1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package cloudwatch 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 "github.com/aws/aws-sdk-go/private/protocol/query" 14) 15 16const opDeleteAlarms = "DeleteAlarms" 17 18// DeleteAlarmsRequest generates a "aws/request.Request" representing the 19// client's request for the DeleteAlarms operation. The "output" return 20// value will be populated with the request's response once the request completes 21// successfully. 22// 23// Use "Send" method on the returned Request to send the API call to the service. 24// the "output" return value is not valid until after Send returns without error. 25// 26// See DeleteAlarms for more information on using the DeleteAlarms 27// API call, and error handling. 28// 29// This method is useful when you want to inject custom logic or configuration 30// into the SDK's request lifecycle. Such as custom headers, or retry logic. 31// 32// 33// // Example sending a request using the DeleteAlarmsRequest method. 34// req, resp := client.DeleteAlarmsRequest(params) 35// 36// err := req.Send() 37// if err == nil { // resp is now filled 38// fmt.Println(resp) 39// } 40// 41// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAlarms 42func (c *CloudWatch) DeleteAlarmsRequest(input *DeleteAlarmsInput) (req *request.Request, output *DeleteAlarmsOutput) { 43 op := &request.Operation{ 44 Name: opDeleteAlarms, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &DeleteAlarmsInput{} 51 } 52 53 output = &DeleteAlarmsOutput{} 54 req = c.newRequest(op, input, output) 55 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 56 return 57} 58 59// DeleteAlarms API operation for Amazon CloudWatch. 60// 61// Deletes the specified alarms. You can delete up to 100 alarms in one operation. 62// However, this total can include no more than one composite alarm. For example, 63// you could delete 99 metric alarms and one composite alarms with one operation, 64// but you can't delete two composite alarms with one operation. 65// 66// In the event of an error, no alarms are deleted. 67// 68// It is possible to create a loop or cycle of composite alarms, where composite 69// alarm A depends on composite alarm B, and composite alarm B also depends 70// on composite alarm A. In this scenario, you can't delete any composite alarm 71// that is part of the cycle because there is always still a composite alarm 72// that depends on that alarm that you want to delete. 73// 74// To get out of such a situation, you must break the cycle by changing the 75// rule of one of the composite alarms in the cycle to remove a dependency that 76// creates the cycle. The simplest change to make to break a cycle is to change 77// the AlarmRule of one of the alarms to False. 78// 79// Additionally, the evaluation of composite alarms stops if CloudWatch detects 80// a cycle in the evaluation path. 81// 82// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 83// with awserr.Error's Code and Message methods to get detailed information about 84// the error. 85// 86// See the AWS API reference guide for Amazon CloudWatch's 87// API operation DeleteAlarms for usage and error information. 88// 89// Returned Error Codes: 90// * ErrCodeResourceNotFound "ResourceNotFound" 91// The named resource does not exist. 92// 93// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAlarms 94func (c *CloudWatch) DeleteAlarms(input *DeleteAlarmsInput) (*DeleteAlarmsOutput, error) { 95 req, out := c.DeleteAlarmsRequest(input) 96 return out, req.Send() 97} 98 99// DeleteAlarmsWithContext is the same as DeleteAlarms with the addition of 100// the ability to pass a context and additional request options. 101// 102// See DeleteAlarms for details on how to use this API operation. 103// 104// The context must be non-nil and will be used for request cancellation. If 105// the context is nil a panic will occur. In the future the SDK may create 106// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 107// for more information on using Contexts. 108func (c *CloudWatch) DeleteAlarmsWithContext(ctx aws.Context, input *DeleteAlarmsInput, opts ...request.Option) (*DeleteAlarmsOutput, error) { 109 req, out := c.DeleteAlarmsRequest(input) 110 req.SetContext(ctx) 111 req.ApplyOptions(opts...) 112 return out, req.Send() 113} 114 115const opDeleteAnomalyDetector = "DeleteAnomalyDetector" 116 117// DeleteAnomalyDetectorRequest generates a "aws/request.Request" representing the 118// client's request for the DeleteAnomalyDetector operation. The "output" return 119// value will be populated with the request's response once the request completes 120// successfully. 121// 122// Use "Send" method on the returned Request to send the API call to the service. 123// the "output" return value is not valid until after Send returns without error. 124// 125// See DeleteAnomalyDetector for more information on using the DeleteAnomalyDetector 126// API call, and error handling. 127// 128// This method is useful when you want to inject custom logic or configuration 129// into the SDK's request lifecycle. Such as custom headers, or retry logic. 130// 131// 132// // Example sending a request using the DeleteAnomalyDetectorRequest method. 133// req, resp := client.DeleteAnomalyDetectorRequest(params) 134// 135// err := req.Send() 136// if err == nil { // resp is now filled 137// fmt.Println(resp) 138// } 139// 140// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAnomalyDetector 141func (c *CloudWatch) DeleteAnomalyDetectorRequest(input *DeleteAnomalyDetectorInput) (req *request.Request, output *DeleteAnomalyDetectorOutput) { 142 op := &request.Operation{ 143 Name: opDeleteAnomalyDetector, 144 HTTPMethod: "POST", 145 HTTPPath: "/", 146 } 147 148 if input == nil { 149 input = &DeleteAnomalyDetectorInput{} 150 } 151 152 output = &DeleteAnomalyDetectorOutput{} 153 req = c.newRequest(op, input, output) 154 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 155 return 156} 157 158// DeleteAnomalyDetector API operation for Amazon CloudWatch. 159// 160// Deletes the specified anomaly detection model from your account. 161// 162// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 163// with awserr.Error's Code and Message methods to get detailed information about 164// the error. 165// 166// See the AWS API reference guide for Amazon CloudWatch's 167// API operation DeleteAnomalyDetector for usage and error information. 168// 169// Returned Error Codes: 170// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 171// The named resource does not exist. 172// 173// * ErrCodeInternalServiceFault "InternalServiceError" 174// Request processing has failed due to some unknown error, exception, or failure. 175// 176// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 177// The value of an input parameter is bad or out-of-range. 178// 179// * ErrCodeMissingRequiredParameterException "MissingParameter" 180// An input parameter that is required is missing. 181// 182// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAnomalyDetector 183func (c *CloudWatch) DeleteAnomalyDetector(input *DeleteAnomalyDetectorInput) (*DeleteAnomalyDetectorOutput, error) { 184 req, out := c.DeleteAnomalyDetectorRequest(input) 185 return out, req.Send() 186} 187 188// DeleteAnomalyDetectorWithContext is the same as DeleteAnomalyDetector with the addition of 189// the ability to pass a context and additional request options. 190// 191// See DeleteAnomalyDetector for details on how to use this API operation. 192// 193// The context must be non-nil and will be used for request cancellation. If 194// the context is nil a panic will occur. In the future the SDK may create 195// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 196// for more information on using Contexts. 197func (c *CloudWatch) DeleteAnomalyDetectorWithContext(ctx aws.Context, input *DeleteAnomalyDetectorInput, opts ...request.Option) (*DeleteAnomalyDetectorOutput, error) { 198 req, out := c.DeleteAnomalyDetectorRequest(input) 199 req.SetContext(ctx) 200 req.ApplyOptions(opts...) 201 return out, req.Send() 202} 203 204const opDeleteDashboards = "DeleteDashboards" 205 206// DeleteDashboardsRequest generates a "aws/request.Request" representing the 207// client's request for the DeleteDashboards operation. The "output" return 208// value will be populated with the request's response once the request completes 209// successfully. 210// 211// Use "Send" method on the returned Request to send the API call to the service. 212// the "output" return value is not valid until after Send returns without error. 213// 214// See DeleteDashboards for more information on using the DeleteDashboards 215// API call, and error handling. 216// 217// This method is useful when you want to inject custom logic or configuration 218// into the SDK's request lifecycle. Such as custom headers, or retry logic. 219// 220// 221// // Example sending a request using the DeleteDashboardsRequest method. 222// req, resp := client.DeleteDashboardsRequest(params) 223// 224// err := req.Send() 225// if err == nil { // resp is now filled 226// fmt.Println(resp) 227// } 228// 229// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteDashboards 230func (c *CloudWatch) DeleteDashboardsRequest(input *DeleteDashboardsInput) (req *request.Request, output *DeleteDashboardsOutput) { 231 op := &request.Operation{ 232 Name: opDeleteDashboards, 233 HTTPMethod: "POST", 234 HTTPPath: "/", 235 } 236 237 if input == nil { 238 input = &DeleteDashboardsInput{} 239 } 240 241 output = &DeleteDashboardsOutput{} 242 req = c.newRequest(op, input, output) 243 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 244 return 245} 246 247// DeleteDashboards API operation for Amazon CloudWatch. 248// 249// Deletes all dashboards that you specify. You can specify up to 100 dashboards 250// to delete. If there is an error during this call, no dashboards are deleted. 251// 252// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 253// with awserr.Error's Code and Message methods to get detailed information about 254// the error. 255// 256// See the AWS API reference guide for Amazon CloudWatch's 257// API operation DeleteDashboards for usage and error information. 258// 259// Returned Error Codes: 260// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 261// The value of an input parameter is bad or out-of-range. 262// 263// * ErrCodeDashboardNotFoundError "ResourceNotFound" 264// The specified dashboard does not exist. 265// 266// * ErrCodeInternalServiceFault "InternalServiceError" 267// Request processing has failed due to some unknown error, exception, or failure. 268// 269// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteDashboards 270func (c *CloudWatch) DeleteDashboards(input *DeleteDashboardsInput) (*DeleteDashboardsOutput, error) { 271 req, out := c.DeleteDashboardsRequest(input) 272 return out, req.Send() 273} 274 275// DeleteDashboardsWithContext is the same as DeleteDashboards with the addition of 276// the ability to pass a context and additional request options. 277// 278// See DeleteDashboards for details on how to use this API operation. 279// 280// The context must be non-nil and will be used for request cancellation. If 281// the context is nil a panic will occur. In the future the SDK may create 282// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 283// for more information on using Contexts. 284func (c *CloudWatch) DeleteDashboardsWithContext(ctx aws.Context, input *DeleteDashboardsInput, opts ...request.Option) (*DeleteDashboardsOutput, error) { 285 req, out := c.DeleteDashboardsRequest(input) 286 req.SetContext(ctx) 287 req.ApplyOptions(opts...) 288 return out, req.Send() 289} 290 291const opDeleteInsightRules = "DeleteInsightRules" 292 293// DeleteInsightRulesRequest generates a "aws/request.Request" representing the 294// client's request for the DeleteInsightRules operation. The "output" return 295// value will be populated with the request's response once the request completes 296// successfully. 297// 298// Use "Send" method on the returned Request to send the API call to the service. 299// the "output" return value is not valid until after Send returns without error. 300// 301// See DeleteInsightRules for more information on using the DeleteInsightRules 302// API call, and error handling. 303// 304// This method is useful when you want to inject custom logic or configuration 305// into the SDK's request lifecycle. Such as custom headers, or retry logic. 306// 307// 308// // Example sending a request using the DeleteInsightRulesRequest method. 309// req, resp := client.DeleteInsightRulesRequest(params) 310// 311// err := req.Send() 312// if err == nil { // resp is now filled 313// fmt.Println(resp) 314// } 315// 316// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteInsightRules 317func (c *CloudWatch) DeleteInsightRulesRequest(input *DeleteInsightRulesInput) (req *request.Request, output *DeleteInsightRulesOutput) { 318 op := &request.Operation{ 319 Name: opDeleteInsightRules, 320 HTTPMethod: "POST", 321 HTTPPath: "/", 322 } 323 324 if input == nil { 325 input = &DeleteInsightRulesInput{} 326 } 327 328 output = &DeleteInsightRulesOutput{} 329 req = c.newRequest(op, input, output) 330 return 331} 332 333// DeleteInsightRules API operation for Amazon CloudWatch. 334// 335// Permanently deletes the specified Contributor Insights rules. 336// 337// If you create a rule, delete it, and then re-create it with the same name, 338// historical data from the first time the rule was created might not be available. 339// 340// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 341// with awserr.Error's Code and Message methods to get detailed information about 342// the error. 343// 344// See the AWS API reference guide for Amazon CloudWatch's 345// API operation DeleteInsightRules for usage and error information. 346// 347// Returned Error Codes: 348// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 349// The value of an input parameter is bad or out-of-range. 350// 351// * ErrCodeMissingRequiredParameterException "MissingParameter" 352// An input parameter that is required is missing. 353// 354// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteInsightRules 355func (c *CloudWatch) DeleteInsightRules(input *DeleteInsightRulesInput) (*DeleteInsightRulesOutput, error) { 356 req, out := c.DeleteInsightRulesRequest(input) 357 return out, req.Send() 358} 359 360// DeleteInsightRulesWithContext is the same as DeleteInsightRules with the addition of 361// the ability to pass a context and additional request options. 362// 363// See DeleteInsightRules for details on how to use this API operation. 364// 365// The context must be non-nil and will be used for request cancellation. If 366// the context is nil a panic will occur. In the future the SDK may create 367// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 368// for more information on using Contexts. 369func (c *CloudWatch) DeleteInsightRulesWithContext(ctx aws.Context, input *DeleteInsightRulesInput, opts ...request.Option) (*DeleteInsightRulesOutput, error) { 370 req, out := c.DeleteInsightRulesRequest(input) 371 req.SetContext(ctx) 372 req.ApplyOptions(opts...) 373 return out, req.Send() 374} 375 376const opDeleteMetricStream = "DeleteMetricStream" 377 378// DeleteMetricStreamRequest generates a "aws/request.Request" representing the 379// client's request for the DeleteMetricStream operation. The "output" return 380// value will be populated with the request's response once the request completes 381// successfully. 382// 383// Use "Send" method on the returned Request to send the API call to the service. 384// the "output" return value is not valid until after Send returns without error. 385// 386// See DeleteMetricStream for more information on using the DeleteMetricStream 387// API call, and error handling. 388// 389// This method is useful when you want to inject custom logic or configuration 390// into the SDK's request lifecycle. Such as custom headers, or retry logic. 391// 392// 393// // Example sending a request using the DeleteMetricStreamRequest method. 394// req, resp := client.DeleteMetricStreamRequest(params) 395// 396// err := req.Send() 397// if err == nil { // resp is now filled 398// fmt.Println(resp) 399// } 400// 401// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteMetricStream 402func (c *CloudWatch) DeleteMetricStreamRequest(input *DeleteMetricStreamInput) (req *request.Request, output *DeleteMetricStreamOutput) { 403 op := &request.Operation{ 404 Name: opDeleteMetricStream, 405 HTTPMethod: "POST", 406 HTTPPath: "/", 407 } 408 409 if input == nil { 410 input = &DeleteMetricStreamInput{} 411 } 412 413 output = &DeleteMetricStreamOutput{} 414 req = c.newRequest(op, input, output) 415 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 416 return 417} 418 419// DeleteMetricStream API operation for Amazon CloudWatch. 420// 421// Permanently deletes the metric stream that you specify. 422// 423// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 424// with awserr.Error's Code and Message methods to get detailed information about 425// the error. 426// 427// See the AWS API reference guide for Amazon CloudWatch's 428// API operation DeleteMetricStream for usage and error information. 429// 430// Returned Error Codes: 431// * ErrCodeInternalServiceFault "InternalServiceError" 432// Request processing has failed due to some unknown error, exception, or failure. 433// 434// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 435// The value of an input parameter is bad or out-of-range. 436// 437// * ErrCodeMissingRequiredParameterException "MissingParameter" 438// An input parameter that is required is missing. 439// 440// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteMetricStream 441func (c *CloudWatch) DeleteMetricStream(input *DeleteMetricStreamInput) (*DeleteMetricStreamOutput, error) { 442 req, out := c.DeleteMetricStreamRequest(input) 443 return out, req.Send() 444} 445 446// DeleteMetricStreamWithContext is the same as DeleteMetricStream with the addition of 447// the ability to pass a context and additional request options. 448// 449// See DeleteMetricStream for details on how to use this API operation. 450// 451// The context must be non-nil and will be used for request cancellation. If 452// the context is nil a panic will occur. In the future the SDK may create 453// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 454// for more information on using Contexts. 455func (c *CloudWatch) DeleteMetricStreamWithContext(ctx aws.Context, input *DeleteMetricStreamInput, opts ...request.Option) (*DeleteMetricStreamOutput, error) { 456 req, out := c.DeleteMetricStreamRequest(input) 457 req.SetContext(ctx) 458 req.ApplyOptions(opts...) 459 return out, req.Send() 460} 461 462const opDescribeAlarmHistory = "DescribeAlarmHistory" 463 464// DescribeAlarmHistoryRequest generates a "aws/request.Request" representing the 465// client's request for the DescribeAlarmHistory operation. The "output" return 466// value will be populated with the request's response once the request completes 467// successfully. 468// 469// Use "Send" method on the returned Request to send the API call to the service. 470// the "output" return value is not valid until after Send returns without error. 471// 472// See DescribeAlarmHistory for more information on using the DescribeAlarmHistory 473// API call, and error handling. 474// 475// This method is useful when you want to inject custom logic or configuration 476// into the SDK's request lifecycle. Such as custom headers, or retry logic. 477// 478// 479// // Example sending a request using the DescribeAlarmHistoryRequest method. 480// req, resp := client.DescribeAlarmHistoryRequest(params) 481// 482// err := req.Send() 483// if err == nil { // resp is now filled 484// fmt.Println(resp) 485// } 486// 487// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmHistory 488func (c *CloudWatch) DescribeAlarmHistoryRequest(input *DescribeAlarmHistoryInput) (req *request.Request, output *DescribeAlarmHistoryOutput) { 489 op := &request.Operation{ 490 Name: opDescribeAlarmHistory, 491 HTTPMethod: "POST", 492 HTTPPath: "/", 493 Paginator: &request.Paginator{ 494 InputTokens: []string{"NextToken"}, 495 OutputTokens: []string{"NextToken"}, 496 LimitToken: "MaxRecords", 497 TruncationToken: "", 498 }, 499 } 500 501 if input == nil { 502 input = &DescribeAlarmHistoryInput{} 503 } 504 505 output = &DescribeAlarmHistoryOutput{} 506 req = c.newRequest(op, input, output) 507 return 508} 509 510// DescribeAlarmHistory API operation for Amazon CloudWatch. 511// 512// Retrieves the history for the specified alarm. You can filter the results 513// by date range or item type. If an alarm name is not specified, the histories 514// for either all metric alarms or all composite alarms are returned. 515// 516// CloudWatch retains the history of an alarm even if you delete the alarm. 517// 518// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 519// with awserr.Error's Code and Message methods to get detailed information about 520// the error. 521// 522// See the AWS API reference guide for Amazon CloudWatch's 523// API operation DescribeAlarmHistory for usage and error information. 524// 525// Returned Error Codes: 526// * ErrCodeInvalidNextToken "InvalidNextToken" 527// The next token specified is invalid. 528// 529// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmHistory 530func (c *CloudWatch) DescribeAlarmHistory(input *DescribeAlarmHistoryInput) (*DescribeAlarmHistoryOutput, error) { 531 req, out := c.DescribeAlarmHistoryRequest(input) 532 return out, req.Send() 533} 534 535// DescribeAlarmHistoryWithContext is the same as DescribeAlarmHistory with the addition of 536// the ability to pass a context and additional request options. 537// 538// See DescribeAlarmHistory for details on how to use this API operation. 539// 540// The context must be non-nil and will be used for request cancellation. If 541// the context is nil a panic will occur. In the future the SDK may create 542// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 543// for more information on using Contexts. 544func (c *CloudWatch) DescribeAlarmHistoryWithContext(ctx aws.Context, input *DescribeAlarmHistoryInput, opts ...request.Option) (*DescribeAlarmHistoryOutput, error) { 545 req, out := c.DescribeAlarmHistoryRequest(input) 546 req.SetContext(ctx) 547 req.ApplyOptions(opts...) 548 return out, req.Send() 549} 550 551// DescribeAlarmHistoryPages iterates over the pages of a DescribeAlarmHistory operation, 552// calling the "fn" function with the response data for each page. To stop 553// iterating, return false from the fn function. 554// 555// See DescribeAlarmHistory method for more information on how to use this operation. 556// 557// Note: This operation can generate multiple requests to a service. 558// 559// // Example iterating over at most 3 pages of a DescribeAlarmHistory operation. 560// pageNum := 0 561// err := client.DescribeAlarmHistoryPages(params, 562// func(page *cloudwatch.DescribeAlarmHistoryOutput, lastPage bool) bool { 563// pageNum++ 564// fmt.Println(page) 565// return pageNum <= 3 566// }) 567// 568func (c *CloudWatch) DescribeAlarmHistoryPages(input *DescribeAlarmHistoryInput, fn func(*DescribeAlarmHistoryOutput, bool) bool) error { 569 return c.DescribeAlarmHistoryPagesWithContext(aws.BackgroundContext(), input, fn) 570} 571 572// DescribeAlarmHistoryPagesWithContext same as DescribeAlarmHistoryPages except 573// it takes a Context and allows setting request options on the pages. 574// 575// The context must be non-nil and will be used for request cancellation. If 576// the context is nil a panic will occur. In the future the SDK may create 577// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 578// for more information on using Contexts. 579func (c *CloudWatch) DescribeAlarmHistoryPagesWithContext(ctx aws.Context, input *DescribeAlarmHistoryInput, fn func(*DescribeAlarmHistoryOutput, bool) bool, opts ...request.Option) error { 580 p := request.Pagination{ 581 NewRequest: func() (*request.Request, error) { 582 var inCpy *DescribeAlarmHistoryInput 583 if input != nil { 584 tmp := *input 585 inCpy = &tmp 586 } 587 req, _ := c.DescribeAlarmHistoryRequest(inCpy) 588 req.SetContext(ctx) 589 req.ApplyOptions(opts...) 590 return req, nil 591 }, 592 } 593 594 for p.Next() { 595 if !fn(p.Page().(*DescribeAlarmHistoryOutput), !p.HasNextPage()) { 596 break 597 } 598 } 599 600 return p.Err() 601} 602 603const opDescribeAlarms = "DescribeAlarms" 604 605// DescribeAlarmsRequest generates a "aws/request.Request" representing the 606// client's request for the DescribeAlarms operation. The "output" return 607// value will be populated with the request's response once the request completes 608// successfully. 609// 610// Use "Send" method on the returned Request to send the API call to the service. 611// the "output" return value is not valid until after Send returns without error. 612// 613// See DescribeAlarms for more information on using the DescribeAlarms 614// API call, and error handling. 615// 616// This method is useful when you want to inject custom logic or configuration 617// into the SDK's request lifecycle. Such as custom headers, or retry logic. 618// 619// 620// // Example sending a request using the DescribeAlarmsRequest method. 621// req, resp := client.DescribeAlarmsRequest(params) 622// 623// err := req.Send() 624// if err == nil { // resp is now filled 625// fmt.Println(resp) 626// } 627// 628// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarms 629func (c *CloudWatch) DescribeAlarmsRequest(input *DescribeAlarmsInput) (req *request.Request, output *DescribeAlarmsOutput) { 630 op := &request.Operation{ 631 Name: opDescribeAlarms, 632 HTTPMethod: "POST", 633 HTTPPath: "/", 634 Paginator: &request.Paginator{ 635 InputTokens: []string{"NextToken"}, 636 OutputTokens: []string{"NextToken"}, 637 LimitToken: "MaxRecords", 638 TruncationToken: "", 639 }, 640 } 641 642 if input == nil { 643 input = &DescribeAlarmsInput{} 644 } 645 646 output = &DescribeAlarmsOutput{} 647 req = c.newRequest(op, input, output) 648 return 649} 650 651// DescribeAlarms API operation for Amazon CloudWatch. 652// 653// Retrieves the specified alarms. You can filter the results by specifying 654// a prefix for the alarm name, the alarm state, or a prefix for any action. 655// 656// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 657// with awserr.Error's Code and Message methods to get detailed information about 658// the error. 659// 660// See the AWS API reference guide for Amazon CloudWatch's 661// API operation DescribeAlarms for usage and error information. 662// 663// Returned Error Codes: 664// * ErrCodeInvalidNextToken "InvalidNextToken" 665// The next token specified is invalid. 666// 667// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarms 668func (c *CloudWatch) DescribeAlarms(input *DescribeAlarmsInput) (*DescribeAlarmsOutput, error) { 669 req, out := c.DescribeAlarmsRequest(input) 670 return out, req.Send() 671} 672 673// DescribeAlarmsWithContext is the same as DescribeAlarms with the addition of 674// the ability to pass a context and additional request options. 675// 676// See DescribeAlarms for details on how to use this API operation. 677// 678// The context must be non-nil and will be used for request cancellation. If 679// the context is nil a panic will occur. In the future the SDK may create 680// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 681// for more information on using Contexts. 682func (c *CloudWatch) DescribeAlarmsWithContext(ctx aws.Context, input *DescribeAlarmsInput, opts ...request.Option) (*DescribeAlarmsOutput, error) { 683 req, out := c.DescribeAlarmsRequest(input) 684 req.SetContext(ctx) 685 req.ApplyOptions(opts...) 686 return out, req.Send() 687} 688 689// DescribeAlarmsPages iterates over the pages of a DescribeAlarms operation, 690// calling the "fn" function with the response data for each page. To stop 691// iterating, return false from the fn function. 692// 693// See DescribeAlarms method for more information on how to use this operation. 694// 695// Note: This operation can generate multiple requests to a service. 696// 697// // Example iterating over at most 3 pages of a DescribeAlarms operation. 698// pageNum := 0 699// err := client.DescribeAlarmsPages(params, 700// func(page *cloudwatch.DescribeAlarmsOutput, lastPage bool) bool { 701// pageNum++ 702// fmt.Println(page) 703// return pageNum <= 3 704// }) 705// 706func (c *CloudWatch) DescribeAlarmsPages(input *DescribeAlarmsInput, fn func(*DescribeAlarmsOutput, bool) bool) error { 707 return c.DescribeAlarmsPagesWithContext(aws.BackgroundContext(), input, fn) 708} 709 710// DescribeAlarmsPagesWithContext same as DescribeAlarmsPages except 711// it takes a Context and allows setting request options on the pages. 712// 713// The context must be non-nil and will be used for request cancellation. If 714// the context is nil a panic will occur. In the future the SDK may create 715// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 716// for more information on using Contexts. 717func (c *CloudWatch) DescribeAlarmsPagesWithContext(ctx aws.Context, input *DescribeAlarmsInput, fn func(*DescribeAlarmsOutput, bool) bool, opts ...request.Option) error { 718 p := request.Pagination{ 719 NewRequest: func() (*request.Request, error) { 720 var inCpy *DescribeAlarmsInput 721 if input != nil { 722 tmp := *input 723 inCpy = &tmp 724 } 725 req, _ := c.DescribeAlarmsRequest(inCpy) 726 req.SetContext(ctx) 727 req.ApplyOptions(opts...) 728 return req, nil 729 }, 730 } 731 732 for p.Next() { 733 if !fn(p.Page().(*DescribeAlarmsOutput), !p.HasNextPage()) { 734 break 735 } 736 } 737 738 return p.Err() 739} 740 741const opDescribeAlarmsForMetric = "DescribeAlarmsForMetric" 742 743// DescribeAlarmsForMetricRequest generates a "aws/request.Request" representing the 744// client's request for the DescribeAlarmsForMetric operation. The "output" return 745// value will be populated with the request's response once the request completes 746// successfully. 747// 748// Use "Send" method on the returned Request to send the API call to the service. 749// the "output" return value is not valid until after Send returns without error. 750// 751// See DescribeAlarmsForMetric for more information on using the DescribeAlarmsForMetric 752// API call, and error handling. 753// 754// This method is useful when you want to inject custom logic or configuration 755// into the SDK's request lifecycle. Such as custom headers, or retry logic. 756// 757// 758// // Example sending a request using the DescribeAlarmsForMetricRequest method. 759// req, resp := client.DescribeAlarmsForMetricRequest(params) 760// 761// err := req.Send() 762// if err == nil { // resp is now filled 763// fmt.Println(resp) 764// } 765// 766// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsForMetric 767func (c *CloudWatch) DescribeAlarmsForMetricRequest(input *DescribeAlarmsForMetricInput) (req *request.Request, output *DescribeAlarmsForMetricOutput) { 768 op := &request.Operation{ 769 Name: opDescribeAlarmsForMetric, 770 HTTPMethod: "POST", 771 HTTPPath: "/", 772 } 773 774 if input == nil { 775 input = &DescribeAlarmsForMetricInput{} 776 } 777 778 output = &DescribeAlarmsForMetricOutput{} 779 req = c.newRequest(op, input, output) 780 return 781} 782 783// DescribeAlarmsForMetric API operation for Amazon CloudWatch. 784// 785// Retrieves the alarms for the specified metric. To filter the results, specify 786// a statistic, period, or unit. 787// 788// This operation retrieves only standard alarms that are based on the specified 789// metric. It does not return alarms based on math expressions that use the 790// specified metric, or composite alarms that use the specified metric. 791// 792// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 793// with awserr.Error's Code and Message methods to get detailed information about 794// the error. 795// 796// See the AWS API reference guide for Amazon CloudWatch's 797// API operation DescribeAlarmsForMetric for usage and error information. 798// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsForMetric 799func (c *CloudWatch) DescribeAlarmsForMetric(input *DescribeAlarmsForMetricInput) (*DescribeAlarmsForMetricOutput, error) { 800 req, out := c.DescribeAlarmsForMetricRequest(input) 801 return out, req.Send() 802} 803 804// DescribeAlarmsForMetricWithContext is the same as DescribeAlarmsForMetric with the addition of 805// the ability to pass a context and additional request options. 806// 807// See DescribeAlarmsForMetric for details on how to use this API operation. 808// 809// The context must be non-nil and will be used for request cancellation. If 810// the context is nil a panic will occur. In the future the SDK may create 811// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 812// for more information on using Contexts. 813func (c *CloudWatch) DescribeAlarmsForMetricWithContext(ctx aws.Context, input *DescribeAlarmsForMetricInput, opts ...request.Option) (*DescribeAlarmsForMetricOutput, error) { 814 req, out := c.DescribeAlarmsForMetricRequest(input) 815 req.SetContext(ctx) 816 req.ApplyOptions(opts...) 817 return out, req.Send() 818} 819 820const opDescribeAnomalyDetectors = "DescribeAnomalyDetectors" 821 822// DescribeAnomalyDetectorsRequest generates a "aws/request.Request" representing the 823// client's request for the DescribeAnomalyDetectors operation. The "output" return 824// value will be populated with the request's response once the request completes 825// successfully. 826// 827// Use "Send" method on the returned Request to send the API call to the service. 828// the "output" return value is not valid until after Send returns without error. 829// 830// See DescribeAnomalyDetectors for more information on using the DescribeAnomalyDetectors 831// API call, and error handling. 832// 833// This method is useful when you want to inject custom logic or configuration 834// into the SDK's request lifecycle. Such as custom headers, or retry logic. 835// 836// 837// // Example sending a request using the DescribeAnomalyDetectorsRequest method. 838// req, resp := client.DescribeAnomalyDetectorsRequest(params) 839// 840// err := req.Send() 841// if err == nil { // resp is now filled 842// fmt.Println(resp) 843// } 844// 845// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAnomalyDetectors 846func (c *CloudWatch) DescribeAnomalyDetectorsRequest(input *DescribeAnomalyDetectorsInput) (req *request.Request, output *DescribeAnomalyDetectorsOutput) { 847 op := &request.Operation{ 848 Name: opDescribeAnomalyDetectors, 849 HTTPMethod: "POST", 850 HTTPPath: "/", 851 } 852 853 if input == nil { 854 input = &DescribeAnomalyDetectorsInput{} 855 } 856 857 output = &DescribeAnomalyDetectorsOutput{} 858 req = c.newRequest(op, input, output) 859 return 860} 861 862// DescribeAnomalyDetectors API operation for Amazon CloudWatch. 863// 864// Lists the anomaly detection models that you have created in your account. 865// You can list all models in your account or filter the results to only the 866// models that are related to a certain namespace, metric name, or metric dimension. 867// 868// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 869// with awserr.Error's Code and Message methods to get detailed information about 870// the error. 871// 872// See the AWS API reference guide for Amazon CloudWatch's 873// API operation DescribeAnomalyDetectors for usage and error information. 874// 875// Returned Error Codes: 876// * ErrCodeInvalidNextToken "InvalidNextToken" 877// The next token specified is invalid. 878// 879// * ErrCodeInternalServiceFault "InternalServiceError" 880// Request processing has failed due to some unknown error, exception, or failure. 881// 882// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 883// The value of an input parameter is bad or out-of-range. 884// 885// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAnomalyDetectors 886func (c *CloudWatch) DescribeAnomalyDetectors(input *DescribeAnomalyDetectorsInput) (*DescribeAnomalyDetectorsOutput, error) { 887 req, out := c.DescribeAnomalyDetectorsRequest(input) 888 return out, req.Send() 889} 890 891// DescribeAnomalyDetectorsWithContext is the same as DescribeAnomalyDetectors with the addition of 892// the ability to pass a context and additional request options. 893// 894// See DescribeAnomalyDetectors for details on how to use this API operation. 895// 896// The context must be non-nil and will be used for request cancellation. If 897// the context is nil a panic will occur. In the future the SDK may create 898// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 899// for more information on using Contexts. 900func (c *CloudWatch) DescribeAnomalyDetectorsWithContext(ctx aws.Context, input *DescribeAnomalyDetectorsInput, opts ...request.Option) (*DescribeAnomalyDetectorsOutput, error) { 901 req, out := c.DescribeAnomalyDetectorsRequest(input) 902 req.SetContext(ctx) 903 req.ApplyOptions(opts...) 904 return out, req.Send() 905} 906 907const opDescribeInsightRules = "DescribeInsightRules" 908 909// DescribeInsightRulesRequest generates a "aws/request.Request" representing the 910// client's request for the DescribeInsightRules operation. The "output" return 911// value will be populated with the request's response once the request completes 912// successfully. 913// 914// Use "Send" method on the returned Request to send the API call to the service. 915// the "output" return value is not valid until after Send returns without error. 916// 917// See DescribeInsightRules for more information on using the DescribeInsightRules 918// API call, and error handling. 919// 920// This method is useful when you want to inject custom logic or configuration 921// into the SDK's request lifecycle. Such as custom headers, or retry logic. 922// 923// 924// // Example sending a request using the DescribeInsightRulesRequest method. 925// req, resp := client.DescribeInsightRulesRequest(params) 926// 927// err := req.Send() 928// if err == nil { // resp is now filled 929// fmt.Println(resp) 930// } 931// 932// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeInsightRules 933func (c *CloudWatch) DescribeInsightRulesRequest(input *DescribeInsightRulesInput) (req *request.Request, output *DescribeInsightRulesOutput) { 934 op := &request.Operation{ 935 Name: opDescribeInsightRules, 936 HTTPMethod: "POST", 937 HTTPPath: "/", 938 Paginator: &request.Paginator{ 939 InputTokens: []string{"NextToken"}, 940 OutputTokens: []string{"NextToken"}, 941 LimitToken: "MaxResults", 942 TruncationToken: "", 943 }, 944 } 945 946 if input == nil { 947 input = &DescribeInsightRulesInput{} 948 } 949 950 output = &DescribeInsightRulesOutput{} 951 req = c.newRequest(op, input, output) 952 return 953} 954 955// DescribeInsightRules API operation for Amazon CloudWatch. 956// 957// Returns a list of all the Contributor Insights rules in your account. 958// 959// For more information about Contributor Insights, see Using Contributor Insights 960// to Analyze High-Cardinality Data (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights.html). 961// 962// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 963// with awserr.Error's Code and Message methods to get detailed information about 964// the error. 965// 966// See the AWS API reference guide for Amazon CloudWatch's 967// API operation DescribeInsightRules for usage and error information. 968// 969// Returned Error Codes: 970// * ErrCodeInvalidNextToken "InvalidNextToken" 971// The next token specified is invalid. 972// 973// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeInsightRules 974func (c *CloudWatch) DescribeInsightRules(input *DescribeInsightRulesInput) (*DescribeInsightRulesOutput, error) { 975 req, out := c.DescribeInsightRulesRequest(input) 976 return out, req.Send() 977} 978 979// DescribeInsightRulesWithContext is the same as DescribeInsightRules with the addition of 980// the ability to pass a context and additional request options. 981// 982// See DescribeInsightRules for details on how to use this API operation. 983// 984// The context must be non-nil and will be used for request cancellation. If 985// the context is nil a panic will occur. In the future the SDK may create 986// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 987// for more information on using Contexts. 988func (c *CloudWatch) DescribeInsightRulesWithContext(ctx aws.Context, input *DescribeInsightRulesInput, opts ...request.Option) (*DescribeInsightRulesOutput, error) { 989 req, out := c.DescribeInsightRulesRequest(input) 990 req.SetContext(ctx) 991 req.ApplyOptions(opts...) 992 return out, req.Send() 993} 994 995// DescribeInsightRulesPages iterates over the pages of a DescribeInsightRules operation, 996// calling the "fn" function with the response data for each page. To stop 997// iterating, return false from the fn function. 998// 999// See DescribeInsightRules method for more information on how to use this operation. 1000// 1001// Note: This operation can generate multiple requests to a service. 1002// 1003// // Example iterating over at most 3 pages of a DescribeInsightRules operation. 1004// pageNum := 0 1005// err := client.DescribeInsightRulesPages(params, 1006// func(page *cloudwatch.DescribeInsightRulesOutput, lastPage bool) bool { 1007// pageNum++ 1008// fmt.Println(page) 1009// return pageNum <= 3 1010// }) 1011// 1012func (c *CloudWatch) DescribeInsightRulesPages(input *DescribeInsightRulesInput, fn func(*DescribeInsightRulesOutput, bool) bool) error { 1013 return c.DescribeInsightRulesPagesWithContext(aws.BackgroundContext(), input, fn) 1014} 1015 1016// DescribeInsightRulesPagesWithContext same as DescribeInsightRulesPages except 1017// it takes a Context and allows setting request options on the pages. 1018// 1019// The context must be non-nil and will be used for request cancellation. If 1020// the context is nil a panic will occur. In the future the SDK may create 1021// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1022// for more information on using Contexts. 1023func (c *CloudWatch) DescribeInsightRulesPagesWithContext(ctx aws.Context, input *DescribeInsightRulesInput, fn func(*DescribeInsightRulesOutput, bool) bool, opts ...request.Option) error { 1024 p := request.Pagination{ 1025 NewRequest: func() (*request.Request, error) { 1026 var inCpy *DescribeInsightRulesInput 1027 if input != nil { 1028 tmp := *input 1029 inCpy = &tmp 1030 } 1031 req, _ := c.DescribeInsightRulesRequest(inCpy) 1032 req.SetContext(ctx) 1033 req.ApplyOptions(opts...) 1034 return req, nil 1035 }, 1036 } 1037 1038 for p.Next() { 1039 if !fn(p.Page().(*DescribeInsightRulesOutput), !p.HasNextPage()) { 1040 break 1041 } 1042 } 1043 1044 return p.Err() 1045} 1046 1047const opDisableAlarmActions = "DisableAlarmActions" 1048 1049// DisableAlarmActionsRequest generates a "aws/request.Request" representing the 1050// client's request for the DisableAlarmActions operation. The "output" return 1051// value will be populated with the request's response once the request completes 1052// successfully. 1053// 1054// Use "Send" method on the returned Request to send the API call to the service. 1055// the "output" return value is not valid until after Send returns without error. 1056// 1057// See DisableAlarmActions for more information on using the DisableAlarmActions 1058// API call, and error handling. 1059// 1060// This method is useful when you want to inject custom logic or configuration 1061// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1062// 1063// 1064// // Example sending a request using the DisableAlarmActionsRequest method. 1065// req, resp := client.DisableAlarmActionsRequest(params) 1066// 1067// err := req.Send() 1068// if err == nil { // resp is now filled 1069// fmt.Println(resp) 1070// } 1071// 1072// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DisableAlarmActions 1073func (c *CloudWatch) DisableAlarmActionsRequest(input *DisableAlarmActionsInput) (req *request.Request, output *DisableAlarmActionsOutput) { 1074 op := &request.Operation{ 1075 Name: opDisableAlarmActions, 1076 HTTPMethod: "POST", 1077 HTTPPath: "/", 1078 } 1079 1080 if input == nil { 1081 input = &DisableAlarmActionsInput{} 1082 } 1083 1084 output = &DisableAlarmActionsOutput{} 1085 req = c.newRequest(op, input, output) 1086 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1087 return 1088} 1089 1090// DisableAlarmActions API operation for Amazon CloudWatch. 1091// 1092// Disables the actions for the specified alarms. When an alarm's actions are 1093// disabled, the alarm actions do not execute when the alarm state changes. 1094// 1095// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1096// with awserr.Error's Code and Message methods to get detailed information about 1097// the error. 1098// 1099// See the AWS API reference guide for Amazon CloudWatch's 1100// API operation DisableAlarmActions for usage and error information. 1101// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DisableAlarmActions 1102func (c *CloudWatch) DisableAlarmActions(input *DisableAlarmActionsInput) (*DisableAlarmActionsOutput, error) { 1103 req, out := c.DisableAlarmActionsRequest(input) 1104 return out, req.Send() 1105} 1106 1107// DisableAlarmActionsWithContext is the same as DisableAlarmActions with the addition of 1108// the ability to pass a context and additional request options. 1109// 1110// See DisableAlarmActions for details on how to use this API operation. 1111// 1112// The context must be non-nil and will be used for request cancellation. If 1113// the context is nil a panic will occur. In the future the SDK may create 1114// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1115// for more information on using Contexts. 1116func (c *CloudWatch) DisableAlarmActionsWithContext(ctx aws.Context, input *DisableAlarmActionsInput, opts ...request.Option) (*DisableAlarmActionsOutput, error) { 1117 req, out := c.DisableAlarmActionsRequest(input) 1118 req.SetContext(ctx) 1119 req.ApplyOptions(opts...) 1120 return out, req.Send() 1121} 1122 1123const opDisableInsightRules = "DisableInsightRules" 1124 1125// DisableInsightRulesRequest generates a "aws/request.Request" representing the 1126// client's request for the DisableInsightRules operation. The "output" return 1127// value will be populated with the request's response once the request completes 1128// successfully. 1129// 1130// Use "Send" method on the returned Request to send the API call to the service. 1131// the "output" return value is not valid until after Send returns without error. 1132// 1133// See DisableInsightRules for more information on using the DisableInsightRules 1134// API call, and error handling. 1135// 1136// This method is useful when you want to inject custom logic or configuration 1137// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1138// 1139// 1140// // Example sending a request using the DisableInsightRulesRequest method. 1141// req, resp := client.DisableInsightRulesRequest(params) 1142// 1143// err := req.Send() 1144// if err == nil { // resp is now filled 1145// fmt.Println(resp) 1146// } 1147// 1148// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DisableInsightRules 1149func (c *CloudWatch) DisableInsightRulesRequest(input *DisableInsightRulesInput) (req *request.Request, output *DisableInsightRulesOutput) { 1150 op := &request.Operation{ 1151 Name: opDisableInsightRules, 1152 HTTPMethod: "POST", 1153 HTTPPath: "/", 1154 } 1155 1156 if input == nil { 1157 input = &DisableInsightRulesInput{} 1158 } 1159 1160 output = &DisableInsightRulesOutput{} 1161 req = c.newRequest(op, input, output) 1162 return 1163} 1164 1165// DisableInsightRules API operation for Amazon CloudWatch. 1166// 1167// Disables the specified Contributor Insights rules. When rules are disabled, 1168// they do not analyze log groups and do not incur costs. 1169// 1170// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1171// with awserr.Error's Code and Message methods to get detailed information about 1172// the error. 1173// 1174// See the AWS API reference guide for Amazon CloudWatch's 1175// API operation DisableInsightRules for usage and error information. 1176// 1177// Returned Error Codes: 1178// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 1179// The value of an input parameter is bad or out-of-range. 1180// 1181// * ErrCodeMissingRequiredParameterException "MissingParameter" 1182// An input parameter that is required is missing. 1183// 1184// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DisableInsightRules 1185func (c *CloudWatch) DisableInsightRules(input *DisableInsightRulesInput) (*DisableInsightRulesOutput, error) { 1186 req, out := c.DisableInsightRulesRequest(input) 1187 return out, req.Send() 1188} 1189 1190// DisableInsightRulesWithContext is the same as DisableInsightRules with the addition of 1191// the ability to pass a context and additional request options. 1192// 1193// See DisableInsightRules for details on how to use this API operation. 1194// 1195// The context must be non-nil and will be used for request cancellation. If 1196// the context is nil a panic will occur. In the future the SDK may create 1197// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1198// for more information on using Contexts. 1199func (c *CloudWatch) DisableInsightRulesWithContext(ctx aws.Context, input *DisableInsightRulesInput, opts ...request.Option) (*DisableInsightRulesOutput, error) { 1200 req, out := c.DisableInsightRulesRequest(input) 1201 req.SetContext(ctx) 1202 req.ApplyOptions(opts...) 1203 return out, req.Send() 1204} 1205 1206const opEnableAlarmActions = "EnableAlarmActions" 1207 1208// EnableAlarmActionsRequest generates a "aws/request.Request" representing the 1209// client's request for the EnableAlarmActions operation. The "output" return 1210// value will be populated with the request's response once the request completes 1211// successfully. 1212// 1213// Use "Send" method on the returned Request to send the API call to the service. 1214// the "output" return value is not valid until after Send returns without error. 1215// 1216// See EnableAlarmActions for more information on using the EnableAlarmActions 1217// API call, and error handling. 1218// 1219// This method is useful when you want to inject custom logic or configuration 1220// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1221// 1222// 1223// // Example sending a request using the EnableAlarmActionsRequest method. 1224// req, resp := client.EnableAlarmActionsRequest(params) 1225// 1226// err := req.Send() 1227// if err == nil { // resp is now filled 1228// fmt.Println(resp) 1229// } 1230// 1231// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/EnableAlarmActions 1232func (c *CloudWatch) EnableAlarmActionsRequest(input *EnableAlarmActionsInput) (req *request.Request, output *EnableAlarmActionsOutput) { 1233 op := &request.Operation{ 1234 Name: opEnableAlarmActions, 1235 HTTPMethod: "POST", 1236 HTTPPath: "/", 1237 } 1238 1239 if input == nil { 1240 input = &EnableAlarmActionsInput{} 1241 } 1242 1243 output = &EnableAlarmActionsOutput{} 1244 req = c.newRequest(op, input, output) 1245 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1246 return 1247} 1248 1249// EnableAlarmActions API operation for Amazon CloudWatch. 1250// 1251// Enables the actions for the specified alarms. 1252// 1253// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1254// with awserr.Error's Code and Message methods to get detailed information about 1255// the error. 1256// 1257// See the AWS API reference guide for Amazon CloudWatch's 1258// API operation EnableAlarmActions for usage and error information. 1259// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/EnableAlarmActions 1260func (c *CloudWatch) EnableAlarmActions(input *EnableAlarmActionsInput) (*EnableAlarmActionsOutput, error) { 1261 req, out := c.EnableAlarmActionsRequest(input) 1262 return out, req.Send() 1263} 1264 1265// EnableAlarmActionsWithContext is the same as EnableAlarmActions with the addition of 1266// the ability to pass a context and additional request options. 1267// 1268// See EnableAlarmActions for details on how to use this API operation. 1269// 1270// The context must be non-nil and will be used for request cancellation. If 1271// the context is nil a panic will occur. In the future the SDK may create 1272// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1273// for more information on using Contexts. 1274func (c *CloudWatch) EnableAlarmActionsWithContext(ctx aws.Context, input *EnableAlarmActionsInput, opts ...request.Option) (*EnableAlarmActionsOutput, error) { 1275 req, out := c.EnableAlarmActionsRequest(input) 1276 req.SetContext(ctx) 1277 req.ApplyOptions(opts...) 1278 return out, req.Send() 1279} 1280 1281const opEnableInsightRules = "EnableInsightRules" 1282 1283// EnableInsightRulesRequest generates a "aws/request.Request" representing the 1284// client's request for the EnableInsightRules operation. The "output" return 1285// value will be populated with the request's response once the request completes 1286// successfully. 1287// 1288// Use "Send" method on the returned Request to send the API call to the service. 1289// the "output" return value is not valid until after Send returns without error. 1290// 1291// See EnableInsightRules for more information on using the EnableInsightRules 1292// API call, and error handling. 1293// 1294// This method is useful when you want to inject custom logic or configuration 1295// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1296// 1297// 1298// // Example sending a request using the EnableInsightRulesRequest method. 1299// req, resp := client.EnableInsightRulesRequest(params) 1300// 1301// err := req.Send() 1302// if err == nil { // resp is now filled 1303// fmt.Println(resp) 1304// } 1305// 1306// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/EnableInsightRules 1307func (c *CloudWatch) EnableInsightRulesRequest(input *EnableInsightRulesInput) (req *request.Request, output *EnableInsightRulesOutput) { 1308 op := &request.Operation{ 1309 Name: opEnableInsightRules, 1310 HTTPMethod: "POST", 1311 HTTPPath: "/", 1312 } 1313 1314 if input == nil { 1315 input = &EnableInsightRulesInput{} 1316 } 1317 1318 output = &EnableInsightRulesOutput{} 1319 req = c.newRequest(op, input, output) 1320 return 1321} 1322 1323// EnableInsightRules API operation for Amazon CloudWatch. 1324// 1325// Enables the specified Contributor Insights rules. When rules are enabled, 1326// they immediately begin analyzing log data. 1327// 1328// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1329// with awserr.Error's Code and Message methods to get detailed information about 1330// the error. 1331// 1332// See the AWS API reference guide for Amazon CloudWatch's 1333// API operation EnableInsightRules for usage and error information. 1334// 1335// Returned Error Codes: 1336// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 1337// The value of an input parameter is bad or out-of-range. 1338// 1339// * ErrCodeMissingRequiredParameterException "MissingParameter" 1340// An input parameter that is required is missing. 1341// 1342// * ErrCodeLimitExceededException "LimitExceededException" 1343// The operation exceeded one or more limits. 1344// 1345// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/EnableInsightRules 1346func (c *CloudWatch) EnableInsightRules(input *EnableInsightRulesInput) (*EnableInsightRulesOutput, error) { 1347 req, out := c.EnableInsightRulesRequest(input) 1348 return out, req.Send() 1349} 1350 1351// EnableInsightRulesWithContext is the same as EnableInsightRules with the addition of 1352// the ability to pass a context and additional request options. 1353// 1354// See EnableInsightRules for details on how to use this API operation. 1355// 1356// The context must be non-nil and will be used for request cancellation. If 1357// the context is nil a panic will occur. In the future the SDK may create 1358// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1359// for more information on using Contexts. 1360func (c *CloudWatch) EnableInsightRulesWithContext(ctx aws.Context, input *EnableInsightRulesInput, opts ...request.Option) (*EnableInsightRulesOutput, error) { 1361 req, out := c.EnableInsightRulesRequest(input) 1362 req.SetContext(ctx) 1363 req.ApplyOptions(opts...) 1364 return out, req.Send() 1365} 1366 1367const opGetDashboard = "GetDashboard" 1368 1369// GetDashboardRequest generates a "aws/request.Request" representing the 1370// client's request for the GetDashboard operation. The "output" return 1371// value will be populated with the request's response once the request completes 1372// successfully. 1373// 1374// Use "Send" method on the returned Request to send the API call to the service. 1375// the "output" return value is not valid until after Send returns without error. 1376// 1377// See GetDashboard for more information on using the GetDashboard 1378// API call, and error handling. 1379// 1380// This method is useful when you want to inject custom logic or configuration 1381// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1382// 1383// 1384// // Example sending a request using the GetDashboardRequest method. 1385// req, resp := client.GetDashboardRequest(params) 1386// 1387// err := req.Send() 1388// if err == nil { // resp is now filled 1389// fmt.Println(resp) 1390// } 1391// 1392// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetDashboard 1393func (c *CloudWatch) GetDashboardRequest(input *GetDashboardInput) (req *request.Request, output *GetDashboardOutput) { 1394 op := &request.Operation{ 1395 Name: opGetDashboard, 1396 HTTPMethod: "POST", 1397 HTTPPath: "/", 1398 } 1399 1400 if input == nil { 1401 input = &GetDashboardInput{} 1402 } 1403 1404 output = &GetDashboardOutput{} 1405 req = c.newRequest(op, input, output) 1406 return 1407} 1408 1409// GetDashboard API operation for Amazon CloudWatch. 1410// 1411// Displays the details of the dashboard that you specify. 1412// 1413// To copy an existing dashboard, use GetDashboard, and then use the data returned 1414// within DashboardBody as the template for the new dashboard when you call 1415// PutDashboard to create the copy. 1416// 1417// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1418// with awserr.Error's Code and Message methods to get detailed information about 1419// the error. 1420// 1421// See the AWS API reference guide for Amazon CloudWatch's 1422// API operation GetDashboard for usage and error information. 1423// 1424// Returned Error Codes: 1425// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 1426// The value of an input parameter is bad or out-of-range. 1427// 1428// * ErrCodeDashboardNotFoundError "ResourceNotFound" 1429// The specified dashboard does not exist. 1430// 1431// * ErrCodeInternalServiceFault "InternalServiceError" 1432// Request processing has failed due to some unknown error, exception, or failure. 1433// 1434// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetDashboard 1435func (c *CloudWatch) GetDashboard(input *GetDashboardInput) (*GetDashboardOutput, error) { 1436 req, out := c.GetDashboardRequest(input) 1437 return out, req.Send() 1438} 1439 1440// GetDashboardWithContext is the same as GetDashboard with the addition of 1441// the ability to pass a context and additional request options. 1442// 1443// See GetDashboard for details on how to use this API operation. 1444// 1445// The context must be non-nil and will be used for request cancellation. If 1446// the context is nil a panic will occur. In the future the SDK may create 1447// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1448// for more information on using Contexts. 1449func (c *CloudWatch) GetDashboardWithContext(ctx aws.Context, input *GetDashboardInput, opts ...request.Option) (*GetDashboardOutput, error) { 1450 req, out := c.GetDashboardRequest(input) 1451 req.SetContext(ctx) 1452 req.ApplyOptions(opts...) 1453 return out, req.Send() 1454} 1455 1456const opGetInsightRuleReport = "GetInsightRuleReport" 1457 1458// GetInsightRuleReportRequest generates a "aws/request.Request" representing the 1459// client's request for the GetInsightRuleReport operation. The "output" return 1460// value will be populated with the request's response once the request completes 1461// successfully. 1462// 1463// Use "Send" method on the returned Request to send the API call to the service. 1464// the "output" return value is not valid until after Send returns without error. 1465// 1466// See GetInsightRuleReport for more information on using the GetInsightRuleReport 1467// API call, and error handling. 1468// 1469// This method is useful when you want to inject custom logic or configuration 1470// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1471// 1472// 1473// // Example sending a request using the GetInsightRuleReportRequest method. 1474// req, resp := client.GetInsightRuleReportRequest(params) 1475// 1476// err := req.Send() 1477// if err == nil { // resp is now filled 1478// fmt.Println(resp) 1479// } 1480// 1481// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetInsightRuleReport 1482func (c *CloudWatch) GetInsightRuleReportRequest(input *GetInsightRuleReportInput) (req *request.Request, output *GetInsightRuleReportOutput) { 1483 op := &request.Operation{ 1484 Name: opGetInsightRuleReport, 1485 HTTPMethod: "POST", 1486 HTTPPath: "/", 1487 } 1488 1489 if input == nil { 1490 input = &GetInsightRuleReportInput{} 1491 } 1492 1493 output = &GetInsightRuleReportOutput{} 1494 req = c.newRequest(op, input, output) 1495 return 1496} 1497 1498// GetInsightRuleReport API operation for Amazon CloudWatch. 1499// 1500// This operation returns the time series data collected by a Contributor Insights 1501// rule. The data includes the identity and number of contributors to the log 1502// group. 1503// 1504// You can also optionally return one or more statistics about each data point 1505// in the time series. These statistics can include the following: 1506// 1507// * UniqueContributors -- the number of unique contributors for each data 1508// point. 1509// 1510// * MaxContributorValue -- the value of the top contributor for each data 1511// point. The identity of the contributor might change for each data point 1512// in the graph. If this rule aggregates by COUNT, the top contributor for 1513// each data point is the contributor with the most occurrences in that period. 1514// If the rule aggregates by SUM, the top contributor is the contributor 1515// with the highest sum in the log field specified by the rule's Value, during 1516// that period. 1517// 1518// * SampleCount -- the number of data points matched by the rule. 1519// 1520// * Sum -- the sum of the values from all contributors during the time period 1521// represented by that data point. 1522// 1523// * Minimum -- the minimum value from a single observation during the time 1524// period represented by that data point. 1525// 1526// * Maximum -- the maximum value from a single observation during the time 1527// period represented by that data point. 1528// 1529// * Average -- the average value from all contributors during the time period 1530// represented by that data point. 1531// 1532// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1533// with awserr.Error's Code and Message methods to get detailed information about 1534// the error. 1535// 1536// See the AWS API reference guide for Amazon CloudWatch's 1537// API operation GetInsightRuleReport for usage and error information. 1538// 1539// Returned Error Codes: 1540// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 1541// The value of an input parameter is bad or out-of-range. 1542// 1543// * ErrCodeMissingRequiredParameterException "MissingParameter" 1544// An input parameter that is required is missing. 1545// 1546// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 1547// The named resource does not exist. 1548// 1549// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetInsightRuleReport 1550func (c *CloudWatch) GetInsightRuleReport(input *GetInsightRuleReportInput) (*GetInsightRuleReportOutput, error) { 1551 req, out := c.GetInsightRuleReportRequest(input) 1552 return out, req.Send() 1553} 1554 1555// GetInsightRuleReportWithContext is the same as GetInsightRuleReport with the addition of 1556// the ability to pass a context and additional request options. 1557// 1558// See GetInsightRuleReport for details on how to use this API operation. 1559// 1560// The context must be non-nil and will be used for request cancellation. If 1561// the context is nil a panic will occur. In the future the SDK may create 1562// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1563// for more information on using Contexts. 1564func (c *CloudWatch) GetInsightRuleReportWithContext(ctx aws.Context, input *GetInsightRuleReportInput, opts ...request.Option) (*GetInsightRuleReportOutput, error) { 1565 req, out := c.GetInsightRuleReportRequest(input) 1566 req.SetContext(ctx) 1567 req.ApplyOptions(opts...) 1568 return out, req.Send() 1569} 1570 1571const opGetMetricData = "GetMetricData" 1572 1573// GetMetricDataRequest generates a "aws/request.Request" representing the 1574// client's request for the GetMetricData operation. The "output" return 1575// value will be populated with the request's response once the request completes 1576// successfully. 1577// 1578// Use "Send" method on the returned Request to send the API call to the service. 1579// the "output" return value is not valid until after Send returns without error. 1580// 1581// See GetMetricData for more information on using the GetMetricData 1582// API call, and error handling. 1583// 1584// This method is useful when you want to inject custom logic or configuration 1585// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1586// 1587// 1588// // Example sending a request using the GetMetricDataRequest method. 1589// req, resp := client.GetMetricDataRequest(params) 1590// 1591// err := req.Send() 1592// if err == nil { // resp is now filled 1593// fmt.Println(resp) 1594// } 1595// 1596// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricData 1597func (c *CloudWatch) GetMetricDataRequest(input *GetMetricDataInput) (req *request.Request, output *GetMetricDataOutput) { 1598 op := &request.Operation{ 1599 Name: opGetMetricData, 1600 HTTPMethod: "POST", 1601 HTTPPath: "/", 1602 Paginator: &request.Paginator{ 1603 InputTokens: []string{"NextToken"}, 1604 OutputTokens: []string{"NextToken"}, 1605 LimitToken: "MaxDatapoints", 1606 TruncationToken: "", 1607 }, 1608 } 1609 1610 if input == nil { 1611 input = &GetMetricDataInput{} 1612 } 1613 1614 output = &GetMetricDataOutput{} 1615 req = c.newRequest(op, input, output) 1616 return 1617} 1618 1619// GetMetricData API operation for Amazon CloudWatch. 1620// 1621// You can use the GetMetricData API to retrieve as many as 500 different metrics 1622// in a single request, with a total of as many as 100,800 data points. You 1623// can also optionally perform math expressions on the values of the returned 1624// statistics, to create new time series that represent new insights into your 1625// data. For example, using Lambda metrics, you could divide the Errors metric 1626// by the Invocations metric to get an error rate time series. For more information 1627// about metric math expressions, see Metric Math Syntax and Functions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) 1628// in the Amazon CloudWatch User Guide. 1629// 1630// Calls to the GetMetricData API have a different pricing structure than calls 1631// to GetMetricStatistics. For more information about pricing, see Amazon CloudWatch 1632// Pricing (https://aws.amazon.com/cloudwatch/pricing/). 1633// 1634// Amazon CloudWatch retains metric data as follows: 1635// 1636// * Data points with a period of less than 60 seconds are available for 1637// 3 hours. These data points are high-resolution metrics and are available 1638// only for custom metrics that have been defined with a StorageResolution 1639// of 1. 1640// 1641// * Data points with a period of 60 seconds (1-minute) are available for 1642// 15 days. 1643// 1644// * Data points with a period of 300 seconds (5-minute) are available for 1645// 63 days. 1646// 1647// * Data points with a period of 3600 seconds (1 hour) are available for 1648// 455 days (15 months). 1649// 1650// Data points that are initially published with a shorter period are aggregated 1651// together for long-term storage. For example, if you collect data using a 1652// period of 1 minute, the data remains available for 15 days with 1-minute 1653// resolution. After 15 days, this data is still available, but is aggregated 1654// and retrievable only with a resolution of 5 minutes. After 63 days, the data 1655// is further aggregated and is available with a resolution of 1 hour. 1656// 1657// If you omit Unit in your request, all data that was collected with any unit 1658// is returned, along with the corresponding units that were specified when 1659// the data was reported to CloudWatch. If you specify a unit, the operation 1660// returns only data that was collected with that unit specified. If you specify 1661// a unit that does not match the data collected, the results of the operation 1662// are null. CloudWatch does not perform unit conversions. 1663// 1664// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1665// with awserr.Error's Code and Message methods to get detailed information about 1666// the error. 1667// 1668// See the AWS API reference guide for Amazon CloudWatch's 1669// API operation GetMetricData for usage and error information. 1670// 1671// Returned Error Codes: 1672// * ErrCodeInvalidNextToken "InvalidNextToken" 1673// The next token specified is invalid. 1674// 1675// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricData 1676func (c *CloudWatch) GetMetricData(input *GetMetricDataInput) (*GetMetricDataOutput, error) { 1677 req, out := c.GetMetricDataRequest(input) 1678 return out, req.Send() 1679} 1680 1681// GetMetricDataWithContext is the same as GetMetricData with the addition of 1682// the ability to pass a context and additional request options. 1683// 1684// See GetMetricData for details on how to use this API operation. 1685// 1686// The context must be non-nil and will be used for request cancellation. If 1687// the context is nil a panic will occur. In the future the SDK may create 1688// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1689// for more information on using Contexts. 1690func (c *CloudWatch) GetMetricDataWithContext(ctx aws.Context, input *GetMetricDataInput, opts ...request.Option) (*GetMetricDataOutput, error) { 1691 req, out := c.GetMetricDataRequest(input) 1692 req.SetContext(ctx) 1693 req.ApplyOptions(opts...) 1694 return out, req.Send() 1695} 1696 1697// GetMetricDataPages iterates over the pages of a GetMetricData operation, 1698// calling the "fn" function with the response data for each page. To stop 1699// iterating, return false from the fn function. 1700// 1701// See GetMetricData method for more information on how to use this operation. 1702// 1703// Note: This operation can generate multiple requests to a service. 1704// 1705// // Example iterating over at most 3 pages of a GetMetricData operation. 1706// pageNum := 0 1707// err := client.GetMetricDataPages(params, 1708// func(page *cloudwatch.GetMetricDataOutput, lastPage bool) bool { 1709// pageNum++ 1710// fmt.Println(page) 1711// return pageNum <= 3 1712// }) 1713// 1714func (c *CloudWatch) GetMetricDataPages(input *GetMetricDataInput, fn func(*GetMetricDataOutput, bool) bool) error { 1715 return c.GetMetricDataPagesWithContext(aws.BackgroundContext(), input, fn) 1716} 1717 1718// GetMetricDataPagesWithContext same as GetMetricDataPages except 1719// it takes a Context and allows setting request options on the pages. 1720// 1721// The context must be non-nil and will be used for request cancellation. If 1722// the context is nil a panic will occur. In the future the SDK may create 1723// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1724// for more information on using Contexts. 1725func (c *CloudWatch) GetMetricDataPagesWithContext(ctx aws.Context, input *GetMetricDataInput, fn func(*GetMetricDataOutput, bool) bool, opts ...request.Option) error { 1726 p := request.Pagination{ 1727 NewRequest: func() (*request.Request, error) { 1728 var inCpy *GetMetricDataInput 1729 if input != nil { 1730 tmp := *input 1731 inCpy = &tmp 1732 } 1733 req, _ := c.GetMetricDataRequest(inCpy) 1734 req.SetContext(ctx) 1735 req.ApplyOptions(opts...) 1736 return req, nil 1737 }, 1738 } 1739 1740 for p.Next() { 1741 if !fn(p.Page().(*GetMetricDataOutput), !p.HasNextPage()) { 1742 break 1743 } 1744 } 1745 1746 return p.Err() 1747} 1748 1749const opGetMetricStatistics = "GetMetricStatistics" 1750 1751// GetMetricStatisticsRequest generates a "aws/request.Request" representing the 1752// client's request for the GetMetricStatistics operation. The "output" return 1753// value will be populated with the request's response once the request completes 1754// successfully. 1755// 1756// Use "Send" method on the returned Request to send the API call to the service. 1757// the "output" return value is not valid until after Send returns without error. 1758// 1759// See GetMetricStatistics for more information on using the GetMetricStatistics 1760// API call, and error handling. 1761// 1762// This method is useful when you want to inject custom logic or configuration 1763// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1764// 1765// 1766// // Example sending a request using the GetMetricStatisticsRequest method. 1767// req, resp := client.GetMetricStatisticsRequest(params) 1768// 1769// err := req.Send() 1770// if err == nil { // resp is now filled 1771// fmt.Println(resp) 1772// } 1773// 1774// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricStatistics 1775func (c *CloudWatch) GetMetricStatisticsRequest(input *GetMetricStatisticsInput) (req *request.Request, output *GetMetricStatisticsOutput) { 1776 op := &request.Operation{ 1777 Name: opGetMetricStatistics, 1778 HTTPMethod: "POST", 1779 HTTPPath: "/", 1780 } 1781 1782 if input == nil { 1783 input = &GetMetricStatisticsInput{} 1784 } 1785 1786 output = &GetMetricStatisticsOutput{} 1787 req = c.newRequest(op, input, output) 1788 return 1789} 1790 1791// GetMetricStatistics API operation for Amazon CloudWatch. 1792// 1793// Gets statistics for the specified metric. 1794// 1795// The maximum number of data points returned from a single call is 1,440. If 1796// you request more than 1,440 data points, CloudWatch returns an error. To 1797// reduce the number of data points, you can narrow the specified time range 1798// and make multiple requests across adjacent time ranges, or you can increase 1799// the specified period. Data points are not returned in chronological order. 1800// 1801// CloudWatch aggregates data points based on the length of the period that 1802// you specify. For example, if you request statistics with a one-hour period, 1803// CloudWatch aggregates all data points with time stamps that fall within each 1804// one-hour period. Therefore, the number of values aggregated by CloudWatch 1805// is larger than the number of data points returned. 1806// 1807// CloudWatch needs raw data points to calculate percentile statistics. If you 1808// publish data using a statistic set instead, you can only retrieve percentile 1809// statistics for this data if one of the following conditions is true: 1810// 1811// * The SampleCount value of the statistic set is 1. 1812// 1813// * The Min and the Max values of the statistic set are equal. 1814// 1815// Percentile statistics are not available for metrics when any of the metric 1816// values are negative numbers. 1817// 1818// Amazon CloudWatch retains metric data as follows: 1819// 1820// * Data points with a period of less than 60 seconds are available for 1821// 3 hours. These data points are high-resolution metrics and are available 1822// only for custom metrics that have been defined with a StorageResolution 1823// of 1. 1824// 1825// * Data points with a period of 60 seconds (1-minute) are available for 1826// 15 days. 1827// 1828// * Data points with a period of 300 seconds (5-minute) are available for 1829// 63 days. 1830// 1831// * Data points with a period of 3600 seconds (1 hour) are available for 1832// 455 days (15 months). 1833// 1834// Data points that are initially published with a shorter period are aggregated 1835// together for long-term storage. For example, if you collect data using a 1836// period of 1 minute, the data remains available for 15 days with 1-minute 1837// resolution. After 15 days, this data is still available, but is aggregated 1838// and retrievable only with a resolution of 5 minutes. After 63 days, the data 1839// is further aggregated and is available with a resolution of 1 hour. 1840// 1841// CloudWatch started retaining 5-minute and 1-hour metric data as of July 9, 1842// 2016. 1843// 1844// For information about metrics and dimensions supported by AWS services, see 1845// the Amazon CloudWatch Metrics and Dimensions Reference (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CW_Support_For_AWS.html) 1846// in the Amazon CloudWatch User Guide. 1847// 1848// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1849// with awserr.Error's Code and Message methods to get detailed information about 1850// the error. 1851// 1852// See the AWS API reference guide for Amazon CloudWatch's 1853// API operation GetMetricStatistics for usage and error information. 1854// 1855// Returned Error Codes: 1856// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 1857// The value of an input parameter is bad or out-of-range. 1858// 1859// * ErrCodeMissingRequiredParameterException "MissingParameter" 1860// An input parameter that is required is missing. 1861// 1862// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" 1863// Parameters were used together that cannot be used together. 1864// 1865// * ErrCodeInternalServiceFault "InternalServiceError" 1866// Request processing has failed due to some unknown error, exception, or failure. 1867// 1868// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricStatistics 1869func (c *CloudWatch) GetMetricStatistics(input *GetMetricStatisticsInput) (*GetMetricStatisticsOutput, error) { 1870 req, out := c.GetMetricStatisticsRequest(input) 1871 return out, req.Send() 1872} 1873 1874// GetMetricStatisticsWithContext is the same as GetMetricStatistics with the addition of 1875// the ability to pass a context and additional request options. 1876// 1877// See GetMetricStatistics for details on how to use this API operation. 1878// 1879// The context must be non-nil and will be used for request cancellation. If 1880// the context is nil a panic will occur. In the future the SDK may create 1881// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1882// for more information on using Contexts. 1883func (c *CloudWatch) GetMetricStatisticsWithContext(ctx aws.Context, input *GetMetricStatisticsInput, opts ...request.Option) (*GetMetricStatisticsOutput, error) { 1884 req, out := c.GetMetricStatisticsRequest(input) 1885 req.SetContext(ctx) 1886 req.ApplyOptions(opts...) 1887 return out, req.Send() 1888} 1889 1890const opGetMetricStream = "GetMetricStream" 1891 1892// GetMetricStreamRequest generates a "aws/request.Request" representing the 1893// client's request for the GetMetricStream operation. The "output" return 1894// value will be populated with the request's response once the request completes 1895// successfully. 1896// 1897// Use "Send" method on the returned Request to send the API call to the service. 1898// the "output" return value is not valid until after Send returns without error. 1899// 1900// See GetMetricStream for more information on using the GetMetricStream 1901// API call, and error handling. 1902// 1903// This method is useful when you want to inject custom logic or configuration 1904// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1905// 1906// 1907// // Example sending a request using the GetMetricStreamRequest method. 1908// req, resp := client.GetMetricStreamRequest(params) 1909// 1910// err := req.Send() 1911// if err == nil { // resp is now filled 1912// fmt.Println(resp) 1913// } 1914// 1915// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricStream 1916func (c *CloudWatch) GetMetricStreamRequest(input *GetMetricStreamInput) (req *request.Request, output *GetMetricStreamOutput) { 1917 op := &request.Operation{ 1918 Name: opGetMetricStream, 1919 HTTPMethod: "POST", 1920 HTTPPath: "/", 1921 } 1922 1923 if input == nil { 1924 input = &GetMetricStreamInput{} 1925 } 1926 1927 output = &GetMetricStreamOutput{} 1928 req = c.newRequest(op, input, output) 1929 return 1930} 1931 1932// GetMetricStream API operation for Amazon CloudWatch. 1933// 1934// Returns information about the metric stream that you specify. 1935// 1936// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1937// with awserr.Error's Code and Message methods to get detailed information about 1938// the error. 1939// 1940// See the AWS API reference guide for Amazon CloudWatch's 1941// API operation GetMetricStream for usage and error information. 1942// 1943// Returned Error Codes: 1944// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 1945// The named resource does not exist. 1946// 1947// * ErrCodeInternalServiceFault "InternalServiceError" 1948// Request processing has failed due to some unknown error, exception, or failure. 1949// 1950// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 1951// The value of an input parameter is bad or out-of-range. 1952// 1953// * ErrCodeMissingRequiredParameterException "MissingParameter" 1954// An input parameter that is required is missing. 1955// 1956// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" 1957// Parameters were used together that cannot be used together. 1958// 1959// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricStream 1960func (c *CloudWatch) GetMetricStream(input *GetMetricStreamInput) (*GetMetricStreamOutput, error) { 1961 req, out := c.GetMetricStreamRequest(input) 1962 return out, req.Send() 1963} 1964 1965// GetMetricStreamWithContext is the same as GetMetricStream with the addition of 1966// the ability to pass a context and additional request options. 1967// 1968// See GetMetricStream for details on how to use this API operation. 1969// 1970// The context must be non-nil and will be used for request cancellation. If 1971// the context is nil a panic will occur. In the future the SDK may create 1972// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1973// for more information on using Contexts. 1974func (c *CloudWatch) GetMetricStreamWithContext(ctx aws.Context, input *GetMetricStreamInput, opts ...request.Option) (*GetMetricStreamOutput, error) { 1975 req, out := c.GetMetricStreamRequest(input) 1976 req.SetContext(ctx) 1977 req.ApplyOptions(opts...) 1978 return out, req.Send() 1979} 1980 1981const opGetMetricWidgetImage = "GetMetricWidgetImage" 1982 1983// GetMetricWidgetImageRequest generates a "aws/request.Request" representing the 1984// client's request for the GetMetricWidgetImage operation. The "output" return 1985// value will be populated with the request's response once the request completes 1986// successfully. 1987// 1988// Use "Send" method on the returned Request to send the API call to the service. 1989// the "output" return value is not valid until after Send returns without error. 1990// 1991// See GetMetricWidgetImage for more information on using the GetMetricWidgetImage 1992// API call, and error handling. 1993// 1994// This method is useful when you want to inject custom logic or configuration 1995// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1996// 1997// 1998// // Example sending a request using the GetMetricWidgetImageRequest method. 1999// req, resp := client.GetMetricWidgetImageRequest(params) 2000// 2001// err := req.Send() 2002// if err == nil { // resp is now filled 2003// fmt.Println(resp) 2004// } 2005// 2006// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricWidgetImage 2007func (c *CloudWatch) GetMetricWidgetImageRequest(input *GetMetricWidgetImageInput) (req *request.Request, output *GetMetricWidgetImageOutput) { 2008 op := &request.Operation{ 2009 Name: opGetMetricWidgetImage, 2010 HTTPMethod: "POST", 2011 HTTPPath: "/", 2012 } 2013 2014 if input == nil { 2015 input = &GetMetricWidgetImageInput{} 2016 } 2017 2018 output = &GetMetricWidgetImageOutput{} 2019 req = c.newRequest(op, input, output) 2020 return 2021} 2022 2023// GetMetricWidgetImage API operation for Amazon CloudWatch. 2024// 2025// You can use the GetMetricWidgetImage API to retrieve a snapshot graph of 2026// one or more Amazon CloudWatch metrics as a bitmap image. You can then embed 2027// this image into your services and products, such as wiki pages, reports, 2028// and documents. You could also retrieve images regularly, such as every minute, 2029// and create your own custom live dashboard. 2030// 2031// The graph you retrieve can include all CloudWatch metric graph features, 2032// including metric math and horizontal and vertical annotations. 2033// 2034// There is a limit of 20 transactions per second for this API. Each GetMetricWidgetImage 2035// action has the following limits: 2036// 2037// * As many as 100 metrics in the graph. 2038// 2039// * Up to 100 KB uncompressed payload. 2040// 2041// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2042// with awserr.Error's Code and Message methods to get detailed information about 2043// the error. 2044// 2045// See the AWS API reference guide for Amazon CloudWatch's 2046// API operation GetMetricWidgetImage for usage and error information. 2047// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricWidgetImage 2048func (c *CloudWatch) GetMetricWidgetImage(input *GetMetricWidgetImageInput) (*GetMetricWidgetImageOutput, error) { 2049 req, out := c.GetMetricWidgetImageRequest(input) 2050 return out, req.Send() 2051} 2052 2053// GetMetricWidgetImageWithContext is the same as GetMetricWidgetImage with the addition of 2054// the ability to pass a context and additional request options. 2055// 2056// See GetMetricWidgetImage for details on how to use this API operation. 2057// 2058// The context must be non-nil and will be used for request cancellation. If 2059// the context is nil a panic will occur. In the future the SDK may create 2060// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2061// for more information on using Contexts. 2062func (c *CloudWatch) GetMetricWidgetImageWithContext(ctx aws.Context, input *GetMetricWidgetImageInput, opts ...request.Option) (*GetMetricWidgetImageOutput, error) { 2063 req, out := c.GetMetricWidgetImageRequest(input) 2064 req.SetContext(ctx) 2065 req.ApplyOptions(opts...) 2066 return out, req.Send() 2067} 2068 2069const opListDashboards = "ListDashboards" 2070 2071// ListDashboardsRequest generates a "aws/request.Request" representing the 2072// client's request for the ListDashboards operation. The "output" return 2073// value will be populated with the request's response once the request completes 2074// successfully. 2075// 2076// Use "Send" method on the returned Request to send the API call to the service. 2077// the "output" return value is not valid until after Send returns without error. 2078// 2079// See ListDashboards for more information on using the ListDashboards 2080// API call, and error handling. 2081// 2082// This method is useful when you want to inject custom logic or configuration 2083// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2084// 2085// 2086// // Example sending a request using the ListDashboardsRequest method. 2087// req, resp := client.ListDashboardsRequest(params) 2088// 2089// err := req.Send() 2090// if err == nil { // resp is now filled 2091// fmt.Println(resp) 2092// } 2093// 2094// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListDashboards 2095func (c *CloudWatch) ListDashboardsRequest(input *ListDashboardsInput) (req *request.Request, output *ListDashboardsOutput) { 2096 op := &request.Operation{ 2097 Name: opListDashboards, 2098 HTTPMethod: "POST", 2099 HTTPPath: "/", 2100 Paginator: &request.Paginator{ 2101 InputTokens: []string{"NextToken"}, 2102 OutputTokens: []string{"NextToken"}, 2103 LimitToken: "", 2104 TruncationToken: "", 2105 }, 2106 } 2107 2108 if input == nil { 2109 input = &ListDashboardsInput{} 2110 } 2111 2112 output = &ListDashboardsOutput{} 2113 req = c.newRequest(op, input, output) 2114 return 2115} 2116 2117// ListDashboards API operation for Amazon CloudWatch. 2118// 2119// Returns a list of the dashboards for your account. If you include DashboardNamePrefix, 2120// only those dashboards with names starting with the prefix are listed. Otherwise, 2121// all dashboards in your account are listed. 2122// 2123// ListDashboards returns up to 1000 results on one page. If there are more 2124// than 1000 dashboards, you can call ListDashboards again and include the value 2125// you received for NextToken in the first call, to receive the next 1000 results. 2126// 2127// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2128// with awserr.Error's Code and Message methods to get detailed information about 2129// the error. 2130// 2131// See the AWS API reference guide for Amazon CloudWatch's 2132// API operation ListDashboards for usage and error information. 2133// 2134// Returned Error Codes: 2135// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 2136// The value of an input parameter is bad or out-of-range. 2137// 2138// * ErrCodeInternalServiceFault "InternalServiceError" 2139// Request processing has failed due to some unknown error, exception, or failure. 2140// 2141// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListDashboards 2142func (c *CloudWatch) ListDashboards(input *ListDashboardsInput) (*ListDashboardsOutput, error) { 2143 req, out := c.ListDashboardsRequest(input) 2144 return out, req.Send() 2145} 2146 2147// ListDashboardsWithContext is the same as ListDashboards with the addition of 2148// the ability to pass a context and additional request options. 2149// 2150// See ListDashboards for details on how to use this API operation. 2151// 2152// The context must be non-nil and will be used for request cancellation. If 2153// the context is nil a panic will occur. In the future the SDK may create 2154// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2155// for more information on using Contexts. 2156func (c *CloudWatch) ListDashboardsWithContext(ctx aws.Context, input *ListDashboardsInput, opts ...request.Option) (*ListDashboardsOutput, error) { 2157 req, out := c.ListDashboardsRequest(input) 2158 req.SetContext(ctx) 2159 req.ApplyOptions(opts...) 2160 return out, req.Send() 2161} 2162 2163// ListDashboardsPages iterates over the pages of a ListDashboards operation, 2164// calling the "fn" function with the response data for each page. To stop 2165// iterating, return false from the fn function. 2166// 2167// See ListDashboards method for more information on how to use this operation. 2168// 2169// Note: This operation can generate multiple requests to a service. 2170// 2171// // Example iterating over at most 3 pages of a ListDashboards operation. 2172// pageNum := 0 2173// err := client.ListDashboardsPages(params, 2174// func(page *cloudwatch.ListDashboardsOutput, lastPage bool) bool { 2175// pageNum++ 2176// fmt.Println(page) 2177// return pageNum <= 3 2178// }) 2179// 2180func (c *CloudWatch) ListDashboardsPages(input *ListDashboardsInput, fn func(*ListDashboardsOutput, bool) bool) error { 2181 return c.ListDashboardsPagesWithContext(aws.BackgroundContext(), input, fn) 2182} 2183 2184// ListDashboardsPagesWithContext same as ListDashboardsPages except 2185// it takes a Context and allows setting request options on the pages. 2186// 2187// The context must be non-nil and will be used for request cancellation. If 2188// the context is nil a panic will occur. In the future the SDK may create 2189// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2190// for more information on using Contexts. 2191func (c *CloudWatch) ListDashboardsPagesWithContext(ctx aws.Context, input *ListDashboardsInput, fn func(*ListDashboardsOutput, bool) bool, opts ...request.Option) error { 2192 p := request.Pagination{ 2193 NewRequest: func() (*request.Request, error) { 2194 var inCpy *ListDashboardsInput 2195 if input != nil { 2196 tmp := *input 2197 inCpy = &tmp 2198 } 2199 req, _ := c.ListDashboardsRequest(inCpy) 2200 req.SetContext(ctx) 2201 req.ApplyOptions(opts...) 2202 return req, nil 2203 }, 2204 } 2205 2206 for p.Next() { 2207 if !fn(p.Page().(*ListDashboardsOutput), !p.HasNextPage()) { 2208 break 2209 } 2210 } 2211 2212 return p.Err() 2213} 2214 2215const opListMetricStreams = "ListMetricStreams" 2216 2217// ListMetricStreamsRequest generates a "aws/request.Request" representing the 2218// client's request for the ListMetricStreams operation. The "output" return 2219// value will be populated with the request's response once the request completes 2220// successfully. 2221// 2222// Use "Send" method on the returned Request to send the API call to the service. 2223// the "output" return value is not valid until after Send returns without error. 2224// 2225// See ListMetricStreams for more information on using the ListMetricStreams 2226// API call, and error handling. 2227// 2228// This method is useful when you want to inject custom logic or configuration 2229// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2230// 2231// 2232// // Example sending a request using the ListMetricStreamsRequest method. 2233// req, resp := client.ListMetricStreamsRequest(params) 2234// 2235// err := req.Send() 2236// if err == nil { // resp is now filled 2237// fmt.Println(resp) 2238// } 2239// 2240// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetricStreams 2241func (c *CloudWatch) ListMetricStreamsRequest(input *ListMetricStreamsInput) (req *request.Request, output *ListMetricStreamsOutput) { 2242 op := &request.Operation{ 2243 Name: opListMetricStreams, 2244 HTTPMethod: "POST", 2245 HTTPPath: "/", 2246 Paginator: &request.Paginator{ 2247 InputTokens: []string{"NextToken"}, 2248 OutputTokens: []string{"NextToken"}, 2249 LimitToken: "MaxResults", 2250 TruncationToken: "", 2251 }, 2252 } 2253 2254 if input == nil { 2255 input = &ListMetricStreamsInput{} 2256 } 2257 2258 output = &ListMetricStreamsOutput{} 2259 req = c.newRequest(op, input, output) 2260 return 2261} 2262 2263// ListMetricStreams API operation for Amazon CloudWatch. 2264// 2265// Returns a list of metric streams in this account. 2266// 2267// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2268// with awserr.Error's Code and Message methods to get detailed information about 2269// the error. 2270// 2271// See the AWS API reference guide for Amazon CloudWatch's 2272// API operation ListMetricStreams for usage and error information. 2273// 2274// Returned Error Codes: 2275// * ErrCodeInvalidNextToken "InvalidNextToken" 2276// The next token specified is invalid. 2277// 2278// * ErrCodeInternalServiceFault "InternalServiceError" 2279// Request processing has failed due to some unknown error, exception, or failure. 2280// 2281// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 2282// The value of an input parameter is bad or out-of-range. 2283// 2284// * ErrCodeMissingRequiredParameterException "MissingParameter" 2285// An input parameter that is required is missing. 2286// 2287// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetricStreams 2288func (c *CloudWatch) ListMetricStreams(input *ListMetricStreamsInput) (*ListMetricStreamsOutput, error) { 2289 req, out := c.ListMetricStreamsRequest(input) 2290 return out, req.Send() 2291} 2292 2293// ListMetricStreamsWithContext is the same as ListMetricStreams with the addition of 2294// the ability to pass a context and additional request options. 2295// 2296// See ListMetricStreams for details on how to use this API operation. 2297// 2298// The context must be non-nil and will be used for request cancellation. If 2299// the context is nil a panic will occur. In the future the SDK may create 2300// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2301// for more information on using Contexts. 2302func (c *CloudWatch) ListMetricStreamsWithContext(ctx aws.Context, input *ListMetricStreamsInput, opts ...request.Option) (*ListMetricStreamsOutput, error) { 2303 req, out := c.ListMetricStreamsRequest(input) 2304 req.SetContext(ctx) 2305 req.ApplyOptions(opts...) 2306 return out, req.Send() 2307} 2308 2309// ListMetricStreamsPages iterates over the pages of a ListMetricStreams operation, 2310// calling the "fn" function with the response data for each page. To stop 2311// iterating, return false from the fn function. 2312// 2313// See ListMetricStreams method for more information on how to use this operation. 2314// 2315// Note: This operation can generate multiple requests to a service. 2316// 2317// // Example iterating over at most 3 pages of a ListMetricStreams operation. 2318// pageNum := 0 2319// err := client.ListMetricStreamsPages(params, 2320// func(page *cloudwatch.ListMetricStreamsOutput, lastPage bool) bool { 2321// pageNum++ 2322// fmt.Println(page) 2323// return pageNum <= 3 2324// }) 2325// 2326func (c *CloudWatch) ListMetricStreamsPages(input *ListMetricStreamsInput, fn func(*ListMetricStreamsOutput, bool) bool) error { 2327 return c.ListMetricStreamsPagesWithContext(aws.BackgroundContext(), input, fn) 2328} 2329 2330// ListMetricStreamsPagesWithContext same as ListMetricStreamsPages except 2331// it takes a Context and allows setting request options on the pages. 2332// 2333// The context must be non-nil and will be used for request cancellation. If 2334// the context is nil a panic will occur. In the future the SDK may create 2335// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2336// for more information on using Contexts. 2337func (c *CloudWatch) ListMetricStreamsPagesWithContext(ctx aws.Context, input *ListMetricStreamsInput, fn func(*ListMetricStreamsOutput, bool) bool, opts ...request.Option) error { 2338 p := request.Pagination{ 2339 NewRequest: func() (*request.Request, error) { 2340 var inCpy *ListMetricStreamsInput 2341 if input != nil { 2342 tmp := *input 2343 inCpy = &tmp 2344 } 2345 req, _ := c.ListMetricStreamsRequest(inCpy) 2346 req.SetContext(ctx) 2347 req.ApplyOptions(opts...) 2348 return req, nil 2349 }, 2350 } 2351 2352 for p.Next() { 2353 if !fn(p.Page().(*ListMetricStreamsOutput), !p.HasNextPage()) { 2354 break 2355 } 2356 } 2357 2358 return p.Err() 2359} 2360 2361const opListMetrics = "ListMetrics" 2362 2363// ListMetricsRequest generates a "aws/request.Request" representing the 2364// client's request for the ListMetrics operation. The "output" return 2365// value will be populated with the request's response once the request completes 2366// successfully. 2367// 2368// Use "Send" method on the returned Request to send the API call to the service. 2369// the "output" return value is not valid until after Send returns without error. 2370// 2371// See ListMetrics for more information on using the ListMetrics 2372// API call, and error handling. 2373// 2374// This method is useful when you want to inject custom logic or configuration 2375// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2376// 2377// 2378// // Example sending a request using the ListMetricsRequest method. 2379// req, resp := client.ListMetricsRequest(params) 2380// 2381// err := req.Send() 2382// if err == nil { // resp is now filled 2383// fmt.Println(resp) 2384// } 2385// 2386// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetrics 2387func (c *CloudWatch) ListMetricsRequest(input *ListMetricsInput) (req *request.Request, output *ListMetricsOutput) { 2388 op := &request.Operation{ 2389 Name: opListMetrics, 2390 HTTPMethod: "POST", 2391 HTTPPath: "/", 2392 Paginator: &request.Paginator{ 2393 InputTokens: []string{"NextToken"}, 2394 OutputTokens: []string{"NextToken"}, 2395 LimitToken: "", 2396 TruncationToken: "", 2397 }, 2398 } 2399 2400 if input == nil { 2401 input = &ListMetricsInput{} 2402 } 2403 2404 output = &ListMetricsOutput{} 2405 req = c.newRequest(op, input, output) 2406 return 2407} 2408 2409// ListMetrics API operation for Amazon CloudWatch. 2410// 2411// List the specified metrics. You can use the returned metrics with GetMetricData 2412// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html) 2413// or GetMetricStatistics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html) 2414// to obtain statistical data. 2415// 2416// Up to 500 results are returned for any one call. To retrieve additional results, 2417// use the returned token with subsequent calls. 2418// 2419// After you create a metric, allow up to 15 minutes before the metric appears. 2420// You can see statistics about the metric sooner by using GetMetricData (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html) 2421// or GetMetricStatistics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html). 2422// 2423// ListMetrics doesn't return information about metrics if those metrics haven't 2424// reported data in the past two weeks. To retrieve those metrics, use GetMetricData 2425// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html) 2426// or GetMetricStatistics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html). 2427// 2428// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2429// with awserr.Error's Code and Message methods to get detailed information about 2430// the error. 2431// 2432// See the AWS API reference guide for Amazon CloudWatch's 2433// API operation ListMetrics for usage and error information. 2434// 2435// Returned Error Codes: 2436// * ErrCodeInternalServiceFault "InternalServiceError" 2437// Request processing has failed due to some unknown error, exception, or failure. 2438// 2439// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 2440// The value of an input parameter is bad or out-of-range. 2441// 2442// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetrics 2443func (c *CloudWatch) ListMetrics(input *ListMetricsInput) (*ListMetricsOutput, error) { 2444 req, out := c.ListMetricsRequest(input) 2445 return out, req.Send() 2446} 2447 2448// ListMetricsWithContext is the same as ListMetrics with the addition of 2449// the ability to pass a context and additional request options. 2450// 2451// See ListMetrics for details on how to use this API operation. 2452// 2453// The context must be non-nil and will be used for request cancellation. If 2454// the context is nil a panic will occur. In the future the SDK may create 2455// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2456// for more information on using Contexts. 2457func (c *CloudWatch) ListMetricsWithContext(ctx aws.Context, input *ListMetricsInput, opts ...request.Option) (*ListMetricsOutput, error) { 2458 req, out := c.ListMetricsRequest(input) 2459 req.SetContext(ctx) 2460 req.ApplyOptions(opts...) 2461 return out, req.Send() 2462} 2463 2464// ListMetricsPages iterates over the pages of a ListMetrics operation, 2465// calling the "fn" function with the response data for each page. To stop 2466// iterating, return false from the fn function. 2467// 2468// See ListMetrics method for more information on how to use this operation. 2469// 2470// Note: This operation can generate multiple requests to a service. 2471// 2472// // Example iterating over at most 3 pages of a ListMetrics operation. 2473// pageNum := 0 2474// err := client.ListMetricsPages(params, 2475// func(page *cloudwatch.ListMetricsOutput, lastPage bool) bool { 2476// pageNum++ 2477// fmt.Println(page) 2478// return pageNum <= 3 2479// }) 2480// 2481func (c *CloudWatch) ListMetricsPages(input *ListMetricsInput, fn func(*ListMetricsOutput, bool) bool) error { 2482 return c.ListMetricsPagesWithContext(aws.BackgroundContext(), input, fn) 2483} 2484 2485// ListMetricsPagesWithContext same as ListMetricsPages except 2486// it takes a Context and allows setting request options on the pages. 2487// 2488// The context must be non-nil and will be used for request cancellation. If 2489// the context is nil a panic will occur. In the future the SDK may create 2490// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2491// for more information on using Contexts. 2492func (c *CloudWatch) ListMetricsPagesWithContext(ctx aws.Context, input *ListMetricsInput, fn func(*ListMetricsOutput, bool) bool, opts ...request.Option) error { 2493 p := request.Pagination{ 2494 NewRequest: func() (*request.Request, error) { 2495 var inCpy *ListMetricsInput 2496 if input != nil { 2497 tmp := *input 2498 inCpy = &tmp 2499 } 2500 req, _ := c.ListMetricsRequest(inCpy) 2501 req.SetContext(ctx) 2502 req.ApplyOptions(opts...) 2503 return req, nil 2504 }, 2505 } 2506 2507 for p.Next() { 2508 if !fn(p.Page().(*ListMetricsOutput), !p.HasNextPage()) { 2509 break 2510 } 2511 } 2512 2513 return p.Err() 2514} 2515 2516const opListTagsForResource = "ListTagsForResource" 2517 2518// ListTagsForResourceRequest generates a "aws/request.Request" representing the 2519// client's request for the ListTagsForResource operation. The "output" return 2520// value will be populated with the request's response once the request completes 2521// successfully. 2522// 2523// Use "Send" method on the returned Request to send the API call to the service. 2524// the "output" return value is not valid until after Send returns without error. 2525// 2526// See ListTagsForResource for more information on using the ListTagsForResource 2527// API call, and error handling. 2528// 2529// This method is useful when you want to inject custom logic or configuration 2530// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2531// 2532// 2533// // Example sending a request using the ListTagsForResourceRequest method. 2534// req, resp := client.ListTagsForResourceRequest(params) 2535// 2536// err := req.Send() 2537// if err == nil { // resp is now filled 2538// fmt.Println(resp) 2539// } 2540// 2541// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListTagsForResource 2542func (c *CloudWatch) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 2543 op := &request.Operation{ 2544 Name: opListTagsForResource, 2545 HTTPMethod: "POST", 2546 HTTPPath: "/", 2547 } 2548 2549 if input == nil { 2550 input = &ListTagsForResourceInput{} 2551 } 2552 2553 output = &ListTagsForResourceOutput{} 2554 req = c.newRequest(op, input, output) 2555 return 2556} 2557 2558// ListTagsForResource API operation for Amazon CloudWatch. 2559// 2560// Displays the tags associated with a CloudWatch resource. Currently, alarms 2561// and Contributor Insights rules support tagging. 2562// 2563// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2564// with awserr.Error's Code and Message methods to get detailed information about 2565// the error. 2566// 2567// See the AWS API reference guide for Amazon CloudWatch's 2568// API operation ListTagsForResource for usage and error information. 2569// 2570// Returned Error Codes: 2571// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 2572// The value of an input parameter is bad or out-of-range. 2573// 2574// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 2575// The named resource does not exist. 2576// 2577// * ErrCodeInternalServiceFault "InternalServiceError" 2578// Request processing has failed due to some unknown error, exception, or failure. 2579// 2580// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListTagsForResource 2581func (c *CloudWatch) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 2582 req, out := c.ListTagsForResourceRequest(input) 2583 return out, req.Send() 2584} 2585 2586// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 2587// the ability to pass a context and additional request options. 2588// 2589// See ListTagsForResource for details on how to use this API operation. 2590// 2591// The context must be non-nil and will be used for request cancellation. If 2592// the context is nil a panic will occur. In the future the SDK may create 2593// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2594// for more information on using Contexts. 2595func (c *CloudWatch) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 2596 req, out := c.ListTagsForResourceRequest(input) 2597 req.SetContext(ctx) 2598 req.ApplyOptions(opts...) 2599 return out, req.Send() 2600} 2601 2602const opPutAnomalyDetector = "PutAnomalyDetector" 2603 2604// PutAnomalyDetectorRequest generates a "aws/request.Request" representing the 2605// client's request for the PutAnomalyDetector operation. The "output" return 2606// value will be populated with the request's response once the request completes 2607// successfully. 2608// 2609// Use "Send" method on the returned Request to send the API call to the service. 2610// the "output" return value is not valid until after Send returns without error. 2611// 2612// See PutAnomalyDetector for more information on using the PutAnomalyDetector 2613// API call, and error handling. 2614// 2615// This method is useful when you want to inject custom logic or configuration 2616// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2617// 2618// 2619// // Example sending a request using the PutAnomalyDetectorRequest method. 2620// req, resp := client.PutAnomalyDetectorRequest(params) 2621// 2622// err := req.Send() 2623// if err == nil { // resp is now filled 2624// fmt.Println(resp) 2625// } 2626// 2627// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutAnomalyDetector 2628func (c *CloudWatch) PutAnomalyDetectorRequest(input *PutAnomalyDetectorInput) (req *request.Request, output *PutAnomalyDetectorOutput) { 2629 op := &request.Operation{ 2630 Name: opPutAnomalyDetector, 2631 HTTPMethod: "POST", 2632 HTTPPath: "/", 2633 } 2634 2635 if input == nil { 2636 input = &PutAnomalyDetectorInput{} 2637 } 2638 2639 output = &PutAnomalyDetectorOutput{} 2640 req = c.newRequest(op, input, output) 2641 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2642 return 2643} 2644 2645// PutAnomalyDetector API operation for Amazon CloudWatch. 2646// 2647// Creates an anomaly detection model for a CloudWatch metric. You can use the 2648// model to display a band of expected normal values when the metric is graphed. 2649// 2650// For more information, see CloudWatch Anomaly Detection (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Anomaly_Detection.html). 2651// 2652// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2653// with awserr.Error's Code and Message methods to get detailed information about 2654// the error. 2655// 2656// See the AWS API reference guide for Amazon CloudWatch's 2657// API operation PutAnomalyDetector for usage and error information. 2658// 2659// Returned Error Codes: 2660// * ErrCodeLimitExceededException "LimitExceededException" 2661// The operation exceeded one or more limits. 2662// 2663// * ErrCodeInternalServiceFault "InternalServiceError" 2664// Request processing has failed due to some unknown error, exception, or failure. 2665// 2666// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 2667// The value of an input parameter is bad or out-of-range. 2668// 2669// * ErrCodeMissingRequiredParameterException "MissingParameter" 2670// An input parameter that is required is missing. 2671// 2672// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutAnomalyDetector 2673func (c *CloudWatch) PutAnomalyDetector(input *PutAnomalyDetectorInput) (*PutAnomalyDetectorOutput, error) { 2674 req, out := c.PutAnomalyDetectorRequest(input) 2675 return out, req.Send() 2676} 2677 2678// PutAnomalyDetectorWithContext is the same as PutAnomalyDetector with the addition of 2679// the ability to pass a context and additional request options. 2680// 2681// See PutAnomalyDetector for details on how to use this API operation. 2682// 2683// The context must be non-nil and will be used for request cancellation. If 2684// the context is nil a panic will occur. In the future the SDK may create 2685// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2686// for more information on using Contexts. 2687func (c *CloudWatch) PutAnomalyDetectorWithContext(ctx aws.Context, input *PutAnomalyDetectorInput, opts ...request.Option) (*PutAnomalyDetectorOutput, error) { 2688 req, out := c.PutAnomalyDetectorRequest(input) 2689 req.SetContext(ctx) 2690 req.ApplyOptions(opts...) 2691 return out, req.Send() 2692} 2693 2694const opPutCompositeAlarm = "PutCompositeAlarm" 2695 2696// PutCompositeAlarmRequest generates a "aws/request.Request" representing the 2697// client's request for the PutCompositeAlarm operation. The "output" return 2698// value will be populated with the request's response once the request completes 2699// successfully. 2700// 2701// Use "Send" method on the returned Request to send the API call to the service. 2702// the "output" return value is not valid until after Send returns without error. 2703// 2704// See PutCompositeAlarm for more information on using the PutCompositeAlarm 2705// API call, and error handling. 2706// 2707// This method is useful when you want to inject custom logic or configuration 2708// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2709// 2710// 2711// // Example sending a request using the PutCompositeAlarmRequest method. 2712// req, resp := client.PutCompositeAlarmRequest(params) 2713// 2714// err := req.Send() 2715// if err == nil { // resp is now filled 2716// fmt.Println(resp) 2717// } 2718// 2719// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutCompositeAlarm 2720func (c *CloudWatch) PutCompositeAlarmRequest(input *PutCompositeAlarmInput) (req *request.Request, output *PutCompositeAlarmOutput) { 2721 op := &request.Operation{ 2722 Name: opPutCompositeAlarm, 2723 HTTPMethod: "POST", 2724 HTTPPath: "/", 2725 } 2726 2727 if input == nil { 2728 input = &PutCompositeAlarmInput{} 2729 } 2730 2731 output = &PutCompositeAlarmOutput{} 2732 req = c.newRequest(op, input, output) 2733 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2734 return 2735} 2736 2737// PutCompositeAlarm API operation for Amazon CloudWatch. 2738// 2739// Creates or updates a composite alarm. When you create a composite alarm, 2740// you specify a rule expression for the alarm that takes into account the alarm 2741// states of other alarms that you have created. The composite alarm goes into 2742// ALARM state only if all conditions of the rule are met. 2743// 2744// The alarms specified in a composite alarm's rule expression can include metric 2745// alarms and other composite alarms. 2746// 2747// Using composite alarms can reduce alarm noise. You can create multiple metric 2748// alarms, and also create a composite alarm and set up alerts only for the 2749// composite alarm. For example, you could create a composite alarm that goes 2750// into ALARM state only when more than one of the underlying metric alarms 2751// are in ALARM state. 2752// 2753// Currently, the only alarm actions that can be taken by composite alarms are 2754// notifying SNS topics. 2755// 2756// It is possible to create a loop or cycle of composite alarms, where composite 2757// alarm A depends on composite alarm B, and composite alarm B also depends 2758// on composite alarm A. In this scenario, you can't delete any composite alarm 2759// that is part of the cycle because there is always still a composite alarm 2760// that depends on that alarm that you want to delete. 2761// 2762// To get out of such a situation, you must break the cycle by changing the 2763// rule of one of the composite alarms in the cycle to remove a dependency that 2764// creates the cycle. The simplest change to make to break a cycle is to change 2765// the AlarmRule of one of the alarms to False. 2766// 2767// Additionally, the evaluation of composite alarms stops if CloudWatch detects 2768// a cycle in the evaluation path. 2769// 2770// When this operation creates an alarm, the alarm state is immediately set 2771// to INSUFFICIENT_DATA. The alarm is then evaluated and its state is set appropriately. 2772// Any actions associated with the new state are then executed. For a composite 2773// alarm, this initial time after creation is the only time that the alarm can 2774// be in INSUFFICIENT_DATA state. 2775// 2776// When you update an existing alarm, its state is left unchanged, but the update 2777// completely overwrites the previous configuration of the alarm. 2778// 2779// If you are an IAM user, you must have iam:CreateServiceLinkedRole to create 2780// a composite alarm that has Systems Manager OpsItem actions. 2781// 2782// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2783// with awserr.Error's Code and Message methods to get detailed information about 2784// the error. 2785// 2786// See the AWS API reference guide for Amazon CloudWatch's 2787// API operation PutCompositeAlarm for usage and error information. 2788// 2789// Returned Error Codes: 2790// * ErrCodeLimitExceededFault "LimitExceeded" 2791// The quota for alarms for this customer has already been reached. 2792// 2793// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutCompositeAlarm 2794func (c *CloudWatch) PutCompositeAlarm(input *PutCompositeAlarmInput) (*PutCompositeAlarmOutput, error) { 2795 req, out := c.PutCompositeAlarmRequest(input) 2796 return out, req.Send() 2797} 2798 2799// PutCompositeAlarmWithContext is the same as PutCompositeAlarm with the addition of 2800// the ability to pass a context and additional request options. 2801// 2802// See PutCompositeAlarm for details on how to use this API operation. 2803// 2804// The context must be non-nil and will be used for request cancellation. If 2805// the context is nil a panic will occur. In the future the SDK may create 2806// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2807// for more information on using Contexts. 2808func (c *CloudWatch) PutCompositeAlarmWithContext(ctx aws.Context, input *PutCompositeAlarmInput, opts ...request.Option) (*PutCompositeAlarmOutput, error) { 2809 req, out := c.PutCompositeAlarmRequest(input) 2810 req.SetContext(ctx) 2811 req.ApplyOptions(opts...) 2812 return out, req.Send() 2813} 2814 2815const opPutDashboard = "PutDashboard" 2816 2817// PutDashboardRequest generates a "aws/request.Request" representing the 2818// client's request for the PutDashboard operation. The "output" return 2819// value will be populated with the request's response once the request completes 2820// successfully. 2821// 2822// Use "Send" method on the returned Request to send the API call to the service. 2823// the "output" return value is not valid until after Send returns without error. 2824// 2825// See PutDashboard for more information on using the PutDashboard 2826// API call, and error handling. 2827// 2828// This method is useful when you want to inject custom logic or configuration 2829// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2830// 2831// 2832// // Example sending a request using the PutDashboardRequest method. 2833// req, resp := client.PutDashboardRequest(params) 2834// 2835// err := req.Send() 2836// if err == nil { // resp is now filled 2837// fmt.Println(resp) 2838// } 2839// 2840// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutDashboard 2841func (c *CloudWatch) PutDashboardRequest(input *PutDashboardInput) (req *request.Request, output *PutDashboardOutput) { 2842 op := &request.Operation{ 2843 Name: opPutDashboard, 2844 HTTPMethod: "POST", 2845 HTTPPath: "/", 2846 } 2847 2848 if input == nil { 2849 input = &PutDashboardInput{} 2850 } 2851 2852 output = &PutDashboardOutput{} 2853 req = c.newRequest(op, input, output) 2854 return 2855} 2856 2857// PutDashboard API operation for Amazon CloudWatch. 2858// 2859// Creates a dashboard if it does not already exist, or updates an existing 2860// dashboard. If you update a dashboard, the entire contents are replaced with 2861// what you specify here. 2862// 2863// All dashboards in your account are global, not region-specific. 2864// 2865// A simple way to create a dashboard using PutDashboard is to copy an existing 2866// dashboard. To copy an existing dashboard using the console, you can load 2867// the dashboard and then use the View/edit source command in the Actions menu 2868// to display the JSON block for that dashboard. Another way to copy a dashboard 2869// is to use GetDashboard, and then use the data returned within DashboardBody 2870// as the template for the new dashboard when you call PutDashboard. 2871// 2872// When you create a dashboard with PutDashboard, a good practice is to add 2873// a text widget at the top of the dashboard with a message that the dashboard 2874// was created by script and should not be changed in the console. This message 2875// could also point console users to the location of the DashboardBody script 2876// or the CloudFormation template used to create the dashboard. 2877// 2878// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2879// with awserr.Error's Code and Message methods to get detailed information about 2880// the error. 2881// 2882// See the AWS API reference guide for Amazon CloudWatch's 2883// API operation PutDashboard for usage and error information. 2884// 2885// Returned Error Codes: 2886// * ErrCodeDashboardInvalidInputError "InvalidParameterInput" 2887// Some part of the dashboard data is invalid. 2888// 2889// * ErrCodeInternalServiceFault "InternalServiceError" 2890// Request processing has failed due to some unknown error, exception, or failure. 2891// 2892// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutDashboard 2893func (c *CloudWatch) PutDashboard(input *PutDashboardInput) (*PutDashboardOutput, error) { 2894 req, out := c.PutDashboardRequest(input) 2895 return out, req.Send() 2896} 2897 2898// PutDashboardWithContext is the same as PutDashboard with the addition of 2899// the ability to pass a context and additional request options. 2900// 2901// See PutDashboard for details on how to use this API operation. 2902// 2903// The context must be non-nil and will be used for request cancellation. If 2904// the context is nil a panic will occur. In the future the SDK may create 2905// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2906// for more information on using Contexts. 2907func (c *CloudWatch) PutDashboardWithContext(ctx aws.Context, input *PutDashboardInput, opts ...request.Option) (*PutDashboardOutput, error) { 2908 req, out := c.PutDashboardRequest(input) 2909 req.SetContext(ctx) 2910 req.ApplyOptions(opts...) 2911 return out, req.Send() 2912} 2913 2914const opPutInsightRule = "PutInsightRule" 2915 2916// PutInsightRuleRequest generates a "aws/request.Request" representing the 2917// client's request for the PutInsightRule operation. The "output" return 2918// value will be populated with the request's response once the request completes 2919// successfully. 2920// 2921// Use "Send" method on the returned Request to send the API call to the service. 2922// the "output" return value is not valid until after Send returns without error. 2923// 2924// See PutInsightRule for more information on using the PutInsightRule 2925// API call, and error handling. 2926// 2927// This method is useful when you want to inject custom logic or configuration 2928// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2929// 2930// 2931// // Example sending a request using the PutInsightRuleRequest method. 2932// req, resp := client.PutInsightRuleRequest(params) 2933// 2934// err := req.Send() 2935// if err == nil { // resp is now filled 2936// fmt.Println(resp) 2937// } 2938// 2939// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutInsightRule 2940func (c *CloudWatch) PutInsightRuleRequest(input *PutInsightRuleInput) (req *request.Request, output *PutInsightRuleOutput) { 2941 op := &request.Operation{ 2942 Name: opPutInsightRule, 2943 HTTPMethod: "POST", 2944 HTTPPath: "/", 2945 } 2946 2947 if input == nil { 2948 input = &PutInsightRuleInput{} 2949 } 2950 2951 output = &PutInsightRuleOutput{} 2952 req = c.newRequest(op, input, output) 2953 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2954 return 2955} 2956 2957// PutInsightRule API operation for Amazon CloudWatch. 2958// 2959// Creates a Contributor Insights rule. Rules evaluate log events in a CloudWatch 2960// Logs log group, enabling you to find contributor data for the log events 2961// in that log group. For more information, see Using Contributor Insights to 2962// Analyze High-Cardinality Data (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights.html). 2963// 2964// If you create a rule, delete it, and then re-create it with the same name, 2965// historical data from the first time the rule was created might not be available. 2966// 2967// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2968// with awserr.Error's Code and Message methods to get detailed information about 2969// the error. 2970// 2971// See the AWS API reference guide for Amazon CloudWatch's 2972// API operation PutInsightRule for usage and error information. 2973// 2974// Returned Error Codes: 2975// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 2976// The value of an input parameter is bad or out-of-range. 2977// 2978// * ErrCodeMissingRequiredParameterException "MissingParameter" 2979// An input parameter that is required is missing. 2980// 2981// * ErrCodeLimitExceededException "LimitExceededException" 2982// The operation exceeded one or more limits. 2983// 2984// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutInsightRule 2985func (c *CloudWatch) PutInsightRule(input *PutInsightRuleInput) (*PutInsightRuleOutput, error) { 2986 req, out := c.PutInsightRuleRequest(input) 2987 return out, req.Send() 2988} 2989 2990// PutInsightRuleWithContext is the same as PutInsightRule with the addition of 2991// the ability to pass a context and additional request options. 2992// 2993// See PutInsightRule for details on how to use this API operation. 2994// 2995// The context must be non-nil and will be used for request cancellation. If 2996// the context is nil a panic will occur. In the future the SDK may create 2997// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2998// for more information on using Contexts. 2999func (c *CloudWatch) PutInsightRuleWithContext(ctx aws.Context, input *PutInsightRuleInput, opts ...request.Option) (*PutInsightRuleOutput, error) { 3000 req, out := c.PutInsightRuleRequest(input) 3001 req.SetContext(ctx) 3002 req.ApplyOptions(opts...) 3003 return out, req.Send() 3004} 3005 3006const opPutMetricAlarm = "PutMetricAlarm" 3007 3008// PutMetricAlarmRequest generates a "aws/request.Request" representing the 3009// client's request for the PutMetricAlarm operation. The "output" return 3010// value will be populated with the request's response once the request completes 3011// successfully. 3012// 3013// Use "Send" method on the returned Request to send the API call to the service. 3014// the "output" return value is not valid until after Send returns without error. 3015// 3016// See PutMetricAlarm for more information on using the PutMetricAlarm 3017// API call, and error handling. 3018// 3019// This method is useful when you want to inject custom logic or configuration 3020// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3021// 3022// 3023// // Example sending a request using the PutMetricAlarmRequest method. 3024// req, resp := client.PutMetricAlarmRequest(params) 3025// 3026// err := req.Send() 3027// if err == nil { // resp is now filled 3028// fmt.Println(resp) 3029// } 3030// 3031// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricAlarm 3032func (c *CloudWatch) PutMetricAlarmRequest(input *PutMetricAlarmInput) (req *request.Request, output *PutMetricAlarmOutput) { 3033 op := &request.Operation{ 3034 Name: opPutMetricAlarm, 3035 HTTPMethod: "POST", 3036 HTTPPath: "/", 3037 } 3038 3039 if input == nil { 3040 input = &PutMetricAlarmInput{} 3041 } 3042 3043 output = &PutMetricAlarmOutput{} 3044 req = c.newRequest(op, input, output) 3045 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3046 return 3047} 3048 3049// PutMetricAlarm API operation for Amazon CloudWatch. 3050// 3051// Creates or updates an alarm and associates it with the specified metric, 3052// metric math expression, or anomaly detection model. 3053// 3054// Alarms based on anomaly detection models cannot have Auto Scaling actions. 3055// 3056// When this operation creates an alarm, the alarm state is immediately set 3057// to INSUFFICIENT_DATA. The alarm is then evaluated and its state is set appropriately. 3058// Any actions associated with the new state are then executed. 3059// 3060// When you update an existing alarm, its state is left unchanged, but the update 3061// completely overwrites the previous configuration of the alarm. 3062// 3063// If you are an IAM user, you must have Amazon EC2 permissions for some alarm 3064// operations: 3065// 3066// * The iam:CreateServiceLinkedRole for all alarms with EC2 actions 3067// 3068// * The iam:CreateServiceLinkedRole to create an alarm with Systems Manager 3069// OpsItem actions. 3070// 3071// The first time you create an alarm in the AWS Management Console, the CLI, 3072// or by using the PutMetricAlarm API, CloudWatch creates the necessary service-linked 3073// role for you. The service-linked roles are called AWSServiceRoleForCloudWatchEvents 3074// and AWSServiceRoleForCloudWatchAlarms_ActionSSM. For more information, see 3075// AWS service-linked role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role). 3076// 3077// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3078// with awserr.Error's Code and Message methods to get detailed information about 3079// the error. 3080// 3081// See the AWS API reference guide for Amazon CloudWatch's 3082// API operation PutMetricAlarm for usage and error information. 3083// 3084// Returned Error Codes: 3085// * ErrCodeLimitExceededFault "LimitExceeded" 3086// The quota for alarms for this customer has already been reached. 3087// 3088// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricAlarm 3089func (c *CloudWatch) PutMetricAlarm(input *PutMetricAlarmInput) (*PutMetricAlarmOutput, error) { 3090 req, out := c.PutMetricAlarmRequest(input) 3091 return out, req.Send() 3092} 3093 3094// PutMetricAlarmWithContext is the same as PutMetricAlarm with the addition of 3095// the ability to pass a context and additional request options. 3096// 3097// See PutMetricAlarm for details on how to use this API operation. 3098// 3099// The context must be non-nil and will be used for request cancellation. If 3100// the context is nil a panic will occur. In the future the SDK may create 3101// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3102// for more information on using Contexts. 3103func (c *CloudWatch) PutMetricAlarmWithContext(ctx aws.Context, input *PutMetricAlarmInput, opts ...request.Option) (*PutMetricAlarmOutput, error) { 3104 req, out := c.PutMetricAlarmRequest(input) 3105 req.SetContext(ctx) 3106 req.ApplyOptions(opts...) 3107 return out, req.Send() 3108} 3109 3110const opPutMetricData = "PutMetricData" 3111 3112// PutMetricDataRequest generates a "aws/request.Request" representing the 3113// client's request for the PutMetricData operation. The "output" return 3114// value will be populated with the request's response once the request completes 3115// successfully. 3116// 3117// Use "Send" method on the returned Request to send the API call to the service. 3118// the "output" return value is not valid until after Send returns without error. 3119// 3120// See PutMetricData for more information on using the PutMetricData 3121// API call, and error handling. 3122// 3123// This method is useful when you want to inject custom logic or configuration 3124// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3125// 3126// 3127// // Example sending a request using the PutMetricDataRequest method. 3128// req, resp := client.PutMetricDataRequest(params) 3129// 3130// err := req.Send() 3131// if err == nil { // resp is now filled 3132// fmt.Println(resp) 3133// } 3134// 3135// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricData 3136func (c *CloudWatch) PutMetricDataRequest(input *PutMetricDataInput) (req *request.Request, output *PutMetricDataOutput) { 3137 op := &request.Operation{ 3138 Name: opPutMetricData, 3139 HTTPMethod: "POST", 3140 HTTPPath: "/", 3141 } 3142 3143 if input == nil { 3144 input = &PutMetricDataInput{} 3145 } 3146 3147 output = &PutMetricDataOutput{} 3148 req = c.newRequest(op, input, output) 3149 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3150 return 3151} 3152 3153// PutMetricData API operation for Amazon CloudWatch. 3154// 3155// Publishes metric data points to Amazon CloudWatch. CloudWatch associates 3156// the data points with the specified metric. If the specified metric does not 3157// exist, CloudWatch creates the metric. When CloudWatch creates a metric, it 3158// can take up to fifteen minutes for the metric to appear in calls to ListMetrics 3159// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html). 3160// 3161// You can publish either individual data points in the Value field, or arrays 3162// of values and the number of times each value occurred during the period by 3163// using the Values and Counts fields in the MetricDatum structure. Using the 3164// Values and Counts method enables you to publish up to 150 values per metric 3165// with one PutMetricData request, and supports retrieving percentile statistics 3166// on this data. 3167// 3168// Each PutMetricData request is limited to 40 KB in size for HTTP POST requests. 3169// You can send a payload compressed by gzip. Each request is also limited to 3170// no more than 20 different metrics. 3171// 3172// Although the Value parameter accepts numbers of type Double, CloudWatch rejects 3173// values that are either too small or too large. Values must be in the range 3174// of -2^360 to 2^360. In addition, special values (for example, NaN, +Infinity, 3175// -Infinity) are not supported. 3176// 3177// You can use up to 10 dimensions per metric to further clarify what data the 3178// metric collects. Each dimension consists of a Name and Value pair. For more 3179// information about specifying dimensions, see Publishing Metrics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html) 3180// in the Amazon CloudWatch User Guide. 3181// 3182// You specify the time stamp to be associated with each data point. You can 3183// specify time stamps that are as much as two weeks before the current date, 3184// and as much as 2 hours after the current day and time. 3185// 3186// Data points with time stamps from 24 hours ago or longer can take at least 3187// 48 hours to become available for GetMetricData (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html) 3188// or GetMetricStatistics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html) 3189// from the time they are submitted. Data points with time stamps between 3 3190// and 24 hours ago can take as much as 2 hours to become available for for 3191// GetMetricData (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html) 3192// or GetMetricStatistics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html). 3193// 3194// CloudWatch needs raw data points to calculate percentile statistics. If you 3195// publish data using a statistic set instead, you can only retrieve percentile 3196// statistics for this data if one of the following conditions is true: 3197// 3198// * The SampleCount value of the statistic set is 1 and Min, Max, and Sum 3199// are all equal. 3200// 3201// * The Min and Max are equal, and Sum is equal to Min multiplied by SampleCount. 3202// 3203// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3204// with awserr.Error's Code and Message methods to get detailed information about 3205// the error. 3206// 3207// See the AWS API reference guide for Amazon CloudWatch's 3208// API operation PutMetricData for usage and error information. 3209// 3210// Returned Error Codes: 3211// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 3212// The value of an input parameter is bad or out-of-range. 3213// 3214// * ErrCodeMissingRequiredParameterException "MissingParameter" 3215// An input parameter that is required is missing. 3216// 3217// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" 3218// Parameters were used together that cannot be used together. 3219// 3220// * ErrCodeInternalServiceFault "InternalServiceError" 3221// Request processing has failed due to some unknown error, exception, or failure. 3222// 3223// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricData 3224func (c *CloudWatch) PutMetricData(input *PutMetricDataInput) (*PutMetricDataOutput, error) { 3225 req, out := c.PutMetricDataRequest(input) 3226 return out, req.Send() 3227} 3228 3229// PutMetricDataWithContext is the same as PutMetricData with the addition of 3230// the ability to pass a context and additional request options. 3231// 3232// See PutMetricData for details on how to use this API operation. 3233// 3234// The context must be non-nil and will be used for request cancellation. If 3235// the context is nil a panic will occur. In the future the SDK may create 3236// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3237// for more information on using Contexts. 3238func (c *CloudWatch) PutMetricDataWithContext(ctx aws.Context, input *PutMetricDataInput, opts ...request.Option) (*PutMetricDataOutput, error) { 3239 req, out := c.PutMetricDataRequest(input) 3240 req.SetContext(ctx) 3241 req.ApplyOptions(opts...) 3242 return out, req.Send() 3243} 3244 3245const opPutMetricStream = "PutMetricStream" 3246 3247// PutMetricStreamRequest generates a "aws/request.Request" representing the 3248// client's request for the PutMetricStream operation. The "output" return 3249// value will be populated with the request's response once the request completes 3250// successfully. 3251// 3252// Use "Send" method on the returned Request to send the API call to the service. 3253// the "output" return value is not valid until after Send returns without error. 3254// 3255// See PutMetricStream for more information on using the PutMetricStream 3256// API call, and error handling. 3257// 3258// This method is useful when you want to inject custom logic or configuration 3259// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3260// 3261// 3262// // Example sending a request using the PutMetricStreamRequest method. 3263// req, resp := client.PutMetricStreamRequest(params) 3264// 3265// err := req.Send() 3266// if err == nil { // resp is now filled 3267// fmt.Println(resp) 3268// } 3269// 3270// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricStream 3271func (c *CloudWatch) PutMetricStreamRequest(input *PutMetricStreamInput) (req *request.Request, output *PutMetricStreamOutput) { 3272 op := &request.Operation{ 3273 Name: opPutMetricStream, 3274 HTTPMethod: "POST", 3275 HTTPPath: "/", 3276 } 3277 3278 if input == nil { 3279 input = &PutMetricStreamInput{} 3280 } 3281 3282 output = &PutMetricStreamOutput{} 3283 req = c.newRequest(op, input, output) 3284 return 3285} 3286 3287// PutMetricStream API operation for Amazon CloudWatch. 3288// 3289// Creates or updates a metric stream. Metric streams can automatically stream 3290// CloudWatch metrics to AWS destinations including Amazon S3 and to many third-party 3291// solutions. 3292// 3293// For more information, see Using Metric Streams (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Metric-Streams.html). 3294// 3295// To create a metric stream, you must be logged on to an account that has the 3296// iam:PassRole permission and either the CloudWatchFullAccess policy or the 3297// cloudwatch:PutMetricStream permission. 3298// 3299// When you create or update a metric stream, you choose one of the following: 3300// 3301// * Stream metrics from all metric namespaces in the account. 3302// 3303// * Stream metrics from all metric namespaces in the account, except for 3304// the namespaces that you list in ExcludeFilters. 3305// 3306// * Stream metrics from only the metric namespaces that you list in IncludeFilters. 3307// 3308// When you use PutMetricStream to create a new metric stream, the stream is 3309// created in the running state. If you use it to update an existing stream, 3310// the state of the stream is not changed. 3311// 3312// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3313// with awserr.Error's Code and Message methods to get detailed information about 3314// the error. 3315// 3316// See the AWS API reference guide for Amazon CloudWatch's 3317// API operation PutMetricStream for usage and error information. 3318// 3319// Returned Error Codes: 3320// * ErrCodeConcurrentModificationException "ConcurrentModificationException" 3321// More than one process tried to modify a resource at the same time. 3322// 3323// * ErrCodeInternalServiceFault "InternalServiceError" 3324// Request processing has failed due to some unknown error, exception, or failure. 3325// 3326// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 3327// The value of an input parameter is bad or out-of-range. 3328// 3329// * ErrCodeMissingRequiredParameterException "MissingParameter" 3330// An input parameter that is required is missing. 3331// 3332// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" 3333// Parameters were used together that cannot be used together. 3334// 3335// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricStream 3336func (c *CloudWatch) PutMetricStream(input *PutMetricStreamInput) (*PutMetricStreamOutput, error) { 3337 req, out := c.PutMetricStreamRequest(input) 3338 return out, req.Send() 3339} 3340 3341// PutMetricStreamWithContext is the same as PutMetricStream with the addition of 3342// the ability to pass a context and additional request options. 3343// 3344// See PutMetricStream for details on how to use this API operation. 3345// 3346// The context must be non-nil and will be used for request cancellation. If 3347// the context is nil a panic will occur. In the future the SDK may create 3348// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3349// for more information on using Contexts. 3350func (c *CloudWatch) PutMetricStreamWithContext(ctx aws.Context, input *PutMetricStreamInput, opts ...request.Option) (*PutMetricStreamOutput, error) { 3351 req, out := c.PutMetricStreamRequest(input) 3352 req.SetContext(ctx) 3353 req.ApplyOptions(opts...) 3354 return out, req.Send() 3355} 3356 3357const opSetAlarmState = "SetAlarmState" 3358 3359// SetAlarmStateRequest generates a "aws/request.Request" representing the 3360// client's request for the SetAlarmState operation. The "output" return 3361// value will be populated with the request's response once the request completes 3362// successfully. 3363// 3364// Use "Send" method on the returned Request to send the API call to the service. 3365// the "output" return value is not valid until after Send returns without error. 3366// 3367// See SetAlarmState for more information on using the SetAlarmState 3368// API call, and error handling. 3369// 3370// This method is useful when you want to inject custom logic or configuration 3371// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3372// 3373// 3374// // Example sending a request using the SetAlarmStateRequest method. 3375// req, resp := client.SetAlarmStateRequest(params) 3376// 3377// err := req.Send() 3378// if err == nil { // resp is now filled 3379// fmt.Println(resp) 3380// } 3381// 3382// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/SetAlarmState 3383func (c *CloudWatch) SetAlarmStateRequest(input *SetAlarmStateInput) (req *request.Request, output *SetAlarmStateOutput) { 3384 op := &request.Operation{ 3385 Name: opSetAlarmState, 3386 HTTPMethod: "POST", 3387 HTTPPath: "/", 3388 } 3389 3390 if input == nil { 3391 input = &SetAlarmStateInput{} 3392 } 3393 3394 output = &SetAlarmStateOutput{} 3395 req = c.newRequest(op, input, output) 3396 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3397 return 3398} 3399 3400// SetAlarmState API operation for Amazon CloudWatch. 3401// 3402// Temporarily sets the state of an alarm for testing purposes. When the updated 3403// state differs from the previous value, the action configured for the appropriate 3404// state is invoked. For example, if your alarm is configured to send an Amazon 3405// SNS message when an alarm is triggered, temporarily changing the alarm state 3406// to ALARM sends an SNS message. 3407// 3408// Metric alarms returns to their actual state quickly, often within seconds. 3409// Because the metric alarm state change happens quickly, it is typically only 3410// visible in the alarm's History tab in the Amazon CloudWatch console or through 3411// DescribeAlarmHistory (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarmHistory.html). 3412// 3413// If you use SetAlarmState on a composite alarm, the composite alarm is not 3414// guaranteed to return to its actual state. It returns to its actual state 3415// only once any of its children alarms change state. It is also reevaluated 3416// if you update its configuration. 3417// 3418// If an alarm triggers EC2 Auto Scaling policies or application Auto Scaling 3419// policies, you must include information in the StateReasonData parameter to 3420// enable the policy to take the correct action. 3421// 3422// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3423// with awserr.Error's Code and Message methods to get detailed information about 3424// the error. 3425// 3426// See the AWS API reference guide for Amazon CloudWatch's 3427// API operation SetAlarmState for usage and error information. 3428// 3429// Returned Error Codes: 3430// * ErrCodeResourceNotFound "ResourceNotFound" 3431// The named resource does not exist. 3432// 3433// * ErrCodeInvalidFormatFault "InvalidFormat" 3434// Data was not syntactically valid JSON. 3435// 3436// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/SetAlarmState 3437func (c *CloudWatch) SetAlarmState(input *SetAlarmStateInput) (*SetAlarmStateOutput, error) { 3438 req, out := c.SetAlarmStateRequest(input) 3439 return out, req.Send() 3440} 3441 3442// SetAlarmStateWithContext is the same as SetAlarmState with the addition of 3443// the ability to pass a context and additional request options. 3444// 3445// See SetAlarmState for details on how to use this API operation. 3446// 3447// The context must be non-nil and will be used for request cancellation. If 3448// the context is nil a panic will occur. In the future the SDK may create 3449// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3450// for more information on using Contexts. 3451func (c *CloudWatch) SetAlarmStateWithContext(ctx aws.Context, input *SetAlarmStateInput, opts ...request.Option) (*SetAlarmStateOutput, error) { 3452 req, out := c.SetAlarmStateRequest(input) 3453 req.SetContext(ctx) 3454 req.ApplyOptions(opts...) 3455 return out, req.Send() 3456} 3457 3458const opStartMetricStreams = "StartMetricStreams" 3459 3460// StartMetricStreamsRequest generates a "aws/request.Request" representing the 3461// client's request for the StartMetricStreams operation. The "output" return 3462// value will be populated with the request's response once the request completes 3463// successfully. 3464// 3465// Use "Send" method on the returned Request to send the API call to the service. 3466// the "output" return value is not valid until after Send returns without error. 3467// 3468// See StartMetricStreams for more information on using the StartMetricStreams 3469// API call, and error handling. 3470// 3471// This method is useful when you want to inject custom logic or configuration 3472// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3473// 3474// 3475// // Example sending a request using the StartMetricStreamsRequest method. 3476// req, resp := client.StartMetricStreamsRequest(params) 3477// 3478// err := req.Send() 3479// if err == nil { // resp is now filled 3480// fmt.Println(resp) 3481// } 3482// 3483// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/StartMetricStreams 3484func (c *CloudWatch) StartMetricStreamsRequest(input *StartMetricStreamsInput) (req *request.Request, output *StartMetricStreamsOutput) { 3485 op := &request.Operation{ 3486 Name: opStartMetricStreams, 3487 HTTPMethod: "POST", 3488 HTTPPath: "/", 3489 } 3490 3491 if input == nil { 3492 input = &StartMetricStreamsInput{} 3493 } 3494 3495 output = &StartMetricStreamsOutput{} 3496 req = c.newRequest(op, input, output) 3497 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3498 return 3499} 3500 3501// StartMetricStreams API operation for Amazon CloudWatch. 3502// 3503// Starts the streaming of metrics for one or more of your metric streams. 3504// 3505// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3506// with awserr.Error's Code and Message methods to get detailed information about 3507// the error. 3508// 3509// See the AWS API reference guide for Amazon CloudWatch's 3510// API operation StartMetricStreams for usage and error information. 3511// 3512// Returned Error Codes: 3513// * ErrCodeInternalServiceFault "InternalServiceError" 3514// Request processing has failed due to some unknown error, exception, or failure. 3515// 3516// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 3517// The value of an input parameter is bad or out-of-range. 3518// 3519// * ErrCodeMissingRequiredParameterException "MissingParameter" 3520// An input parameter that is required is missing. 3521// 3522// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/StartMetricStreams 3523func (c *CloudWatch) StartMetricStreams(input *StartMetricStreamsInput) (*StartMetricStreamsOutput, error) { 3524 req, out := c.StartMetricStreamsRequest(input) 3525 return out, req.Send() 3526} 3527 3528// StartMetricStreamsWithContext is the same as StartMetricStreams with the addition of 3529// the ability to pass a context and additional request options. 3530// 3531// See StartMetricStreams for details on how to use this API operation. 3532// 3533// The context must be non-nil and will be used for request cancellation. If 3534// the context is nil a panic will occur. In the future the SDK may create 3535// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3536// for more information on using Contexts. 3537func (c *CloudWatch) StartMetricStreamsWithContext(ctx aws.Context, input *StartMetricStreamsInput, opts ...request.Option) (*StartMetricStreamsOutput, error) { 3538 req, out := c.StartMetricStreamsRequest(input) 3539 req.SetContext(ctx) 3540 req.ApplyOptions(opts...) 3541 return out, req.Send() 3542} 3543 3544const opStopMetricStreams = "StopMetricStreams" 3545 3546// StopMetricStreamsRequest generates a "aws/request.Request" representing the 3547// client's request for the StopMetricStreams operation. The "output" return 3548// value will be populated with the request's response once the request completes 3549// successfully. 3550// 3551// Use "Send" method on the returned Request to send the API call to the service. 3552// the "output" return value is not valid until after Send returns without error. 3553// 3554// See StopMetricStreams for more information on using the StopMetricStreams 3555// API call, and error handling. 3556// 3557// This method is useful when you want to inject custom logic or configuration 3558// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3559// 3560// 3561// // Example sending a request using the StopMetricStreamsRequest method. 3562// req, resp := client.StopMetricStreamsRequest(params) 3563// 3564// err := req.Send() 3565// if err == nil { // resp is now filled 3566// fmt.Println(resp) 3567// } 3568// 3569// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/StopMetricStreams 3570func (c *CloudWatch) StopMetricStreamsRequest(input *StopMetricStreamsInput) (req *request.Request, output *StopMetricStreamsOutput) { 3571 op := &request.Operation{ 3572 Name: opStopMetricStreams, 3573 HTTPMethod: "POST", 3574 HTTPPath: "/", 3575 } 3576 3577 if input == nil { 3578 input = &StopMetricStreamsInput{} 3579 } 3580 3581 output = &StopMetricStreamsOutput{} 3582 req = c.newRequest(op, input, output) 3583 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3584 return 3585} 3586 3587// StopMetricStreams API operation for Amazon CloudWatch. 3588// 3589// Stops the streaming of metrics for one or more of your metric streams. 3590// 3591// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3592// with awserr.Error's Code and Message methods to get detailed information about 3593// the error. 3594// 3595// See the AWS API reference guide for Amazon CloudWatch's 3596// API operation StopMetricStreams for usage and error information. 3597// 3598// Returned Error Codes: 3599// * ErrCodeInternalServiceFault "InternalServiceError" 3600// Request processing has failed due to some unknown error, exception, or failure. 3601// 3602// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 3603// The value of an input parameter is bad or out-of-range. 3604// 3605// * ErrCodeMissingRequiredParameterException "MissingParameter" 3606// An input parameter that is required is missing. 3607// 3608// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/StopMetricStreams 3609func (c *CloudWatch) StopMetricStreams(input *StopMetricStreamsInput) (*StopMetricStreamsOutput, error) { 3610 req, out := c.StopMetricStreamsRequest(input) 3611 return out, req.Send() 3612} 3613 3614// StopMetricStreamsWithContext is the same as StopMetricStreams with the addition of 3615// the ability to pass a context and additional request options. 3616// 3617// See StopMetricStreams for details on how to use this API operation. 3618// 3619// The context must be non-nil and will be used for request cancellation. If 3620// the context is nil a panic will occur. In the future the SDK may create 3621// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3622// for more information on using Contexts. 3623func (c *CloudWatch) StopMetricStreamsWithContext(ctx aws.Context, input *StopMetricStreamsInput, opts ...request.Option) (*StopMetricStreamsOutput, error) { 3624 req, out := c.StopMetricStreamsRequest(input) 3625 req.SetContext(ctx) 3626 req.ApplyOptions(opts...) 3627 return out, req.Send() 3628} 3629 3630const opTagResource = "TagResource" 3631 3632// TagResourceRequest generates a "aws/request.Request" representing the 3633// client's request for the TagResource operation. The "output" return 3634// value will be populated with the request's response once the request completes 3635// successfully. 3636// 3637// Use "Send" method on the returned Request to send the API call to the service. 3638// the "output" return value is not valid until after Send returns without error. 3639// 3640// See TagResource for more information on using the TagResource 3641// API call, and error handling. 3642// 3643// This method is useful when you want to inject custom logic or configuration 3644// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3645// 3646// 3647// // Example sending a request using the TagResourceRequest method. 3648// req, resp := client.TagResourceRequest(params) 3649// 3650// err := req.Send() 3651// if err == nil { // resp is now filled 3652// fmt.Println(resp) 3653// } 3654// 3655// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/TagResource 3656func (c *CloudWatch) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 3657 op := &request.Operation{ 3658 Name: opTagResource, 3659 HTTPMethod: "POST", 3660 HTTPPath: "/", 3661 } 3662 3663 if input == nil { 3664 input = &TagResourceInput{} 3665 } 3666 3667 output = &TagResourceOutput{} 3668 req = c.newRequest(op, input, output) 3669 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3670 return 3671} 3672 3673// TagResource API operation for Amazon CloudWatch. 3674// 3675// Assigns one or more tags (key-value pairs) to the specified CloudWatch resource. 3676// Currently, the only CloudWatch resources that can be tagged are alarms and 3677// Contributor Insights rules. 3678// 3679// Tags can help you organize and categorize your resources. You can also use 3680// them to scope user permissions by granting a user permission to access or 3681// change only resources with certain tag values. 3682// 3683// Tags don't have any semantic meaning to AWS and are interpreted strictly 3684// as strings of characters. 3685// 3686// You can use the TagResource action with an alarm that already has tags. If 3687// you specify a new tag key for the alarm, this tag is appended to the list 3688// of tags associated with the alarm. If you specify a tag key that is already 3689// associated with the alarm, the new tag value that you specify replaces the 3690// previous value for that tag. 3691// 3692// You can associate as many as 50 tags with a CloudWatch resource. 3693// 3694// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3695// with awserr.Error's Code and Message methods to get detailed information about 3696// the error. 3697// 3698// See the AWS API reference guide for Amazon CloudWatch's 3699// API operation TagResource for usage and error information. 3700// 3701// Returned Error Codes: 3702// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 3703// The value of an input parameter is bad or out-of-range. 3704// 3705// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 3706// The named resource does not exist. 3707// 3708// * ErrCodeConcurrentModificationException "ConcurrentModificationException" 3709// More than one process tried to modify a resource at the same time. 3710// 3711// * ErrCodeInternalServiceFault "InternalServiceError" 3712// Request processing has failed due to some unknown error, exception, or failure. 3713// 3714// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/TagResource 3715func (c *CloudWatch) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 3716 req, out := c.TagResourceRequest(input) 3717 return out, req.Send() 3718} 3719 3720// TagResourceWithContext is the same as TagResource with the addition of 3721// the ability to pass a context and additional request options. 3722// 3723// See TagResource for details on how to use this API operation. 3724// 3725// The context must be non-nil and will be used for request cancellation. If 3726// the context is nil a panic will occur. In the future the SDK may create 3727// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3728// for more information on using Contexts. 3729func (c *CloudWatch) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 3730 req, out := c.TagResourceRequest(input) 3731 req.SetContext(ctx) 3732 req.ApplyOptions(opts...) 3733 return out, req.Send() 3734} 3735 3736const opUntagResource = "UntagResource" 3737 3738// UntagResourceRequest generates a "aws/request.Request" representing the 3739// client's request for the UntagResource operation. The "output" return 3740// value will be populated with the request's response once the request completes 3741// successfully. 3742// 3743// Use "Send" method on the returned Request to send the API call to the service. 3744// the "output" return value is not valid until after Send returns without error. 3745// 3746// See UntagResource for more information on using the UntagResource 3747// API call, and error handling. 3748// 3749// This method is useful when you want to inject custom logic or configuration 3750// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3751// 3752// 3753// // Example sending a request using the UntagResourceRequest method. 3754// req, resp := client.UntagResourceRequest(params) 3755// 3756// err := req.Send() 3757// if err == nil { // resp is now filled 3758// fmt.Println(resp) 3759// } 3760// 3761// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/UntagResource 3762func (c *CloudWatch) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 3763 op := &request.Operation{ 3764 Name: opUntagResource, 3765 HTTPMethod: "POST", 3766 HTTPPath: "/", 3767 } 3768 3769 if input == nil { 3770 input = &UntagResourceInput{} 3771 } 3772 3773 output = &UntagResourceOutput{} 3774 req = c.newRequest(op, input, output) 3775 req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3776 return 3777} 3778 3779// UntagResource API operation for Amazon CloudWatch. 3780// 3781// Removes one or more tags from the specified resource. 3782// 3783// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3784// with awserr.Error's Code and Message methods to get detailed information about 3785// the error. 3786// 3787// See the AWS API reference guide for Amazon CloudWatch's 3788// API operation UntagResource for usage and error information. 3789// 3790// Returned Error Codes: 3791// * ErrCodeInvalidParameterValueException "InvalidParameterValue" 3792// The value of an input parameter is bad or out-of-range. 3793// 3794// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 3795// The named resource does not exist. 3796// 3797// * ErrCodeConcurrentModificationException "ConcurrentModificationException" 3798// More than one process tried to modify a resource at the same time. 3799// 3800// * ErrCodeInternalServiceFault "InternalServiceError" 3801// Request processing has failed due to some unknown error, exception, or failure. 3802// 3803// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/UntagResource 3804func (c *CloudWatch) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 3805 req, out := c.UntagResourceRequest(input) 3806 return out, req.Send() 3807} 3808 3809// UntagResourceWithContext is the same as UntagResource with the addition of 3810// the ability to pass a context and additional request options. 3811// 3812// See UntagResource for details on how to use this API operation. 3813// 3814// The context must be non-nil and will be used for request cancellation. If 3815// the context is nil a panic will occur. In the future the SDK may create 3816// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3817// for more information on using Contexts. 3818func (c *CloudWatch) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 3819 req, out := c.UntagResourceRequest(input) 3820 req.SetContext(ctx) 3821 req.ApplyOptions(opts...) 3822 return out, req.Send() 3823} 3824 3825// Represents the history of a specific alarm. 3826type AlarmHistoryItem struct { 3827 _ struct{} `type:"structure"` 3828 3829 // The descriptive name for the alarm. 3830 AlarmName *string `min:"1" type:"string"` 3831 3832 // The type of alarm, either metric alarm or composite alarm. 3833 AlarmType *string `type:"string" enum:"AlarmType"` 3834 3835 // Data about the alarm, in JSON format. 3836 HistoryData *string `min:"1" type:"string"` 3837 3838 // The type of alarm history item. 3839 HistoryItemType *string `type:"string" enum:"HistoryItemType"` 3840 3841 // A summary of the alarm history, in text format. 3842 HistorySummary *string `min:"1" type:"string"` 3843 3844 // The time stamp for the alarm history item. 3845 Timestamp *time.Time `type:"timestamp"` 3846} 3847 3848// String returns the string representation 3849func (s AlarmHistoryItem) String() string { 3850 return awsutil.Prettify(s) 3851} 3852 3853// GoString returns the string representation 3854func (s AlarmHistoryItem) GoString() string { 3855 return s.String() 3856} 3857 3858// SetAlarmName sets the AlarmName field's value. 3859func (s *AlarmHistoryItem) SetAlarmName(v string) *AlarmHistoryItem { 3860 s.AlarmName = &v 3861 return s 3862} 3863 3864// SetAlarmType sets the AlarmType field's value. 3865func (s *AlarmHistoryItem) SetAlarmType(v string) *AlarmHistoryItem { 3866 s.AlarmType = &v 3867 return s 3868} 3869 3870// SetHistoryData sets the HistoryData field's value. 3871func (s *AlarmHistoryItem) SetHistoryData(v string) *AlarmHistoryItem { 3872 s.HistoryData = &v 3873 return s 3874} 3875 3876// SetHistoryItemType sets the HistoryItemType field's value. 3877func (s *AlarmHistoryItem) SetHistoryItemType(v string) *AlarmHistoryItem { 3878 s.HistoryItemType = &v 3879 return s 3880} 3881 3882// SetHistorySummary sets the HistorySummary field's value. 3883func (s *AlarmHistoryItem) SetHistorySummary(v string) *AlarmHistoryItem { 3884 s.HistorySummary = &v 3885 return s 3886} 3887 3888// SetTimestamp sets the Timestamp field's value. 3889func (s *AlarmHistoryItem) SetTimestamp(v time.Time) *AlarmHistoryItem { 3890 s.Timestamp = &v 3891 return s 3892} 3893 3894// An anomaly detection model associated with a particular CloudWatch metric 3895// and statistic. You can use the model to display a band of expected normal 3896// values when the metric is graphed. 3897type AnomalyDetector struct { 3898 _ struct{} `type:"structure"` 3899 3900 // The configuration specifies details about how the anomaly detection model 3901 // is to be trained, including time ranges to exclude from use for training 3902 // the model, and the time zone to use for the metric. 3903 Configuration *AnomalyDetectorConfiguration `type:"structure"` 3904 3905 // The metric dimensions associated with the anomaly detection model. 3906 Dimensions []*Dimension `type:"list"` 3907 3908 // The name of the metric associated with the anomaly detection model. 3909 MetricName *string `min:"1" type:"string"` 3910 3911 // The namespace of the metric associated with the anomaly detection model. 3912 Namespace *string `min:"1" type:"string"` 3913 3914 // The statistic associated with the anomaly detection model. 3915 Stat *string `type:"string"` 3916 3917 // The current status of the anomaly detector's training. The possible values 3918 // are TRAINED | PENDING_TRAINING | TRAINED_INSUFFICIENT_DATA 3919 StateValue *string `type:"string" enum:"AnomalyDetectorStateValue"` 3920} 3921 3922// String returns the string representation 3923func (s AnomalyDetector) String() string { 3924 return awsutil.Prettify(s) 3925} 3926 3927// GoString returns the string representation 3928func (s AnomalyDetector) GoString() string { 3929 return s.String() 3930} 3931 3932// SetConfiguration sets the Configuration field's value. 3933func (s *AnomalyDetector) SetConfiguration(v *AnomalyDetectorConfiguration) *AnomalyDetector { 3934 s.Configuration = v 3935 return s 3936} 3937 3938// SetDimensions sets the Dimensions field's value. 3939func (s *AnomalyDetector) SetDimensions(v []*Dimension) *AnomalyDetector { 3940 s.Dimensions = v 3941 return s 3942} 3943 3944// SetMetricName sets the MetricName field's value. 3945func (s *AnomalyDetector) SetMetricName(v string) *AnomalyDetector { 3946 s.MetricName = &v 3947 return s 3948} 3949 3950// SetNamespace sets the Namespace field's value. 3951func (s *AnomalyDetector) SetNamespace(v string) *AnomalyDetector { 3952 s.Namespace = &v 3953 return s 3954} 3955 3956// SetStat sets the Stat field's value. 3957func (s *AnomalyDetector) SetStat(v string) *AnomalyDetector { 3958 s.Stat = &v 3959 return s 3960} 3961 3962// SetStateValue sets the StateValue field's value. 3963func (s *AnomalyDetector) SetStateValue(v string) *AnomalyDetector { 3964 s.StateValue = &v 3965 return s 3966} 3967 3968// The configuration specifies details about how the anomaly detection model 3969// is to be trained, including time ranges to exclude from use for training 3970// the model and the time zone to use for the metric. 3971type AnomalyDetectorConfiguration struct { 3972 _ struct{} `type:"structure"` 3973 3974 // An array of time ranges to exclude from use when the anomaly detection model 3975 // is trained. Use this to make sure that events that could cause unusual values 3976 // for the metric, such as deployments, aren't used when CloudWatch creates 3977 // the model. 3978 ExcludedTimeRanges []*Range `type:"list"` 3979 3980 // The time zone to use for the metric. This is useful to enable the model to 3981 // automatically account for daylight savings time changes if the metric is 3982 // sensitive to such time changes. 3983 // 3984 // To specify a time zone, use the name of the time zone as specified in the 3985 // standard tz database. For more information, see tz database (https://en.wikipedia.org/wiki/Tz_database). 3986 MetricTimezone *string `type:"string"` 3987} 3988 3989// String returns the string representation 3990func (s AnomalyDetectorConfiguration) String() string { 3991 return awsutil.Prettify(s) 3992} 3993 3994// GoString returns the string representation 3995func (s AnomalyDetectorConfiguration) GoString() string { 3996 return s.String() 3997} 3998 3999// Validate inspects the fields of the type to determine if they are valid. 4000func (s *AnomalyDetectorConfiguration) Validate() error { 4001 invalidParams := request.ErrInvalidParams{Context: "AnomalyDetectorConfiguration"} 4002 if s.ExcludedTimeRanges != nil { 4003 for i, v := range s.ExcludedTimeRanges { 4004 if v == nil { 4005 continue 4006 } 4007 if err := v.Validate(); err != nil { 4008 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ExcludedTimeRanges", i), err.(request.ErrInvalidParams)) 4009 } 4010 } 4011 } 4012 4013 if invalidParams.Len() > 0 { 4014 return invalidParams 4015 } 4016 return nil 4017} 4018 4019// SetExcludedTimeRanges sets the ExcludedTimeRanges field's value. 4020func (s *AnomalyDetectorConfiguration) SetExcludedTimeRanges(v []*Range) *AnomalyDetectorConfiguration { 4021 s.ExcludedTimeRanges = v 4022 return s 4023} 4024 4025// SetMetricTimezone sets the MetricTimezone field's value. 4026func (s *AnomalyDetectorConfiguration) SetMetricTimezone(v string) *AnomalyDetectorConfiguration { 4027 s.MetricTimezone = &v 4028 return s 4029} 4030 4031// The details about a composite alarm. 4032type CompositeAlarm struct { 4033 _ struct{} `type:"structure"` 4034 4035 // Indicates whether actions should be executed during any changes to the alarm 4036 // state. 4037 ActionsEnabled *bool `type:"boolean"` 4038 4039 // The actions to execute when this alarm transitions to the ALARM state from 4040 // any other state. Each action is specified as an Amazon Resource Name (ARN). 4041 AlarmActions []*string `type:"list"` 4042 4043 // The Amazon Resource Name (ARN) of the alarm. 4044 AlarmArn *string `min:"1" type:"string"` 4045 4046 // The time stamp of the last update to the alarm configuration. 4047 AlarmConfigurationUpdatedTimestamp *time.Time `type:"timestamp"` 4048 4049 // The description of the alarm. 4050 AlarmDescription *string `type:"string"` 4051 4052 // The name of the alarm. 4053 AlarmName *string `min:"1" type:"string"` 4054 4055 // The rule that this alarm uses to evaluate its alarm state. 4056 AlarmRule *string `min:"1" type:"string"` 4057 4058 // The actions to execute when this alarm transitions to the INSUFFICIENT_DATA 4059 // state from any other state. Each action is specified as an Amazon Resource 4060 // Name (ARN). 4061 InsufficientDataActions []*string `type:"list"` 4062 4063 // The actions to execute when this alarm transitions to the OK state from any 4064 // other state. Each action is specified as an Amazon Resource Name (ARN). 4065 OKActions []*string `type:"list"` 4066 4067 // An explanation for the alarm state, in text format. 4068 StateReason *string `type:"string"` 4069 4070 // An explanation for the alarm state, in JSON format. 4071 StateReasonData *string `type:"string"` 4072 4073 // The time stamp of the last update to the alarm state. 4074 StateUpdatedTimestamp *time.Time `type:"timestamp"` 4075 4076 // The state value for the alarm. 4077 StateValue *string `type:"string" enum:"StateValue"` 4078} 4079 4080// String returns the string representation 4081func (s CompositeAlarm) String() string { 4082 return awsutil.Prettify(s) 4083} 4084 4085// GoString returns the string representation 4086func (s CompositeAlarm) GoString() string { 4087 return s.String() 4088} 4089 4090// SetActionsEnabled sets the ActionsEnabled field's value. 4091func (s *CompositeAlarm) SetActionsEnabled(v bool) *CompositeAlarm { 4092 s.ActionsEnabled = &v 4093 return s 4094} 4095 4096// SetAlarmActions sets the AlarmActions field's value. 4097func (s *CompositeAlarm) SetAlarmActions(v []*string) *CompositeAlarm { 4098 s.AlarmActions = v 4099 return s 4100} 4101 4102// SetAlarmArn sets the AlarmArn field's value. 4103func (s *CompositeAlarm) SetAlarmArn(v string) *CompositeAlarm { 4104 s.AlarmArn = &v 4105 return s 4106} 4107 4108// SetAlarmConfigurationUpdatedTimestamp sets the AlarmConfigurationUpdatedTimestamp field's value. 4109func (s *CompositeAlarm) SetAlarmConfigurationUpdatedTimestamp(v time.Time) *CompositeAlarm { 4110 s.AlarmConfigurationUpdatedTimestamp = &v 4111 return s 4112} 4113 4114// SetAlarmDescription sets the AlarmDescription field's value. 4115func (s *CompositeAlarm) SetAlarmDescription(v string) *CompositeAlarm { 4116 s.AlarmDescription = &v 4117 return s 4118} 4119 4120// SetAlarmName sets the AlarmName field's value. 4121func (s *CompositeAlarm) SetAlarmName(v string) *CompositeAlarm { 4122 s.AlarmName = &v 4123 return s 4124} 4125 4126// SetAlarmRule sets the AlarmRule field's value. 4127func (s *CompositeAlarm) SetAlarmRule(v string) *CompositeAlarm { 4128 s.AlarmRule = &v 4129 return s 4130} 4131 4132// SetInsufficientDataActions sets the InsufficientDataActions field's value. 4133func (s *CompositeAlarm) SetInsufficientDataActions(v []*string) *CompositeAlarm { 4134 s.InsufficientDataActions = v 4135 return s 4136} 4137 4138// SetOKActions sets the OKActions field's value. 4139func (s *CompositeAlarm) SetOKActions(v []*string) *CompositeAlarm { 4140 s.OKActions = v 4141 return s 4142} 4143 4144// SetStateReason sets the StateReason field's value. 4145func (s *CompositeAlarm) SetStateReason(v string) *CompositeAlarm { 4146 s.StateReason = &v 4147 return s 4148} 4149 4150// SetStateReasonData sets the StateReasonData field's value. 4151func (s *CompositeAlarm) SetStateReasonData(v string) *CompositeAlarm { 4152 s.StateReasonData = &v 4153 return s 4154} 4155 4156// SetStateUpdatedTimestamp sets the StateUpdatedTimestamp field's value. 4157func (s *CompositeAlarm) SetStateUpdatedTimestamp(v time.Time) *CompositeAlarm { 4158 s.StateUpdatedTimestamp = &v 4159 return s 4160} 4161 4162// SetStateValue sets the StateValue field's value. 4163func (s *CompositeAlarm) SetStateValue(v string) *CompositeAlarm { 4164 s.StateValue = &v 4165 return s 4166} 4167 4168// Represents a specific dashboard. 4169type DashboardEntry struct { 4170 _ struct{} `type:"structure"` 4171 4172 // The Amazon Resource Name (ARN) of the dashboard. 4173 DashboardArn *string `type:"string"` 4174 4175 // The name of the dashboard. 4176 DashboardName *string `type:"string"` 4177 4178 // The time stamp of when the dashboard was last modified, either by an API 4179 // call or through the console. This number is expressed as the number of milliseconds 4180 // since Jan 1, 1970 00:00:00 UTC. 4181 LastModified *time.Time `type:"timestamp"` 4182 4183 // The size of the dashboard, in bytes. 4184 Size *int64 `type:"long"` 4185} 4186 4187// String returns the string representation 4188func (s DashboardEntry) String() string { 4189 return awsutil.Prettify(s) 4190} 4191 4192// GoString returns the string representation 4193func (s DashboardEntry) GoString() string { 4194 return s.String() 4195} 4196 4197// SetDashboardArn sets the DashboardArn field's value. 4198func (s *DashboardEntry) SetDashboardArn(v string) *DashboardEntry { 4199 s.DashboardArn = &v 4200 return s 4201} 4202 4203// SetDashboardName sets the DashboardName field's value. 4204func (s *DashboardEntry) SetDashboardName(v string) *DashboardEntry { 4205 s.DashboardName = &v 4206 return s 4207} 4208 4209// SetLastModified sets the LastModified field's value. 4210func (s *DashboardEntry) SetLastModified(v time.Time) *DashboardEntry { 4211 s.LastModified = &v 4212 return s 4213} 4214 4215// SetSize sets the Size field's value. 4216func (s *DashboardEntry) SetSize(v int64) *DashboardEntry { 4217 s.Size = &v 4218 return s 4219} 4220 4221// An error or warning for the operation. 4222type DashboardValidationMessage struct { 4223 _ struct{} `type:"structure"` 4224 4225 // The data path related to the message. 4226 DataPath *string `type:"string"` 4227 4228 // A message describing the error or warning. 4229 Message *string `type:"string"` 4230} 4231 4232// String returns the string representation 4233func (s DashboardValidationMessage) String() string { 4234 return awsutil.Prettify(s) 4235} 4236 4237// GoString returns the string representation 4238func (s DashboardValidationMessage) GoString() string { 4239 return s.String() 4240} 4241 4242// SetDataPath sets the DataPath field's value. 4243func (s *DashboardValidationMessage) SetDataPath(v string) *DashboardValidationMessage { 4244 s.DataPath = &v 4245 return s 4246} 4247 4248// SetMessage sets the Message field's value. 4249func (s *DashboardValidationMessage) SetMessage(v string) *DashboardValidationMessage { 4250 s.Message = &v 4251 return s 4252} 4253 4254// Encapsulates the statistical data that CloudWatch computes from metric data. 4255type Datapoint struct { 4256 _ struct{} `type:"structure"` 4257 4258 // The average of the metric values that correspond to the data point. 4259 Average *float64 `type:"double"` 4260 4261 // The percentile statistic for the data point. 4262 ExtendedStatistics map[string]*float64 `type:"map"` 4263 4264 // The maximum metric value for the data point. 4265 Maximum *float64 `type:"double"` 4266 4267 // The minimum metric value for the data point. 4268 Minimum *float64 `type:"double"` 4269 4270 // The number of metric values that contributed to the aggregate value of this 4271 // data point. 4272 SampleCount *float64 `type:"double"` 4273 4274 // The sum of the metric values for the data point. 4275 Sum *float64 `type:"double"` 4276 4277 // The time stamp used for the data point. 4278 Timestamp *time.Time `type:"timestamp"` 4279 4280 // The standard unit for the data point. 4281 Unit *string `type:"string" enum:"StandardUnit"` 4282} 4283 4284// String returns the string representation 4285func (s Datapoint) String() string { 4286 return awsutil.Prettify(s) 4287} 4288 4289// GoString returns the string representation 4290func (s Datapoint) GoString() string { 4291 return s.String() 4292} 4293 4294// SetAverage sets the Average field's value. 4295func (s *Datapoint) SetAverage(v float64) *Datapoint { 4296 s.Average = &v 4297 return s 4298} 4299 4300// SetExtendedStatistics sets the ExtendedStatistics field's value. 4301func (s *Datapoint) SetExtendedStatistics(v map[string]*float64) *Datapoint { 4302 s.ExtendedStatistics = v 4303 return s 4304} 4305 4306// SetMaximum sets the Maximum field's value. 4307func (s *Datapoint) SetMaximum(v float64) *Datapoint { 4308 s.Maximum = &v 4309 return s 4310} 4311 4312// SetMinimum sets the Minimum field's value. 4313func (s *Datapoint) SetMinimum(v float64) *Datapoint { 4314 s.Minimum = &v 4315 return s 4316} 4317 4318// SetSampleCount sets the SampleCount field's value. 4319func (s *Datapoint) SetSampleCount(v float64) *Datapoint { 4320 s.SampleCount = &v 4321 return s 4322} 4323 4324// SetSum sets the Sum field's value. 4325func (s *Datapoint) SetSum(v float64) *Datapoint { 4326 s.Sum = &v 4327 return s 4328} 4329 4330// SetTimestamp sets the Timestamp field's value. 4331func (s *Datapoint) SetTimestamp(v time.Time) *Datapoint { 4332 s.Timestamp = &v 4333 return s 4334} 4335 4336// SetUnit sets the Unit field's value. 4337func (s *Datapoint) SetUnit(v string) *Datapoint { 4338 s.Unit = &v 4339 return s 4340} 4341 4342type DeleteAlarmsInput struct { 4343 _ struct{} `type:"structure"` 4344 4345 // The alarms to be deleted. 4346 // 4347 // AlarmNames is a required field 4348 AlarmNames []*string `type:"list" required:"true"` 4349} 4350 4351// String returns the string representation 4352func (s DeleteAlarmsInput) String() string { 4353 return awsutil.Prettify(s) 4354} 4355 4356// GoString returns the string representation 4357func (s DeleteAlarmsInput) GoString() string { 4358 return s.String() 4359} 4360 4361// Validate inspects the fields of the type to determine if they are valid. 4362func (s *DeleteAlarmsInput) Validate() error { 4363 invalidParams := request.ErrInvalidParams{Context: "DeleteAlarmsInput"} 4364 if s.AlarmNames == nil { 4365 invalidParams.Add(request.NewErrParamRequired("AlarmNames")) 4366 } 4367 4368 if invalidParams.Len() > 0 { 4369 return invalidParams 4370 } 4371 return nil 4372} 4373 4374// SetAlarmNames sets the AlarmNames field's value. 4375func (s *DeleteAlarmsInput) SetAlarmNames(v []*string) *DeleteAlarmsInput { 4376 s.AlarmNames = v 4377 return s 4378} 4379 4380type DeleteAlarmsOutput struct { 4381 _ struct{} `type:"structure"` 4382} 4383 4384// String returns the string representation 4385func (s DeleteAlarmsOutput) String() string { 4386 return awsutil.Prettify(s) 4387} 4388 4389// GoString returns the string representation 4390func (s DeleteAlarmsOutput) GoString() string { 4391 return s.String() 4392} 4393 4394type DeleteAnomalyDetectorInput struct { 4395 _ struct{} `type:"structure"` 4396 4397 // The metric dimensions associated with the anomaly detection model to delete. 4398 Dimensions []*Dimension `type:"list"` 4399 4400 // The metric name associated with the anomaly detection model to delete. 4401 // 4402 // MetricName is a required field 4403 MetricName *string `min:"1" type:"string" required:"true"` 4404 4405 // The namespace associated with the anomaly detection model to delete. 4406 // 4407 // Namespace is a required field 4408 Namespace *string `min:"1" type:"string" required:"true"` 4409 4410 // The statistic associated with the anomaly detection model to delete. 4411 // 4412 // Stat is a required field 4413 Stat *string `type:"string" required:"true"` 4414} 4415 4416// String returns the string representation 4417func (s DeleteAnomalyDetectorInput) String() string { 4418 return awsutil.Prettify(s) 4419} 4420 4421// GoString returns the string representation 4422func (s DeleteAnomalyDetectorInput) GoString() string { 4423 return s.String() 4424} 4425 4426// Validate inspects the fields of the type to determine if they are valid. 4427func (s *DeleteAnomalyDetectorInput) Validate() error { 4428 invalidParams := request.ErrInvalidParams{Context: "DeleteAnomalyDetectorInput"} 4429 if s.MetricName == nil { 4430 invalidParams.Add(request.NewErrParamRequired("MetricName")) 4431 } 4432 if s.MetricName != nil && len(*s.MetricName) < 1 { 4433 invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) 4434 } 4435 if s.Namespace == nil { 4436 invalidParams.Add(request.NewErrParamRequired("Namespace")) 4437 } 4438 if s.Namespace != nil && len(*s.Namespace) < 1 { 4439 invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) 4440 } 4441 if s.Stat == nil { 4442 invalidParams.Add(request.NewErrParamRequired("Stat")) 4443 } 4444 if s.Dimensions != nil { 4445 for i, v := range s.Dimensions { 4446 if v == nil { 4447 continue 4448 } 4449 if err := v.Validate(); err != nil { 4450 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) 4451 } 4452 } 4453 } 4454 4455 if invalidParams.Len() > 0 { 4456 return invalidParams 4457 } 4458 return nil 4459} 4460 4461// SetDimensions sets the Dimensions field's value. 4462func (s *DeleteAnomalyDetectorInput) SetDimensions(v []*Dimension) *DeleteAnomalyDetectorInput { 4463 s.Dimensions = v 4464 return s 4465} 4466 4467// SetMetricName sets the MetricName field's value. 4468func (s *DeleteAnomalyDetectorInput) SetMetricName(v string) *DeleteAnomalyDetectorInput { 4469 s.MetricName = &v 4470 return s 4471} 4472 4473// SetNamespace sets the Namespace field's value. 4474func (s *DeleteAnomalyDetectorInput) SetNamespace(v string) *DeleteAnomalyDetectorInput { 4475 s.Namespace = &v 4476 return s 4477} 4478 4479// SetStat sets the Stat field's value. 4480func (s *DeleteAnomalyDetectorInput) SetStat(v string) *DeleteAnomalyDetectorInput { 4481 s.Stat = &v 4482 return s 4483} 4484 4485type DeleteAnomalyDetectorOutput struct { 4486 _ struct{} `type:"structure"` 4487} 4488 4489// String returns the string representation 4490func (s DeleteAnomalyDetectorOutput) String() string { 4491 return awsutil.Prettify(s) 4492} 4493 4494// GoString returns the string representation 4495func (s DeleteAnomalyDetectorOutput) GoString() string { 4496 return s.String() 4497} 4498 4499type DeleteDashboardsInput struct { 4500 _ struct{} `type:"structure"` 4501 4502 // The dashboards to be deleted. This parameter is required. 4503 // 4504 // DashboardNames is a required field 4505 DashboardNames []*string `type:"list" required:"true"` 4506} 4507 4508// String returns the string representation 4509func (s DeleteDashboardsInput) String() string { 4510 return awsutil.Prettify(s) 4511} 4512 4513// GoString returns the string representation 4514func (s DeleteDashboardsInput) GoString() string { 4515 return s.String() 4516} 4517 4518// Validate inspects the fields of the type to determine if they are valid. 4519func (s *DeleteDashboardsInput) Validate() error { 4520 invalidParams := request.ErrInvalidParams{Context: "DeleteDashboardsInput"} 4521 if s.DashboardNames == nil { 4522 invalidParams.Add(request.NewErrParamRequired("DashboardNames")) 4523 } 4524 4525 if invalidParams.Len() > 0 { 4526 return invalidParams 4527 } 4528 return nil 4529} 4530 4531// SetDashboardNames sets the DashboardNames field's value. 4532func (s *DeleteDashboardsInput) SetDashboardNames(v []*string) *DeleteDashboardsInput { 4533 s.DashboardNames = v 4534 return s 4535} 4536 4537type DeleteDashboardsOutput struct { 4538 _ struct{} `type:"structure"` 4539} 4540 4541// String returns the string representation 4542func (s DeleteDashboardsOutput) String() string { 4543 return awsutil.Prettify(s) 4544} 4545 4546// GoString returns the string representation 4547func (s DeleteDashboardsOutput) GoString() string { 4548 return s.String() 4549} 4550 4551type DeleteInsightRulesInput struct { 4552 _ struct{} `type:"structure"` 4553 4554 // An array of the rule names to delete. If you need to find out the names of 4555 // your rules, use DescribeInsightRules (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeInsightRules.html). 4556 // 4557 // RuleNames is a required field 4558 RuleNames []*string `type:"list" required:"true"` 4559} 4560 4561// String returns the string representation 4562func (s DeleteInsightRulesInput) String() string { 4563 return awsutil.Prettify(s) 4564} 4565 4566// GoString returns the string representation 4567func (s DeleteInsightRulesInput) GoString() string { 4568 return s.String() 4569} 4570 4571// Validate inspects the fields of the type to determine if they are valid. 4572func (s *DeleteInsightRulesInput) Validate() error { 4573 invalidParams := request.ErrInvalidParams{Context: "DeleteInsightRulesInput"} 4574 if s.RuleNames == nil { 4575 invalidParams.Add(request.NewErrParamRequired("RuleNames")) 4576 } 4577 4578 if invalidParams.Len() > 0 { 4579 return invalidParams 4580 } 4581 return nil 4582} 4583 4584// SetRuleNames sets the RuleNames field's value. 4585func (s *DeleteInsightRulesInput) SetRuleNames(v []*string) *DeleteInsightRulesInput { 4586 s.RuleNames = v 4587 return s 4588} 4589 4590type DeleteInsightRulesOutput struct { 4591 _ struct{} `type:"structure"` 4592 4593 // An array listing the rules that could not be deleted. You cannot delete built-in 4594 // rules. 4595 Failures []*PartialFailure `type:"list"` 4596} 4597 4598// String returns the string representation 4599func (s DeleteInsightRulesOutput) String() string { 4600 return awsutil.Prettify(s) 4601} 4602 4603// GoString returns the string representation 4604func (s DeleteInsightRulesOutput) GoString() string { 4605 return s.String() 4606} 4607 4608// SetFailures sets the Failures field's value. 4609func (s *DeleteInsightRulesOutput) SetFailures(v []*PartialFailure) *DeleteInsightRulesOutput { 4610 s.Failures = v 4611 return s 4612} 4613 4614type DeleteMetricStreamInput struct { 4615 _ struct{} `type:"structure"` 4616 4617 // The name of the metric stream to delete. 4618 // 4619 // Name is a required field 4620 Name *string `min:"1" type:"string" required:"true"` 4621} 4622 4623// String returns the string representation 4624func (s DeleteMetricStreamInput) String() string { 4625 return awsutil.Prettify(s) 4626} 4627 4628// GoString returns the string representation 4629func (s DeleteMetricStreamInput) GoString() string { 4630 return s.String() 4631} 4632 4633// Validate inspects the fields of the type to determine if they are valid. 4634func (s *DeleteMetricStreamInput) Validate() error { 4635 invalidParams := request.ErrInvalidParams{Context: "DeleteMetricStreamInput"} 4636 if s.Name == nil { 4637 invalidParams.Add(request.NewErrParamRequired("Name")) 4638 } 4639 if s.Name != nil && len(*s.Name) < 1 { 4640 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 4641 } 4642 4643 if invalidParams.Len() > 0 { 4644 return invalidParams 4645 } 4646 return nil 4647} 4648 4649// SetName sets the Name field's value. 4650func (s *DeleteMetricStreamInput) SetName(v string) *DeleteMetricStreamInput { 4651 s.Name = &v 4652 return s 4653} 4654 4655type DeleteMetricStreamOutput struct { 4656 _ struct{} `type:"structure"` 4657} 4658 4659// String returns the string representation 4660func (s DeleteMetricStreamOutput) String() string { 4661 return awsutil.Prettify(s) 4662} 4663 4664// GoString returns the string representation 4665func (s DeleteMetricStreamOutput) GoString() string { 4666 return s.String() 4667} 4668 4669type DescribeAlarmHistoryInput struct { 4670 _ struct{} `type:"structure"` 4671 4672 // The name of the alarm. 4673 AlarmName *string `min:"1" type:"string"` 4674 4675 // Use this parameter to specify whether you want the operation to return metric 4676 // alarms or composite alarms. If you omit this parameter, only metric alarms 4677 // are returned. 4678 AlarmTypes []*string `type:"list"` 4679 4680 // The ending date to retrieve alarm history. 4681 EndDate *time.Time `type:"timestamp"` 4682 4683 // The type of alarm histories to retrieve. 4684 HistoryItemType *string `type:"string" enum:"HistoryItemType"` 4685 4686 // The maximum number of alarm history records to retrieve. 4687 MaxRecords *int64 `min:"1" type:"integer"` 4688 4689 // The token returned by a previous call to indicate that there is more data 4690 // available. 4691 NextToken *string `type:"string"` 4692 4693 // Specified whether to return the newest or oldest alarm history first. Specify 4694 // TimestampDescending to have the newest event history returned first, and 4695 // specify TimestampAscending to have the oldest history returned first. 4696 ScanBy *string `type:"string" enum:"ScanBy"` 4697 4698 // The starting date to retrieve alarm history. 4699 StartDate *time.Time `type:"timestamp"` 4700} 4701 4702// String returns the string representation 4703func (s DescribeAlarmHistoryInput) String() string { 4704 return awsutil.Prettify(s) 4705} 4706 4707// GoString returns the string representation 4708func (s DescribeAlarmHistoryInput) GoString() string { 4709 return s.String() 4710} 4711 4712// Validate inspects the fields of the type to determine if they are valid. 4713func (s *DescribeAlarmHistoryInput) Validate() error { 4714 invalidParams := request.ErrInvalidParams{Context: "DescribeAlarmHistoryInput"} 4715 if s.AlarmName != nil && len(*s.AlarmName) < 1 { 4716 invalidParams.Add(request.NewErrParamMinLen("AlarmName", 1)) 4717 } 4718 if s.MaxRecords != nil && *s.MaxRecords < 1 { 4719 invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 1)) 4720 } 4721 4722 if invalidParams.Len() > 0 { 4723 return invalidParams 4724 } 4725 return nil 4726} 4727 4728// SetAlarmName sets the AlarmName field's value. 4729func (s *DescribeAlarmHistoryInput) SetAlarmName(v string) *DescribeAlarmHistoryInput { 4730 s.AlarmName = &v 4731 return s 4732} 4733 4734// SetAlarmTypes sets the AlarmTypes field's value. 4735func (s *DescribeAlarmHistoryInput) SetAlarmTypes(v []*string) *DescribeAlarmHistoryInput { 4736 s.AlarmTypes = v 4737 return s 4738} 4739 4740// SetEndDate sets the EndDate field's value. 4741func (s *DescribeAlarmHistoryInput) SetEndDate(v time.Time) *DescribeAlarmHistoryInput { 4742 s.EndDate = &v 4743 return s 4744} 4745 4746// SetHistoryItemType sets the HistoryItemType field's value. 4747func (s *DescribeAlarmHistoryInput) SetHistoryItemType(v string) *DescribeAlarmHistoryInput { 4748 s.HistoryItemType = &v 4749 return s 4750} 4751 4752// SetMaxRecords sets the MaxRecords field's value. 4753func (s *DescribeAlarmHistoryInput) SetMaxRecords(v int64) *DescribeAlarmHistoryInput { 4754 s.MaxRecords = &v 4755 return s 4756} 4757 4758// SetNextToken sets the NextToken field's value. 4759func (s *DescribeAlarmHistoryInput) SetNextToken(v string) *DescribeAlarmHistoryInput { 4760 s.NextToken = &v 4761 return s 4762} 4763 4764// SetScanBy sets the ScanBy field's value. 4765func (s *DescribeAlarmHistoryInput) SetScanBy(v string) *DescribeAlarmHistoryInput { 4766 s.ScanBy = &v 4767 return s 4768} 4769 4770// SetStartDate sets the StartDate field's value. 4771func (s *DescribeAlarmHistoryInput) SetStartDate(v time.Time) *DescribeAlarmHistoryInput { 4772 s.StartDate = &v 4773 return s 4774} 4775 4776type DescribeAlarmHistoryOutput struct { 4777 _ struct{} `type:"structure"` 4778 4779 // The alarm histories, in JSON format. 4780 AlarmHistoryItems []*AlarmHistoryItem `type:"list"` 4781 4782 // The token that marks the start of the next batch of returned results. 4783 NextToken *string `type:"string"` 4784} 4785 4786// String returns the string representation 4787func (s DescribeAlarmHistoryOutput) String() string { 4788 return awsutil.Prettify(s) 4789} 4790 4791// GoString returns the string representation 4792func (s DescribeAlarmHistoryOutput) GoString() string { 4793 return s.String() 4794} 4795 4796// SetAlarmHistoryItems sets the AlarmHistoryItems field's value. 4797func (s *DescribeAlarmHistoryOutput) SetAlarmHistoryItems(v []*AlarmHistoryItem) *DescribeAlarmHistoryOutput { 4798 s.AlarmHistoryItems = v 4799 return s 4800} 4801 4802// SetNextToken sets the NextToken field's value. 4803func (s *DescribeAlarmHistoryOutput) SetNextToken(v string) *DescribeAlarmHistoryOutput { 4804 s.NextToken = &v 4805 return s 4806} 4807 4808type DescribeAlarmsForMetricInput struct { 4809 _ struct{} `type:"structure"` 4810 4811 // The dimensions associated with the metric. If the metric has any associated 4812 // dimensions, you must specify them in order for the call to succeed. 4813 Dimensions []*Dimension `type:"list"` 4814 4815 // The percentile statistic for the metric. Specify a value between p0.0 and 4816 // p100. 4817 ExtendedStatistic *string `type:"string"` 4818 4819 // The name of the metric. 4820 // 4821 // MetricName is a required field 4822 MetricName *string `min:"1" type:"string" required:"true"` 4823 4824 // The namespace of the metric. 4825 // 4826 // Namespace is a required field 4827 Namespace *string `min:"1" type:"string" required:"true"` 4828 4829 // The period, in seconds, over which the statistic is applied. 4830 Period *int64 `min:"1" type:"integer"` 4831 4832 // The statistic for the metric, other than percentiles. For percentile statistics, 4833 // use ExtendedStatistics. 4834 Statistic *string `type:"string" enum:"Statistic"` 4835 4836 // The unit for the metric. 4837 Unit *string `type:"string" enum:"StandardUnit"` 4838} 4839 4840// String returns the string representation 4841func (s DescribeAlarmsForMetricInput) String() string { 4842 return awsutil.Prettify(s) 4843} 4844 4845// GoString returns the string representation 4846func (s DescribeAlarmsForMetricInput) GoString() string { 4847 return s.String() 4848} 4849 4850// Validate inspects the fields of the type to determine if they are valid. 4851func (s *DescribeAlarmsForMetricInput) Validate() error { 4852 invalidParams := request.ErrInvalidParams{Context: "DescribeAlarmsForMetricInput"} 4853 if s.MetricName == nil { 4854 invalidParams.Add(request.NewErrParamRequired("MetricName")) 4855 } 4856 if s.MetricName != nil && len(*s.MetricName) < 1 { 4857 invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) 4858 } 4859 if s.Namespace == nil { 4860 invalidParams.Add(request.NewErrParamRequired("Namespace")) 4861 } 4862 if s.Namespace != nil && len(*s.Namespace) < 1 { 4863 invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) 4864 } 4865 if s.Period != nil && *s.Period < 1 { 4866 invalidParams.Add(request.NewErrParamMinValue("Period", 1)) 4867 } 4868 if s.Dimensions != nil { 4869 for i, v := range s.Dimensions { 4870 if v == nil { 4871 continue 4872 } 4873 if err := v.Validate(); err != nil { 4874 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) 4875 } 4876 } 4877 } 4878 4879 if invalidParams.Len() > 0 { 4880 return invalidParams 4881 } 4882 return nil 4883} 4884 4885// SetDimensions sets the Dimensions field's value. 4886func (s *DescribeAlarmsForMetricInput) SetDimensions(v []*Dimension) *DescribeAlarmsForMetricInput { 4887 s.Dimensions = v 4888 return s 4889} 4890 4891// SetExtendedStatistic sets the ExtendedStatistic field's value. 4892func (s *DescribeAlarmsForMetricInput) SetExtendedStatistic(v string) *DescribeAlarmsForMetricInput { 4893 s.ExtendedStatistic = &v 4894 return s 4895} 4896 4897// SetMetricName sets the MetricName field's value. 4898func (s *DescribeAlarmsForMetricInput) SetMetricName(v string) *DescribeAlarmsForMetricInput { 4899 s.MetricName = &v 4900 return s 4901} 4902 4903// SetNamespace sets the Namespace field's value. 4904func (s *DescribeAlarmsForMetricInput) SetNamespace(v string) *DescribeAlarmsForMetricInput { 4905 s.Namespace = &v 4906 return s 4907} 4908 4909// SetPeriod sets the Period field's value. 4910func (s *DescribeAlarmsForMetricInput) SetPeriod(v int64) *DescribeAlarmsForMetricInput { 4911 s.Period = &v 4912 return s 4913} 4914 4915// SetStatistic sets the Statistic field's value. 4916func (s *DescribeAlarmsForMetricInput) SetStatistic(v string) *DescribeAlarmsForMetricInput { 4917 s.Statistic = &v 4918 return s 4919} 4920 4921// SetUnit sets the Unit field's value. 4922func (s *DescribeAlarmsForMetricInput) SetUnit(v string) *DescribeAlarmsForMetricInput { 4923 s.Unit = &v 4924 return s 4925} 4926 4927type DescribeAlarmsForMetricOutput struct { 4928 _ struct{} `type:"structure"` 4929 4930 // The information for each alarm with the specified metric. 4931 MetricAlarms []*MetricAlarm `type:"list"` 4932} 4933 4934// String returns the string representation 4935func (s DescribeAlarmsForMetricOutput) String() string { 4936 return awsutil.Prettify(s) 4937} 4938 4939// GoString returns the string representation 4940func (s DescribeAlarmsForMetricOutput) GoString() string { 4941 return s.String() 4942} 4943 4944// SetMetricAlarms sets the MetricAlarms field's value. 4945func (s *DescribeAlarmsForMetricOutput) SetMetricAlarms(v []*MetricAlarm) *DescribeAlarmsForMetricOutput { 4946 s.MetricAlarms = v 4947 return s 4948} 4949 4950type DescribeAlarmsInput struct { 4951 _ struct{} `type:"structure"` 4952 4953 // Use this parameter to filter the results of the operation to only those alarms 4954 // that use a certain alarm action. For example, you could specify the ARN of 4955 // an SNS topic to find all alarms that send notifications to that topic. 4956 ActionPrefix *string `min:"1" type:"string"` 4957 4958 // An alarm name prefix. If you specify this parameter, you receive information 4959 // about all alarms that have names that start with this prefix. 4960 // 4961 // If this parameter is specified, you cannot specify AlarmNames. 4962 AlarmNamePrefix *string `min:"1" type:"string"` 4963 4964 // The names of the alarms to retrieve information about. 4965 AlarmNames []*string `type:"list"` 4966 4967 // Use this parameter to specify whether you want the operation to return metric 4968 // alarms or composite alarms. If you omit this parameter, only metric alarms 4969 // are returned. 4970 AlarmTypes []*string `type:"list"` 4971 4972 // If you use this parameter and specify the name of a composite alarm, the 4973 // operation returns information about the "children" alarms of the alarm you 4974 // specify. These are the metric alarms and composite alarms referenced in the 4975 // AlarmRule field of the composite alarm that you specify in ChildrenOfAlarmName. 4976 // Information about the composite alarm that you name in ChildrenOfAlarmName 4977 // is not returned. 4978 // 4979 // If you specify ChildrenOfAlarmName, you cannot specify any other parameters 4980 // in the request except for MaxRecords and NextToken. If you do so, you receive 4981 // a validation error. 4982 // 4983 // Only the Alarm Name, ARN, StateValue (OK/ALARM/INSUFFICIENT_DATA), and StateUpdatedTimestamp 4984 // information are returned by this operation when you use this parameter. To 4985 // get complete information about these alarms, perform another DescribeAlarms 4986 // operation and specify the parent alarm names in the AlarmNames parameter. 4987 ChildrenOfAlarmName *string `min:"1" type:"string"` 4988 4989 // The maximum number of alarm descriptions to retrieve. 4990 MaxRecords *int64 `min:"1" type:"integer"` 4991 4992 // The token returned by a previous call to indicate that there is more data 4993 // available. 4994 NextToken *string `type:"string"` 4995 4996 // If you use this parameter and specify the name of a metric or composite alarm, 4997 // the operation returns information about the "parent" alarms of the alarm 4998 // you specify. These are the composite alarms that have AlarmRule parameters 4999 // that reference the alarm named in ParentsOfAlarmName. Information about the 5000 // alarm that you specify in ParentsOfAlarmName is not returned. 5001 // 5002 // If you specify ParentsOfAlarmName, you cannot specify any other parameters 5003 // in the request except for MaxRecords and NextToken. If you do so, you receive 5004 // a validation error. 5005 // 5006 // Only the Alarm Name and ARN are returned by this operation when you use this 5007 // parameter. To get complete information about these alarms, perform another 5008 // DescribeAlarms operation and specify the parent alarm names in the AlarmNames 5009 // parameter. 5010 ParentsOfAlarmName *string `min:"1" type:"string"` 5011 5012 // Specify this parameter to receive information only about alarms that are 5013 // currently in the state that you specify. 5014 StateValue *string `type:"string" enum:"StateValue"` 5015} 5016 5017// String returns the string representation 5018func (s DescribeAlarmsInput) String() string { 5019 return awsutil.Prettify(s) 5020} 5021 5022// GoString returns the string representation 5023func (s DescribeAlarmsInput) GoString() string { 5024 return s.String() 5025} 5026 5027// Validate inspects the fields of the type to determine if they are valid. 5028func (s *DescribeAlarmsInput) Validate() error { 5029 invalidParams := request.ErrInvalidParams{Context: "DescribeAlarmsInput"} 5030 if s.ActionPrefix != nil && len(*s.ActionPrefix) < 1 { 5031 invalidParams.Add(request.NewErrParamMinLen("ActionPrefix", 1)) 5032 } 5033 if s.AlarmNamePrefix != nil && len(*s.AlarmNamePrefix) < 1 { 5034 invalidParams.Add(request.NewErrParamMinLen("AlarmNamePrefix", 1)) 5035 } 5036 if s.ChildrenOfAlarmName != nil && len(*s.ChildrenOfAlarmName) < 1 { 5037 invalidParams.Add(request.NewErrParamMinLen("ChildrenOfAlarmName", 1)) 5038 } 5039 if s.MaxRecords != nil && *s.MaxRecords < 1 { 5040 invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 1)) 5041 } 5042 if s.ParentsOfAlarmName != nil && len(*s.ParentsOfAlarmName) < 1 { 5043 invalidParams.Add(request.NewErrParamMinLen("ParentsOfAlarmName", 1)) 5044 } 5045 5046 if invalidParams.Len() > 0 { 5047 return invalidParams 5048 } 5049 return nil 5050} 5051 5052// SetActionPrefix sets the ActionPrefix field's value. 5053func (s *DescribeAlarmsInput) SetActionPrefix(v string) *DescribeAlarmsInput { 5054 s.ActionPrefix = &v 5055 return s 5056} 5057 5058// SetAlarmNamePrefix sets the AlarmNamePrefix field's value. 5059func (s *DescribeAlarmsInput) SetAlarmNamePrefix(v string) *DescribeAlarmsInput { 5060 s.AlarmNamePrefix = &v 5061 return s 5062} 5063 5064// SetAlarmNames sets the AlarmNames field's value. 5065func (s *DescribeAlarmsInput) SetAlarmNames(v []*string) *DescribeAlarmsInput { 5066 s.AlarmNames = v 5067 return s 5068} 5069 5070// SetAlarmTypes sets the AlarmTypes field's value. 5071func (s *DescribeAlarmsInput) SetAlarmTypes(v []*string) *DescribeAlarmsInput { 5072 s.AlarmTypes = v 5073 return s 5074} 5075 5076// SetChildrenOfAlarmName sets the ChildrenOfAlarmName field's value. 5077func (s *DescribeAlarmsInput) SetChildrenOfAlarmName(v string) *DescribeAlarmsInput { 5078 s.ChildrenOfAlarmName = &v 5079 return s 5080} 5081 5082// SetMaxRecords sets the MaxRecords field's value. 5083func (s *DescribeAlarmsInput) SetMaxRecords(v int64) *DescribeAlarmsInput { 5084 s.MaxRecords = &v 5085 return s 5086} 5087 5088// SetNextToken sets the NextToken field's value. 5089func (s *DescribeAlarmsInput) SetNextToken(v string) *DescribeAlarmsInput { 5090 s.NextToken = &v 5091 return s 5092} 5093 5094// SetParentsOfAlarmName sets the ParentsOfAlarmName field's value. 5095func (s *DescribeAlarmsInput) SetParentsOfAlarmName(v string) *DescribeAlarmsInput { 5096 s.ParentsOfAlarmName = &v 5097 return s 5098} 5099 5100// SetStateValue sets the StateValue field's value. 5101func (s *DescribeAlarmsInput) SetStateValue(v string) *DescribeAlarmsInput { 5102 s.StateValue = &v 5103 return s 5104} 5105 5106type DescribeAlarmsOutput struct { 5107 _ struct{} `type:"structure"` 5108 5109 // The information about any composite alarms returned by the operation. 5110 CompositeAlarms []*CompositeAlarm `type:"list"` 5111 5112 // The information about any metric alarms returned by the operation. 5113 MetricAlarms []*MetricAlarm `type:"list"` 5114 5115 // The token that marks the start of the next batch of returned results. 5116 NextToken *string `type:"string"` 5117} 5118 5119// String returns the string representation 5120func (s DescribeAlarmsOutput) String() string { 5121 return awsutil.Prettify(s) 5122} 5123 5124// GoString returns the string representation 5125func (s DescribeAlarmsOutput) GoString() string { 5126 return s.String() 5127} 5128 5129// SetCompositeAlarms sets the CompositeAlarms field's value. 5130func (s *DescribeAlarmsOutput) SetCompositeAlarms(v []*CompositeAlarm) *DescribeAlarmsOutput { 5131 s.CompositeAlarms = v 5132 return s 5133} 5134 5135// SetMetricAlarms sets the MetricAlarms field's value. 5136func (s *DescribeAlarmsOutput) SetMetricAlarms(v []*MetricAlarm) *DescribeAlarmsOutput { 5137 s.MetricAlarms = v 5138 return s 5139} 5140 5141// SetNextToken sets the NextToken field's value. 5142func (s *DescribeAlarmsOutput) SetNextToken(v string) *DescribeAlarmsOutput { 5143 s.NextToken = &v 5144 return s 5145} 5146 5147type DescribeAnomalyDetectorsInput struct { 5148 _ struct{} `type:"structure"` 5149 5150 // Limits the results to only the anomaly detection models that are associated 5151 // with the specified metric dimensions. If there are multiple metrics that 5152 // have these dimensions and have anomaly detection models associated, they're 5153 // all returned. 5154 Dimensions []*Dimension `type:"list"` 5155 5156 // The maximum number of results to return in one operation. The maximum value 5157 // that you can specify is 100. 5158 // 5159 // To retrieve the remaining results, make another call with the returned NextToken 5160 // value. 5161 MaxResults *int64 `min:"1" type:"integer"` 5162 5163 // Limits the results to only the anomaly detection models that are associated 5164 // with the specified metric name. If there are multiple metrics with this name 5165 // in different namespaces that have anomaly detection models, they're all returned. 5166 MetricName *string `min:"1" type:"string"` 5167 5168 // Limits the results to only the anomaly detection models that are associated 5169 // with the specified namespace. 5170 Namespace *string `min:"1" type:"string"` 5171 5172 // Use the token returned by the previous operation to request the next page 5173 // of results. 5174 NextToken *string `type:"string"` 5175} 5176 5177// String returns the string representation 5178func (s DescribeAnomalyDetectorsInput) String() string { 5179 return awsutil.Prettify(s) 5180} 5181 5182// GoString returns the string representation 5183func (s DescribeAnomalyDetectorsInput) GoString() string { 5184 return s.String() 5185} 5186 5187// Validate inspects the fields of the type to determine if they are valid. 5188func (s *DescribeAnomalyDetectorsInput) Validate() error { 5189 invalidParams := request.ErrInvalidParams{Context: "DescribeAnomalyDetectorsInput"} 5190 if s.MaxResults != nil && *s.MaxResults < 1 { 5191 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 5192 } 5193 if s.MetricName != nil && len(*s.MetricName) < 1 { 5194 invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) 5195 } 5196 if s.Namespace != nil && len(*s.Namespace) < 1 { 5197 invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) 5198 } 5199 if s.Dimensions != nil { 5200 for i, v := range s.Dimensions { 5201 if v == nil { 5202 continue 5203 } 5204 if err := v.Validate(); err != nil { 5205 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) 5206 } 5207 } 5208 } 5209 5210 if invalidParams.Len() > 0 { 5211 return invalidParams 5212 } 5213 return nil 5214} 5215 5216// SetDimensions sets the Dimensions field's value. 5217func (s *DescribeAnomalyDetectorsInput) SetDimensions(v []*Dimension) *DescribeAnomalyDetectorsInput { 5218 s.Dimensions = v 5219 return s 5220} 5221 5222// SetMaxResults sets the MaxResults field's value. 5223func (s *DescribeAnomalyDetectorsInput) SetMaxResults(v int64) *DescribeAnomalyDetectorsInput { 5224 s.MaxResults = &v 5225 return s 5226} 5227 5228// SetMetricName sets the MetricName field's value. 5229func (s *DescribeAnomalyDetectorsInput) SetMetricName(v string) *DescribeAnomalyDetectorsInput { 5230 s.MetricName = &v 5231 return s 5232} 5233 5234// SetNamespace sets the Namespace field's value. 5235func (s *DescribeAnomalyDetectorsInput) SetNamespace(v string) *DescribeAnomalyDetectorsInput { 5236 s.Namespace = &v 5237 return s 5238} 5239 5240// SetNextToken sets the NextToken field's value. 5241func (s *DescribeAnomalyDetectorsInput) SetNextToken(v string) *DescribeAnomalyDetectorsInput { 5242 s.NextToken = &v 5243 return s 5244} 5245 5246type DescribeAnomalyDetectorsOutput struct { 5247 _ struct{} `type:"structure"` 5248 5249 // The list of anomaly detection models returned by the operation. 5250 AnomalyDetectors []*AnomalyDetector `type:"list"` 5251 5252 // A token that you can use in a subsequent operation to retrieve the next set 5253 // of results. 5254 NextToken *string `type:"string"` 5255} 5256 5257// String returns the string representation 5258func (s DescribeAnomalyDetectorsOutput) String() string { 5259 return awsutil.Prettify(s) 5260} 5261 5262// GoString returns the string representation 5263func (s DescribeAnomalyDetectorsOutput) GoString() string { 5264 return s.String() 5265} 5266 5267// SetAnomalyDetectors sets the AnomalyDetectors field's value. 5268func (s *DescribeAnomalyDetectorsOutput) SetAnomalyDetectors(v []*AnomalyDetector) *DescribeAnomalyDetectorsOutput { 5269 s.AnomalyDetectors = v 5270 return s 5271} 5272 5273// SetNextToken sets the NextToken field's value. 5274func (s *DescribeAnomalyDetectorsOutput) SetNextToken(v string) *DescribeAnomalyDetectorsOutput { 5275 s.NextToken = &v 5276 return s 5277} 5278 5279type DescribeInsightRulesInput struct { 5280 _ struct{} `type:"structure"` 5281 5282 // The maximum number of results to return in one operation. If you omit this 5283 // parameter, the default of 500 is used. 5284 MaxResults *int64 `min:"1" type:"integer"` 5285 5286 // Include this value, if it was returned by the previous operation, to get 5287 // the next set of rules. 5288 NextToken *string `type:"string"` 5289} 5290 5291// String returns the string representation 5292func (s DescribeInsightRulesInput) String() string { 5293 return awsutil.Prettify(s) 5294} 5295 5296// GoString returns the string representation 5297func (s DescribeInsightRulesInput) GoString() string { 5298 return s.String() 5299} 5300 5301// Validate inspects the fields of the type to determine if they are valid. 5302func (s *DescribeInsightRulesInput) Validate() error { 5303 invalidParams := request.ErrInvalidParams{Context: "DescribeInsightRulesInput"} 5304 if s.MaxResults != nil && *s.MaxResults < 1 { 5305 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 5306 } 5307 5308 if invalidParams.Len() > 0 { 5309 return invalidParams 5310 } 5311 return nil 5312} 5313 5314// SetMaxResults sets the MaxResults field's value. 5315func (s *DescribeInsightRulesInput) SetMaxResults(v int64) *DescribeInsightRulesInput { 5316 s.MaxResults = &v 5317 return s 5318} 5319 5320// SetNextToken sets the NextToken field's value. 5321func (s *DescribeInsightRulesInput) SetNextToken(v string) *DescribeInsightRulesInput { 5322 s.NextToken = &v 5323 return s 5324} 5325 5326type DescribeInsightRulesOutput struct { 5327 _ struct{} `type:"structure"` 5328 5329 // The rules returned by the operation. 5330 InsightRules []*InsightRule `type:"list"` 5331 5332 // If this parameter is present, it is a token that marks the start of the next 5333 // batch of returned results. 5334 NextToken *string `type:"string"` 5335} 5336 5337// String returns the string representation 5338func (s DescribeInsightRulesOutput) String() string { 5339 return awsutil.Prettify(s) 5340} 5341 5342// GoString returns the string representation 5343func (s DescribeInsightRulesOutput) GoString() string { 5344 return s.String() 5345} 5346 5347// SetInsightRules sets the InsightRules field's value. 5348func (s *DescribeInsightRulesOutput) SetInsightRules(v []*InsightRule) *DescribeInsightRulesOutput { 5349 s.InsightRules = v 5350 return s 5351} 5352 5353// SetNextToken sets the NextToken field's value. 5354func (s *DescribeInsightRulesOutput) SetNextToken(v string) *DescribeInsightRulesOutput { 5355 s.NextToken = &v 5356 return s 5357} 5358 5359// A dimension is a name/value pair that is part of the identity of a metric. 5360// You can assign up to 10 dimensions to a metric. Because dimensions are part 5361// of the unique identifier for a metric, whenever you add a unique name/value 5362// pair to one of your metrics, you are creating a new variation of that metric. 5363type Dimension struct { 5364 _ struct{} `type:"structure"` 5365 5366 // The name of the dimension. Dimension names cannot contain blank spaces or 5367 // non-ASCII characters. 5368 // 5369 // Name is a required field 5370 Name *string `min:"1" type:"string" required:"true"` 5371 5372 // The value of the dimension. Dimension values cannot contain blank spaces 5373 // or non-ASCII characters. 5374 // 5375 // Value is a required field 5376 Value *string `min:"1" type:"string" required:"true"` 5377} 5378 5379// String returns the string representation 5380func (s Dimension) String() string { 5381 return awsutil.Prettify(s) 5382} 5383 5384// GoString returns the string representation 5385func (s Dimension) GoString() string { 5386 return s.String() 5387} 5388 5389// Validate inspects the fields of the type to determine if they are valid. 5390func (s *Dimension) Validate() error { 5391 invalidParams := request.ErrInvalidParams{Context: "Dimension"} 5392 if s.Name == nil { 5393 invalidParams.Add(request.NewErrParamRequired("Name")) 5394 } 5395 if s.Name != nil && len(*s.Name) < 1 { 5396 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5397 } 5398 if s.Value == nil { 5399 invalidParams.Add(request.NewErrParamRequired("Value")) 5400 } 5401 if s.Value != nil && len(*s.Value) < 1 { 5402 invalidParams.Add(request.NewErrParamMinLen("Value", 1)) 5403 } 5404 5405 if invalidParams.Len() > 0 { 5406 return invalidParams 5407 } 5408 return nil 5409} 5410 5411// SetName sets the Name field's value. 5412func (s *Dimension) SetName(v string) *Dimension { 5413 s.Name = &v 5414 return s 5415} 5416 5417// SetValue sets the Value field's value. 5418func (s *Dimension) SetValue(v string) *Dimension { 5419 s.Value = &v 5420 return s 5421} 5422 5423// Represents filters for a dimension. 5424type DimensionFilter struct { 5425 _ struct{} `type:"structure"` 5426 5427 // The dimension name to be matched. 5428 // 5429 // Name is a required field 5430 Name *string `min:"1" type:"string" required:"true"` 5431 5432 // The value of the dimension to be matched. 5433 Value *string `min:"1" type:"string"` 5434} 5435 5436// String returns the string representation 5437func (s DimensionFilter) String() string { 5438 return awsutil.Prettify(s) 5439} 5440 5441// GoString returns the string representation 5442func (s DimensionFilter) GoString() string { 5443 return s.String() 5444} 5445 5446// Validate inspects the fields of the type to determine if they are valid. 5447func (s *DimensionFilter) Validate() error { 5448 invalidParams := request.ErrInvalidParams{Context: "DimensionFilter"} 5449 if s.Name == nil { 5450 invalidParams.Add(request.NewErrParamRequired("Name")) 5451 } 5452 if s.Name != nil && len(*s.Name) < 1 { 5453 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5454 } 5455 if s.Value != nil && len(*s.Value) < 1 { 5456 invalidParams.Add(request.NewErrParamMinLen("Value", 1)) 5457 } 5458 5459 if invalidParams.Len() > 0 { 5460 return invalidParams 5461 } 5462 return nil 5463} 5464 5465// SetName sets the Name field's value. 5466func (s *DimensionFilter) SetName(v string) *DimensionFilter { 5467 s.Name = &v 5468 return s 5469} 5470 5471// SetValue sets the Value field's value. 5472func (s *DimensionFilter) SetValue(v string) *DimensionFilter { 5473 s.Value = &v 5474 return s 5475} 5476 5477type DisableAlarmActionsInput struct { 5478 _ struct{} `type:"structure"` 5479 5480 // The names of the alarms. 5481 // 5482 // AlarmNames is a required field 5483 AlarmNames []*string `type:"list" required:"true"` 5484} 5485 5486// String returns the string representation 5487func (s DisableAlarmActionsInput) String() string { 5488 return awsutil.Prettify(s) 5489} 5490 5491// GoString returns the string representation 5492func (s DisableAlarmActionsInput) GoString() string { 5493 return s.String() 5494} 5495 5496// Validate inspects the fields of the type to determine if they are valid. 5497func (s *DisableAlarmActionsInput) Validate() error { 5498 invalidParams := request.ErrInvalidParams{Context: "DisableAlarmActionsInput"} 5499 if s.AlarmNames == nil { 5500 invalidParams.Add(request.NewErrParamRequired("AlarmNames")) 5501 } 5502 5503 if invalidParams.Len() > 0 { 5504 return invalidParams 5505 } 5506 return nil 5507} 5508 5509// SetAlarmNames sets the AlarmNames field's value. 5510func (s *DisableAlarmActionsInput) SetAlarmNames(v []*string) *DisableAlarmActionsInput { 5511 s.AlarmNames = v 5512 return s 5513} 5514 5515type DisableAlarmActionsOutput struct { 5516 _ struct{} `type:"structure"` 5517} 5518 5519// String returns the string representation 5520func (s DisableAlarmActionsOutput) String() string { 5521 return awsutil.Prettify(s) 5522} 5523 5524// GoString returns the string representation 5525func (s DisableAlarmActionsOutput) GoString() string { 5526 return s.String() 5527} 5528 5529type DisableInsightRulesInput struct { 5530 _ struct{} `type:"structure"` 5531 5532 // An array of the rule names to disable. If you need to find out the names 5533 // of your rules, use DescribeInsightRules (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeInsightRules.html). 5534 // 5535 // RuleNames is a required field 5536 RuleNames []*string `type:"list" required:"true"` 5537} 5538 5539// String returns the string representation 5540func (s DisableInsightRulesInput) String() string { 5541 return awsutil.Prettify(s) 5542} 5543 5544// GoString returns the string representation 5545func (s DisableInsightRulesInput) GoString() string { 5546 return s.String() 5547} 5548 5549// Validate inspects the fields of the type to determine if they are valid. 5550func (s *DisableInsightRulesInput) Validate() error { 5551 invalidParams := request.ErrInvalidParams{Context: "DisableInsightRulesInput"} 5552 if s.RuleNames == nil { 5553 invalidParams.Add(request.NewErrParamRequired("RuleNames")) 5554 } 5555 5556 if invalidParams.Len() > 0 { 5557 return invalidParams 5558 } 5559 return nil 5560} 5561 5562// SetRuleNames sets the RuleNames field's value. 5563func (s *DisableInsightRulesInput) SetRuleNames(v []*string) *DisableInsightRulesInput { 5564 s.RuleNames = v 5565 return s 5566} 5567 5568type DisableInsightRulesOutput struct { 5569 _ struct{} `type:"structure"` 5570 5571 // An array listing the rules that could not be disabled. You cannot disable 5572 // built-in rules. 5573 Failures []*PartialFailure `type:"list"` 5574} 5575 5576// String returns the string representation 5577func (s DisableInsightRulesOutput) String() string { 5578 return awsutil.Prettify(s) 5579} 5580 5581// GoString returns the string representation 5582func (s DisableInsightRulesOutput) GoString() string { 5583 return s.String() 5584} 5585 5586// SetFailures sets the Failures field's value. 5587func (s *DisableInsightRulesOutput) SetFailures(v []*PartialFailure) *DisableInsightRulesOutput { 5588 s.Failures = v 5589 return s 5590} 5591 5592type EnableAlarmActionsInput struct { 5593 _ struct{} `type:"structure"` 5594 5595 // The names of the alarms. 5596 // 5597 // AlarmNames is a required field 5598 AlarmNames []*string `type:"list" required:"true"` 5599} 5600 5601// String returns the string representation 5602func (s EnableAlarmActionsInput) String() string { 5603 return awsutil.Prettify(s) 5604} 5605 5606// GoString returns the string representation 5607func (s EnableAlarmActionsInput) GoString() string { 5608 return s.String() 5609} 5610 5611// Validate inspects the fields of the type to determine if they are valid. 5612func (s *EnableAlarmActionsInput) Validate() error { 5613 invalidParams := request.ErrInvalidParams{Context: "EnableAlarmActionsInput"} 5614 if s.AlarmNames == nil { 5615 invalidParams.Add(request.NewErrParamRequired("AlarmNames")) 5616 } 5617 5618 if invalidParams.Len() > 0 { 5619 return invalidParams 5620 } 5621 return nil 5622} 5623 5624// SetAlarmNames sets the AlarmNames field's value. 5625func (s *EnableAlarmActionsInput) SetAlarmNames(v []*string) *EnableAlarmActionsInput { 5626 s.AlarmNames = v 5627 return s 5628} 5629 5630type EnableAlarmActionsOutput struct { 5631 _ struct{} `type:"structure"` 5632} 5633 5634// String returns the string representation 5635func (s EnableAlarmActionsOutput) String() string { 5636 return awsutil.Prettify(s) 5637} 5638 5639// GoString returns the string representation 5640func (s EnableAlarmActionsOutput) GoString() string { 5641 return s.String() 5642} 5643 5644type EnableInsightRulesInput struct { 5645 _ struct{} `type:"structure"` 5646 5647 // An array of the rule names to enable. If you need to find out the names of 5648 // your rules, use DescribeInsightRules (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeInsightRules.html). 5649 // 5650 // RuleNames is a required field 5651 RuleNames []*string `type:"list" required:"true"` 5652} 5653 5654// String returns the string representation 5655func (s EnableInsightRulesInput) String() string { 5656 return awsutil.Prettify(s) 5657} 5658 5659// GoString returns the string representation 5660func (s EnableInsightRulesInput) GoString() string { 5661 return s.String() 5662} 5663 5664// Validate inspects the fields of the type to determine if they are valid. 5665func (s *EnableInsightRulesInput) Validate() error { 5666 invalidParams := request.ErrInvalidParams{Context: "EnableInsightRulesInput"} 5667 if s.RuleNames == nil { 5668 invalidParams.Add(request.NewErrParamRequired("RuleNames")) 5669 } 5670 5671 if invalidParams.Len() > 0 { 5672 return invalidParams 5673 } 5674 return nil 5675} 5676 5677// SetRuleNames sets the RuleNames field's value. 5678func (s *EnableInsightRulesInput) SetRuleNames(v []*string) *EnableInsightRulesInput { 5679 s.RuleNames = v 5680 return s 5681} 5682 5683type EnableInsightRulesOutput struct { 5684 _ struct{} `type:"structure"` 5685 5686 // An array listing the rules that could not be enabled. You cannot disable 5687 // or enable built-in rules. 5688 Failures []*PartialFailure `type:"list"` 5689} 5690 5691// String returns the string representation 5692func (s EnableInsightRulesOutput) String() string { 5693 return awsutil.Prettify(s) 5694} 5695 5696// GoString returns the string representation 5697func (s EnableInsightRulesOutput) GoString() string { 5698 return s.String() 5699} 5700 5701// SetFailures sets the Failures field's value. 5702func (s *EnableInsightRulesOutput) SetFailures(v []*PartialFailure) *EnableInsightRulesOutput { 5703 s.Failures = v 5704 return s 5705} 5706 5707type GetDashboardInput struct { 5708 _ struct{} `type:"structure"` 5709 5710 // The name of the dashboard to be described. 5711 // 5712 // DashboardName is a required field 5713 DashboardName *string `type:"string" required:"true"` 5714} 5715 5716// String returns the string representation 5717func (s GetDashboardInput) String() string { 5718 return awsutil.Prettify(s) 5719} 5720 5721// GoString returns the string representation 5722func (s GetDashboardInput) GoString() string { 5723 return s.String() 5724} 5725 5726// Validate inspects the fields of the type to determine if they are valid. 5727func (s *GetDashboardInput) Validate() error { 5728 invalidParams := request.ErrInvalidParams{Context: "GetDashboardInput"} 5729 if s.DashboardName == nil { 5730 invalidParams.Add(request.NewErrParamRequired("DashboardName")) 5731 } 5732 5733 if invalidParams.Len() > 0 { 5734 return invalidParams 5735 } 5736 return nil 5737} 5738 5739// SetDashboardName sets the DashboardName field's value. 5740func (s *GetDashboardInput) SetDashboardName(v string) *GetDashboardInput { 5741 s.DashboardName = &v 5742 return s 5743} 5744 5745type GetDashboardOutput struct { 5746 _ struct{} `type:"structure"` 5747 5748 // The Amazon Resource Name (ARN) of the dashboard. 5749 DashboardArn *string `type:"string"` 5750 5751 // The detailed information about the dashboard, including what widgets are 5752 // included and their location on the dashboard. For more information about 5753 // the DashboardBody syntax, see Dashboard Body Structure and Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html). 5754 DashboardBody *string `type:"string"` 5755 5756 // The name of the dashboard. 5757 DashboardName *string `type:"string"` 5758} 5759 5760// String returns the string representation 5761func (s GetDashboardOutput) String() string { 5762 return awsutil.Prettify(s) 5763} 5764 5765// GoString returns the string representation 5766func (s GetDashboardOutput) GoString() string { 5767 return s.String() 5768} 5769 5770// SetDashboardArn sets the DashboardArn field's value. 5771func (s *GetDashboardOutput) SetDashboardArn(v string) *GetDashboardOutput { 5772 s.DashboardArn = &v 5773 return s 5774} 5775 5776// SetDashboardBody sets the DashboardBody field's value. 5777func (s *GetDashboardOutput) SetDashboardBody(v string) *GetDashboardOutput { 5778 s.DashboardBody = &v 5779 return s 5780} 5781 5782// SetDashboardName sets the DashboardName field's value. 5783func (s *GetDashboardOutput) SetDashboardName(v string) *GetDashboardOutput { 5784 s.DashboardName = &v 5785 return s 5786} 5787 5788type GetInsightRuleReportInput struct { 5789 _ struct{} `type:"structure"` 5790 5791 // The end time of the data to use in the report. When used in a raw HTTP Query 5792 // API, it is formatted as yyyy-MM-dd'T'HH:mm:ss. For example, 2019-07-01T23:59:59. 5793 // 5794 // EndTime is a required field 5795 EndTime *time.Time `type:"timestamp" required:"true"` 5796 5797 // The maximum number of contributors to include in the report. The range is 5798 // 1 to 100. If you omit this, the default of 10 is used. 5799 MaxContributorCount *int64 `type:"integer"` 5800 5801 // Specifies which metrics to use for aggregation of contributor values for 5802 // the report. You can specify one or more of the following metrics: 5803 // 5804 // * UniqueContributors -- the number of unique contributors for each data 5805 // point. 5806 // 5807 // * MaxContributorValue -- the value of the top contributor for each data 5808 // point. The identity of the contributor might change for each data point 5809 // in the graph. If this rule aggregates by COUNT, the top contributor for 5810 // each data point is the contributor with the most occurrences in that period. 5811 // If the rule aggregates by SUM, the top contributor is the contributor 5812 // with the highest sum in the log field specified by the rule's Value, during 5813 // that period. 5814 // 5815 // * SampleCount -- the number of data points matched by the rule. 5816 // 5817 // * Sum -- the sum of the values from all contributors during the time period 5818 // represented by that data point. 5819 // 5820 // * Minimum -- the minimum value from a single observation during the time 5821 // period represented by that data point. 5822 // 5823 // * Maximum -- the maximum value from a single observation during the time 5824 // period represented by that data point. 5825 // 5826 // * Average -- the average value from all contributors during the time period 5827 // represented by that data point. 5828 Metrics []*string `type:"list"` 5829 5830 // Determines what statistic to use to rank the contributors. Valid values are 5831 // SUM and MAXIMUM. 5832 OrderBy *string `min:"1" type:"string"` 5833 5834 // The period, in seconds, to use for the statistics in the InsightRuleMetricDatapoint 5835 // results. 5836 // 5837 // Period is a required field 5838 Period *int64 `min:"1" type:"integer" required:"true"` 5839 5840 // The name of the rule that you want to see data from. 5841 // 5842 // RuleName is a required field 5843 RuleName *string `min:"1" type:"string" required:"true"` 5844 5845 // The start time of the data to use in the report. When used in a raw HTTP 5846 // Query API, it is formatted as yyyy-MM-dd'T'HH:mm:ss. For example, 2019-07-01T23:59:59. 5847 // 5848 // StartTime is a required field 5849 StartTime *time.Time `type:"timestamp" required:"true"` 5850} 5851 5852// String returns the string representation 5853func (s GetInsightRuleReportInput) String() string { 5854 return awsutil.Prettify(s) 5855} 5856 5857// GoString returns the string representation 5858func (s GetInsightRuleReportInput) GoString() string { 5859 return s.String() 5860} 5861 5862// Validate inspects the fields of the type to determine if they are valid. 5863func (s *GetInsightRuleReportInput) Validate() error { 5864 invalidParams := request.ErrInvalidParams{Context: "GetInsightRuleReportInput"} 5865 if s.EndTime == nil { 5866 invalidParams.Add(request.NewErrParamRequired("EndTime")) 5867 } 5868 if s.OrderBy != nil && len(*s.OrderBy) < 1 { 5869 invalidParams.Add(request.NewErrParamMinLen("OrderBy", 1)) 5870 } 5871 if s.Period == nil { 5872 invalidParams.Add(request.NewErrParamRequired("Period")) 5873 } 5874 if s.Period != nil && *s.Period < 1 { 5875 invalidParams.Add(request.NewErrParamMinValue("Period", 1)) 5876 } 5877 if s.RuleName == nil { 5878 invalidParams.Add(request.NewErrParamRequired("RuleName")) 5879 } 5880 if s.RuleName != nil && len(*s.RuleName) < 1 { 5881 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 5882 } 5883 if s.StartTime == nil { 5884 invalidParams.Add(request.NewErrParamRequired("StartTime")) 5885 } 5886 5887 if invalidParams.Len() > 0 { 5888 return invalidParams 5889 } 5890 return nil 5891} 5892 5893// SetEndTime sets the EndTime field's value. 5894func (s *GetInsightRuleReportInput) SetEndTime(v time.Time) *GetInsightRuleReportInput { 5895 s.EndTime = &v 5896 return s 5897} 5898 5899// SetMaxContributorCount sets the MaxContributorCount field's value. 5900func (s *GetInsightRuleReportInput) SetMaxContributorCount(v int64) *GetInsightRuleReportInput { 5901 s.MaxContributorCount = &v 5902 return s 5903} 5904 5905// SetMetrics sets the Metrics field's value. 5906func (s *GetInsightRuleReportInput) SetMetrics(v []*string) *GetInsightRuleReportInput { 5907 s.Metrics = v 5908 return s 5909} 5910 5911// SetOrderBy sets the OrderBy field's value. 5912func (s *GetInsightRuleReportInput) SetOrderBy(v string) *GetInsightRuleReportInput { 5913 s.OrderBy = &v 5914 return s 5915} 5916 5917// SetPeriod sets the Period field's value. 5918func (s *GetInsightRuleReportInput) SetPeriod(v int64) *GetInsightRuleReportInput { 5919 s.Period = &v 5920 return s 5921} 5922 5923// SetRuleName sets the RuleName field's value. 5924func (s *GetInsightRuleReportInput) SetRuleName(v string) *GetInsightRuleReportInput { 5925 s.RuleName = &v 5926 return s 5927} 5928 5929// SetStartTime sets the StartTime field's value. 5930func (s *GetInsightRuleReportInput) SetStartTime(v time.Time) *GetInsightRuleReportInput { 5931 s.StartTime = &v 5932 return s 5933} 5934 5935type GetInsightRuleReportOutput struct { 5936 _ struct{} `type:"structure"` 5937 5938 // The sum of the values from all individual contributors that match the rule. 5939 AggregateValue *float64 `type:"double"` 5940 5941 // Specifies whether this rule aggregates contributor data by COUNT or SUM. 5942 AggregationStatistic *string `type:"string"` 5943 5944 // An approximate count of the unique contributors found by this rule in this 5945 // time period. 5946 ApproximateUniqueCount *int64 `type:"long"` 5947 5948 // An array of the unique contributors found by this rule in this time period. 5949 // If the rule contains multiple keys, each combination of values for the keys 5950 // counts as a unique contributor. 5951 Contributors []*InsightRuleContributor `type:"list"` 5952 5953 // An array of the strings used as the keys for this rule. The keys are the 5954 // dimensions used to classify contributors. If the rule contains more than 5955 // one key, then each unique combination of values for the keys is counted as 5956 // a unique contributor. 5957 KeyLabels []*string `type:"list"` 5958 5959 // A time series of metric data points that matches the time period in the rule 5960 // request. 5961 MetricDatapoints []*InsightRuleMetricDatapoint `type:"list"` 5962} 5963 5964// String returns the string representation 5965func (s GetInsightRuleReportOutput) String() string { 5966 return awsutil.Prettify(s) 5967} 5968 5969// GoString returns the string representation 5970func (s GetInsightRuleReportOutput) GoString() string { 5971 return s.String() 5972} 5973 5974// SetAggregateValue sets the AggregateValue field's value. 5975func (s *GetInsightRuleReportOutput) SetAggregateValue(v float64) *GetInsightRuleReportOutput { 5976 s.AggregateValue = &v 5977 return s 5978} 5979 5980// SetAggregationStatistic sets the AggregationStatistic field's value. 5981func (s *GetInsightRuleReportOutput) SetAggregationStatistic(v string) *GetInsightRuleReportOutput { 5982 s.AggregationStatistic = &v 5983 return s 5984} 5985 5986// SetApproximateUniqueCount sets the ApproximateUniqueCount field's value. 5987func (s *GetInsightRuleReportOutput) SetApproximateUniqueCount(v int64) *GetInsightRuleReportOutput { 5988 s.ApproximateUniqueCount = &v 5989 return s 5990} 5991 5992// SetContributors sets the Contributors field's value. 5993func (s *GetInsightRuleReportOutput) SetContributors(v []*InsightRuleContributor) *GetInsightRuleReportOutput { 5994 s.Contributors = v 5995 return s 5996} 5997 5998// SetKeyLabels sets the KeyLabels field's value. 5999func (s *GetInsightRuleReportOutput) SetKeyLabels(v []*string) *GetInsightRuleReportOutput { 6000 s.KeyLabels = v 6001 return s 6002} 6003 6004// SetMetricDatapoints sets the MetricDatapoints field's value. 6005func (s *GetInsightRuleReportOutput) SetMetricDatapoints(v []*InsightRuleMetricDatapoint) *GetInsightRuleReportOutput { 6006 s.MetricDatapoints = v 6007 return s 6008} 6009 6010type GetMetricDataInput struct { 6011 _ struct{} `type:"structure"` 6012 6013 // The time stamp indicating the latest data to be returned. 6014 // 6015 // The value specified is exclusive; results include data points up to the specified 6016 // time stamp. 6017 // 6018 // For better performance, specify StartTime and EndTime values that align with 6019 // the value of the metric's Period and sync up with the beginning and end of 6020 // an hour. For example, if the Period of a metric is 5 minutes, specifying 6021 // 12:05 or 12:30 as EndTime can get a faster response from CloudWatch than 6022 // setting 12:07 or 12:29 as the EndTime. 6023 // 6024 // EndTime is a required field 6025 EndTime *time.Time `type:"timestamp" required:"true"` 6026 6027 // This structure includes the Timezone parameter, which you can use to specify 6028 // your time zone so that the labels of returned data display the correct time 6029 // for your time zone. 6030 LabelOptions *LabelOptions `type:"structure"` 6031 6032 // The maximum number of data points the request should return before paginating. 6033 // If you omit this, the default of 100,800 is used. 6034 MaxDatapoints *int64 `type:"integer"` 6035 6036 // The metric queries to be returned. A single GetMetricData call can include 6037 // as many as 500 MetricDataQuery structures. Each of these structures can specify 6038 // either a metric to retrieve, or a math expression to perform on retrieved 6039 // data. 6040 // 6041 // MetricDataQueries is a required field 6042 MetricDataQueries []*MetricDataQuery `type:"list" required:"true"` 6043 6044 // Include this value, if it was returned by the previous GetMetricData operation, 6045 // to get the next set of data points. 6046 NextToken *string `type:"string"` 6047 6048 // The order in which data points should be returned. TimestampDescending returns 6049 // the newest data first and paginates when the MaxDatapoints limit is reached. 6050 // TimestampAscending returns the oldest data first and paginates when the MaxDatapoints 6051 // limit is reached. 6052 ScanBy *string `type:"string" enum:"ScanBy"` 6053 6054 // The time stamp indicating the earliest data to be returned. 6055 // 6056 // The value specified is inclusive; results include data points with the specified 6057 // time stamp. 6058 // 6059 // CloudWatch rounds the specified time stamp as follows: 6060 // 6061 // * Start time less than 15 days ago - Round down to the nearest whole minute. 6062 // For example, 12:32:34 is rounded down to 12:32:00. 6063 // 6064 // * Start time between 15 and 63 days ago - Round down to the nearest 5-minute 6065 // clock interval. For example, 12:32:34 is rounded down to 12:30:00. 6066 // 6067 // * Start time greater than 63 days ago - Round down to the nearest 1-hour 6068 // clock interval. For example, 12:32:34 is rounded down to 12:00:00. 6069 // 6070 // If you set Period to 5, 10, or 30, the start time of your request is rounded 6071 // down to the nearest time that corresponds to even 5-, 10-, or 30-second divisions 6072 // of a minute. For example, if you make a query at (HH:mm:ss) 01:05:23 for 6073 // the previous 10-second period, the start time of your request is rounded 6074 // down and you receive data from 01:05:10 to 01:05:20. If you make a query 6075 // at 15:07:17 for the previous 5 minutes of data, using a period of 5 seconds, 6076 // you receive data timestamped between 15:02:15 and 15:07:15. 6077 // 6078 // For better performance, specify StartTime and EndTime values that align with 6079 // the value of the metric's Period and sync up with the beginning and end of 6080 // an hour. For example, if the Period of a metric is 5 minutes, specifying 6081 // 12:05 or 12:30 as StartTime can get a faster response from CloudWatch than 6082 // setting 12:07 or 12:29 as the StartTime. 6083 // 6084 // StartTime is a required field 6085 StartTime *time.Time `type:"timestamp" required:"true"` 6086} 6087 6088// String returns the string representation 6089func (s GetMetricDataInput) String() string { 6090 return awsutil.Prettify(s) 6091} 6092 6093// GoString returns the string representation 6094func (s GetMetricDataInput) GoString() string { 6095 return s.String() 6096} 6097 6098// Validate inspects the fields of the type to determine if they are valid. 6099func (s *GetMetricDataInput) Validate() error { 6100 invalidParams := request.ErrInvalidParams{Context: "GetMetricDataInput"} 6101 if s.EndTime == nil { 6102 invalidParams.Add(request.NewErrParamRequired("EndTime")) 6103 } 6104 if s.MetricDataQueries == nil { 6105 invalidParams.Add(request.NewErrParamRequired("MetricDataQueries")) 6106 } 6107 if s.StartTime == nil { 6108 invalidParams.Add(request.NewErrParamRequired("StartTime")) 6109 } 6110 if s.MetricDataQueries != nil { 6111 for i, v := range s.MetricDataQueries { 6112 if v == nil { 6113 continue 6114 } 6115 if err := v.Validate(); err != nil { 6116 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricDataQueries", i), err.(request.ErrInvalidParams)) 6117 } 6118 } 6119 } 6120 6121 if invalidParams.Len() > 0 { 6122 return invalidParams 6123 } 6124 return nil 6125} 6126 6127// SetEndTime sets the EndTime field's value. 6128func (s *GetMetricDataInput) SetEndTime(v time.Time) *GetMetricDataInput { 6129 s.EndTime = &v 6130 return s 6131} 6132 6133// SetLabelOptions sets the LabelOptions field's value. 6134func (s *GetMetricDataInput) SetLabelOptions(v *LabelOptions) *GetMetricDataInput { 6135 s.LabelOptions = v 6136 return s 6137} 6138 6139// SetMaxDatapoints sets the MaxDatapoints field's value. 6140func (s *GetMetricDataInput) SetMaxDatapoints(v int64) *GetMetricDataInput { 6141 s.MaxDatapoints = &v 6142 return s 6143} 6144 6145// SetMetricDataQueries sets the MetricDataQueries field's value. 6146func (s *GetMetricDataInput) SetMetricDataQueries(v []*MetricDataQuery) *GetMetricDataInput { 6147 s.MetricDataQueries = v 6148 return s 6149} 6150 6151// SetNextToken sets the NextToken field's value. 6152func (s *GetMetricDataInput) SetNextToken(v string) *GetMetricDataInput { 6153 s.NextToken = &v 6154 return s 6155} 6156 6157// SetScanBy sets the ScanBy field's value. 6158func (s *GetMetricDataInput) SetScanBy(v string) *GetMetricDataInput { 6159 s.ScanBy = &v 6160 return s 6161} 6162 6163// SetStartTime sets the StartTime field's value. 6164func (s *GetMetricDataInput) SetStartTime(v time.Time) *GetMetricDataInput { 6165 s.StartTime = &v 6166 return s 6167} 6168 6169type GetMetricDataOutput struct { 6170 _ struct{} `type:"structure"` 6171 6172 // Contains a message about this GetMetricData operation, if the operation results 6173 // in such a message. An example of a message that might be returned is Maximum 6174 // number of allowed metrics exceeded. If there is a message, as much of the 6175 // operation as possible is still executed. 6176 // 6177 // A message appears here only if it is related to the global GetMetricData 6178 // operation. Any message about a specific metric returned by the operation 6179 // appears in the MetricDataResult object returned for that metric. 6180 Messages []*MessageData `type:"list"` 6181 6182 // The metrics that are returned, including the metric name, namespace, and 6183 // dimensions. 6184 MetricDataResults []*MetricDataResult `type:"list"` 6185 6186 // A token that marks the next batch of returned results. 6187 NextToken *string `type:"string"` 6188} 6189 6190// String returns the string representation 6191func (s GetMetricDataOutput) String() string { 6192 return awsutil.Prettify(s) 6193} 6194 6195// GoString returns the string representation 6196func (s GetMetricDataOutput) GoString() string { 6197 return s.String() 6198} 6199 6200// SetMessages sets the Messages field's value. 6201func (s *GetMetricDataOutput) SetMessages(v []*MessageData) *GetMetricDataOutput { 6202 s.Messages = v 6203 return s 6204} 6205 6206// SetMetricDataResults sets the MetricDataResults field's value. 6207func (s *GetMetricDataOutput) SetMetricDataResults(v []*MetricDataResult) *GetMetricDataOutput { 6208 s.MetricDataResults = v 6209 return s 6210} 6211 6212// SetNextToken sets the NextToken field's value. 6213func (s *GetMetricDataOutput) SetNextToken(v string) *GetMetricDataOutput { 6214 s.NextToken = &v 6215 return s 6216} 6217 6218type GetMetricStatisticsInput struct { 6219 _ struct{} `type:"structure"` 6220 6221 // The dimensions. If the metric contains multiple dimensions, you must include 6222 // a value for each dimension. CloudWatch treats each unique combination of 6223 // dimensions as a separate metric. If a specific combination of dimensions 6224 // was not published, you can't retrieve statistics for it. You must specify 6225 // the same dimensions that were used when the metrics were created. For an 6226 // example, see Dimension Combinations (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#dimension-combinations) 6227 // in the Amazon CloudWatch User Guide. For more information about specifying 6228 // dimensions, see Publishing Metrics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html) 6229 // in the Amazon CloudWatch User Guide. 6230 Dimensions []*Dimension `type:"list"` 6231 6232 // The time stamp that determines the last data point to return. 6233 // 6234 // The value specified is exclusive; results include data points up to the specified 6235 // time stamp. In a raw HTTP query, the time stamp must be in ISO 8601 UTC format 6236 // (for example, 2016-10-10T23:00:00Z). 6237 // 6238 // EndTime is a required field 6239 EndTime *time.Time `type:"timestamp" required:"true"` 6240 6241 // The percentile statistics. Specify values between p0.0 and p100. When calling 6242 // GetMetricStatistics, you must specify either Statistics or ExtendedStatistics, 6243 // but not both. Percentile statistics are not available for metrics when any 6244 // of the metric values are negative numbers. 6245 ExtendedStatistics []*string `min:"1" type:"list"` 6246 6247 // The name of the metric, with or without spaces. 6248 // 6249 // MetricName is a required field 6250 MetricName *string `min:"1" type:"string" required:"true"` 6251 6252 // The namespace of the metric, with or without spaces. 6253 // 6254 // Namespace is a required field 6255 Namespace *string `min:"1" type:"string" required:"true"` 6256 6257 // The granularity, in seconds, of the returned data points. For metrics with 6258 // regular resolution, a period can be as short as one minute (60 seconds) and 6259 // must be a multiple of 60. For high-resolution metrics that are collected 6260 // at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, 6261 // or any multiple of 60. High-resolution metrics are those metrics stored by 6262 // a PutMetricData call that includes a StorageResolution of 1 second. 6263 // 6264 // If the StartTime parameter specifies a time stamp that is greater than 3 6265 // hours ago, you must specify the period as follows or no data points in that 6266 // time range is returned: 6267 // 6268 // * Start time between 3 hours and 15 days ago - Use a multiple of 60 seconds 6269 // (1 minute). 6270 // 6271 // * Start time between 15 and 63 days ago - Use a multiple of 300 seconds 6272 // (5 minutes). 6273 // 6274 // * Start time greater than 63 days ago - Use a multiple of 3600 seconds 6275 // (1 hour). 6276 // 6277 // Period is a required field 6278 Period *int64 `min:"1" type:"integer" required:"true"` 6279 6280 // The time stamp that determines the first data point to return. Start times 6281 // are evaluated relative to the time that CloudWatch receives the request. 6282 // 6283 // The value specified is inclusive; results include data points with the specified 6284 // time stamp. In a raw HTTP query, the time stamp must be in ISO 8601 UTC format 6285 // (for example, 2016-10-03T23:00:00Z). 6286 // 6287 // CloudWatch rounds the specified time stamp as follows: 6288 // 6289 // * Start time less than 15 days ago - Round down to the nearest whole minute. 6290 // For example, 12:32:34 is rounded down to 12:32:00. 6291 // 6292 // * Start time between 15 and 63 days ago - Round down to the nearest 5-minute 6293 // clock interval. For example, 12:32:34 is rounded down to 12:30:00. 6294 // 6295 // * Start time greater than 63 days ago - Round down to the nearest 1-hour 6296 // clock interval. For example, 12:32:34 is rounded down to 12:00:00. 6297 // 6298 // If you set Period to 5, 10, or 30, the start time of your request is rounded 6299 // down to the nearest time that corresponds to even 5-, 10-, or 30-second divisions 6300 // of a minute. For example, if you make a query at (HH:mm:ss) 01:05:23 for 6301 // the previous 10-second period, the start time of your request is rounded 6302 // down and you receive data from 01:05:10 to 01:05:20. If you make a query 6303 // at 15:07:17 for the previous 5 minutes of data, using a period of 5 seconds, 6304 // you receive data timestamped between 15:02:15 and 15:07:15. 6305 // 6306 // StartTime is a required field 6307 StartTime *time.Time `type:"timestamp" required:"true"` 6308 6309 // The metric statistics, other than percentile. For percentile statistics, 6310 // use ExtendedStatistics. When calling GetMetricStatistics, you must specify 6311 // either Statistics or ExtendedStatistics, but not both. 6312 Statistics []*string `min:"1" type:"list"` 6313 6314 // The unit for a given metric. If you omit Unit, all data that was collected 6315 // with any unit is returned, along with the corresponding units that were specified 6316 // when the data was reported to CloudWatch. If you specify a unit, the operation 6317 // returns only data that was collected with that unit specified. If you specify 6318 // a unit that does not match the data collected, the results of the operation 6319 // are null. CloudWatch does not perform unit conversions. 6320 Unit *string `type:"string" enum:"StandardUnit"` 6321} 6322 6323// String returns the string representation 6324func (s GetMetricStatisticsInput) String() string { 6325 return awsutil.Prettify(s) 6326} 6327 6328// GoString returns the string representation 6329func (s GetMetricStatisticsInput) GoString() string { 6330 return s.String() 6331} 6332 6333// Validate inspects the fields of the type to determine if they are valid. 6334func (s *GetMetricStatisticsInput) Validate() error { 6335 invalidParams := request.ErrInvalidParams{Context: "GetMetricStatisticsInput"} 6336 if s.EndTime == nil { 6337 invalidParams.Add(request.NewErrParamRequired("EndTime")) 6338 } 6339 if s.ExtendedStatistics != nil && len(s.ExtendedStatistics) < 1 { 6340 invalidParams.Add(request.NewErrParamMinLen("ExtendedStatistics", 1)) 6341 } 6342 if s.MetricName == nil { 6343 invalidParams.Add(request.NewErrParamRequired("MetricName")) 6344 } 6345 if s.MetricName != nil && len(*s.MetricName) < 1 { 6346 invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) 6347 } 6348 if s.Namespace == nil { 6349 invalidParams.Add(request.NewErrParamRequired("Namespace")) 6350 } 6351 if s.Namespace != nil && len(*s.Namespace) < 1 { 6352 invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) 6353 } 6354 if s.Period == nil { 6355 invalidParams.Add(request.NewErrParamRequired("Period")) 6356 } 6357 if s.Period != nil && *s.Period < 1 { 6358 invalidParams.Add(request.NewErrParamMinValue("Period", 1)) 6359 } 6360 if s.StartTime == nil { 6361 invalidParams.Add(request.NewErrParamRequired("StartTime")) 6362 } 6363 if s.Statistics != nil && len(s.Statistics) < 1 { 6364 invalidParams.Add(request.NewErrParamMinLen("Statistics", 1)) 6365 } 6366 if s.Dimensions != nil { 6367 for i, v := range s.Dimensions { 6368 if v == nil { 6369 continue 6370 } 6371 if err := v.Validate(); err != nil { 6372 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) 6373 } 6374 } 6375 } 6376 6377 if invalidParams.Len() > 0 { 6378 return invalidParams 6379 } 6380 return nil 6381} 6382 6383// SetDimensions sets the Dimensions field's value. 6384func (s *GetMetricStatisticsInput) SetDimensions(v []*Dimension) *GetMetricStatisticsInput { 6385 s.Dimensions = v 6386 return s 6387} 6388 6389// SetEndTime sets the EndTime field's value. 6390func (s *GetMetricStatisticsInput) SetEndTime(v time.Time) *GetMetricStatisticsInput { 6391 s.EndTime = &v 6392 return s 6393} 6394 6395// SetExtendedStatistics sets the ExtendedStatistics field's value. 6396func (s *GetMetricStatisticsInput) SetExtendedStatistics(v []*string) *GetMetricStatisticsInput { 6397 s.ExtendedStatistics = v 6398 return s 6399} 6400 6401// SetMetricName sets the MetricName field's value. 6402func (s *GetMetricStatisticsInput) SetMetricName(v string) *GetMetricStatisticsInput { 6403 s.MetricName = &v 6404 return s 6405} 6406 6407// SetNamespace sets the Namespace field's value. 6408func (s *GetMetricStatisticsInput) SetNamespace(v string) *GetMetricStatisticsInput { 6409 s.Namespace = &v 6410 return s 6411} 6412 6413// SetPeriod sets the Period field's value. 6414func (s *GetMetricStatisticsInput) SetPeriod(v int64) *GetMetricStatisticsInput { 6415 s.Period = &v 6416 return s 6417} 6418 6419// SetStartTime sets the StartTime field's value. 6420func (s *GetMetricStatisticsInput) SetStartTime(v time.Time) *GetMetricStatisticsInput { 6421 s.StartTime = &v 6422 return s 6423} 6424 6425// SetStatistics sets the Statistics field's value. 6426func (s *GetMetricStatisticsInput) SetStatistics(v []*string) *GetMetricStatisticsInput { 6427 s.Statistics = v 6428 return s 6429} 6430 6431// SetUnit sets the Unit field's value. 6432func (s *GetMetricStatisticsInput) SetUnit(v string) *GetMetricStatisticsInput { 6433 s.Unit = &v 6434 return s 6435} 6436 6437type GetMetricStatisticsOutput struct { 6438 _ struct{} `type:"structure"` 6439 6440 // The data points for the specified metric. 6441 Datapoints []*Datapoint `type:"list"` 6442 6443 // A label for the specified metric. 6444 Label *string `type:"string"` 6445} 6446 6447// String returns the string representation 6448func (s GetMetricStatisticsOutput) String() string { 6449 return awsutil.Prettify(s) 6450} 6451 6452// GoString returns the string representation 6453func (s GetMetricStatisticsOutput) GoString() string { 6454 return s.String() 6455} 6456 6457// SetDatapoints sets the Datapoints field's value. 6458func (s *GetMetricStatisticsOutput) SetDatapoints(v []*Datapoint) *GetMetricStatisticsOutput { 6459 s.Datapoints = v 6460 return s 6461} 6462 6463// SetLabel sets the Label field's value. 6464func (s *GetMetricStatisticsOutput) SetLabel(v string) *GetMetricStatisticsOutput { 6465 s.Label = &v 6466 return s 6467} 6468 6469type GetMetricStreamInput struct { 6470 _ struct{} `type:"structure"` 6471 6472 // The name of the metric stream to retrieve information about. 6473 // 6474 // Name is a required field 6475 Name *string `min:"1" type:"string" required:"true"` 6476} 6477 6478// String returns the string representation 6479func (s GetMetricStreamInput) String() string { 6480 return awsutil.Prettify(s) 6481} 6482 6483// GoString returns the string representation 6484func (s GetMetricStreamInput) GoString() string { 6485 return s.String() 6486} 6487 6488// Validate inspects the fields of the type to determine if they are valid. 6489func (s *GetMetricStreamInput) Validate() error { 6490 invalidParams := request.ErrInvalidParams{Context: "GetMetricStreamInput"} 6491 if s.Name == nil { 6492 invalidParams.Add(request.NewErrParamRequired("Name")) 6493 } 6494 if s.Name != nil && len(*s.Name) < 1 { 6495 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 6496 } 6497 6498 if invalidParams.Len() > 0 { 6499 return invalidParams 6500 } 6501 return nil 6502} 6503 6504// SetName sets the Name field's value. 6505func (s *GetMetricStreamInput) SetName(v string) *GetMetricStreamInput { 6506 s.Name = &v 6507 return s 6508} 6509 6510type GetMetricStreamOutput struct { 6511 _ struct{} `type:"structure"` 6512 6513 // The ARN of the metric stream. 6514 Arn *string `min:"1" type:"string"` 6515 6516 // The date that the metric stream was created. 6517 CreationDate *time.Time `type:"timestamp"` 6518 6519 // If this array of metric namespaces is present, then these namespaces are 6520 // the only metric namespaces that are not streamed by this metric stream. In 6521 // this case, all other metric namespaces in the account are streamed by this 6522 // metric stream. 6523 ExcludeFilters []*MetricStreamFilter `type:"list"` 6524 6525 // The ARN of the Amazon Kinesis Firehose delivery stream that is used by this 6526 // metric stream. 6527 FirehoseArn *string `min:"1" type:"string"` 6528 6529 // If this array of metric namespaces is present, then these namespaces are 6530 // the only metric namespaces that are streamed by this metric stream. 6531 IncludeFilters []*MetricStreamFilter `type:"list"` 6532 6533 // The date of the most recent update to the metric stream's configuration. 6534 LastUpdateDate *time.Time `type:"timestamp"` 6535 6536 // The name of the metric stream. 6537 Name *string `min:"1" type:"string"` 6538 6539 OutputFormat *string `min:"1" type:"string" enum:"MetricStreamOutputFormat"` 6540 6541 // The ARN of the IAM role that is used by this metric stream. 6542 RoleArn *string `min:"1" type:"string"` 6543 6544 // The state of the metric stream. The possible values are running and stopped. 6545 State *string `type:"string"` 6546} 6547 6548// String returns the string representation 6549func (s GetMetricStreamOutput) String() string { 6550 return awsutil.Prettify(s) 6551} 6552 6553// GoString returns the string representation 6554func (s GetMetricStreamOutput) GoString() string { 6555 return s.String() 6556} 6557 6558// SetArn sets the Arn field's value. 6559func (s *GetMetricStreamOutput) SetArn(v string) *GetMetricStreamOutput { 6560 s.Arn = &v 6561 return s 6562} 6563 6564// SetCreationDate sets the CreationDate field's value. 6565func (s *GetMetricStreamOutput) SetCreationDate(v time.Time) *GetMetricStreamOutput { 6566 s.CreationDate = &v 6567 return s 6568} 6569 6570// SetExcludeFilters sets the ExcludeFilters field's value. 6571func (s *GetMetricStreamOutput) SetExcludeFilters(v []*MetricStreamFilter) *GetMetricStreamOutput { 6572 s.ExcludeFilters = v 6573 return s 6574} 6575 6576// SetFirehoseArn sets the FirehoseArn field's value. 6577func (s *GetMetricStreamOutput) SetFirehoseArn(v string) *GetMetricStreamOutput { 6578 s.FirehoseArn = &v 6579 return s 6580} 6581 6582// SetIncludeFilters sets the IncludeFilters field's value. 6583func (s *GetMetricStreamOutput) SetIncludeFilters(v []*MetricStreamFilter) *GetMetricStreamOutput { 6584 s.IncludeFilters = v 6585 return s 6586} 6587 6588// SetLastUpdateDate sets the LastUpdateDate field's value. 6589func (s *GetMetricStreamOutput) SetLastUpdateDate(v time.Time) *GetMetricStreamOutput { 6590 s.LastUpdateDate = &v 6591 return s 6592} 6593 6594// SetName sets the Name field's value. 6595func (s *GetMetricStreamOutput) SetName(v string) *GetMetricStreamOutput { 6596 s.Name = &v 6597 return s 6598} 6599 6600// SetOutputFormat sets the OutputFormat field's value. 6601func (s *GetMetricStreamOutput) SetOutputFormat(v string) *GetMetricStreamOutput { 6602 s.OutputFormat = &v 6603 return s 6604} 6605 6606// SetRoleArn sets the RoleArn field's value. 6607func (s *GetMetricStreamOutput) SetRoleArn(v string) *GetMetricStreamOutput { 6608 s.RoleArn = &v 6609 return s 6610} 6611 6612// SetState sets the State field's value. 6613func (s *GetMetricStreamOutput) SetState(v string) *GetMetricStreamOutput { 6614 s.State = &v 6615 return s 6616} 6617 6618type GetMetricWidgetImageInput struct { 6619 _ struct{} `type:"structure"` 6620 6621 // A JSON string that defines the bitmap graph to be retrieved. The string includes 6622 // the metrics to include in the graph, statistics, annotations, title, axis 6623 // limits, and so on. You can include only one MetricWidget parameter in each 6624 // GetMetricWidgetImage call. 6625 // 6626 // For more information about the syntax of MetricWidget see GetMetricWidgetImage: 6627 // Metric Widget Structure and Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Metric-Widget-Structure.html). 6628 // 6629 // If any metric on the graph could not load all the requested data points, 6630 // an orange triangle with an exclamation point appears next to the graph legend. 6631 // 6632 // MetricWidget is a required field 6633 MetricWidget *string `type:"string" required:"true"` 6634 6635 // The format of the resulting image. Only PNG images are supported. 6636 // 6637 // The default is png. If you specify png, the API returns an HTTP response 6638 // with the content-type set to text/xml. The image data is in a MetricWidgetImage 6639 // field. For example: 6640 // 6641 // <GetMetricWidgetImageResponse xmlns=<URLstring>> 6642 // 6643 // <GetMetricWidgetImageResult> 6644 // 6645 // <MetricWidgetImage> 6646 // 6647 // iVBORw0KGgoAAAANSUhEUgAAAlgAAAGQEAYAAAAip... 6648 // 6649 // </MetricWidgetImage> 6650 // 6651 // </GetMetricWidgetImageResult> 6652 // 6653 // <ResponseMetadata> 6654 // 6655 // <RequestId>6f0d4192-4d42-11e8-82c1-f539a07e0e3b</RequestId> 6656 // 6657 // </ResponseMetadata> 6658 // 6659 // </GetMetricWidgetImageResponse> 6660 // 6661 // The image/png setting is intended only for custom HTTP requests. For most 6662 // use cases, and all actions using an AWS SDK, you should use png. If you specify 6663 // image/png, the HTTP response has a content-type set to image/png, and the 6664 // body of the response is a PNG image. 6665 OutputFormat *string `type:"string"` 6666} 6667 6668// String returns the string representation 6669func (s GetMetricWidgetImageInput) String() string { 6670 return awsutil.Prettify(s) 6671} 6672 6673// GoString returns the string representation 6674func (s GetMetricWidgetImageInput) GoString() string { 6675 return s.String() 6676} 6677 6678// Validate inspects the fields of the type to determine if they are valid. 6679func (s *GetMetricWidgetImageInput) Validate() error { 6680 invalidParams := request.ErrInvalidParams{Context: "GetMetricWidgetImageInput"} 6681 if s.MetricWidget == nil { 6682 invalidParams.Add(request.NewErrParamRequired("MetricWidget")) 6683 } 6684 6685 if invalidParams.Len() > 0 { 6686 return invalidParams 6687 } 6688 return nil 6689} 6690 6691// SetMetricWidget sets the MetricWidget field's value. 6692func (s *GetMetricWidgetImageInput) SetMetricWidget(v string) *GetMetricWidgetImageInput { 6693 s.MetricWidget = &v 6694 return s 6695} 6696 6697// SetOutputFormat sets the OutputFormat field's value. 6698func (s *GetMetricWidgetImageInput) SetOutputFormat(v string) *GetMetricWidgetImageInput { 6699 s.OutputFormat = &v 6700 return s 6701} 6702 6703type GetMetricWidgetImageOutput struct { 6704 _ struct{} `type:"structure"` 6705 6706 // The image of the graph, in the output format specified. The output is base64-encoded. 6707 // 6708 // MetricWidgetImage is automatically base64 encoded/decoded by the SDK. 6709 MetricWidgetImage []byte `type:"blob"` 6710} 6711 6712// String returns the string representation 6713func (s GetMetricWidgetImageOutput) String() string { 6714 return awsutil.Prettify(s) 6715} 6716 6717// GoString returns the string representation 6718func (s GetMetricWidgetImageOutput) GoString() string { 6719 return s.String() 6720} 6721 6722// SetMetricWidgetImage sets the MetricWidgetImage field's value. 6723func (s *GetMetricWidgetImageOutput) SetMetricWidgetImage(v []byte) *GetMetricWidgetImageOutput { 6724 s.MetricWidgetImage = v 6725 return s 6726} 6727 6728// This structure contains the definition for a Contributor Insights rule. 6729type InsightRule struct { 6730 _ struct{} `type:"structure"` 6731 6732 // The definition of the rule, as a JSON object. The definition contains the 6733 // keywords used to define contributors, the value to aggregate on if this rule 6734 // returns a sum instead of a count, and the filters. For details on the valid 6735 // syntax, see Contributor Insights Rule Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights-RuleSyntax.html). 6736 // 6737 // Definition is a required field 6738 Definition *string `min:"1" type:"string" required:"true"` 6739 6740 // The name of the rule. 6741 // 6742 // Name is a required field 6743 Name *string `min:"1" type:"string" required:"true"` 6744 6745 // For rules that you create, this is always {"Name": "CloudWatchLogRule", "Version": 6746 // 1}. For built-in rules, this is {"Name": "ServiceLogRule", "Version": 1} 6747 // 6748 // Schema is a required field 6749 Schema *string `type:"string" required:"true"` 6750 6751 // Indicates whether the rule is enabled or disabled. 6752 // 6753 // State is a required field 6754 State *string `min:"1" type:"string" required:"true"` 6755} 6756 6757// String returns the string representation 6758func (s InsightRule) String() string { 6759 return awsutil.Prettify(s) 6760} 6761 6762// GoString returns the string representation 6763func (s InsightRule) GoString() string { 6764 return s.String() 6765} 6766 6767// SetDefinition sets the Definition field's value. 6768func (s *InsightRule) SetDefinition(v string) *InsightRule { 6769 s.Definition = &v 6770 return s 6771} 6772 6773// SetName sets the Name field's value. 6774func (s *InsightRule) SetName(v string) *InsightRule { 6775 s.Name = &v 6776 return s 6777} 6778 6779// SetSchema sets the Schema field's value. 6780func (s *InsightRule) SetSchema(v string) *InsightRule { 6781 s.Schema = &v 6782 return s 6783} 6784 6785// SetState sets the State field's value. 6786func (s *InsightRule) SetState(v string) *InsightRule { 6787 s.State = &v 6788 return s 6789} 6790 6791// One of the unique contributors found by a Contributor Insights rule. If the 6792// rule contains multiple keys, then a unique contributor is a unique combination 6793// of values from all the keys in the rule. 6794// 6795// If the rule contains a single key, then each unique contributor is each unique 6796// value for this key. 6797// 6798// For more information, see GetInsightRuleReport (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetInsightRuleReport.html). 6799type InsightRuleContributor struct { 6800 _ struct{} `type:"structure"` 6801 6802 // An approximation of the aggregate value that comes from this contributor. 6803 // 6804 // ApproximateAggregateValue is a required field 6805 ApproximateAggregateValue *float64 `type:"double" required:"true"` 6806 6807 // An array of the data points where this contributor is present. Only the data 6808 // points when this contributor appeared are included in the array. 6809 // 6810 // Datapoints is a required field 6811 Datapoints []*InsightRuleContributorDatapoint `type:"list" required:"true"` 6812 6813 // One of the log entry field keywords that is used to define contributors for 6814 // this rule. 6815 // 6816 // Keys is a required field 6817 Keys []*string `type:"list" required:"true"` 6818} 6819 6820// String returns the string representation 6821func (s InsightRuleContributor) String() string { 6822 return awsutil.Prettify(s) 6823} 6824 6825// GoString returns the string representation 6826func (s InsightRuleContributor) GoString() string { 6827 return s.String() 6828} 6829 6830// SetApproximateAggregateValue sets the ApproximateAggregateValue field's value. 6831func (s *InsightRuleContributor) SetApproximateAggregateValue(v float64) *InsightRuleContributor { 6832 s.ApproximateAggregateValue = &v 6833 return s 6834} 6835 6836// SetDatapoints sets the Datapoints field's value. 6837func (s *InsightRuleContributor) SetDatapoints(v []*InsightRuleContributorDatapoint) *InsightRuleContributor { 6838 s.Datapoints = v 6839 return s 6840} 6841 6842// SetKeys sets the Keys field's value. 6843func (s *InsightRuleContributor) SetKeys(v []*string) *InsightRuleContributor { 6844 s.Keys = v 6845 return s 6846} 6847 6848// One data point related to one contributor. 6849// 6850// For more information, see GetInsightRuleReport (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetInsightRuleReport.html) 6851// and InsightRuleContributor (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_InsightRuleContributor.html). 6852type InsightRuleContributorDatapoint struct { 6853 _ struct{} `type:"structure"` 6854 6855 // The approximate value that this contributor added during this timestamp. 6856 // 6857 // ApproximateValue is a required field 6858 ApproximateValue *float64 `type:"double" required:"true"` 6859 6860 // The timestamp of the data point. 6861 // 6862 // Timestamp is a required field 6863 Timestamp *time.Time `type:"timestamp" required:"true"` 6864} 6865 6866// String returns the string representation 6867func (s InsightRuleContributorDatapoint) String() string { 6868 return awsutil.Prettify(s) 6869} 6870 6871// GoString returns the string representation 6872func (s InsightRuleContributorDatapoint) GoString() string { 6873 return s.String() 6874} 6875 6876// SetApproximateValue sets the ApproximateValue field's value. 6877func (s *InsightRuleContributorDatapoint) SetApproximateValue(v float64) *InsightRuleContributorDatapoint { 6878 s.ApproximateValue = &v 6879 return s 6880} 6881 6882// SetTimestamp sets the Timestamp field's value. 6883func (s *InsightRuleContributorDatapoint) SetTimestamp(v time.Time) *InsightRuleContributorDatapoint { 6884 s.Timestamp = &v 6885 return s 6886} 6887 6888// One data point from the metric time series returned in a Contributor Insights 6889// rule report. 6890// 6891// For more information, see GetInsightRuleReport (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetInsightRuleReport.html). 6892type InsightRuleMetricDatapoint struct { 6893 _ struct{} `type:"structure"` 6894 6895 // The average value from all contributors during the time period represented 6896 // by that data point. 6897 // 6898 // This statistic is returned only if you included it in the Metrics array in 6899 // your request. 6900 Average *float64 `type:"double"` 6901 6902 // The maximum value provided by one contributor during this timestamp. Each 6903 // timestamp is evaluated separately, so the identity of the max contributor 6904 // could be different for each timestamp. 6905 // 6906 // This statistic is returned only if you included it in the Metrics array in 6907 // your request. 6908 MaxContributorValue *float64 `type:"double"` 6909 6910 // The maximum value from a single occurence from a single contributor during 6911 // the time period represented by that data point. 6912 // 6913 // This statistic is returned only if you included it in the Metrics array in 6914 // your request. 6915 Maximum *float64 `type:"double"` 6916 6917 // The minimum value from a single contributor during the time period represented 6918 // by that data point. 6919 // 6920 // This statistic is returned only if you included it in the Metrics array in 6921 // your request. 6922 Minimum *float64 `type:"double"` 6923 6924 // The number of occurrences that matched the rule during this data point. 6925 // 6926 // This statistic is returned only if you included it in the Metrics array in 6927 // your request. 6928 SampleCount *float64 `type:"double"` 6929 6930 // The sum of the values from all contributors during the time period represented 6931 // by that data point. 6932 // 6933 // This statistic is returned only if you included it in the Metrics array in 6934 // your request. 6935 Sum *float64 `type:"double"` 6936 6937 // The timestamp of the data point. 6938 // 6939 // Timestamp is a required field 6940 Timestamp *time.Time `type:"timestamp" required:"true"` 6941 6942 // The number of unique contributors who published data during this timestamp. 6943 // 6944 // This statistic is returned only if you included it in the Metrics array in 6945 // your request. 6946 UniqueContributors *float64 `type:"double"` 6947} 6948 6949// String returns the string representation 6950func (s InsightRuleMetricDatapoint) String() string { 6951 return awsutil.Prettify(s) 6952} 6953 6954// GoString returns the string representation 6955func (s InsightRuleMetricDatapoint) GoString() string { 6956 return s.String() 6957} 6958 6959// SetAverage sets the Average field's value. 6960func (s *InsightRuleMetricDatapoint) SetAverage(v float64) *InsightRuleMetricDatapoint { 6961 s.Average = &v 6962 return s 6963} 6964 6965// SetMaxContributorValue sets the MaxContributorValue field's value. 6966func (s *InsightRuleMetricDatapoint) SetMaxContributorValue(v float64) *InsightRuleMetricDatapoint { 6967 s.MaxContributorValue = &v 6968 return s 6969} 6970 6971// SetMaximum sets the Maximum field's value. 6972func (s *InsightRuleMetricDatapoint) SetMaximum(v float64) *InsightRuleMetricDatapoint { 6973 s.Maximum = &v 6974 return s 6975} 6976 6977// SetMinimum sets the Minimum field's value. 6978func (s *InsightRuleMetricDatapoint) SetMinimum(v float64) *InsightRuleMetricDatapoint { 6979 s.Minimum = &v 6980 return s 6981} 6982 6983// SetSampleCount sets the SampleCount field's value. 6984func (s *InsightRuleMetricDatapoint) SetSampleCount(v float64) *InsightRuleMetricDatapoint { 6985 s.SampleCount = &v 6986 return s 6987} 6988 6989// SetSum sets the Sum field's value. 6990func (s *InsightRuleMetricDatapoint) SetSum(v float64) *InsightRuleMetricDatapoint { 6991 s.Sum = &v 6992 return s 6993} 6994 6995// SetTimestamp sets the Timestamp field's value. 6996func (s *InsightRuleMetricDatapoint) SetTimestamp(v time.Time) *InsightRuleMetricDatapoint { 6997 s.Timestamp = &v 6998 return s 6999} 7000 7001// SetUniqueContributors sets the UniqueContributors field's value. 7002func (s *InsightRuleMetricDatapoint) SetUniqueContributors(v float64) *InsightRuleMetricDatapoint { 7003 s.UniqueContributors = &v 7004 return s 7005} 7006 7007// This structure includes the Timezone parameter, which you can use to specify 7008// your time zone so that the labels that are associated with returned metrics 7009// display the correct time for your time zone. 7010// 7011// The Timezone value affects a label only if you have a time-based dynamic 7012// expression in the label. For more information about dynamic expressions in 7013// labels, see Using Dynamic Labels (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html). 7014type LabelOptions struct { 7015 _ struct{} `type:"structure"` 7016 7017 // The time zone to use for metric data return in this operation. The format 7018 // is + or - followed by four digits. The first two digits indicate the number 7019 // of hours ahead or behind of UTC, and the final two digits are the number 7020 // of minutes. For example, +0130 indicates a time zone that is 1 hour and 30 7021 // minutes ahead of UTC. The default is +0000. 7022 Timezone *string `type:"string"` 7023} 7024 7025// String returns the string representation 7026func (s LabelOptions) String() string { 7027 return awsutil.Prettify(s) 7028} 7029 7030// GoString returns the string representation 7031func (s LabelOptions) GoString() string { 7032 return s.String() 7033} 7034 7035// SetTimezone sets the Timezone field's value. 7036func (s *LabelOptions) SetTimezone(v string) *LabelOptions { 7037 s.Timezone = &v 7038 return s 7039} 7040 7041type ListDashboardsInput struct { 7042 _ struct{} `type:"structure"` 7043 7044 // If you specify this parameter, only the dashboards with names starting with 7045 // the specified string are listed. The maximum length is 255, and valid characters 7046 // are A-Z, a-z, 0-9, ".", "-", and "_". 7047 DashboardNamePrefix *string `type:"string"` 7048 7049 // The token returned by a previous call to indicate that there is more data 7050 // available. 7051 NextToken *string `type:"string"` 7052} 7053 7054// String returns the string representation 7055func (s ListDashboardsInput) String() string { 7056 return awsutil.Prettify(s) 7057} 7058 7059// GoString returns the string representation 7060func (s ListDashboardsInput) GoString() string { 7061 return s.String() 7062} 7063 7064// SetDashboardNamePrefix sets the DashboardNamePrefix field's value. 7065func (s *ListDashboardsInput) SetDashboardNamePrefix(v string) *ListDashboardsInput { 7066 s.DashboardNamePrefix = &v 7067 return s 7068} 7069 7070// SetNextToken sets the NextToken field's value. 7071func (s *ListDashboardsInput) SetNextToken(v string) *ListDashboardsInput { 7072 s.NextToken = &v 7073 return s 7074} 7075 7076type ListDashboardsOutput struct { 7077 _ struct{} `type:"structure"` 7078 7079 // The list of matching dashboards. 7080 DashboardEntries []*DashboardEntry `type:"list"` 7081 7082 // The token that marks the start of the next batch of returned results. 7083 NextToken *string `type:"string"` 7084} 7085 7086// String returns the string representation 7087func (s ListDashboardsOutput) String() string { 7088 return awsutil.Prettify(s) 7089} 7090 7091// GoString returns the string representation 7092func (s ListDashboardsOutput) GoString() string { 7093 return s.String() 7094} 7095 7096// SetDashboardEntries sets the DashboardEntries field's value. 7097func (s *ListDashboardsOutput) SetDashboardEntries(v []*DashboardEntry) *ListDashboardsOutput { 7098 s.DashboardEntries = v 7099 return s 7100} 7101 7102// SetNextToken sets the NextToken field's value. 7103func (s *ListDashboardsOutput) SetNextToken(v string) *ListDashboardsOutput { 7104 s.NextToken = &v 7105 return s 7106} 7107 7108type ListMetricStreamsInput struct { 7109 _ struct{} `type:"structure"` 7110 7111 // The maximum number of results to return in one operation. 7112 MaxResults *int64 `min:"1" type:"integer"` 7113 7114 // Include this value, if it was returned by the previous call, to get the next 7115 // set of metric streams. 7116 NextToken *string `type:"string"` 7117} 7118 7119// String returns the string representation 7120func (s ListMetricStreamsInput) String() string { 7121 return awsutil.Prettify(s) 7122} 7123 7124// GoString returns the string representation 7125func (s ListMetricStreamsInput) GoString() string { 7126 return s.String() 7127} 7128 7129// Validate inspects the fields of the type to determine if they are valid. 7130func (s *ListMetricStreamsInput) Validate() error { 7131 invalidParams := request.ErrInvalidParams{Context: "ListMetricStreamsInput"} 7132 if s.MaxResults != nil && *s.MaxResults < 1 { 7133 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 7134 } 7135 7136 if invalidParams.Len() > 0 { 7137 return invalidParams 7138 } 7139 return nil 7140} 7141 7142// SetMaxResults sets the MaxResults field's value. 7143func (s *ListMetricStreamsInput) SetMaxResults(v int64) *ListMetricStreamsInput { 7144 s.MaxResults = &v 7145 return s 7146} 7147 7148// SetNextToken sets the NextToken field's value. 7149func (s *ListMetricStreamsInput) SetNextToken(v string) *ListMetricStreamsInput { 7150 s.NextToken = &v 7151 return s 7152} 7153 7154type ListMetricStreamsOutput struct { 7155 _ struct{} `type:"structure"` 7156 7157 // The array of metric stream information. 7158 Entries []*MetricStreamEntry `type:"list"` 7159 7160 // The token that marks the start of the next batch of returned results. You 7161 // can use this token in a subsequent operation to get the next batch of results. 7162 NextToken *string `type:"string"` 7163} 7164 7165// String returns the string representation 7166func (s ListMetricStreamsOutput) String() string { 7167 return awsutil.Prettify(s) 7168} 7169 7170// GoString returns the string representation 7171func (s ListMetricStreamsOutput) GoString() string { 7172 return s.String() 7173} 7174 7175// SetEntries sets the Entries field's value. 7176func (s *ListMetricStreamsOutput) SetEntries(v []*MetricStreamEntry) *ListMetricStreamsOutput { 7177 s.Entries = v 7178 return s 7179} 7180 7181// SetNextToken sets the NextToken field's value. 7182func (s *ListMetricStreamsOutput) SetNextToken(v string) *ListMetricStreamsOutput { 7183 s.NextToken = &v 7184 return s 7185} 7186 7187type ListMetricsInput struct { 7188 _ struct{} `type:"structure"` 7189 7190 // The dimensions to filter against. Only the dimensions that match exactly 7191 // will be returned. 7192 Dimensions []*DimensionFilter `type:"list"` 7193 7194 // The name of the metric to filter against. Only the metrics with names that 7195 // match exactly will be returned. 7196 MetricName *string `min:"1" type:"string"` 7197 7198 // The metric namespace to filter against. Only the namespace that matches exactly 7199 // will be returned. 7200 Namespace *string `min:"1" type:"string"` 7201 7202 // The token returned by a previous call to indicate that there is more data 7203 // available. 7204 NextToken *string `type:"string"` 7205 7206 // To filter the results to show only metrics that have had data points published 7207 // in the past three hours, specify this parameter with a value of PT3H. This 7208 // is the only valid value for this parameter. 7209 // 7210 // The results that are returned are an approximation of the value you specify. 7211 // There is a low probability that the returned results include metrics with 7212 // last published data as much as 40 minutes more than the specified time interval. 7213 RecentlyActive *string `type:"string" enum:"RecentlyActive"` 7214} 7215 7216// String returns the string representation 7217func (s ListMetricsInput) String() string { 7218 return awsutil.Prettify(s) 7219} 7220 7221// GoString returns the string representation 7222func (s ListMetricsInput) GoString() string { 7223 return s.String() 7224} 7225 7226// Validate inspects the fields of the type to determine if they are valid. 7227func (s *ListMetricsInput) Validate() error { 7228 invalidParams := request.ErrInvalidParams{Context: "ListMetricsInput"} 7229 if s.MetricName != nil && len(*s.MetricName) < 1 { 7230 invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) 7231 } 7232 if s.Namespace != nil && len(*s.Namespace) < 1 { 7233 invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) 7234 } 7235 if s.Dimensions != nil { 7236 for i, v := range s.Dimensions { 7237 if v == nil { 7238 continue 7239 } 7240 if err := v.Validate(); err != nil { 7241 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) 7242 } 7243 } 7244 } 7245 7246 if invalidParams.Len() > 0 { 7247 return invalidParams 7248 } 7249 return nil 7250} 7251 7252// SetDimensions sets the Dimensions field's value. 7253func (s *ListMetricsInput) SetDimensions(v []*DimensionFilter) *ListMetricsInput { 7254 s.Dimensions = v 7255 return s 7256} 7257 7258// SetMetricName sets the MetricName field's value. 7259func (s *ListMetricsInput) SetMetricName(v string) *ListMetricsInput { 7260 s.MetricName = &v 7261 return s 7262} 7263 7264// SetNamespace sets the Namespace field's value. 7265func (s *ListMetricsInput) SetNamespace(v string) *ListMetricsInput { 7266 s.Namespace = &v 7267 return s 7268} 7269 7270// SetNextToken sets the NextToken field's value. 7271func (s *ListMetricsInput) SetNextToken(v string) *ListMetricsInput { 7272 s.NextToken = &v 7273 return s 7274} 7275 7276// SetRecentlyActive sets the RecentlyActive field's value. 7277func (s *ListMetricsInput) SetRecentlyActive(v string) *ListMetricsInput { 7278 s.RecentlyActive = &v 7279 return s 7280} 7281 7282type ListMetricsOutput struct { 7283 _ struct{} `type:"structure"` 7284 7285 // The metrics that match your request. 7286 Metrics []*Metric `type:"list"` 7287 7288 // The token that marks the start of the next batch of returned results. 7289 NextToken *string `type:"string"` 7290} 7291 7292// String returns the string representation 7293func (s ListMetricsOutput) String() string { 7294 return awsutil.Prettify(s) 7295} 7296 7297// GoString returns the string representation 7298func (s ListMetricsOutput) GoString() string { 7299 return s.String() 7300} 7301 7302// SetMetrics sets the Metrics field's value. 7303func (s *ListMetricsOutput) SetMetrics(v []*Metric) *ListMetricsOutput { 7304 s.Metrics = v 7305 return s 7306} 7307 7308// SetNextToken sets the NextToken field's value. 7309func (s *ListMetricsOutput) SetNextToken(v string) *ListMetricsOutput { 7310 s.NextToken = &v 7311 return s 7312} 7313 7314type ListTagsForResourceInput struct { 7315 _ struct{} `type:"structure"` 7316 7317 // The ARN of the CloudWatch resource that you want to view tags for. 7318 // 7319 // The ARN format of an alarm is arn:aws:cloudwatch:Region:account-id:alarm:alarm-name 7320 // 7321 // The ARN format of a Contributor Insights rule is arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name 7322 // 7323 // For more information about ARN format, see Resource Types Defined by Amazon 7324 // CloudWatch (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies) 7325 // in the Amazon Web Services General Reference. 7326 // 7327 // ResourceARN is a required field 7328 ResourceARN *string `min:"1" type:"string" required:"true"` 7329} 7330 7331// String returns the string representation 7332func (s ListTagsForResourceInput) String() string { 7333 return awsutil.Prettify(s) 7334} 7335 7336// GoString returns the string representation 7337func (s ListTagsForResourceInput) GoString() string { 7338 return s.String() 7339} 7340 7341// Validate inspects the fields of the type to determine if they are valid. 7342func (s *ListTagsForResourceInput) Validate() error { 7343 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 7344 if s.ResourceARN == nil { 7345 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 7346 } 7347 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 7348 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 7349 } 7350 7351 if invalidParams.Len() > 0 { 7352 return invalidParams 7353 } 7354 return nil 7355} 7356 7357// SetResourceARN sets the ResourceARN field's value. 7358func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { 7359 s.ResourceARN = &v 7360 return s 7361} 7362 7363type ListTagsForResourceOutput struct { 7364 _ struct{} `type:"structure"` 7365 7366 // The list of tag keys and values associated with the resource you specified. 7367 Tags []*Tag `type:"list"` 7368} 7369 7370// String returns the string representation 7371func (s ListTagsForResourceOutput) String() string { 7372 return awsutil.Prettify(s) 7373} 7374 7375// GoString returns the string representation 7376func (s ListTagsForResourceOutput) GoString() string { 7377 return s.String() 7378} 7379 7380// SetTags sets the Tags field's value. 7381func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { 7382 s.Tags = v 7383 return s 7384} 7385 7386// A message returned by the GetMetricDataAPI, including a code and a description. 7387type MessageData struct { 7388 _ struct{} `type:"structure"` 7389 7390 // The error code or status code associated with the message. 7391 Code *string `type:"string"` 7392 7393 // The message text. 7394 Value *string `type:"string"` 7395} 7396 7397// String returns the string representation 7398func (s MessageData) String() string { 7399 return awsutil.Prettify(s) 7400} 7401 7402// GoString returns the string representation 7403func (s MessageData) GoString() string { 7404 return s.String() 7405} 7406 7407// SetCode sets the Code field's value. 7408func (s *MessageData) SetCode(v string) *MessageData { 7409 s.Code = &v 7410 return s 7411} 7412 7413// SetValue sets the Value field's value. 7414func (s *MessageData) SetValue(v string) *MessageData { 7415 s.Value = &v 7416 return s 7417} 7418 7419// Represents a specific metric. 7420type Metric struct { 7421 _ struct{} `type:"structure"` 7422 7423 // The dimensions for the metric. 7424 Dimensions []*Dimension `type:"list"` 7425 7426 // The name of the metric. This is a required field. 7427 MetricName *string `min:"1" type:"string"` 7428 7429 // The namespace of the metric. 7430 Namespace *string `min:"1" type:"string"` 7431} 7432 7433// String returns the string representation 7434func (s Metric) String() string { 7435 return awsutil.Prettify(s) 7436} 7437 7438// GoString returns the string representation 7439func (s Metric) GoString() string { 7440 return s.String() 7441} 7442 7443// Validate inspects the fields of the type to determine if they are valid. 7444func (s *Metric) Validate() error { 7445 invalidParams := request.ErrInvalidParams{Context: "Metric"} 7446 if s.MetricName != nil && len(*s.MetricName) < 1 { 7447 invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) 7448 } 7449 if s.Namespace != nil && len(*s.Namespace) < 1 { 7450 invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) 7451 } 7452 if s.Dimensions != nil { 7453 for i, v := range s.Dimensions { 7454 if v == nil { 7455 continue 7456 } 7457 if err := v.Validate(); err != nil { 7458 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) 7459 } 7460 } 7461 } 7462 7463 if invalidParams.Len() > 0 { 7464 return invalidParams 7465 } 7466 return nil 7467} 7468 7469// SetDimensions sets the Dimensions field's value. 7470func (s *Metric) SetDimensions(v []*Dimension) *Metric { 7471 s.Dimensions = v 7472 return s 7473} 7474 7475// SetMetricName sets the MetricName field's value. 7476func (s *Metric) SetMetricName(v string) *Metric { 7477 s.MetricName = &v 7478 return s 7479} 7480 7481// SetNamespace sets the Namespace field's value. 7482func (s *Metric) SetNamespace(v string) *Metric { 7483 s.Namespace = &v 7484 return s 7485} 7486 7487// The details about a metric alarm. 7488type MetricAlarm struct { 7489 _ struct{} `type:"structure"` 7490 7491 // Indicates whether actions should be executed during any changes to the alarm 7492 // state. 7493 ActionsEnabled *bool `type:"boolean"` 7494 7495 // The actions to execute when this alarm transitions to the ALARM state from 7496 // any other state. Each action is specified as an Amazon Resource Name (ARN). 7497 AlarmActions []*string `type:"list"` 7498 7499 // The Amazon Resource Name (ARN) of the alarm. 7500 AlarmArn *string `min:"1" type:"string"` 7501 7502 // The time stamp of the last update to the alarm configuration. 7503 AlarmConfigurationUpdatedTimestamp *time.Time `type:"timestamp"` 7504 7505 // The description of the alarm. 7506 AlarmDescription *string `type:"string"` 7507 7508 // The name of the alarm. 7509 AlarmName *string `min:"1" type:"string"` 7510 7511 // The arithmetic operation to use when comparing the specified statistic and 7512 // threshold. The specified statistic value is used as the first operand. 7513 ComparisonOperator *string `type:"string" enum:"ComparisonOperator"` 7514 7515 // The number of data points that must be breaching to trigger the alarm. 7516 DatapointsToAlarm *int64 `min:"1" type:"integer"` 7517 7518 // The dimensions for the metric associated with the alarm. 7519 Dimensions []*Dimension `type:"list"` 7520 7521 // Used only for alarms based on percentiles. If ignore, the alarm state does 7522 // not change during periods with too few data points to be statistically significant. 7523 // If evaluate or this parameter is not used, the alarm is always evaluated 7524 // and possibly changes state no matter how many data points are available. 7525 EvaluateLowSampleCountPercentile *string `min:"1" type:"string"` 7526 7527 // The number of periods over which data is compared to the specified threshold. 7528 EvaluationPeriods *int64 `min:"1" type:"integer"` 7529 7530 // The percentile statistic for the metric associated with the alarm. Specify 7531 // a value between p0.0 and p100. 7532 ExtendedStatistic *string `type:"string"` 7533 7534 // The actions to execute when this alarm transitions to the INSUFFICIENT_DATA 7535 // state from any other state. Each action is specified as an Amazon Resource 7536 // Name (ARN). 7537 InsufficientDataActions []*string `type:"list"` 7538 7539 // The name of the metric associated with the alarm, if this is an alarm based 7540 // on a single metric. 7541 MetricName *string `min:"1" type:"string"` 7542 7543 // An array of MetricDataQuery structures, used in an alarm based on a metric 7544 // math expression. Each structure either retrieves a metric or performs a math 7545 // expression. One item in the Metrics array is the math expression that the 7546 // alarm watches. This expression by designated by having ReturnData set to 7547 // true. 7548 Metrics []*MetricDataQuery `type:"list"` 7549 7550 // The namespace of the metric associated with the alarm. 7551 Namespace *string `min:"1" type:"string"` 7552 7553 // The actions to execute when this alarm transitions to the OK state from any 7554 // other state. Each action is specified as an Amazon Resource Name (ARN). 7555 OKActions []*string `type:"list"` 7556 7557 // The period, in seconds, over which the statistic is applied. 7558 Period *int64 `min:"1" type:"integer"` 7559 7560 // An explanation for the alarm state, in text format. 7561 StateReason *string `type:"string"` 7562 7563 // An explanation for the alarm state, in JSON format. 7564 StateReasonData *string `type:"string"` 7565 7566 // The time stamp of the last update to the alarm state. 7567 StateUpdatedTimestamp *time.Time `type:"timestamp"` 7568 7569 // The state value for the alarm. 7570 StateValue *string `type:"string" enum:"StateValue"` 7571 7572 // The statistic for the metric associated with the alarm, other than percentile. 7573 // For percentile statistics, use ExtendedStatistic. 7574 Statistic *string `type:"string" enum:"Statistic"` 7575 7576 // The value to compare with the specified statistic. 7577 Threshold *float64 `type:"double"` 7578 7579 // In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND 7580 // function used as the threshold for the alarm. 7581 ThresholdMetricId *string `min:"1" type:"string"` 7582 7583 // Sets how this alarm is to handle missing data points. If this parameter is 7584 // omitted, the default behavior of missing is used. 7585 TreatMissingData *string `min:"1" type:"string"` 7586 7587 // The unit of the metric associated with the alarm. 7588 Unit *string `type:"string" enum:"StandardUnit"` 7589} 7590 7591// String returns the string representation 7592func (s MetricAlarm) String() string { 7593 return awsutil.Prettify(s) 7594} 7595 7596// GoString returns the string representation 7597func (s MetricAlarm) GoString() string { 7598 return s.String() 7599} 7600 7601// SetActionsEnabled sets the ActionsEnabled field's value. 7602func (s *MetricAlarm) SetActionsEnabled(v bool) *MetricAlarm { 7603 s.ActionsEnabled = &v 7604 return s 7605} 7606 7607// SetAlarmActions sets the AlarmActions field's value. 7608func (s *MetricAlarm) SetAlarmActions(v []*string) *MetricAlarm { 7609 s.AlarmActions = v 7610 return s 7611} 7612 7613// SetAlarmArn sets the AlarmArn field's value. 7614func (s *MetricAlarm) SetAlarmArn(v string) *MetricAlarm { 7615 s.AlarmArn = &v 7616 return s 7617} 7618 7619// SetAlarmConfigurationUpdatedTimestamp sets the AlarmConfigurationUpdatedTimestamp field's value. 7620func (s *MetricAlarm) SetAlarmConfigurationUpdatedTimestamp(v time.Time) *MetricAlarm { 7621 s.AlarmConfigurationUpdatedTimestamp = &v 7622 return s 7623} 7624 7625// SetAlarmDescription sets the AlarmDescription field's value. 7626func (s *MetricAlarm) SetAlarmDescription(v string) *MetricAlarm { 7627 s.AlarmDescription = &v 7628 return s 7629} 7630 7631// SetAlarmName sets the AlarmName field's value. 7632func (s *MetricAlarm) SetAlarmName(v string) *MetricAlarm { 7633 s.AlarmName = &v 7634 return s 7635} 7636 7637// SetComparisonOperator sets the ComparisonOperator field's value. 7638func (s *MetricAlarm) SetComparisonOperator(v string) *MetricAlarm { 7639 s.ComparisonOperator = &v 7640 return s 7641} 7642 7643// SetDatapointsToAlarm sets the DatapointsToAlarm field's value. 7644func (s *MetricAlarm) SetDatapointsToAlarm(v int64) *MetricAlarm { 7645 s.DatapointsToAlarm = &v 7646 return s 7647} 7648 7649// SetDimensions sets the Dimensions field's value. 7650func (s *MetricAlarm) SetDimensions(v []*Dimension) *MetricAlarm { 7651 s.Dimensions = v 7652 return s 7653} 7654 7655// SetEvaluateLowSampleCountPercentile sets the EvaluateLowSampleCountPercentile field's value. 7656func (s *MetricAlarm) SetEvaluateLowSampleCountPercentile(v string) *MetricAlarm { 7657 s.EvaluateLowSampleCountPercentile = &v 7658 return s 7659} 7660 7661// SetEvaluationPeriods sets the EvaluationPeriods field's value. 7662func (s *MetricAlarm) SetEvaluationPeriods(v int64) *MetricAlarm { 7663 s.EvaluationPeriods = &v 7664 return s 7665} 7666 7667// SetExtendedStatistic sets the ExtendedStatistic field's value. 7668func (s *MetricAlarm) SetExtendedStatistic(v string) *MetricAlarm { 7669 s.ExtendedStatistic = &v 7670 return s 7671} 7672 7673// SetInsufficientDataActions sets the InsufficientDataActions field's value. 7674func (s *MetricAlarm) SetInsufficientDataActions(v []*string) *MetricAlarm { 7675 s.InsufficientDataActions = v 7676 return s 7677} 7678 7679// SetMetricName sets the MetricName field's value. 7680func (s *MetricAlarm) SetMetricName(v string) *MetricAlarm { 7681 s.MetricName = &v 7682 return s 7683} 7684 7685// SetMetrics sets the Metrics field's value. 7686func (s *MetricAlarm) SetMetrics(v []*MetricDataQuery) *MetricAlarm { 7687 s.Metrics = v 7688 return s 7689} 7690 7691// SetNamespace sets the Namespace field's value. 7692func (s *MetricAlarm) SetNamespace(v string) *MetricAlarm { 7693 s.Namespace = &v 7694 return s 7695} 7696 7697// SetOKActions sets the OKActions field's value. 7698func (s *MetricAlarm) SetOKActions(v []*string) *MetricAlarm { 7699 s.OKActions = v 7700 return s 7701} 7702 7703// SetPeriod sets the Period field's value. 7704func (s *MetricAlarm) SetPeriod(v int64) *MetricAlarm { 7705 s.Period = &v 7706 return s 7707} 7708 7709// SetStateReason sets the StateReason field's value. 7710func (s *MetricAlarm) SetStateReason(v string) *MetricAlarm { 7711 s.StateReason = &v 7712 return s 7713} 7714 7715// SetStateReasonData sets the StateReasonData field's value. 7716func (s *MetricAlarm) SetStateReasonData(v string) *MetricAlarm { 7717 s.StateReasonData = &v 7718 return s 7719} 7720 7721// SetStateUpdatedTimestamp sets the StateUpdatedTimestamp field's value. 7722func (s *MetricAlarm) SetStateUpdatedTimestamp(v time.Time) *MetricAlarm { 7723 s.StateUpdatedTimestamp = &v 7724 return s 7725} 7726 7727// SetStateValue sets the StateValue field's value. 7728func (s *MetricAlarm) SetStateValue(v string) *MetricAlarm { 7729 s.StateValue = &v 7730 return s 7731} 7732 7733// SetStatistic sets the Statistic field's value. 7734func (s *MetricAlarm) SetStatistic(v string) *MetricAlarm { 7735 s.Statistic = &v 7736 return s 7737} 7738 7739// SetThreshold sets the Threshold field's value. 7740func (s *MetricAlarm) SetThreshold(v float64) *MetricAlarm { 7741 s.Threshold = &v 7742 return s 7743} 7744 7745// SetThresholdMetricId sets the ThresholdMetricId field's value. 7746func (s *MetricAlarm) SetThresholdMetricId(v string) *MetricAlarm { 7747 s.ThresholdMetricId = &v 7748 return s 7749} 7750 7751// SetTreatMissingData sets the TreatMissingData field's value. 7752func (s *MetricAlarm) SetTreatMissingData(v string) *MetricAlarm { 7753 s.TreatMissingData = &v 7754 return s 7755} 7756 7757// SetUnit sets the Unit field's value. 7758func (s *MetricAlarm) SetUnit(v string) *MetricAlarm { 7759 s.Unit = &v 7760 return s 7761} 7762 7763// This structure is used in both GetMetricData and PutMetricAlarm. The supported 7764// use of this structure is different for those two operations. 7765// 7766// When used in GetMetricData, it indicates the metric data to return, and whether 7767// this call is just retrieving a batch set of data for one metric, or is performing 7768// a math expression on metric data. A single GetMetricData call can include 7769// up to 500 MetricDataQuery structures. 7770// 7771// When used in PutMetricAlarm, it enables you to create an alarm based on a 7772// metric math expression. Each MetricDataQuery in the array specifies either 7773// a metric to retrieve, or a math expression to be performed on retrieved metrics. 7774// A single PutMetricAlarm call can include up to 20 MetricDataQuery structures 7775// in the array. The 20 structures can include as many as 10 structures that 7776// contain a MetricStat parameter to retrieve a metric, and as many as 10 structures 7777// that contain the Expression parameter to perform a math expression. Of those 7778// Expression structures, one must have True as the value for ReturnData. The 7779// result of this expression is the value the alarm watches. 7780// 7781// Any expression used in a PutMetricAlarm operation must return a single time 7782// series. For more information, see Metric Math Syntax and Functions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) 7783// in the Amazon CloudWatch User Guide. 7784// 7785// Some of the parameters of this structure also have different uses whether 7786// you are using this structure in a GetMetricData operation or a PutMetricAlarm 7787// operation. These differences are explained in the following parameter list. 7788type MetricDataQuery struct { 7789 _ struct{} `type:"structure"` 7790 7791 // The math expression to be performed on the returned data, if this object 7792 // is performing a math expression. This expression can use the Id of the other 7793 // metrics to refer to those metrics, and can also use the Id of other expressions 7794 // to use the result of those expressions. For more information about metric 7795 // math expressions, see Metric Math Syntax and Functions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) 7796 // in the Amazon CloudWatch User Guide. 7797 // 7798 // Within each MetricDataQuery object, you must specify either Expression or 7799 // MetricStat but not both. 7800 Expression *string `min:"1" type:"string"` 7801 7802 // A short name used to tie this object to the results in the response. This 7803 // name must be unique within a single call to GetMetricData. If you are performing 7804 // math expressions on this set of data, this name represents that data and 7805 // can serve as a variable in the mathematical expression. The valid characters 7806 // are letters, numbers, and underscore. The first character must be a lowercase 7807 // letter. 7808 // 7809 // Id is a required field 7810 Id *string `min:"1" type:"string" required:"true"` 7811 7812 // A human-readable label for this metric or expression. This is especially 7813 // useful if this is an expression, so that you know what the value represents. 7814 // If the metric or expression is shown in a CloudWatch dashboard widget, the 7815 // label is shown. If Label is omitted, CloudWatch generates a default. 7816 // 7817 // You can put dynamic expressions into a label, so that it is more descriptive. 7818 // For more information, see Using Dynamic Labels (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html). 7819 Label *string `type:"string"` 7820 7821 // The metric to be returned, along with statistics, period, and units. Use 7822 // this parameter only if this object is retrieving a metric and not performing 7823 // a math expression on returned data. 7824 // 7825 // Within one MetricDataQuery object, you must specify either Expression or 7826 // MetricStat but not both. 7827 MetricStat *MetricStat `type:"structure"` 7828 7829 // The granularity, in seconds, of the returned data points. For metrics with 7830 // regular resolution, a period can be as short as one minute (60 seconds) and 7831 // must be a multiple of 60. For high-resolution metrics that are collected 7832 // at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, 7833 // or any multiple of 60. High-resolution metrics are those metrics stored by 7834 // a PutMetricData operation that includes a StorageResolution of 1 second. 7835 Period *int64 `min:"1" type:"integer"` 7836 7837 // When used in GetMetricData, this option indicates whether to return the timestamps 7838 // and raw data values of this metric. If you are performing this call just 7839 // to do math expressions and do not also need the raw data returned, you can 7840 // specify False. If you omit this, the default of True is used. 7841 // 7842 // When used in PutMetricAlarm, specify True for the one expression result to 7843 // use as the alarm. For all other metrics and expressions in the same PutMetricAlarm 7844 // operation, specify ReturnData as False. 7845 ReturnData *bool `type:"boolean"` 7846} 7847 7848// String returns the string representation 7849func (s MetricDataQuery) String() string { 7850 return awsutil.Prettify(s) 7851} 7852 7853// GoString returns the string representation 7854func (s MetricDataQuery) GoString() string { 7855 return s.String() 7856} 7857 7858// Validate inspects the fields of the type to determine if they are valid. 7859func (s *MetricDataQuery) Validate() error { 7860 invalidParams := request.ErrInvalidParams{Context: "MetricDataQuery"} 7861 if s.Expression != nil && len(*s.Expression) < 1 { 7862 invalidParams.Add(request.NewErrParamMinLen("Expression", 1)) 7863 } 7864 if s.Id == nil { 7865 invalidParams.Add(request.NewErrParamRequired("Id")) 7866 } 7867 if s.Id != nil && len(*s.Id) < 1 { 7868 invalidParams.Add(request.NewErrParamMinLen("Id", 1)) 7869 } 7870 if s.Period != nil && *s.Period < 1 { 7871 invalidParams.Add(request.NewErrParamMinValue("Period", 1)) 7872 } 7873 if s.MetricStat != nil { 7874 if err := s.MetricStat.Validate(); err != nil { 7875 invalidParams.AddNested("MetricStat", err.(request.ErrInvalidParams)) 7876 } 7877 } 7878 7879 if invalidParams.Len() > 0 { 7880 return invalidParams 7881 } 7882 return nil 7883} 7884 7885// SetExpression sets the Expression field's value. 7886func (s *MetricDataQuery) SetExpression(v string) *MetricDataQuery { 7887 s.Expression = &v 7888 return s 7889} 7890 7891// SetId sets the Id field's value. 7892func (s *MetricDataQuery) SetId(v string) *MetricDataQuery { 7893 s.Id = &v 7894 return s 7895} 7896 7897// SetLabel sets the Label field's value. 7898func (s *MetricDataQuery) SetLabel(v string) *MetricDataQuery { 7899 s.Label = &v 7900 return s 7901} 7902 7903// SetMetricStat sets the MetricStat field's value. 7904func (s *MetricDataQuery) SetMetricStat(v *MetricStat) *MetricDataQuery { 7905 s.MetricStat = v 7906 return s 7907} 7908 7909// SetPeriod sets the Period field's value. 7910func (s *MetricDataQuery) SetPeriod(v int64) *MetricDataQuery { 7911 s.Period = &v 7912 return s 7913} 7914 7915// SetReturnData sets the ReturnData field's value. 7916func (s *MetricDataQuery) SetReturnData(v bool) *MetricDataQuery { 7917 s.ReturnData = &v 7918 return s 7919} 7920 7921// A GetMetricData call returns an array of MetricDataResult structures. Each 7922// of these structures includes the data points for that metric, along with 7923// the timestamps of those data points and other identifying information. 7924type MetricDataResult struct { 7925 _ struct{} `type:"structure"` 7926 7927 // The short name you specified to represent this metric. 7928 Id *string `min:"1" type:"string"` 7929 7930 // The human-readable label associated with the data. 7931 Label *string `type:"string"` 7932 7933 // A list of messages with additional information about the data returned. 7934 Messages []*MessageData `type:"list"` 7935 7936 // The status of the returned data. Complete indicates that all data points 7937 // in the requested time range were returned. PartialData means that an incomplete 7938 // set of data points were returned. You can use the NextToken value that was 7939 // returned and repeat your request to get more data points. NextToken is not 7940 // returned if you are performing a math expression. InternalError indicates 7941 // that an error occurred. Retry your request using NextToken, if present. 7942 StatusCode *string `type:"string" enum:"StatusCode"` 7943 7944 // The timestamps for the data points, formatted in Unix timestamp format. The 7945 // number of timestamps always matches the number of values and the value for 7946 // Timestamps[x] is Values[x]. 7947 Timestamps []*time.Time `type:"list"` 7948 7949 // The data points for the metric corresponding to Timestamps. The number of 7950 // values always matches the number of timestamps and the timestamp for Values[x] 7951 // is Timestamps[x]. 7952 Values []*float64 `type:"list"` 7953} 7954 7955// String returns the string representation 7956func (s MetricDataResult) String() string { 7957 return awsutil.Prettify(s) 7958} 7959 7960// GoString returns the string representation 7961func (s MetricDataResult) GoString() string { 7962 return s.String() 7963} 7964 7965// SetId sets the Id field's value. 7966func (s *MetricDataResult) SetId(v string) *MetricDataResult { 7967 s.Id = &v 7968 return s 7969} 7970 7971// SetLabel sets the Label field's value. 7972func (s *MetricDataResult) SetLabel(v string) *MetricDataResult { 7973 s.Label = &v 7974 return s 7975} 7976 7977// SetMessages sets the Messages field's value. 7978func (s *MetricDataResult) SetMessages(v []*MessageData) *MetricDataResult { 7979 s.Messages = v 7980 return s 7981} 7982 7983// SetStatusCode sets the StatusCode field's value. 7984func (s *MetricDataResult) SetStatusCode(v string) *MetricDataResult { 7985 s.StatusCode = &v 7986 return s 7987} 7988 7989// SetTimestamps sets the Timestamps field's value. 7990func (s *MetricDataResult) SetTimestamps(v []*time.Time) *MetricDataResult { 7991 s.Timestamps = v 7992 return s 7993} 7994 7995// SetValues sets the Values field's value. 7996func (s *MetricDataResult) SetValues(v []*float64) *MetricDataResult { 7997 s.Values = v 7998 return s 7999} 8000 8001// Encapsulates the information sent to either create a metric or add new values 8002// to be aggregated into an existing metric. 8003type MetricDatum struct { 8004 _ struct{} `type:"structure"` 8005 8006 // Array of numbers that is used along with the Values array. Each number in 8007 // the Count array is the number of times the corresponding value in the Values 8008 // array occurred during the period. 8009 // 8010 // If you omit the Counts array, the default of 1 is used as the value for each 8011 // count. If you include a Counts array, it must include the same amount of 8012 // values as the Values array. 8013 Counts []*float64 `type:"list"` 8014 8015 // The dimensions associated with the metric. 8016 Dimensions []*Dimension `type:"list"` 8017 8018 // The name of the metric. 8019 // 8020 // MetricName is a required field 8021 MetricName *string `min:"1" type:"string" required:"true"` 8022 8023 // The statistical values for the metric. 8024 StatisticValues *StatisticSet `type:"structure"` 8025 8026 // Valid values are 1 and 60. Setting this to 1 specifies this metric as a high-resolution 8027 // metric, so that CloudWatch stores the metric with sub-minute resolution down 8028 // to one second. Setting this to 60 specifies this metric as a regular-resolution 8029 // metric, which CloudWatch stores at 1-minute resolution. Currently, high resolution 8030 // is available only for custom metrics. For more information about high-resolution 8031 // metrics, see High-Resolution Metrics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html#high-resolution-metrics) 8032 // in the Amazon CloudWatch User Guide. 8033 // 8034 // This field is optional, if you do not specify it the default of 60 is used. 8035 StorageResolution *int64 `min:"1" type:"integer"` 8036 8037 // The time the metric data was received, expressed as the number of milliseconds 8038 // since Jan 1, 1970 00:00:00 UTC. 8039 Timestamp *time.Time `type:"timestamp"` 8040 8041 // When you are using a Put operation, this defines what unit you want to use 8042 // when storing the metric. 8043 // 8044 // In a Get operation, this displays the unit that is used for the metric. 8045 Unit *string `type:"string" enum:"StandardUnit"` 8046 8047 // The value for the metric. 8048 // 8049 // Although the parameter accepts numbers of type Double, CloudWatch rejects 8050 // values that are either too small or too large. Values must be in the range 8051 // of -2^360 to 2^360. In addition, special values (for example, NaN, +Infinity, 8052 // -Infinity) are not supported. 8053 Value *float64 `type:"double"` 8054 8055 // Array of numbers representing the values for the metric during the period. 8056 // Each unique value is listed just once in this array, and the corresponding 8057 // number in the Counts array specifies the number of times that value occurred 8058 // during the period. You can include up to 150 unique values in each PutMetricData 8059 // action that specifies a Values array. 8060 // 8061 // Although the Values array accepts numbers of type Double, CloudWatch rejects 8062 // values that are either too small or too large. Values must be in the range 8063 // of -2^360 to 2^360. In addition, special values (for example, NaN, +Infinity, 8064 // -Infinity) are not supported. 8065 Values []*float64 `type:"list"` 8066} 8067 8068// String returns the string representation 8069func (s MetricDatum) String() string { 8070 return awsutil.Prettify(s) 8071} 8072 8073// GoString returns the string representation 8074func (s MetricDatum) GoString() string { 8075 return s.String() 8076} 8077 8078// Validate inspects the fields of the type to determine if they are valid. 8079func (s *MetricDatum) Validate() error { 8080 invalidParams := request.ErrInvalidParams{Context: "MetricDatum"} 8081 if s.MetricName == nil { 8082 invalidParams.Add(request.NewErrParamRequired("MetricName")) 8083 } 8084 if s.MetricName != nil && len(*s.MetricName) < 1 { 8085 invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) 8086 } 8087 if s.StorageResolution != nil && *s.StorageResolution < 1 { 8088 invalidParams.Add(request.NewErrParamMinValue("StorageResolution", 1)) 8089 } 8090 if s.Dimensions != nil { 8091 for i, v := range s.Dimensions { 8092 if v == nil { 8093 continue 8094 } 8095 if err := v.Validate(); err != nil { 8096 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) 8097 } 8098 } 8099 } 8100 if s.StatisticValues != nil { 8101 if err := s.StatisticValues.Validate(); err != nil { 8102 invalidParams.AddNested("StatisticValues", err.(request.ErrInvalidParams)) 8103 } 8104 } 8105 8106 if invalidParams.Len() > 0 { 8107 return invalidParams 8108 } 8109 return nil 8110} 8111 8112// SetCounts sets the Counts field's value. 8113func (s *MetricDatum) SetCounts(v []*float64) *MetricDatum { 8114 s.Counts = v 8115 return s 8116} 8117 8118// SetDimensions sets the Dimensions field's value. 8119func (s *MetricDatum) SetDimensions(v []*Dimension) *MetricDatum { 8120 s.Dimensions = v 8121 return s 8122} 8123 8124// SetMetricName sets the MetricName field's value. 8125func (s *MetricDatum) SetMetricName(v string) *MetricDatum { 8126 s.MetricName = &v 8127 return s 8128} 8129 8130// SetStatisticValues sets the StatisticValues field's value. 8131func (s *MetricDatum) SetStatisticValues(v *StatisticSet) *MetricDatum { 8132 s.StatisticValues = v 8133 return s 8134} 8135 8136// SetStorageResolution sets the StorageResolution field's value. 8137func (s *MetricDatum) SetStorageResolution(v int64) *MetricDatum { 8138 s.StorageResolution = &v 8139 return s 8140} 8141 8142// SetTimestamp sets the Timestamp field's value. 8143func (s *MetricDatum) SetTimestamp(v time.Time) *MetricDatum { 8144 s.Timestamp = &v 8145 return s 8146} 8147 8148// SetUnit sets the Unit field's value. 8149func (s *MetricDatum) SetUnit(v string) *MetricDatum { 8150 s.Unit = &v 8151 return s 8152} 8153 8154// SetValue sets the Value field's value. 8155func (s *MetricDatum) SetValue(v float64) *MetricDatum { 8156 s.Value = &v 8157 return s 8158} 8159 8160// SetValues sets the Values field's value. 8161func (s *MetricDatum) SetValues(v []*float64) *MetricDatum { 8162 s.Values = v 8163 return s 8164} 8165 8166// This structure defines the metric to be returned, along with the statistics, 8167// period, and units. 8168type MetricStat struct { 8169 _ struct{} `type:"structure"` 8170 8171 // The metric to return, including the metric name, namespace, and dimensions. 8172 // 8173 // Metric is a required field 8174 Metric *Metric `type:"structure" required:"true"` 8175 8176 // The granularity, in seconds, of the returned data points. For metrics with 8177 // regular resolution, a period can be as short as one minute (60 seconds) and 8178 // must be a multiple of 60. For high-resolution metrics that are collected 8179 // at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, 8180 // or any multiple of 60. High-resolution metrics are those metrics stored by 8181 // a PutMetricData call that includes a StorageResolution of 1 second. 8182 // 8183 // If the StartTime parameter specifies a time stamp that is greater than 3 8184 // hours ago, you must specify the period as follows or no data points in that 8185 // time range is returned: 8186 // 8187 // * Start time between 3 hours and 15 days ago - Use a multiple of 60 seconds 8188 // (1 minute). 8189 // 8190 // * Start time between 15 and 63 days ago - Use a multiple of 300 seconds 8191 // (5 minutes). 8192 // 8193 // * Start time greater than 63 days ago - Use a multiple of 3600 seconds 8194 // (1 hour). 8195 // 8196 // Period is a required field 8197 Period *int64 `min:"1" type:"integer" required:"true"` 8198 8199 // The statistic to return. It can include any CloudWatch statistic or extended 8200 // statistic. 8201 // 8202 // Stat is a required field 8203 Stat *string `type:"string" required:"true"` 8204 8205 // When you are using a Put operation, this defines what unit you want to use 8206 // when storing the metric. 8207 // 8208 // In a Get operation, if you omit Unit then all data that was collected with 8209 // any unit is returned, along with the corresponding units that were specified 8210 // when the data was reported to CloudWatch. If you specify a unit, the operation 8211 // returns only data that was collected with that unit specified. If you specify 8212 // a unit that does not match the data collected, the results of the operation 8213 // are null. CloudWatch does not perform unit conversions. 8214 Unit *string `type:"string" enum:"StandardUnit"` 8215} 8216 8217// String returns the string representation 8218func (s MetricStat) String() string { 8219 return awsutil.Prettify(s) 8220} 8221 8222// GoString returns the string representation 8223func (s MetricStat) GoString() string { 8224 return s.String() 8225} 8226 8227// Validate inspects the fields of the type to determine if they are valid. 8228func (s *MetricStat) Validate() error { 8229 invalidParams := request.ErrInvalidParams{Context: "MetricStat"} 8230 if s.Metric == nil { 8231 invalidParams.Add(request.NewErrParamRequired("Metric")) 8232 } 8233 if s.Period == nil { 8234 invalidParams.Add(request.NewErrParamRequired("Period")) 8235 } 8236 if s.Period != nil && *s.Period < 1 { 8237 invalidParams.Add(request.NewErrParamMinValue("Period", 1)) 8238 } 8239 if s.Stat == nil { 8240 invalidParams.Add(request.NewErrParamRequired("Stat")) 8241 } 8242 if s.Metric != nil { 8243 if err := s.Metric.Validate(); err != nil { 8244 invalidParams.AddNested("Metric", err.(request.ErrInvalidParams)) 8245 } 8246 } 8247 8248 if invalidParams.Len() > 0 { 8249 return invalidParams 8250 } 8251 return nil 8252} 8253 8254// SetMetric sets the Metric field's value. 8255func (s *MetricStat) SetMetric(v *Metric) *MetricStat { 8256 s.Metric = v 8257 return s 8258} 8259 8260// SetPeriod sets the Period field's value. 8261func (s *MetricStat) SetPeriod(v int64) *MetricStat { 8262 s.Period = &v 8263 return s 8264} 8265 8266// SetStat sets the Stat field's value. 8267func (s *MetricStat) SetStat(v string) *MetricStat { 8268 s.Stat = &v 8269 return s 8270} 8271 8272// SetUnit sets the Unit field's value. 8273func (s *MetricStat) SetUnit(v string) *MetricStat { 8274 s.Unit = &v 8275 return s 8276} 8277 8278// This structure contains the configuration information about one metric stream. 8279type MetricStreamEntry struct { 8280 _ struct{} `type:"structure"` 8281 8282 // The ARN of the metric stream. 8283 Arn *string `min:"1" type:"string"` 8284 8285 // The date that the metric stream was originally created. 8286 CreationDate *time.Time `type:"timestamp"` 8287 8288 // The ARN of the Kinesis Firehose devlivery stream that is used for this metric 8289 // stream. 8290 FirehoseArn *string `min:"1" type:"string"` 8291 8292 // The date that the configuration of this metric stream was most recently updated. 8293 LastUpdateDate *time.Time `type:"timestamp"` 8294 8295 // The name of the metric stream. 8296 Name *string `min:"1" type:"string"` 8297 8298 // The output format of this metric stream. Valid values are json and opentelemetry0.7. 8299 OutputFormat *string `min:"1" type:"string" enum:"MetricStreamOutputFormat"` 8300 8301 // The current state of this stream. Valid values are running and stopped. 8302 State *string `type:"string"` 8303} 8304 8305// String returns the string representation 8306func (s MetricStreamEntry) String() string { 8307 return awsutil.Prettify(s) 8308} 8309 8310// GoString returns the string representation 8311func (s MetricStreamEntry) GoString() string { 8312 return s.String() 8313} 8314 8315// SetArn sets the Arn field's value. 8316func (s *MetricStreamEntry) SetArn(v string) *MetricStreamEntry { 8317 s.Arn = &v 8318 return s 8319} 8320 8321// SetCreationDate sets the CreationDate field's value. 8322func (s *MetricStreamEntry) SetCreationDate(v time.Time) *MetricStreamEntry { 8323 s.CreationDate = &v 8324 return s 8325} 8326 8327// SetFirehoseArn sets the FirehoseArn field's value. 8328func (s *MetricStreamEntry) SetFirehoseArn(v string) *MetricStreamEntry { 8329 s.FirehoseArn = &v 8330 return s 8331} 8332 8333// SetLastUpdateDate sets the LastUpdateDate field's value. 8334func (s *MetricStreamEntry) SetLastUpdateDate(v time.Time) *MetricStreamEntry { 8335 s.LastUpdateDate = &v 8336 return s 8337} 8338 8339// SetName sets the Name field's value. 8340func (s *MetricStreamEntry) SetName(v string) *MetricStreamEntry { 8341 s.Name = &v 8342 return s 8343} 8344 8345// SetOutputFormat sets the OutputFormat field's value. 8346func (s *MetricStreamEntry) SetOutputFormat(v string) *MetricStreamEntry { 8347 s.OutputFormat = &v 8348 return s 8349} 8350 8351// SetState sets the State field's value. 8352func (s *MetricStreamEntry) SetState(v string) *MetricStreamEntry { 8353 s.State = &v 8354 return s 8355} 8356 8357// This structure contains the name of one of the metric namespaces that is 8358// listed in a filter of a metric stream. 8359type MetricStreamFilter struct { 8360 _ struct{} `type:"structure"` 8361 8362 // The name of the metric namespace in the filter. 8363 Namespace *string `min:"1" type:"string"` 8364} 8365 8366// String returns the string representation 8367func (s MetricStreamFilter) String() string { 8368 return awsutil.Prettify(s) 8369} 8370 8371// GoString returns the string representation 8372func (s MetricStreamFilter) GoString() string { 8373 return s.String() 8374} 8375 8376// Validate inspects the fields of the type to determine if they are valid. 8377func (s *MetricStreamFilter) Validate() error { 8378 invalidParams := request.ErrInvalidParams{Context: "MetricStreamFilter"} 8379 if s.Namespace != nil && len(*s.Namespace) < 1 { 8380 invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) 8381 } 8382 8383 if invalidParams.Len() > 0 { 8384 return invalidParams 8385 } 8386 return nil 8387} 8388 8389// SetNamespace sets the Namespace field's value. 8390func (s *MetricStreamFilter) SetNamespace(v string) *MetricStreamFilter { 8391 s.Namespace = &v 8392 return s 8393} 8394 8395// This array is empty if the API operation was successful for all the rules 8396// specified in the request. If the operation could not process one of the rules, 8397// the following data is returned for each of those rules. 8398type PartialFailure struct { 8399 _ struct{} `type:"structure"` 8400 8401 // The type of error. 8402 ExceptionType *string `type:"string"` 8403 8404 // The code of the error. 8405 FailureCode *string `type:"string"` 8406 8407 // A description of the error. 8408 FailureDescription *string `type:"string"` 8409 8410 // The specified rule that could not be deleted. 8411 FailureResource *string `type:"string"` 8412} 8413 8414// String returns the string representation 8415func (s PartialFailure) String() string { 8416 return awsutil.Prettify(s) 8417} 8418 8419// GoString returns the string representation 8420func (s PartialFailure) GoString() string { 8421 return s.String() 8422} 8423 8424// SetExceptionType sets the ExceptionType field's value. 8425func (s *PartialFailure) SetExceptionType(v string) *PartialFailure { 8426 s.ExceptionType = &v 8427 return s 8428} 8429 8430// SetFailureCode sets the FailureCode field's value. 8431func (s *PartialFailure) SetFailureCode(v string) *PartialFailure { 8432 s.FailureCode = &v 8433 return s 8434} 8435 8436// SetFailureDescription sets the FailureDescription field's value. 8437func (s *PartialFailure) SetFailureDescription(v string) *PartialFailure { 8438 s.FailureDescription = &v 8439 return s 8440} 8441 8442// SetFailureResource sets the FailureResource field's value. 8443func (s *PartialFailure) SetFailureResource(v string) *PartialFailure { 8444 s.FailureResource = &v 8445 return s 8446} 8447 8448type PutAnomalyDetectorInput struct { 8449 _ struct{} `type:"structure"` 8450 8451 // The configuration specifies details about how the anomaly detection model 8452 // is to be trained, including time ranges to exclude when training and updating 8453 // the model. You can specify as many as 10 time ranges. 8454 // 8455 // The configuration can also include the time zone to use for the metric. 8456 Configuration *AnomalyDetectorConfiguration `type:"structure"` 8457 8458 // The metric dimensions to create the anomaly detection model for. 8459 Dimensions []*Dimension `type:"list"` 8460 8461 // The name of the metric to create the anomaly detection model for. 8462 // 8463 // MetricName is a required field 8464 MetricName *string `min:"1" type:"string" required:"true"` 8465 8466 // The namespace of the metric to create the anomaly detection model for. 8467 // 8468 // Namespace is a required field 8469 Namespace *string `min:"1" type:"string" required:"true"` 8470 8471 // The statistic to use for the metric and the anomaly detection model. 8472 // 8473 // Stat is a required field 8474 Stat *string `type:"string" required:"true"` 8475} 8476 8477// String returns the string representation 8478func (s PutAnomalyDetectorInput) String() string { 8479 return awsutil.Prettify(s) 8480} 8481 8482// GoString returns the string representation 8483func (s PutAnomalyDetectorInput) GoString() string { 8484 return s.String() 8485} 8486 8487// Validate inspects the fields of the type to determine if they are valid. 8488func (s *PutAnomalyDetectorInput) Validate() error { 8489 invalidParams := request.ErrInvalidParams{Context: "PutAnomalyDetectorInput"} 8490 if s.MetricName == nil { 8491 invalidParams.Add(request.NewErrParamRequired("MetricName")) 8492 } 8493 if s.MetricName != nil && len(*s.MetricName) < 1 { 8494 invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) 8495 } 8496 if s.Namespace == nil { 8497 invalidParams.Add(request.NewErrParamRequired("Namespace")) 8498 } 8499 if s.Namespace != nil && len(*s.Namespace) < 1 { 8500 invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) 8501 } 8502 if s.Stat == nil { 8503 invalidParams.Add(request.NewErrParamRequired("Stat")) 8504 } 8505 if s.Configuration != nil { 8506 if err := s.Configuration.Validate(); err != nil { 8507 invalidParams.AddNested("Configuration", err.(request.ErrInvalidParams)) 8508 } 8509 } 8510 if s.Dimensions != nil { 8511 for i, v := range s.Dimensions { 8512 if v == nil { 8513 continue 8514 } 8515 if err := v.Validate(); err != nil { 8516 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) 8517 } 8518 } 8519 } 8520 8521 if invalidParams.Len() > 0 { 8522 return invalidParams 8523 } 8524 return nil 8525} 8526 8527// SetConfiguration sets the Configuration field's value. 8528func (s *PutAnomalyDetectorInput) SetConfiguration(v *AnomalyDetectorConfiguration) *PutAnomalyDetectorInput { 8529 s.Configuration = v 8530 return s 8531} 8532 8533// SetDimensions sets the Dimensions field's value. 8534func (s *PutAnomalyDetectorInput) SetDimensions(v []*Dimension) *PutAnomalyDetectorInput { 8535 s.Dimensions = v 8536 return s 8537} 8538 8539// SetMetricName sets the MetricName field's value. 8540func (s *PutAnomalyDetectorInput) SetMetricName(v string) *PutAnomalyDetectorInput { 8541 s.MetricName = &v 8542 return s 8543} 8544 8545// SetNamespace sets the Namespace field's value. 8546func (s *PutAnomalyDetectorInput) SetNamespace(v string) *PutAnomalyDetectorInput { 8547 s.Namespace = &v 8548 return s 8549} 8550 8551// SetStat sets the Stat field's value. 8552func (s *PutAnomalyDetectorInput) SetStat(v string) *PutAnomalyDetectorInput { 8553 s.Stat = &v 8554 return s 8555} 8556 8557type PutAnomalyDetectorOutput struct { 8558 _ struct{} `type:"structure"` 8559} 8560 8561// String returns the string representation 8562func (s PutAnomalyDetectorOutput) String() string { 8563 return awsutil.Prettify(s) 8564} 8565 8566// GoString returns the string representation 8567func (s PutAnomalyDetectorOutput) GoString() string { 8568 return s.String() 8569} 8570 8571type PutCompositeAlarmInput struct { 8572 _ struct{} `type:"structure"` 8573 8574 // Indicates whether actions should be executed during any changes to the alarm 8575 // state of the composite alarm. The default is TRUE. 8576 ActionsEnabled *bool `type:"boolean"` 8577 8578 // The actions to execute when this alarm transitions to the ALARM state from 8579 // any other state. Each action is specified as an Amazon Resource Name (ARN). 8580 // 8581 // Valid Values: arn:aws:sns:region:account-id:sns-topic-name | arn:aws:ssm:region:account-id:opsitem:severity 8582 AlarmActions []*string `type:"list"` 8583 8584 // The description for the composite alarm. 8585 AlarmDescription *string `type:"string"` 8586 8587 // The name for the composite alarm. This name must be unique within the Region. 8588 // 8589 // AlarmName is a required field 8590 AlarmName *string `min:"1" type:"string" required:"true"` 8591 8592 // An expression that specifies which other alarms are to be evaluated to determine 8593 // this composite alarm's state. For each alarm that you reference, you designate 8594 // a function that specifies whether that alarm needs to be in ALARM state, 8595 // OK state, or INSUFFICIENT_DATA state. You can use operators (AND, OR and 8596 // NOT) to combine multiple functions in a single expression. You can use parenthesis 8597 // to logically group the functions in your expression. 8598 // 8599 // You can use either alarm names or ARNs to reference the other alarms that 8600 // are to be evaluated. 8601 // 8602 // Functions can include the following: 8603 // 8604 // * ALARM("alarm-name or alarm-ARN") is TRUE if the named alarm is in ALARM 8605 // state. 8606 // 8607 // * OK("alarm-name or alarm-ARN") is TRUE if the named alarm is in OK state. 8608 // 8609 // * INSUFFICIENT_DATA("alarm-name or alarm-ARN") is TRUE if the named alarm 8610 // is in INSUFFICIENT_DATA state. 8611 // 8612 // * TRUE always evaluates to TRUE. 8613 // 8614 // * FALSE always evaluates to FALSE. 8615 // 8616 // TRUE and FALSE are useful for testing a complex AlarmRule structure, and 8617 // for testing your alarm actions. 8618 // 8619 // Alarm names specified in AlarmRule can be surrounded with double-quotes ("), 8620 // but do not have to be. 8621 // 8622 // The following are some examples of AlarmRule: 8623 // 8624 // * ALARM(CPUUtilizationTooHigh) AND ALARM(DiskReadOpsTooHigh) specifies 8625 // that the composite alarm goes into ALARM state only if both CPUUtilizationTooHigh 8626 // and DiskReadOpsTooHigh alarms are in ALARM state. 8627 // 8628 // * ALARM(CPUUtilizationTooHigh) AND NOT ALARM(DeploymentInProgress) specifies 8629 // that the alarm goes to ALARM state if CPUUtilizationTooHigh is in ALARM 8630 // state and DeploymentInProgress is not in ALARM state. This example reduces 8631 // alarm noise during a known deployment window. 8632 // 8633 // * (ALARM(CPUUtilizationTooHigh) OR ALARM(DiskReadOpsTooHigh)) AND OK(NetworkOutTooHigh) 8634 // goes into ALARM state if CPUUtilizationTooHigh OR DiskReadOpsTooHigh is 8635 // in ALARM state, and if NetworkOutTooHigh is in OK state. This provides 8636 // another example of using a composite alarm to prevent noise. This rule 8637 // ensures that you are not notified with an alarm action on high CPU or 8638 // disk usage if a known network problem is also occurring. 8639 // 8640 // The AlarmRule can specify as many as 100 "children" alarms. The AlarmRule 8641 // expression can have as many as 500 elements. Elements are child alarms, TRUE 8642 // or FALSE statements, and parentheses. 8643 // 8644 // AlarmRule is a required field 8645 AlarmRule *string `min:"1" type:"string" required:"true"` 8646 8647 // The actions to execute when this alarm transitions to the INSUFFICIENT_DATA 8648 // state from any other state. Each action is specified as an Amazon Resource 8649 // Name (ARN). 8650 // 8651 // Valid Values: arn:aws:sns:region:account-id:sns-topic-name 8652 InsufficientDataActions []*string `type:"list"` 8653 8654 // The actions to execute when this alarm transitions to an OK state from any 8655 // other state. Each action is specified as an Amazon Resource Name (ARN). 8656 // 8657 // Valid Values: arn:aws:sns:region:account-id:sns-topic-name 8658 OKActions []*string `type:"list"` 8659 8660 // A list of key-value pairs to associate with the composite alarm. You can 8661 // associate as many as 50 tags with an alarm. 8662 // 8663 // Tags can help you organize and categorize your resources. You can also use 8664 // them to scope user permissions, by granting a user permission to access or 8665 // change only resources with certain tag values. 8666 Tags []*Tag `type:"list"` 8667} 8668 8669// String returns the string representation 8670func (s PutCompositeAlarmInput) String() string { 8671 return awsutil.Prettify(s) 8672} 8673 8674// GoString returns the string representation 8675func (s PutCompositeAlarmInput) GoString() string { 8676 return s.String() 8677} 8678 8679// Validate inspects the fields of the type to determine if they are valid. 8680func (s *PutCompositeAlarmInput) Validate() error { 8681 invalidParams := request.ErrInvalidParams{Context: "PutCompositeAlarmInput"} 8682 if s.AlarmName == nil { 8683 invalidParams.Add(request.NewErrParamRequired("AlarmName")) 8684 } 8685 if s.AlarmName != nil && len(*s.AlarmName) < 1 { 8686 invalidParams.Add(request.NewErrParamMinLen("AlarmName", 1)) 8687 } 8688 if s.AlarmRule == nil { 8689 invalidParams.Add(request.NewErrParamRequired("AlarmRule")) 8690 } 8691 if s.AlarmRule != nil && len(*s.AlarmRule) < 1 { 8692 invalidParams.Add(request.NewErrParamMinLen("AlarmRule", 1)) 8693 } 8694 if s.Tags != nil { 8695 for i, v := range s.Tags { 8696 if v == nil { 8697 continue 8698 } 8699 if err := v.Validate(); err != nil { 8700 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 8701 } 8702 } 8703 } 8704 8705 if invalidParams.Len() > 0 { 8706 return invalidParams 8707 } 8708 return nil 8709} 8710 8711// SetActionsEnabled sets the ActionsEnabled field's value. 8712func (s *PutCompositeAlarmInput) SetActionsEnabled(v bool) *PutCompositeAlarmInput { 8713 s.ActionsEnabled = &v 8714 return s 8715} 8716 8717// SetAlarmActions sets the AlarmActions field's value. 8718func (s *PutCompositeAlarmInput) SetAlarmActions(v []*string) *PutCompositeAlarmInput { 8719 s.AlarmActions = v 8720 return s 8721} 8722 8723// SetAlarmDescription sets the AlarmDescription field's value. 8724func (s *PutCompositeAlarmInput) SetAlarmDescription(v string) *PutCompositeAlarmInput { 8725 s.AlarmDescription = &v 8726 return s 8727} 8728 8729// SetAlarmName sets the AlarmName field's value. 8730func (s *PutCompositeAlarmInput) SetAlarmName(v string) *PutCompositeAlarmInput { 8731 s.AlarmName = &v 8732 return s 8733} 8734 8735// SetAlarmRule sets the AlarmRule field's value. 8736func (s *PutCompositeAlarmInput) SetAlarmRule(v string) *PutCompositeAlarmInput { 8737 s.AlarmRule = &v 8738 return s 8739} 8740 8741// SetInsufficientDataActions sets the InsufficientDataActions field's value. 8742func (s *PutCompositeAlarmInput) SetInsufficientDataActions(v []*string) *PutCompositeAlarmInput { 8743 s.InsufficientDataActions = v 8744 return s 8745} 8746 8747// SetOKActions sets the OKActions field's value. 8748func (s *PutCompositeAlarmInput) SetOKActions(v []*string) *PutCompositeAlarmInput { 8749 s.OKActions = v 8750 return s 8751} 8752 8753// SetTags sets the Tags field's value. 8754func (s *PutCompositeAlarmInput) SetTags(v []*Tag) *PutCompositeAlarmInput { 8755 s.Tags = v 8756 return s 8757} 8758 8759type PutCompositeAlarmOutput struct { 8760 _ struct{} `type:"structure"` 8761} 8762 8763// String returns the string representation 8764func (s PutCompositeAlarmOutput) String() string { 8765 return awsutil.Prettify(s) 8766} 8767 8768// GoString returns the string representation 8769func (s PutCompositeAlarmOutput) GoString() string { 8770 return s.String() 8771} 8772 8773type PutDashboardInput struct { 8774 _ struct{} `type:"structure"` 8775 8776 // The detailed information about the dashboard in JSON format, including the 8777 // widgets to include and their location on the dashboard. This parameter is 8778 // required. 8779 // 8780 // For more information about the syntax, see Dashboard Body Structure and Syntax 8781 // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html). 8782 // 8783 // DashboardBody is a required field 8784 DashboardBody *string `type:"string" required:"true"` 8785 8786 // The name of the dashboard. If a dashboard with this name already exists, 8787 // this call modifies that dashboard, replacing its current contents. Otherwise, 8788 // a new dashboard is created. The maximum length is 255, and valid characters 8789 // are A-Z, a-z, 0-9, "-", and "_". This parameter is required. 8790 // 8791 // DashboardName is a required field 8792 DashboardName *string `type:"string" required:"true"` 8793} 8794 8795// String returns the string representation 8796func (s PutDashboardInput) String() string { 8797 return awsutil.Prettify(s) 8798} 8799 8800// GoString returns the string representation 8801func (s PutDashboardInput) GoString() string { 8802 return s.String() 8803} 8804 8805// Validate inspects the fields of the type to determine if they are valid. 8806func (s *PutDashboardInput) Validate() error { 8807 invalidParams := request.ErrInvalidParams{Context: "PutDashboardInput"} 8808 if s.DashboardBody == nil { 8809 invalidParams.Add(request.NewErrParamRequired("DashboardBody")) 8810 } 8811 if s.DashboardName == nil { 8812 invalidParams.Add(request.NewErrParamRequired("DashboardName")) 8813 } 8814 8815 if invalidParams.Len() > 0 { 8816 return invalidParams 8817 } 8818 return nil 8819} 8820 8821// SetDashboardBody sets the DashboardBody field's value. 8822func (s *PutDashboardInput) SetDashboardBody(v string) *PutDashboardInput { 8823 s.DashboardBody = &v 8824 return s 8825} 8826 8827// SetDashboardName sets the DashboardName field's value. 8828func (s *PutDashboardInput) SetDashboardName(v string) *PutDashboardInput { 8829 s.DashboardName = &v 8830 return s 8831} 8832 8833type PutDashboardOutput struct { 8834 _ struct{} `type:"structure"` 8835 8836 // If the input for PutDashboard was correct and the dashboard was successfully 8837 // created or modified, this result is empty. 8838 // 8839 // If this result includes only warning messages, then the input was valid enough 8840 // for the dashboard to be created or modified, but some elements of the dashboard 8841 // might not render. 8842 // 8843 // If this result includes error messages, the input was not valid and the operation 8844 // failed. 8845 DashboardValidationMessages []*DashboardValidationMessage `type:"list"` 8846} 8847 8848// String returns the string representation 8849func (s PutDashboardOutput) String() string { 8850 return awsutil.Prettify(s) 8851} 8852 8853// GoString returns the string representation 8854func (s PutDashboardOutput) GoString() string { 8855 return s.String() 8856} 8857 8858// SetDashboardValidationMessages sets the DashboardValidationMessages field's value. 8859func (s *PutDashboardOutput) SetDashboardValidationMessages(v []*DashboardValidationMessage) *PutDashboardOutput { 8860 s.DashboardValidationMessages = v 8861 return s 8862} 8863 8864type PutInsightRuleInput struct { 8865 _ struct{} `type:"structure"` 8866 8867 // The definition of the rule, as a JSON object. For details on the valid syntax, 8868 // see Contributor Insights Rule Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights-RuleSyntax.html). 8869 // 8870 // RuleDefinition is a required field 8871 RuleDefinition *string `min:"1" type:"string" required:"true"` 8872 8873 // A unique name for the rule. 8874 // 8875 // RuleName is a required field 8876 RuleName *string `min:"1" type:"string" required:"true"` 8877 8878 // The state of the rule. Valid values are ENABLED and DISABLED. 8879 RuleState *string `min:"1" type:"string"` 8880 8881 // A list of key-value pairs to associate with the Contributor Insights rule. 8882 // You can associate as many as 50 tags with a rule. 8883 // 8884 // Tags can help you organize and categorize your resources. You can also use 8885 // them to scope user permissions, by granting a user permission to access or 8886 // change only the resources that have certain tag values. 8887 // 8888 // To be able to associate tags with a rule, you must have the cloudwatch:TagResource 8889 // permission in addition to the cloudwatch:PutInsightRule permission. 8890 // 8891 // If you are using this operation to update an existing Contributor Insights 8892 // rule, any tags you specify in this parameter are ignored. To change the tags 8893 // of an existing rule, use TagResource (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_TagResource.html). 8894 Tags []*Tag `type:"list"` 8895} 8896 8897// String returns the string representation 8898func (s PutInsightRuleInput) String() string { 8899 return awsutil.Prettify(s) 8900} 8901 8902// GoString returns the string representation 8903func (s PutInsightRuleInput) GoString() string { 8904 return s.String() 8905} 8906 8907// Validate inspects the fields of the type to determine if they are valid. 8908func (s *PutInsightRuleInput) Validate() error { 8909 invalidParams := request.ErrInvalidParams{Context: "PutInsightRuleInput"} 8910 if s.RuleDefinition == nil { 8911 invalidParams.Add(request.NewErrParamRequired("RuleDefinition")) 8912 } 8913 if s.RuleDefinition != nil && len(*s.RuleDefinition) < 1 { 8914 invalidParams.Add(request.NewErrParamMinLen("RuleDefinition", 1)) 8915 } 8916 if s.RuleName == nil { 8917 invalidParams.Add(request.NewErrParamRequired("RuleName")) 8918 } 8919 if s.RuleName != nil && len(*s.RuleName) < 1 { 8920 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 8921 } 8922 if s.RuleState != nil && len(*s.RuleState) < 1 { 8923 invalidParams.Add(request.NewErrParamMinLen("RuleState", 1)) 8924 } 8925 if s.Tags != nil { 8926 for i, v := range s.Tags { 8927 if v == nil { 8928 continue 8929 } 8930 if err := v.Validate(); err != nil { 8931 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 8932 } 8933 } 8934 } 8935 8936 if invalidParams.Len() > 0 { 8937 return invalidParams 8938 } 8939 return nil 8940} 8941 8942// SetRuleDefinition sets the RuleDefinition field's value. 8943func (s *PutInsightRuleInput) SetRuleDefinition(v string) *PutInsightRuleInput { 8944 s.RuleDefinition = &v 8945 return s 8946} 8947 8948// SetRuleName sets the RuleName field's value. 8949func (s *PutInsightRuleInput) SetRuleName(v string) *PutInsightRuleInput { 8950 s.RuleName = &v 8951 return s 8952} 8953 8954// SetRuleState sets the RuleState field's value. 8955func (s *PutInsightRuleInput) SetRuleState(v string) *PutInsightRuleInput { 8956 s.RuleState = &v 8957 return s 8958} 8959 8960// SetTags sets the Tags field's value. 8961func (s *PutInsightRuleInput) SetTags(v []*Tag) *PutInsightRuleInput { 8962 s.Tags = v 8963 return s 8964} 8965 8966type PutInsightRuleOutput struct { 8967 _ struct{} `type:"structure"` 8968} 8969 8970// String returns the string representation 8971func (s PutInsightRuleOutput) String() string { 8972 return awsutil.Prettify(s) 8973} 8974 8975// GoString returns the string representation 8976func (s PutInsightRuleOutput) GoString() string { 8977 return s.String() 8978} 8979 8980type PutMetricAlarmInput struct { 8981 _ struct{} `type:"structure"` 8982 8983 // Indicates whether actions should be executed during any changes to the alarm 8984 // state. The default is TRUE. 8985 ActionsEnabled *bool `type:"boolean"` 8986 8987 // The actions to execute when this alarm transitions to the ALARM state from 8988 // any other state. Each action is specified as an Amazon Resource Name (ARN). 8989 // 8990 // Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate 8991 // | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot 8992 // | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name 8993 // | arn:aws:ssm:region:account-id:opsitem:severity 8994 // 8995 // Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 8996 // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 8997 // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0 8998 AlarmActions []*string `type:"list"` 8999 9000 // The description for the alarm. 9001 AlarmDescription *string `type:"string"` 9002 9003 // The name for the alarm. This name must be unique within the Region. 9004 // 9005 // AlarmName is a required field 9006 AlarmName *string `min:"1" type:"string" required:"true"` 9007 9008 // The arithmetic operation to use when comparing the specified statistic and 9009 // threshold. The specified statistic value is used as the first operand. 9010 // 9011 // The values LessThanLowerOrGreaterThanUpperThreshold, LessThanLowerThreshold, 9012 // and GreaterThanUpperThreshold are used only for alarms based on anomaly detection 9013 // models. 9014 // 9015 // ComparisonOperator is a required field 9016 ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"` 9017 9018 // The number of data points that must be breaching to trigger the alarm. This 9019 // is used only if you are setting an "M out of N" alarm. In that case, this 9020 // value is the M. For more information, see Evaluating an Alarm (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) 9021 // in the Amazon CloudWatch User Guide. 9022 DatapointsToAlarm *int64 `min:"1" type:"integer"` 9023 9024 // The dimensions for the metric specified in MetricName. 9025 Dimensions []*Dimension `type:"list"` 9026 9027 // Used only for alarms based on percentiles. If you specify ignore, the alarm 9028 // state does not change during periods with too few data points to be statistically 9029 // significant. If you specify evaluate or omit this parameter, the alarm is 9030 // always evaluated and possibly changes state no matter how many data points 9031 // are available. For more information, see Percentile-Based CloudWatch Alarms 9032 // and Low Data Samples (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#percentiles-with-low-samples). 9033 // 9034 // Valid Values: evaluate | ignore 9035 EvaluateLowSampleCountPercentile *string `min:"1" type:"string"` 9036 9037 // The number of periods over which data is compared to the specified threshold. 9038 // If you are setting an alarm that requires that a number of consecutive data 9039 // points be breaching to trigger the alarm, this value specifies that number. 9040 // If you are setting an "M out of N" alarm, this value is the N. 9041 // 9042 // An alarm's total current evaluation period can be no longer than one day, 9043 // so this number multiplied by Period cannot be more than 86,400 seconds. 9044 // 9045 // EvaluationPeriods is a required field 9046 EvaluationPeriods *int64 `min:"1" type:"integer" required:"true"` 9047 9048 // The percentile statistic for the metric specified in MetricName. Specify 9049 // a value between p0.0 and p100. When you call PutMetricAlarm and specify a 9050 // MetricName, you must specify either Statistic or ExtendedStatistic, but not 9051 // both. 9052 ExtendedStatistic *string `type:"string"` 9053 9054 // The actions to execute when this alarm transitions to the INSUFFICIENT_DATA 9055 // state from any other state. Each action is specified as an Amazon Resource 9056 // Name (ARN). 9057 // 9058 // Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate 9059 // | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot 9060 // | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name 9061 // 9062 // Valid Values (for use with IAM roles): >arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 9063 // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 9064 // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0 9065 InsufficientDataActions []*string `type:"list"` 9066 9067 // The name for the metric associated with the alarm. For each PutMetricAlarm 9068 // operation, you must specify either MetricName or a Metrics array. 9069 // 9070 // If you are creating an alarm based on a math expression, you cannot specify 9071 // this parameter, or any of the Dimensions, Period, Namespace, Statistic, or 9072 // ExtendedStatistic parameters. Instead, you specify all this information in 9073 // the Metrics array. 9074 MetricName *string `min:"1" type:"string"` 9075 9076 // An array of MetricDataQuery structures that enable you to create an alarm 9077 // based on the result of a metric math expression. For each PutMetricAlarm 9078 // operation, you must specify either MetricName or a Metrics array. 9079 // 9080 // Each item in the Metrics array either retrieves a metric or performs a math 9081 // expression. 9082 // 9083 // One item in the Metrics array is the expression that the alarm watches. You 9084 // designate this expression by setting ReturnData to true for this object in 9085 // the array. For more information, see MetricDataQuery (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDataQuery.html). 9086 // 9087 // If you use the Metrics parameter, you cannot include the MetricName, Dimensions, 9088 // Period, Namespace, Statistic, or ExtendedStatistic parameters of PutMetricAlarm 9089 // in the same operation. Instead, you retrieve the metrics you are using in 9090 // your math expression as part of the Metrics array. 9091 Metrics []*MetricDataQuery `type:"list"` 9092 9093 // The namespace for the metric associated specified in MetricName. 9094 Namespace *string `min:"1" type:"string"` 9095 9096 // The actions to execute when this alarm transitions to an OK state from any 9097 // other state. Each action is specified as an Amazon Resource Name (ARN). 9098 // 9099 // Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate 9100 // | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot 9101 // | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name 9102 // 9103 // Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 9104 // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 9105 // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0 9106 // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Recover/1.0 9107 OKActions []*string `type:"list"` 9108 9109 // The length, in seconds, used each time the metric specified in MetricName 9110 // is evaluated. Valid values are 10, 30, and any multiple of 60. 9111 // 9112 // Period is required for alarms based on static thresholds. If you are creating 9113 // an alarm based on a metric math expression, you specify the period for each 9114 // metric within the objects in the Metrics array. 9115 // 9116 // Be sure to specify 10 or 30 only for metrics that are stored by a PutMetricData 9117 // call with a StorageResolution of 1. If you specify a period of 10 or 30 for 9118 // a metric that does not have sub-minute resolution, the alarm still attempts 9119 // to gather data at the period rate that you specify. In this case, it does 9120 // not receive data for the attempts that do not correspond to a one-minute 9121 // data resolution, and the alarm might often lapse into INSUFFICENT_DATA status. 9122 // Specifying 10 or 30 also sets this alarm as a high-resolution alarm, which 9123 // has a higher charge than other alarms. For more information about pricing, 9124 // see Amazon CloudWatch Pricing (https://aws.amazon.com/cloudwatch/pricing/). 9125 // 9126 // An alarm's total current evaluation period can be no longer than one day, 9127 // so Period multiplied by EvaluationPeriods cannot be more than 86,400 seconds. 9128 Period *int64 `min:"1" type:"integer"` 9129 9130 // The statistic for the metric specified in MetricName, other than percentile. 9131 // For percentile statistics, use ExtendedStatistic. When you call PutMetricAlarm 9132 // and specify a MetricName, you must specify either Statistic or ExtendedStatistic, 9133 // but not both. 9134 Statistic *string `type:"string" enum:"Statistic"` 9135 9136 // A list of key-value pairs to associate with the alarm. You can associate 9137 // as many as 50 tags with an alarm. 9138 // 9139 // Tags can help you organize and categorize your resources. You can also use 9140 // them to scope user permissions by granting a user permission to access or 9141 // change only resources with certain tag values. 9142 // 9143 // If you are using this operation to update an existing alarm, any tags you 9144 // specify in this parameter are ignored. To change the tags of an existing 9145 // alarm, use TagResource (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_TagResource.html) 9146 // or UntagResource (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_UntagResource.html). 9147 Tags []*Tag `type:"list"` 9148 9149 // The value against which the specified statistic is compared. 9150 // 9151 // This parameter is required for alarms based on static thresholds, but should 9152 // not be used for alarms based on anomaly detection models. 9153 Threshold *float64 `type:"double"` 9154 9155 // If this is an alarm based on an anomaly detection model, make this value 9156 // match the ID of the ANOMALY_DETECTION_BAND function. 9157 // 9158 // For an example of how to use this parameter, see the Anomaly Detection Model 9159 // Alarm example on this page. 9160 // 9161 // If your alarm uses this parameter, it cannot have Auto Scaling actions. 9162 ThresholdMetricId *string `min:"1" type:"string"` 9163 9164 // Sets how this alarm is to handle missing data points. If TreatMissingData 9165 // is omitted, the default behavior of missing is used. For more information, 9166 // see Configuring How CloudWatch Alarms Treats Missing Data (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-and-missing-data). 9167 // 9168 // Valid Values: breaching | notBreaching | ignore | missing 9169 TreatMissingData *string `min:"1" type:"string"` 9170 9171 // The unit of measure for the statistic. For example, the units for the Amazon 9172 // EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes 9173 // that an instance receives on all network interfaces. You can also specify 9174 // a unit when you create a custom metric. Units help provide conceptual meaning 9175 // to your data. Metric data points that specify a unit of measure, such as 9176 // Percent, are aggregated separately. 9177 // 9178 // If you don't specify Unit, CloudWatch retrieves all unit types that have 9179 // been published for the metric and attempts to evaluate the alarm. Usually, 9180 // metrics are published with only one unit, so the alarm works as intended. 9181 // 9182 // However, if the metric is published with multiple types of units and you 9183 // don't specify a unit, the alarm's behavior is not defined and it behaves 9184 // predictably. 9185 // 9186 // We recommend omitting Unit so that you don't inadvertently specify an incorrect 9187 // unit that is not published for this metric. Doing so causes the alarm to 9188 // be stuck in the INSUFFICIENT DATA state. 9189 Unit *string `type:"string" enum:"StandardUnit"` 9190} 9191 9192// String returns the string representation 9193func (s PutMetricAlarmInput) String() string { 9194 return awsutil.Prettify(s) 9195} 9196 9197// GoString returns the string representation 9198func (s PutMetricAlarmInput) GoString() string { 9199 return s.String() 9200} 9201 9202// Validate inspects the fields of the type to determine if they are valid. 9203func (s *PutMetricAlarmInput) Validate() error { 9204 invalidParams := request.ErrInvalidParams{Context: "PutMetricAlarmInput"} 9205 if s.AlarmName == nil { 9206 invalidParams.Add(request.NewErrParamRequired("AlarmName")) 9207 } 9208 if s.AlarmName != nil && len(*s.AlarmName) < 1 { 9209 invalidParams.Add(request.NewErrParamMinLen("AlarmName", 1)) 9210 } 9211 if s.ComparisonOperator == nil { 9212 invalidParams.Add(request.NewErrParamRequired("ComparisonOperator")) 9213 } 9214 if s.DatapointsToAlarm != nil && *s.DatapointsToAlarm < 1 { 9215 invalidParams.Add(request.NewErrParamMinValue("DatapointsToAlarm", 1)) 9216 } 9217 if s.EvaluateLowSampleCountPercentile != nil && len(*s.EvaluateLowSampleCountPercentile) < 1 { 9218 invalidParams.Add(request.NewErrParamMinLen("EvaluateLowSampleCountPercentile", 1)) 9219 } 9220 if s.EvaluationPeriods == nil { 9221 invalidParams.Add(request.NewErrParamRequired("EvaluationPeriods")) 9222 } 9223 if s.EvaluationPeriods != nil && *s.EvaluationPeriods < 1 { 9224 invalidParams.Add(request.NewErrParamMinValue("EvaluationPeriods", 1)) 9225 } 9226 if s.MetricName != nil && len(*s.MetricName) < 1 { 9227 invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) 9228 } 9229 if s.Namespace != nil && len(*s.Namespace) < 1 { 9230 invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) 9231 } 9232 if s.Period != nil && *s.Period < 1 { 9233 invalidParams.Add(request.NewErrParamMinValue("Period", 1)) 9234 } 9235 if s.ThresholdMetricId != nil && len(*s.ThresholdMetricId) < 1 { 9236 invalidParams.Add(request.NewErrParamMinLen("ThresholdMetricId", 1)) 9237 } 9238 if s.TreatMissingData != nil && len(*s.TreatMissingData) < 1 { 9239 invalidParams.Add(request.NewErrParamMinLen("TreatMissingData", 1)) 9240 } 9241 if s.Dimensions != nil { 9242 for i, v := range s.Dimensions { 9243 if v == nil { 9244 continue 9245 } 9246 if err := v.Validate(); err != nil { 9247 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) 9248 } 9249 } 9250 } 9251 if s.Metrics != nil { 9252 for i, v := range s.Metrics { 9253 if v == nil { 9254 continue 9255 } 9256 if err := v.Validate(); err != nil { 9257 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Metrics", i), err.(request.ErrInvalidParams)) 9258 } 9259 } 9260 } 9261 if s.Tags != nil { 9262 for i, v := range s.Tags { 9263 if v == nil { 9264 continue 9265 } 9266 if err := v.Validate(); err != nil { 9267 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 9268 } 9269 } 9270 } 9271 9272 if invalidParams.Len() > 0 { 9273 return invalidParams 9274 } 9275 return nil 9276} 9277 9278// SetActionsEnabled sets the ActionsEnabled field's value. 9279func (s *PutMetricAlarmInput) SetActionsEnabled(v bool) *PutMetricAlarmInput { 9280 s.ActionsEnabled = &v 9281 return s 9282} 9283 9284// SetAlarmActions sets the AlarmActions field's value. 9285func (s *PutMetricAlarmInput) SetAlarmActions(v []*string) *PutMetricAlarmInput { 9286 s.AlarmActions = v 9287 return s 9288} 9289 9290// SetAlarmDescription sets the AlarmDescription field's value. 9291func (s *PutMetricAlarmInput) SetAlarmDescription(v string) *PutMetricAlarmInput { 9292 s.AlarmDescription = &v 9293 return s 9294} 9295 9296// SetAlarmName sets the AlarmName field's value. 9297func (s *PutMetricAlarmInput) SetAlarmName(v string) *PutMetricAlarmInput { 9298 s.AlarmName = &v 9299 return s 9300} 9301 9302// SetComparisonOperator sets the ComparisonOperator field's value. 9303func (s *PutMetricAlarmInput) SetComparisonOperator(v string) *PutMetricAlarmInput { 9304 s.ComparisonOperator = &v 9305 return s 9306} 9307 9308// SetDatapointsToAlarm sets the DatapointsToAlarm field's value. 9309func (s *PutMetricAlarmInput) SetDatapointsToAlarm(v int64) *PutMetricAlarmInput { 9310 s.DatapointsToAlarm = &v 9311 return s 9312} 9313 9314// SetDimensions sets the Dimensions field's value. 9315func (s *PutMetricAlarmInput) SetDimensions(v []*Dimension) *PutMetricAlarmInput { 9316 s.Dimensions = v 9317 return s 9318} 9319 9320// SetEvaluateLowSampleCountPercentile sets the EvaluateLowSampleCountPercentile field's value. 9321func (s *PutMetricAlarmInput) SetEvaluateLowSampleCountPercentile(v string) *PutMetricAlarmInput { 9322 s.EvaluateLowSampleCountPercentile = &v 9323 return s 9324} 9325 9326// SetEvaluationPeriods sets the EvaluationPeriods field's value. 9327func (s *PutMetricAlarmInput) SetEvaluationPeriods(v int64) *PutMetricAlarmInput { 9328 s.EvaluationPeriods = &v 9329 return s 9330} 9331 9332// SetExtendedStatistic sets the ExtendedStatistic field's value. 9333func (s *PutMetricAlarmInput) SetExtendedStatistic(v string) *PutMetricAlarmInput { 9334 s.ExtendedStatistic = &v 9335 return s 9336} 9337 9338// SetInsufficientDataActions sets the InsufficientDataActions field's value. 9339func (s *PutMetricAlarmInput) SetInsufficientDataActions(v []*string) *PutMetricAlarmInput { 9340 s.InsufficientDataActions = v 9341 return s 9342} 9343 9344// SetMetricName sets the MetricName field's value. 9345func (s *PutMetricAlarmInput) SetMetricName(v string) *PutMetricAlarmInput { 9346 s.MetricName = &v 9347 return s 9348} 9349 9350// SetMetrics sets the Metrics field's value. 9351func (s *PutMetricAlarmInput) SetMetrics(v []*MetricDataQuery) *PutMetricAlarmInput { 9352 s.Metrics = v 9353 return s 9354} 9355 9356// SetNamespace sets the Namespace field's value. 9357func (s *PutMetricAlarmInput) SetNamespace(v string) *PutMetricAlarmInput { 9358 s.Namespace = &v 9359 return s 9360} 9361 9362// SetOKActions sets the OKActions field's value. 9363func (s *PutMetricAlarmInput) SetOKActions(v []*string) *PutMetricAlarmInput { 9364 s.OKActions = v 9365 return s 9366} 9367 9368// SetPeriod sets the Period field's value. 9369func (s *PutMetricAlarmInput) SetPeriod(v int64) *PutMetricAlarmInput { 9370 s.Period = &v 9371 return s 9372} 9373 9374// SetStatistic sets the Statistic field's value. 9375func (s *PutMetricAlarmInput) SetStatistic(v string) *PutMetricAlarmInput { 9376 s.Statistic = &v 9377 return s 9378} 9379 9380// SetTags sets the Tags field's value. 9381func (s *PutMetricAlarmInput) SetTags(v []*Tag) *PutMetricAlarmInput { 9382 s.Tags = v 9383 return s 9384} 9385 9386// SetThreshold sets the Threshold field's value. 9387func (s *PutMetricAlarmInput) SetThreshold(v float64) *PutMetricAlarmInput { 9388 s.Threshold = &v 9389 return s 9390} 9391 9392// SetThresholdMetricId sets the ThresholdMetricId field's value. 9393func (s *PutMetricAlarmInput) SetThresholdMetricId(v string) *PutMetricAlarmInput { 9394 s.ThresholdMetricId = &v 9395 return s 9396} 9397 9398// SetTreatMissingData sets the TreatMissingData field's value. 9399func (s *PutMetricAlarmInput) SetTreatMissingData(v string) *PutMetricAlarmInput { 9400 s.TreatMissingData = &v 9401 return s 9402} 9403 9404// SetUnit sets the Unit field's value. 9405func (s *PutMetricAlarmInput) SetUnit(v string) *PutMetricAlarmInput { 9406 s.Unit = &v 9407 return s 9408} 9409 9410type PutMetricAlarmOutput struct { 9411 _ struct{} `type:"structure"` 9412} 9413 9414// String returns the string representation 9415func (s PutMetricAlarmOutput) String() string { 9416 return awsutil.Prettify(s) 9417} 9418 9419// GoString returns the string representation 9420func (s PutMetricAlarmOutput) GoString() string { 9421 return s.String() 9422} 9423 9424type PutMetricDataInput struct { 9425 _ struct{} `type:"structure"` 9426 9427 // The data for the metric. The array can include no more than 20 metrics per 9428 // call. 9429 // 9430 // MetricData is a required field 9431 MetricData []*MetricDatum `type:"list" required:"true"` 9432 9433 // The namespace for the metric data. 9434 // 9435 // To avoid conflicts with AWS service namespaces, you should not specify a 9436 // namespace that begins with AWS/ 9437 // 9438 // Namespace is a required field 9439 Namespace *string `min:"1" type:"string" required:"true"` 9440} 9441 9442// String returns the string representation 9443func (s PutMetricDataInput) String() string { 9444 return awsutil.Prettify(s) 9445} 9446 9447// GoString returns the string representation 9448func (s PutMetricDataInput) GoString() string { 9449 return s.String() 9450} 9451 9452// Validate inspects the fields of the type to determine if they are valid. 9453func (s *PutMetricDataInput) Validate() error { 9454 invalidParams := request.ErrInvalidParams{Context: "PutMetricDataInput"} 9455 if s.MetricData == nil { 9456 invalidParams.Add(request.NewErrParamRequired("MetricData")) 9457 } 9458 if s.Namespace == nil { 9459 invalidParams.Add(request.NewErrParamRequired("Namespace")) 9460 } 9461 if s.Namespace != nil && len(*s.Namespace) < 1 { 9462 invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) 9463 } 9464 if s.MetricData != nil { 9465 for i, v := range s.MetricData { 9466 if v == nil { 9467 continue 9468 } 9469 if err := v.Validate(); err != nil { 9470 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricData", i), err.(request.ErrInvalidParams)) 9471 } 9472 } 9473 } 9474 9475 if invalidParams.Len() > 0 { 9476 return invalidParams 9477 } 9478 return nil 9479} 9480 9481// SetMetricData sets the MetricData field's value. 9482func (s *PutMetricDataInput) SetMetricData(v []*MetricDatum) *PutMetricDataInput { 9483 s.MetricData = v 9484 return s 9485} 9486 9487// SetNamespace sets the Namespace field's value. 9488func (s *PutMetricDataInput) SetNamespace(v string) *PutMetricDataInput { 9489 s.Namespace = &v 9490 return s 9491} 9492 9493type PutMetricDataOutput struct { 9494 _ struct{} `type:"structure"` 9495} 9496 9497// String returns the string representation 9498func (s PutMetricDataOutput) String() string { 9499 return awsutil.Prettify(s) 9500} 9501 9502// GoString returns the string representation 9503func (s PutMetricDataOutput) GoString() string { 9504 return s.String() 9505} 9506 9507type PutMetricStreamInput struct { 9508 _ struct{} `type:"structure"` 9509 9510 // If you specify this parameter, the stream sends metrics from all metric namespaces 9511 // except for the namespaces that you specify here. 9512 // 9513 // You cannot include ExcludeFilters and IncludeFilters in the same operation. 9514 ExcludeFilters []*MetricStreamFilter `type:"list"` 9515 9516 // The ARN of the Amazon Kinesis Firehose delivery stream to use for this metric 9517 // stream. This Amazon Kinesis Firehose delivery stream must already exist and 9518 // must be in the same account as the metric stream. 9519 // 9520 // FirehoseArn is a required field 9521 FirehoseArn *string `min:"1" type:"string" required:"true"` 9522 9523 // If you specify this parameter, the stream sends only the metrics from the 9524 // metric namespaces that you specify here. 9525 // 9526 // You cannot include IncludeFilters and ExcludeFilters in the same operation. 9527 IncludeFilters []*MetricStreamFilter `type:"list"` 9528 9529 // If you are creating a new metric stream, this is the name for the new stream. 9530 // The name must be different than the names of other metric streams in this 9531 // account and Region. 9532 // 9533 // If you are updating a metric stream, specify the name of that stream here. 9534 // 9535 // Valid characters are A-Z, a-z, 0-9, "-" and "_". 9536 // 9537 // Name is a required field 9538 Name *string `min:"1" type:"string" required:"true"` 9539 9540 // The output format for the stream. Valid values are json and opentelemetry0.7. 9541 // For more information about metric stream output formats, see Metric streams 9542 // output formats (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-metric-streams-formats.html). 9543 // 9544 // OutputFormat is a required field 9545 OutputFormat *string `min:"1" type:"string" required:"true" enum:"MetricStreamOutputFormat"` 9546 9547 // The ARN of an IAM role that this metric stream will use to access Amazon 9548 // Kinesis Firehose resources. This IAM role must already exist and must be 9549 // in the same account as the metric stream. This IAM role must include the 9550 // following permissions: 9551 // 9552 // * firehose:PutRecord 9553 // 9554 // * firehose:PutRecordBatch 9555 // 9556 // RoleArn is a required field 9557 RoleArn *string `min:"1" type:"string" required:"true"` 9558 9559 // A list of key-value pairs to associate with the metric stream. You can associate 9560 // as many as 50 tags with a metric stream. 9561 // 9562 // Tags can help you organize and categorize your resources. You can also use 9563 // them to scope user permissions by granting a user permission to access or 9564 // change only resources with certain tag values. 9565 Tags []*Tag `type:"list"` 9566} 9567 9568// String returns the string representation 9569func (s PutMetricStreamInput) String() string { 9570 return awsutil.Prettify(s) 9571} 9572 9573// GoString returns the string representation 9574func (s PutMetricStreamInput) GoString() string { 9575 return s.String() 9576} 9577 9578// Validate inspects the fields of the type to determine if they are valid. 9579func (s *PutMetricStreamInput) Validate() error { 9580 invalidParams := request.ErrInvalidParams{Context: "PutMetricStreamInput"} 9581 if s.FirehoseArn == nil { 9582 invalidParams.Add(request.NewErrParamRequired("FirehoseArn")) 9583 } 9584 if s.FirehoseArn != nil && len(*s.FirehoseArn) < 1 { 9585 invalidParams.Add(request.NewErrParamMinLen("FirehoseArn", 1)) 9586 } 9587 if s.Name == nil { 9588 invalidParams.Add(request.NewErrParamRequired("Name")) 9589 } 9590 if s.Name != nil && len(*s.Name) < 1 { 9591 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 9592 } 9593 if s.OutputFormat == nil { 9594 invalidParams.Add(request.NewErrParamRequired("OutputFormat")) 9595 } 9596 if s.OutputFormat != nil && len(*s.OutputFormat) < 1 { 9597 invalidParams.Add(request.NewErrParamMinLen("OutputFormat", 1)) 9598 } 9599 if s.RoleArn == nil { 9600 invalidParams.Add(request.NewErrParamRequired("RoleArn")) 9601 } 9602 if s.RoleArn != nil && len(*s.RoleArn) < 1 { 9603 invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) 9604 } 9605 if s.ExcludeFilters != nil { 9606 for i, v := range s.ExcludeFilters { 9607 if v == nil { 9608 continue 9609 } 9610 if err := v.Validate(); err != nil { 9611 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ExcludeFilters", i), err.(request.ErrInvalidParams)) 9612 } 9613 } 9614 } 9615 if s.IncludeFilters != nil { 9616 for i, v := range s.IncludeFilters { 9617 if v == nil { 9618 continue 9619 } 9620 if err := v.Validate(); err != nil { 9621 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "IncludeFilters", i), err.(request.ErrInvalidParams)) 9622 } 9623 } 9624 } 9625 if s.Tags != nil { 9626 for i, v := range s.Tags { 9627 if v == nil { 9628 continue 9629 } 9630 if err := v.Validate(); err != nil { 9631 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 9632 } 9633 } 9634 } 9635 9636 if invalidParams.Len() > 0 { 9637 return invalidParams 9638 } 9639 return nil 9640} 9641 9642// SetExcludeFilters sets the ExcludeFilters field's value. 9643func (s *PutMetricStreamInput) SetExcludeFilters(v []*MetricStreamFilter) *PutMetricStreamInput { 9644 s.ExcludeFilters = v 9645 return s 9646} 9647 9648// SetFirehoseArn sets the FirehoseArn field's value. 9649func (s *PutMetricStreamInput) SetFirehoseArn(v string) *PutMetricStreamInput { 9650 s.FirehoseArn = &v 9651 return s 9652} 9653 9654// SetIncludeFilters sets the IncludeFilters field's value. 9655func (s *PutMetricStreamInput) SetIncludeFilters(v []*MetricStreamFilter) *PutMetricStreamInput { 9656 s.IncludeFilters = v 9657 return s 9658} 9659 9660// SetName sets the Name field's value. 9661func (s *PutMetricStreamInput) SetName(v string) *PutMetricStreamInput { 9662 s.Name = &v 9663 return s 9664} 9665 9666// SetOutputFormat sets the OutputFormat field's value. 9667func (s *PutMetricStreamInput) SetOutputFormat(v string) *PutMetricStreamInput { 9668 s.OutputFormat = &v 9669 return s 9670} 9671 9672// SetRoleArn sets the RoleArn field's value. 9673func (s *PutMetricStreamInput) SetRoleArn(v string) *PutMetricStreamInput { 9674 s.RoleArn = &v 9675 return s 9676} 9677 9678// SetTags sets the Tags field's value. 9679func (s *PutMetricStreamInput) SetTags(v []*Tag) *PutMetricStreamInput { 9680 s.Tags = v 9681 return s 9682} 9683 9684type PutMetricStreamOutput struct { 9685 _ struct{} `type:"structure"` 9686 9687 // The ARN of the metric stream. 9688 Arn *string `min:"1" type:"string"` 9689} 9690 9691// String returns the string representation 9692func (s PutMetricStreamOutput) String() string { 9693 return awsutil.Prettify(s) 9694} 9695 9696// GoString returns the string representation 9697func (s PutMetricStreamOutput) GoString() string { 9698 return s.String() 9699} 9700 9701// SetArn sets the Arn field's value. 9702func (s *PutMetricStreamOutput) SetArn(v string) *PutMetricStreamOutput { 9703 s.Arn = &v 9704 return s 9705} 9706 9707// Specifies one range of days or times to exclude from use for training an 9708// anomaly detection model. 9709type Range struct { 9710 _ struct{} `type:"structure"` 9711 9712 // The end time of the range to exclude. The format is yyyy-MM-dd'T'HH:mm:ss. 9713 // For example, 2019-07-01T23:59:59. 9714 // 9715 // EndTime is a required field 9716 EndTime *time.Time `type:"timestamp" required:"true"` 9717 9718 // The start time of the range to exclude. The format is yyyy-MM-dd'T'HH:mm:ss. 9719 // For example, 2019-07-01T23:59:59. 9720 // 9721 // StartTime is a required field 9722 StartTime *time.Time `type:"timestamp" required:"true"` 9723} 9724 9725// String returns the string representation 9726func (s Range) String() string { 9727 return awsutil.Prettify(s) 9728} 9729 9730// GoString returns the string representation 9731func (s Range) GoString() string { 9732 return s.String() 9733} 9734 9735// Validate inspects the fields of the type to determine if they are valid. 9736func (s *Range) Validate() error { 9737 invalidParams := request.ErrInvalidParams{Context: "Range"} 9738 if s.EndTime == nil { 9739 invalidParams.Add(request.NewErrParamRequired("EndTime")) 9740 } 9741 if s.StartTime == nil { 9742 invalidParams.Add(request.NewErrParamRequired("StartTime")) 9743 } 9744 9745 if invalidParams.Len() > 0 { 9746 return invalidParams 9747 } 9748 return nil 9749} 9750 9751// SetEndTime sets the EndTime field's value. 9752func (s *Range) SetEndTime(v time.Time) *Range { 9753 s.EndTime = &v 9754 return s 9755} 9756 9757// SetStartTime sets the StartTime field's value. 9758func (s *Range) SetStartTime(v time.Time) *Range { 9759 s.StartTime = &v 9760 return s 9761} 9762 9763type SetAlarmStateInput struct { 9764 _ struct{} `type:"structure"` 9765 9766 // The name of the alarm. 9767 // 9768 // AlarmName is a required field 9769 AlarmName *string `min:"1" type:"string" required:"true"` 9770 9771 // The reason that this alarm is set to this specific state, in text format. 9772 // 9773 // StateReason is a required field 9774 StateReason *string `type:"string" required:"true"` 9775 9776 // The reason that this alarm is set to this specific state, in JSON format. 9777 // 9778 // For SNS or EC2 alarm actions, this is just informational. But for EC2 Auto 9779 // Scaling or application Auto Scaling alarm actions, the Auto Scaling policy 9780 // uses the information in this field to take the correct action. 9781 StateReasonData *string `type:"string"` 9782 9783 // The value of the state. 9784 // 9785 // StateValue is a required field 9786 StateValue *string `type:"string" required:"true" enum:"StateValue"` 9787} 9788 9789// String returns the string representation 9790func (s SetAlarmStateInput) String() string { 9791 return awsutil.Prettify(s) 9792} 9793 9794// GoString returns the string representation 9795func (s SetAlarmStateInput) GoString() string { 9796 return s.String() 9797} 9798 9799// Validate inspects the fields of the type to determine if they are valid. 9800func (s *SetAlarmStateInput) Validate() error { 9801 invalidParams := request.ErrInvalidParams{Context: "SetAlarmStateInput"} 9802 if s.AlarmName == nil { 9803 invalidParams.Add(request.NewErrParamRequired("AlarmName")) 9804 } 9805 if s.AlarmName != nil && len(*s.AlarmName) < 1 { 9806 invalidParams.Add(request.NewErrParamMinLen("AlarmName", 1)) 9807 } 9808 if s.StateReason == nil { 9809 invalidParams.Add(request.NewErrParamRequired("StateReason")) 9810 } 9811 if s.StateValue == nil { 9812 invalidParams.Add(request.NewErrParamRequired("StateValue")) 9813 } 9814 9815 if invalidParams.Len() > 0 { 9816 return invalidParams 9817 } 9818 return nil 9819} 9820 9821// SetAlarmName sets the AlarmName field's value. 9822func (s *SetAlarmStateInput) SetAlarmName(v string) *SetAlarmStateInput { 9823 s.AlarmName = &v 9824 return s 9825} 9826 9827// SetStateReason sets the StateReason field's value. 9828func (s *SetAlarmStateInput) SetStateReason(v string) *SetAlarmStateInput { 9829 s.StateReason = &v 9830 return s 9831} 9832 9833// SetStateReasonData sets the StateReasonData field's value. 9834func (s *SetAlarmStateInput) SetStateReasonData(v string) *SetAlarmStateInput { 9835 s.StateReasonData = &v 9836 return s 9837} 9838 9839// SetStateValue sets the StateValue field's value. 9840func (s *SetAlarmStateInput) SetStateValue(v string) *SetAlarmStateInput { 9841 s.StateValue = &v 9842 return s 9843} 9844 9845type SetAlarmStateOutput struct { 9846 _ struct{} `type:"structure"` 9847} 9848 9849// String returns the string representation 9850func (s SetAlarmStateOutput) String() string { 9851 return awsutil.Prettify(s) 9852} 9853 9854// GoString returns the string representation 9855func (s SetAlarmStateOutput) GoString() string { 9856 return s.String() 9857} 9858 9859type StartMetricStreamsInput struct { 9860 _ struct{} `type:"structure"` 9861 9862 // The array of the names of metric streams to start streaming. 9863 // 9864 // This is an "all or nothing" operation. If you do not have permission to access 9865 // all of the metric streams that you list here, then none of the streams that 9866 // you list in the operation will start streaming. 9867 // 9868 // Names is a required field 9869 Names []*string `type:"list" required:"true"` 9870} 9871 9872// String returns the string representation 9873func (s StartMetricStreamsInput) String() string { 9874 return awsutil.Prettify(s) 9875} 9876 9877// GoString returns the string representation 9878func (s StartMetricStreamsInput) GoString() string { 9879 return s.String() 9880} 9881 9882// Validate inspects the fields of the type to determine if they are valid. 9883func (s *StartMetricStreamsInput) Validate() error { 9884 invalidParams := request.ErrInvalidParams{Context: "StartMetricStreamsInput"} 9885 if s.Names == nil { 9886 invalidParams.Add(request.NewErrParamRequired("Names")) 9887 } 9888 9889 if invalidParams.Len() > 0 { 9890 return invalidParams 9891 } 9892 return nil 9893} 9894 9895// SetNames sets the Names field's value. 9896func (s *StartMetricStreamsInput) SetNames(v []*string) *StartMetricStreamsInput { 9897 s.Names = v 9898 return s 9899} 9900 9901type StartMetricStreamsOutput struct { 9902 _ struct{} `type:"structure"` 9903} 9904 9905// String returns the string representation 9906func (s StartMetricStreamsOutput) String() string { 9907 return awsutil.Prettify(s) 9908} 9909 9910// GoString returns the string representation 9911func (s StartMetricStreamsOutput) GoString() string { 9912 return s.String() 9913} 9914 9915// Represents a set of statistics that describes a specific metric. 9916type StatisticSet struct { 9917 _ struct{} `type:"structure"` 9918 9919 // The maximum value of the sample set. 9920 // 9921 // Maximum is a required field 9922 Maximum *float64 `type:"double" required:"true"` 9923 9924 // The minimum value of the sample set. 9925 // 9926 // Minimum is a required field 9927 Minimum *float64 `type:"double" required:"true"` 9928 9929 // The number of samples used for the statistic set. 9930 // 9931 // SampleCount is a required field 9932 SampleCount *float64 `type:"double" required:"true"` 9933 9934 // The sum of values for the sample set. 9935 // 9936 // Sum is a required field 9937 Sum *float64 `type:"double" required:"true"` 9938} 9939 9940// String returns the string representation 9941func (s StatisticSet) String() string { 9942 return awsutil.Prettify(s) 9943} 9944 9945// GoString returns the string representation 9946func (s StatisticSet) GoString() string { 9947 return s.String() 9948} 9949 9950// Validate inspects the fields of the type to determine if they are valid. 9951func (s *StatisticSet) Validate() error { 9952 invalidParams := request.ErrInvalidParams{Context: "StatisticSet"} 9953 if s.Maximum == nil { 9954 invalidParams.Add(request.NewErrParamRequired("Maximum")) 9955 } 9956 if s.Minimum == nil { 9957 invalidParams.Add(request.NewErrParamRequired("Minimum")) 9958 } 9959 if s.SampleCount == nil { 9960 invalidParams.Add(request.NewErrParamRequired("SampleCount")) 9961 } 9962 if s.Sum == nil { 9963 invalidParams.Add(request.NewErrParamRequired("Sum")) 9964 } 9965 9966 if invalidParams.Len() > 0 { 9967 return invalidParams 9968 } 9969 return nil 9970} 9971 9972// SetMaximum sets the Maximum field's value. 9973func (s *StatisticSet) SetMaximum(v float64) *StatisticSet { 9974 s.Maximum = &v 9975 return s 9976} 9977 9978// SetMinimum sets the Minimum field's value. 9979func (s *StatisticSet) SetMinimum(v float64) *StatisticSet { 9980 s.Minimum = &v 9981 return s 9982} 9983 9984// SetSampleCount sets the SampleCount field's value. 9985func (s *StatisticSet) SetSampleCount(v float64) *StatisticSet { 9986 s.SampleCount = &v 9987 return s 9988} 9989 9990// SetSum sets the Sum field's value. 9991func (s *StatisticSet) SetSum(v float64) *StatisticSet { 9992 s.Sum = &v 9993 return s 9994} 9995 9996type StopMetricStreamsInput struct { 9997 _ struct{} `type:"structure"` 9998 9999 // The array of the names of metric streams to stop streaming. 10000 // 10001 // This is an "all or nothing" operation. If you do not have permission to access 10002 // all of the metric streams that you list here, then none of the streams that 10003 // you list in the operation will stop streaming. 10004 // 10005 // Names is a required field 10006 Names []*string `type:"list" required:"true"` 10007} 10008 10009// String returns the string representation 10010func (s StopMetricStreamsInput) String() string { 10011 return awsutil.Prettify(s) 10012} 10013 10014// GoString returns the string representation 10015func (s StopMetricStreamsInput) GoString() string { 10016 return s.String() 10017} 10018 10019// Validate inspects the fields of the type to determine if they are valid. 10020func (s *StopMetricStreamsInput) Validate() error { 10021 invalidParams := request.ErrInvalidParams{Context: "StopMetricStreamsInput"} 10022 if s.Names == nil { 10023 invalidParams.Add(request.NewErrParamRequired("Names")) 10024 } 10025 10026 if invalidParams.Len() > 0 { 10027 return invalidParams 10028 } 10029 return nil 10030} 10031 10032// SetNames sets the Names field's value. 10033func (s *StopMetricStreamsInput) SetNames(v []*string) *StopMetricStreamsInput { 10034 s.Names = v 10035 return s 10036} 10037 10038type StopMetricStreamsOutput struct { 10039 _ struct{} `type:"structure"` 10040} 10041 10042// String returns the string representation 10043func (s StopMetricStreamsOutput) String() string { 10044 return awsutil.Prettify(s) 10045} 10046 10047// GoString returns the string representation 10048func (s StopMetricStreamsOutput) GoString() string { 10049 return s.String() 10050} 10051 10052// A key-value pair associated with a CloudWatch resource. 10053type Tag struct { 10054 _ struct{} `type:"structure"` 10055 10056 // A string that you can use to assign a value. The combination of tag keys 10057 // and values can help you organize and categorize your resources. 10058 // 10059 // Key is a required field 10060 Key *string `min:"1" type:"string" required:"true"` 10061 10062 // The value for the specified tag key. 10063 // 10064 // Value is a required field 10065 Value *string `type:"string" required:"true"` 10066} 10067 10068// String returns the string representation 10069func (s Tag) String() string { 10070 return awsutil.Prettify(s) 10071} 10072 10073// GoString returns the string representation 10074func (s Tag) GoString() string { 10075 return s.String() 10076} 10077 10078// Validate inspects the fields of the type to determine if they are valid. 10079func (s *Tag) Validate() error { 10080 invalidParams := request.ErrInvalidParams{Context: "Tag"} 10081 if s.Key == nil { 10082 invalidParams.Add(request.NewErrParamRequired("Key")) 10083 } 10084 if s.Key != nil && len(*s.Key) < 1 { 10085 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 10086 } 10087 if s.Value == nil { 10088 invalidParams.Add(request.NewErrParamRequired("Value")) 10089 } 10090 10091 if invalidParams.Len() > 0 { 10092 return invalidParams 10093 } 10094 return nil 10095} 10096 10097// SetKey sets the Key field's value. 10098func (s *Tag) SetKey(v string) *Tag { 10099 s.Key = &v 10100 return s 10101} 10102 10103// SetValue sets the Value field's value. 10104func (s *Tag) SetValue(v string) *Tag { 10105 s.Value = &v 10106 return s 10107} 10108 10109type TagResourceInput struct { 10110 _ struct{} `type:"structure"` 10111 10112 // The ARN of the CloudWatch resource that you're adding tags to. 10113 // 10114 // The ARN format of an alarm is arn:aws:cloudwatch:Region:account-id:alarm:alarm-name 10115 // 10116 // The ARN format of a Contributor Insights rule is arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name 10117 // 10118 // For more information about ARN format, see Resource Types Defined by Amazon 10119 // CloudWatch (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies) 10120 // in the Amazon Web Services General Reference. 10121 // 10122 // ResourceARN is a required field 10123 ResourceARN *string `min:"1" type:"string" required:"true"` 10124 10125 // The list of key-value pairs to associate with the alarm. 10126 // 10127 // Tags is a required field 10128 Tags []*Tag `type:"list" required:"true"` 10129} 10130 10131// String returns the string representation 10132func (s TagResourceInput) String() string { 10133 return awsutil.Prettify(s) 10134} 10135 10136// GoString returns the string representation 10137func (s TagResourceInput) GoString() string { 10138 return s.String() 10139} 10140 10141// Validate inspects the fields of the type to determine if they are valid. 10142func (s *TagResourceInput) Validate() error { 10143 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 10144 if s.ResourceARN == nil { 10145 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 10146 } 10147 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 10148 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 10149 } 10150 if s.Tags == nil { 10151 invalidParams.Add(request.NewErrParamRequired("Tags")) 10152 } 10153 if s.Tags != nil { 10154 for i, v := range s.Tags { 10155 if v == nil { 10156 continue 10157 } 10158 if err := v.Validate(); err != nil { 10159 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 10160 } 10161 } 10162 } 10163 10164 if invalidParams.Len() > 0 { 10165 return invalidParams 10166 } 10167 return nil 10168} 10169 10170// SetResourceARN sets the ResourceARN field's value. 10171func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput { 10172 s.ResourceARN = &v 10173 return s 10174} 10175 10176// SetTags sets the Tags field's value. 10177func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { 10178 s.Tags = v 10179 return s 10180} 10181 10182type TagResourceOutput struct { 10183 _ struct{} `type:"structure"` 10184} 10185 10186// String returns the string representation 10187func (s TagResourceOutput) String() string { 10188 return awsutil.Prettify(s) 10189} 10190 10191// GoString returns the string representation 10192func (s TagResourceOutput) GoString() string { 10193 return s.String() 10194} 10195 10196type UntagResourceInput struct { 10197 _ struct{} `type:"structure"` 10198 10199 // The ARN of the CloudWatch resource that you're removing tags from. 10200 // 10201 // The ARN format of an alarm is arn:aws:cloudwatch:Region:account-id:alarm:alarm-name 10202 // 10203 // The ARN format of a Contributor Insights rule is arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name 10204 // 10205 // For more information about ARN format, see Resource Types Defined by Amazon 10206 // CloudWatch (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies) 10207 // in the Amazon Web Services General Reference. 10208 // 10209 // ResourceARN is a required field 10210 ResourceARN *string `min:"1" type:"string" required:"true"` 10211 10212 // The list of tag keys to remove from the resource. 10213 // 10214 // TagKeys is a required field 10215 TagKeys []*string `type:"list" required:"true"` 10216} 10217 10218// String returns the string representation 10219func (s UntagResourceInput) String() string { 10220 return awsutil.Prettify(s) 10221} 10222 10223// GoString returns the string representation 10224func (s UntagResourceInput) GoString() string { 10225 return s.String() 10226} 10227 10228// Validate inspects the fields of the type to determine if they are valid. 10229func (s *UntagResourceInput) Validate() error { 10230 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 10231 if s.ResourceARN == nil { 10232 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 10233 } 10234 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 10235 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 10236 } 10237 if s.TagKeys == nil { 10238 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 10239 } 10240 10241 if invalidParams.Len() > 0 { 10242 return invalidParams 10243 } 10244 return nil 10245} 10246 10247// SetResourceARN sets the ResourceARN field's value. 10248func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput { 10249 s.ResourceARN = &v 10250 return s 10251} 10252 10253// SetTagKeys sets the TagKeys field's value. 10254func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 10255 s.TagKeys = v 10256 return s 10257} 10258 10259type UntagResourceOutput struct { 10260 _ struct{} `type:"structure"` 10261} 10262 10263// String returns the string representation 10264func (s UntagResourceOutput) String() string { 10265 return awsutil.Prettify(s) 10266} 10267 10268// GoString returns the string representation 10269func (s UntagResourceOutput) GoString() string { 10270 return s.String() 10271} 10272 10273const ( 10274 // AlarmTypeCompositeAlarm is a AlarmType enum value 10275 AlarmTypeCompositeAlarm = "CompositeAlarm" 10276 10277 // AlarmTypeMetricAlarm is a AlarmType enum value 10278 AlarmTypeMetricAlarm = "MetricAlarm" 10279) 10280 10281// AlarmType_Values returns all elements of the AlarmType enum 10282func AlarmType_Values() []string { 10283 return []string{ 10284 AlarmTypeCompositeAlarm, 10285 AlarmTypeMetricAlarm, 10286 } 10287} 10288 10289const ( 10290 // AnomalyDetectorStateValuePendingTraining is a AnomalyDetectorStateValue enum value 10291 AnomalyDetectorStateValuePendingTraining = "PENDING_TRAINING" 10292 10293 // AnomalyDetectorStateValueTrainedInsufficientData is a AnomalyDetectorStateValue enum value 10294 AnomalyDetectorStateValueTrainedInsufficientData = "TRAINED_INSUFFICIENT_DATA" 10295 10296 // AnomalyDetectorStateValueTrained is a AnomalyDetectorStateValue enum value 10297 AnomalyDetectorStateValueTrained = "TRAINED" 10298) 10299 10300// AnomalyDetectorStateValue_Values returns all elements of the AnomalyDetectorStateValue enum 10301func AnomalyDetectorStateValue_Values() []string { 10302 return []string{ 10303 AnomalyDetectorStateValuePendingTraining, 10304 AnomalyDetectorStateValueTrainedInsufficientData, 10305 AnomalyDetectorStateValueTrained, 10306 } 10307} 10308 10309const ( 10310 // ComparisonOperatorGreaterThanOrEqualToThreshold is a ComparisonOperator enum value 10311 ComparisonOperatorGreaterThanOrEqualToThreshold = "GreaterThanOrEqualToThreshold" 10312 10313 // ComparisonOperatorGreaterThanThreshold is a ComparisonOperator enum value 10314 ComparisonOperatorGreaterThanThreshold = "GreaterThanThreshold" 10315 10316 // ComparisonOperatorLessThanThreshold is a ComparisonOperator enum value 10317 ComparisonOperatorLessThanThreshold = "LessThanThreshold" 10318 10319 // ComparisonOperatorLessThanOrEqualToThreshold is a ComparisonOperator enum value 10320 ComparisonOperatorLessThanOrEqualToThreshold = "LessThanOrEqualToThreshold" 10321 10322 // ComparisonOperatorLessThanLowerOrGreaterThanUpperThreshold is a ComparisonOperator enum value 10323 ComparisonOperatorLessThanLowerOrGreaterThanUpperThreshold = "LessThanLowerOrGreaterThanUpperThreshold" 10324 10325 // ComparisonOperatorLessThanLowerThreshold is a ComparisonOperator enum value 10326 ComparisonOperatorLessThanLowerThreshold = "LessThanLowerThreshold" 10327 10328 // ComparisonOperatorGreaterThanUpperThreshold is a ComparisonOperator enum value 10329 ComparisonOperatorGreaterThanUpperThreshold = "GreaterThanUpperThreshold" 10330) 10331 10332// ComparisonOperator_Values returns all elements of the ComparisonOperator enum 10333func ComparisonOperator_Values() []string { 10334 return []string{ 10335 ComparisonOperatorGreaterThanOrEqualToThreshold, 10336 ComparisonOperatorGreaterThanThreshold, 10337 ComparisonOperatorLessThanThreshold, 10338 ComparisonOperatorLessThanOrEqualToThreshold, 10339 ComparisonOperatorLessThanLowerOrGreaterThanUpperThreshold, 10340 ComparisonOperatorLessThanLowerThreshold, 10341 ComparisonOperatorGreaterThanUpperThreshold, 10342 } 10343} 10344 10345const ( 10346 // HistoryItemTypeConfigurationUpdate is a HistoryItemType enum value 10347 HistoryItemTypeConfigurationUpdate = "ConfigurationUpdate" 10348 10349 // HistoryItemTypeStateUpdate is a HistoryItemType enum value 10350 HistoryItemTypeStateUpdate = "StateUpdate" 10351 10352 // HistoryItemTypeAction is a HistoryItemType enum value 10353 HistoryItemTypeAction = "Action" 10354) 10355 10356// HistoryItemType_Values returns all elements of the HistoryItemType enum 10357func HistoryItemType_Values() []string { 10358 return []string{ 10359 HistoryItemTypeConfigurationUpdate, 10360 HistoryItemTypeStateUpdate, 10361 HistoryItemTypeAction, 10362 } 10363} 10364 10365const ( 10366 // MetricStreamOutputFormatJson is a MetricStreamOutputFormat enum value 10367 MetricStreamOutputFormatJson = "json" 10368 10369 // MetricStreamOutputFormatOpentelemetry07 is a MetricStreamOutputFormat enum value 10370 MetricStreamOutputFormatOpentelemetry07 = "opentelemetry0.7" 10371) 10372 10373// MetricStreamOutputFormat_Values returns all elements of the MetricStreamOutputFormat enum 10374func MetricStreamOutputFormat_Values() []string { 10375 return []string{ 10376 MetricStreamOutputFormatJson, 10377 MetricStreamOutputFormatOpentelemetry07, 10378 } 10379} 10380 10381const ( 10382 // RecentlyActivePt3h is a RecentlyActive enum value 10383 RecentlyActivePt3h = "PT3H" 10384) 10385 10386// RecentlyActive_Values returns all elements of the RecentlyActive enum 10387func RecentlyActive_Values() []string { 10388 return []string{ 10389 RecentlyActivePt3h, 10390 } 10391} 10392 10393const ( 10394 // ScanByTimestampDescending is a ScanBy enum value 10395 ScanByTimestampDescending = "TimestampDescending" 10396 10397 // ScanByTimestampAscending is a ScanBy enum value 10398 ScanByTimestampAscending = "TimestampAscending" 10399) 10400 10401// ScanBy_Values returns all elements of the ScanBy enum 10402func ScanBy_Values() []string { 10403 return []string{ 10404 ScanByTimestampDescending, 10405 ScanByTimestampAscending, 10406 } 10407} 10408 10409const ( 10410 // StandardUnitSeconds is a StandardUnit enum value 10411 StandardUnitSeconds = "Seconds" 10412 10413 // StandardUnitMicroseconds is a StandardUnit enum value 10414 StandardUnitMicroseconds = "Microseconds" 10415 10416 // StandardUnitMilliseconds is a StandardUnit enum value 10417 StandardUnitMilliseconds = "Milliseconds" 10418 10419 // StandardUnitBytes is a StandardUnit enum value 10420 StandardUnitBytes = "Bytes" 10421 10422 // StandardUnitKilobytes is a StandardUnit enum value 10423 StandardUnitKilobytes = "Kilobytes" 10424 10425 // StandardUnitMegabytes is a StandardUnit enum value 10426 StandardUnitMegabytes = "Megabytes" 10427 10428 // StandardUnitGigabytes is a StandardUnit enum value 10429 StandardUnitGigabytes = "Gigabytes" 10430 10431 // StandardUnitTerabytes is a StandardUnit enum value 10432 StandardUnitTerabytes = "Terabytes" 10433 10434 // StandardUnitBits is a StandardUnit enum value 10435 StandardUnitBits = "Bits" 10436 10437 // StandardUnitKilobits is a StandardUnit enum value 10438 StandardUnitKilobits = "Kilobits" 10439 10440 // StandardUnitMegabits is a StandardUnit enum value 10441 StandardUnitMegabits = "Megabits" 10442 10443 // StandardUnitGigabits is a StandardUnit enum value 10444 StandardUnitGigabits = "Gigabits" 10445 10446 // StandardUnitTerabits is a StandardUnit enum value 10447 StandardUnitTerabits = "Terabits" 10448 10449 // StandardUnitPercent is a StandardUnit enum value 10450 StandardUnitPercent = "Percent" 10451 10452 // StandardUnitCount is a StandardUnit enum value 10453 StandardUnitCount = "Count" 10454 10455 // StandardUnitBytesSecond is a StandardUnit enum value 10456 StandardUnitBytesSecond = "Bytes/Second" 10457 10458 // StandardUnitKilobytesSecond is a StandardUnit enum value 10459 StandardUnitKilobytesSecond = "Kilobytes/Second" 10460 10461 // StandardUnitMegabytesSecond is a StandardUnit enum value 10462 StandardUnitMegabytesSecond = "Megabytes/Second" 10463 10464 // StandardUnitGigabytesSecond is a StandardUnit enum value 10465 StandardUnitGigabytesSecond = "Gigabytes/Second" 10466 10467 // StandardUnitTerabytesSecond is a StandardUnit enum value 10468 StandardUnitTerabytesSecond = "Terabytes/Second" 10469 10470 // StandardUnitBitsSecond is a StandardUnit enum value 10471 StandardUnitBitsSecond = "Bits/Second" 10472 10473 // StandardUnitKilobitsSecond is a StandardUnit enum value 10474 StandardUnitKilobitsSecond = "Kilobits/Second" 10475 10476 // StandardUnitMegabitsSecond is a StandardUnit enum value 10477 StandardUnitMegabitsSecond = "Megabits/Second" 10478 10479 // StandardUnitGigabitsSecond is a StandardUnit enum value 10480 StandardUnitGigabitsSecond = "Gigabits/Second" 10481 10482 // StandardUnitTerabitsSecond is a StandardUnit enum value 10483 StandardUnitTerabitsSecond = "Terabits/Second" 10484 10485 // StandardUnitCountSecond is a StandardUnit enum value 10486 StandardUnitCountSecond = "Count/Second" 10487 10488 // StandardUnitNone is a StandardUnit enum value 10489 StandardUnitNone = "None" 10490) 10491 10492// StandardUnit_Values returns all elements of the StandardUnit enum 10493func StandardUnit_Values() []string { 10494 return []string{ 10495 StandardUnitSeconds, 10496 StandardUnitMicroseconds, 10497 StandardUnitMilliseconds, 10498 StandardUnitBytes, 10499 StandardUnitKilobytes, 10500 StandardUnitMegabytes, 10501 StandardUnitGigabytes, 10502 StandardUnitTerabytes, 10503 StandardUnitBits, 10504 StandardUnitKilobits, 10505 StandardUnitMegabits, 10506 StandardUnitGigabits, 10507 StandardUnitTerabits, 10508 StandardUnitPercent, 10509 StandardUnitCount, 10510 StandardUnitBytesSecond, 10511 StandardUnitKilobytesSecond, 10512 StandardUnitMegabytesSecond, 10513 StandardUnitGigabytesSecond, 10514 StandardUnitTerabytesSecond, 10515 StandardUnitBitsSecond, 10516 StandardUnitKilobitsSecond, 10517 StandardUnitMegabitsSecond, 10518 StandardUnitGigabitsSecond, 10519 StandardUnitTerabitsSecond, 10520 StandardUnitCountSecond, 10521 StandardUnitNone, 10522 } 10523} 10524 10525const ( 10526 // StateValueOk is a StateValue enum value 10527 StateValueOk = "OK" 10528 10529 // StateValueAlarm is a StateValue enum value 10530 StateValueAlarm = "ALARM" 10531 10532 // StateValueInsufficientData is a StateValue enum value 10533 StateValueInsufficientData = "INSUFFICIENT_DATA" 10534) 10535 10536// StateValue_Values returns all elements of the StateValue enum 10537func StateValue_Values() []string { 10538 return []string{ 10539 StateValueOk, 10540 StateValueAlarm, 10541 StateValueInsufficientData, 10542 } 10543} 10544 10545const ( 10546 // StatisticSampleCount is a Statistic enum value 10547 StatisticSampleCount = "SampleCount" 10548 10549 // StatisticAverage is a Statistic enum value 10550 StatisticAverage = "Average" 10551 10552 // StatisticSum is a Statistic enum value 10553 StatisticSum = "Sum" 10554 10555 // StatisticMinimum is a Statistic enum value 10556 StatisticMinimum = "Minimum" 10557 10558 // StatisticMaximum is a Statistic enum value 10559 StatisticMaximum = "Maximum" 10560) 10561 10562// Statistic_Values returns all elements of the Statistic enum 10563func Statistic_Values() []string { 10564 return []string{ 10565 StatisticSampleCount, 10566 StatisticAverage, 10567 StatisticSum, 10568 StatisticMinimum, 10569 StatisticMaximum, 10570 } 10571} 10572 10573const ( 10574 // StatusCodeComplete is a StatusCode enum value 10575 StatusCodeComplete = "Complete" 10576 10577 // StatusCodeInternalError is a StatusCode enum value 10578 StatusCodeInternalError = "InternalError" 10579 10580 // StatusCodePartialData is a StatusCode enum value 10581 StatusCodePartialData = "PartialData" 10582) 10583 10584// StatusCode_Values returns all elements of the StatusCode enum 10585func StatusCode_Values() []string { 10586 return []string{ 10587 StatusCodeComplete, 10588 StatusCodeInternalError, 10589 StatusCodePartialData, 10590 } 10591} 10592