1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package pi 4 5import ( 6 "fmt" 7 "time" 8 9 "github.com/aws/aws-sdk-go/aws" 10 "github.com/aws/aws-sdk-go/aws/awsutil" 11 "github.com/aws/aws-sdk-go/aws/request" 12 "github.com/aws/aws-sdk-go/private/protocol" 13) 14 15const opDescribeDimensionKeys = "DescribeDimensionKeys" 16 17// DescribeDimensionKeysRequest generates a "aws/request.Request" representing the 18// client's request for the DescribeDimensionKeys operation. The "output" return 19// value will be populated with the request's response once the request completes 20// successfully. 21// 22// Use "Send" method on the returned Request to send the API call to the service. 23// the "output" return value is not valid until after Send returns without error. 24// 25// See DescribeDimensionKeys for more information on using the DescribeDimensionKeys 26// API call, and error handling. 27// 28// This method is useful when you want to inject custom logic or configuration 29// into the SDK's request lifecycle. Such as custom headers, or retry logic. 30// 31// 32// // Example sending a request using the DescribeDimensionKeysRequest method. 33// req, resp := client.DescribeDimensionKeysRequest(params) 34// 35// err := req.Send() 36// if err == nil { // resp is now filled 37// fmt.Println(resp) 38// } 39// 40// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/DescribeDimensionKeys 41func (c *PI) DescribeDimensionKeysRequest(input *DescribeDimensionKeysInput) (req *request.Request, output *DescribeDimensionKeysOutput) { 42 op := &request.Operation{ 43 Name: opDescribeDimensionKeys, 44 HTTPMethod: "POST", 45 HTTPPath: "/", 46 } 47 48 if input == nil { 49 input = &DescribeDimensionKeysInput{} 50 } 51 52 output = &DescribeDimensionKeysOutput{} 53 req = c.newRequest(op, input, output) 54 return 55} 56 57// DescribeDimensionKeys API operation for AWS Performance Insights. 58// 59// For a specific time period, retrieve the top N dimension keys for a metric. 60// 61// Each response element returns a maximum of 500 bytes. For larger elements, 62// such as SQL statements, only the first 500 bytes are returned. 63// 64// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 65// with awserr.Error's Code and Message methods to get detailed information about 66// the error. 67// 68// See the AWS API reference guide for AWS Performance Insights's 69// API operation DescribeDimensionKeys for usage and error information. 70// 71// Returned Error Types: 72// * InvalidArgumentException 73// One of the arguments provided is invalid for this request. 74// 75// * InternalServiceError 76// The request failed due to an unknown error. 77// 78// * NotAuthorizedException 79// The user is not authorized to perform this request. 80// 81// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/DescribeDimensionKeys 82func (c *PI) DescribeDimensionKeys(input *DescribeDimensionKeysInput) (*DescribeDimensionKeysOutput, error) { 83 req, out := c.DescribeDimensionKeysRequest(input) 84 return out, req.Send() 85} 86 87// DescribeDimensionKeysWithContext is the same as DescribeDimensionKeys with the addition of 88// the ability to pass a context and additional request options. 89// 90// See DescribeDimensionKeys for details on how to use this API operation. 91// 92// The context must be non-nil and will be used for request cancellation. If 93// the context is nil a panic will occur. In the future the SDK may create 94// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 95// for more information on using Contexts. 96func (c *PI) DescribeDimensionKeysWithContext(ctx aws.Context, input *DescribeDimensionKeysInput, opts ...request.Option) (*DescribeDimensionKeysOutput, error) { 97 req, out := c.DescribeDimensionKeysRequest(input) 98 req.SetContext(ctx) 99 req.ApplyOptions(opts...) 100 return out, req.Send() 101} 102 103const opGetDimensionKeyDetails = "GetDimensionKeyDetails" 104 105// GetDimensionKeyDetailsRequest generates a "aws/request.Request" representing the 106// client's request for the GetDimensionKeyDetails operation. The "output" return 107// value will be populated with the request's response once the request completes 108// successfully. 109// 110// Use "Send" method on the returned Request to send the API call to the service. 111// the "output" return value is not valid until after Send returns without error. 112// 113// See GetDimensionKeyDetails for more information on using the GetDimensionKeyDetails 114// API call, and error handling. 115// 116// This method is useful when you want to inject custom logic or configuration 117// into the SDK's request lifecycle. Such as custom headers, or retry logic. 118// 119// 120// // Example sending a request using the GetDimensionKeyDetailsRequest method. 121// req, resp := client.GetDimensionKeyDetailsRequest(params) 122// 123// err := req.Send() 124// if err == nil { // resp is now filled 125// fmt.Println(resp) 126// } 127// 128// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/GetDimensionKeyDetails 129func (c *PI) GetDimensionKeyDetailsRequest(input *GetDimensionKeyDetailsInput) (req *request.Request, output *GetDimensionKeyDetailsOutput) { 130 op := &request.Operation{ 131 Name: opGetDimensionKeyDetails, 132 HTTPMethod: "POST", 133 HTTPPath: "/", 134 } 135 136 if input == nil { 137 input = &GetDimensionKeyDetailsInput{} 138 } 139 140 output = &GetDimensionKeyDetailsOutput{} 141 req = c.newRequest(op, input, output) 142 return 143} 144 145// GetDimensionKeyDetails API operation for AWS Performance Insights. 146// 147// Get the attributes of the specified dimension group for a DB instance or 148// data source. For example, if you specify a SQL ID, GetDimensionKeyDetails 149// retrieves the full text of the dimension db.sql.statement associated with 150// this ID. This operation is useful because GetResourceMetrics and DescribeDimensionKeys 151// don't support retrieval of large SQL statement text. 152// 153// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 154// with awserr.Error's Code and Message methods to get detailed information about 155// the error. 156// 157// See the AWS API reference guide for AWS Performance Insights's 158// API operation GetDimensionKeyDetails for usage and error information. 159// 160// Returned Error Types: 161// * InvalidArgumentException 162// One of the arguments provided is invalid for this request. 163// 164// * InternalServiceError 165// The request failed due to an unknown error. 166// 167// * NotAuthorizedException 168// The user is not authorized to perform this request. 169// 170// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/GetDimensionKeyDetails 171func (c *PI) GetDimensionKeyDetails(input *GetDimensionKeyDetailsInput) (*GetDimensionKeyDetailsOutput, error) { 172 req, out := c.GetDimensionKeyDetailsRequest(input) 173 return out, req.Send() 174} 175 176// GetDimensionKeyDetailsWithContext is the same as GetDimensionKeyDetails with the addition of 177// the ability to pass a context and additional request options. 178// 179// See GetDimensionKeyDetails for details on how to use this API operation. 180// 181// The context must be non-nil and will be used for request cancellation. If 182// the context is nil a panic will occur. In the future the SDK may create 183// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 184// for more information on using Contexts. 185func (c *PI) GetDimensionKeyDetailsWithContext(ctx aws.Context, input *GetDimensionKeyDetailsInput, opts ...request.Option) (*GetDimensionKeyDetailsOutput, error) { 186 req, out := c.GetDimensionKeyDetailsRequest(input) 187 req.SetContext(ctx) 188 req.ApplyOptions(opts...) 189 return out, req.Send() 190} 191 192const opGetResourceMetrics = "GetResourceMetrics" 193 194// GetResourceMetricsRequest generates a "aws/request.Request" representing the 195// client's request for the GetResourceMetrics operation. The "output" return 196// value will be populated with the request's response once the request completes 197// successfully. 198// 199// Use "Send" method on the returned Request to send the API call to the service. 200// the "output" return value is not valid until after Send returns without error. 201// 202// See GetResourceMetrics for more information on using the GetResourceMetrics 203// API call, and error handling. 204// 205// This method is useful when you want to inject custom logic or configuration 206// into the SDK's request lifecycle. Such as custom headers, or retry logic. 207// 208// 209// // Example sending a request using the GetResourceMetricsRequest method. 210// req, resp := client.GetResourceMetricsRequest(params) 211// 212// err := req.Send() 213// if err == nil { // resp is now filled 214// fmt.Println(resp) 215// } 216// 217// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/GetResourceMetrics 218func (c *PI) GetResourceMetricsRequest(input *GetResourceMetricsInput) (req *request.Request, output *GetResourceMetricsOutput) { 219 op := &request.Operation{ 220 Name: opGetResourceMetrics, 221 HTTPMethod: "POST", 222 HTTPPath: "/", 223 } 224 225 if input == nil { 226 input = &GetResourceMetricsInput{} 227 } 228 229 output = &GetResourceMetricsOutput{} 230 req = c.newRequest(op, input, output) 231 return 232} 233 234// GetResourceMetrics API operation for AWS Performance Insights. 235// 236// Retrieve Performance Insights metrics for a set of data sources, over a time 237// period. You can provide specific dimension groups and dimensions, and provide 238// aggregation and filtering criteria for each group. 239// 240// Each response element returns a maximum of 500 bytes. For larger elements, 241// such as SQL statements, only the first 500 bytes are returned. 242// 243// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 244// with awserr.Error's Code and Message methods to get detailed information about 245// the error. 246// 247// See the AWS API reference guide for AWS Performance Insights's 248// API operation GetResourceMetrics for usage and error information. 249// 250// Returned Error Types: 251// * InvalidArgumentException 252// One of the arguments provided is invalid for this request. 253// 254// * InternalServiceError 255// The request failed due to an unknown error. 256// 257// * NotAuthorizedException 258// The user is not authorized to perform this request. 259// 260// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/GetResourceMetrics 261func (c *PI) GetResourceMetrics(input *GetResourceMetricsInput) (*GetResourceMetricsOutput, error) { 262 req, out := c.GetResourceMetricsRequest(input) 263 return out, req.Send() 264} 265 266// GetResourceMetricsWithContext is the same as GetResourceMetrics with the addition of 267// the ability to pass a context and additional request options. 268// 269// See GetResourceMetrics for details on how to use this API operation. 270// 271// The context must be non-nil and will be used for request cancellation. If 272// the context is nil a panic will occur. In the future the SDK may create 273// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 274// for more information on using Contexts. 275func (c *PI) GetResourceMetricsWithContext(ctx aws.Context, input *GetResourceMetricsInput, opts ...request.Option) (*GetResourceMetricsOutput, error) { 276 req, out := c.GetResourceMetricsRequest(input) 277 req.SetContext(ctx) 278 req.ApplyOptions(opts...) 279 return out, req.Send() 280} 281 282// A timestamp, and a single numerical value, which together represent a measurement 283// at a particular point in time. 284type DataPoint struct { 285 _ struct{} `type:"structure"` 286 287 // The time, in epoch format, associated with a particular Value. 288 // 289 // Timestamp is a required field 290 Timestamp *time.Time `type:"timestamp" required:"true"` 291 292 // The actual value associated with a particular Timestamp. 293 // 294 // Value is a required field 295 Value *float64 `type:"double" required:"true"` 296} 297 298// String returns the string representation. 299// 300// API parameter values that are decorated as "sensitive" in the API will not 301// be included in the string output. The member name will be present, but the 302// value will be replaced with "sensitive". 303func (s DataPoint) String() string { 304 return awsutil.Prettify(s) 305} 306 307// GoString returns the string representation. 308// 309// API parameter values that are decorated as "sensitive" in the API will not 310// be included in the string output. The member name will be present, but the 311// value will be replaced with "sensitive". 312func (s DataPoint) GoString() string { 313 return s.String() 314} 315 316// SetTimestamp sets the Timestamp field's value. 317func (s *DataPoint) SetTimestamp(v time.Time) *DataPoint { 318 s.Timestamp = &v 319 return s 320} 321 322// SetValue sets the Value field's value. 323func (s *DataPoint) SetValue(v float64) *DataPoint { 324 s.Value = &v 325 return s 326} 327 328type DescribeDimensionKeysInput struct { 329 _ struct{} `type:"structure"` 330 331 // The date and time specifying the end of the requested time series data. The 332 // value specified is exclusive, which means that data points less than (but 333 // not equal to) EndTime are returned. 334 // 335 // The value for EndTime must be later than the value for StartTime. 336 // 337 // EndTime is a required field 338 EndTime *time.Time `type:"timestamp" required:"true"` 339 340 // One or more filters to apply in the request. Restrictions: 341 // 342 // * Any number of filters by the same dimension, as specified in the GroupBy 343 // or Partition parameters. 344 // 345 // * A single filter for any other dimension in this dimension group. 346 Filter map[string]*string `type:"map"` 347 348 // A specification for how to aggregate the data points from a query result. 349 // You must specify a valid dimension group. Performance Insights returns all 350 // dimensions within this group, unless you provide the names of specific dimensions 351 // within this group. You can also request that Performance Insights return 352 // a limited number of values for a dimension. 353 // 354 // GroupBy is a required field 355 GroupBy *DimensionGroup `type:"structure" required:"true"` 356 357 // An immutable, AWS Region-unique identifier for a data source. Performance 358 // Insights gathers metrics from this data source. 359 // 360 // To use an Amazon RDS instance as a data source, you specify its DbiResourceId 361 // value. For example, specify db-FAIHNTYBKTGAUSUZQYPDS2GW4A 362 // 363 // Identifier is a required field 364 Identifier *string `type:"string" required:"true"` 365 366 // The maximum number of items to return in the response. If more items exist 367 // than the specified MaxRecords value, a pagination token is included in the 368 // response so that the remaining results can be retrieved. 369 MaxResults *int64 `type:"integer"` 370 371 // The name of a Performance Insights metric to be measured. 372 // 373 // Valid values for Metric are: 374 // 375 // * db.load.avg - a scaled representation of the number of active sessions 376 // for the database engine. 377 // 378 // * db.sampledload.avg - the raw number of active sessions for the database 379 // engine. 380 // 381 // If the number of active sessions is less than an internal Performance Insights 382 // threshold, db.load.avg and db.sampledload.avg are the same value. If the 383 // number of active sessions is greater than the internal threshold, Performance 384 // Insights samples the active sessions, with db.load.avg showing the scaled 385 // values, db.sampledload.avg showing the raw values, and db.sampledload.avg 386 // less than db.load.avg. For most use cases, you can query db.load.avg only. 387 // 388 // Metric is a required field 389 Metric *string `type:"string" required:"true"` 390 391 // An optional pagination token provided by a previous request. If this parameter 392 // is specified, the response includes only records beyond the token, up to 393 // the value specified by MaxRecords. 394 NextToken *string `min:"1" type:"string"` 395 396 // For each dimension specified in GroupBy, specify a secondary dimension to 397 // further subdivide the partition keys in the response. 398 PartitionBy *DimensionGroup `type:"structure"` 399 400 // The granularity, in seconds, of the data points returned from Performance 401 // Insights. A period can be as short as one second, or as long as one day (86400 402 // seconds). Valid values are: 403 // 404 // * 1 (one second) 405 // 406 // * 60 (one minute) 407 // 408 // * 300 (five minutes) 409 // 410 // * 3600 (one hour) 411 // 412 // * 86400 (twenty-four hours) 413 // 414 // If you don't specify PeriodInSeconds, then Performance Insights chooses a 415 // value for you, with a goal of returning roughly 100-200 data points in the 416 // response. 417 PeriodInSeconds *int64 `type:"integer"` 418 419 // The AWS service for which Performance Insights will return metrics. The only 420 // valid value for ServiceType is RDS. 421 // 422 // ServiceType is a required field 423 ServiceType *string `type:"string" required:"true" enum:"ServiceType"` 424 425 // The date and time specifying the beginning of the requested time series data. 426 // You must specify a StartTime within the past 7 days. The value specified 427 // is inclusive, which means that data points equal to or greater than StartTime 428 // are returned. 429 // 430 // The value for StartTime must be earlier than the value for EndTime. 431 // 432 // StartTime is a required field 433 StartTime *time.Time `type:"timestamp" required:"true"` 434} 435 436// String returns the string representation. 437// 438// API parameter values that are decorated as "sensitive" in the API will not 439// be included in the string output. The member name will be present, but the 440// value will be replaced with "sensitive". 441func (s DescribeDimensionKeysInput) String() string { 442 return awsutil.Prettify(s) 443} 444 445// GoString returns the string representation. 446// 447// API parameter values that are decorated as "sensitive" in the API will not 448// be included in the string output. The member name will be present, but the 449// value will be replaced with "sensitive". 450func (s DescribeDimensionKeysInput) GoString() string { 451 return s.String() 452} 453 454// Validate inspects the fields of the type to determine if they are valid. 455func (s *DescribeDimensionKeysInput) Validate() error { 456 invalidParams := request.ErrInvalidParams{Context: "DescribeDimensionKeysInput"} 457 if s.EndTime == nil { 458 invalidParams.Add(request.NewErrParamRequired("EndTime")) 459 } 460 if s.GroupBy == nil { 461 invalidParams.Add(request.NewErrParamRequired("GroupBy")) 462 } 463 if s.Identifier == nil { 464 invalidParams.Add(request.NewErrParamRequired("Identifier")) 465 } 466 if s.Metric == nil { 467 invalidParams.Add(request.NewErrParamRequired("Metric")) 468 } 469 if s.NextToken != nil && len(*s.NextToken) < 1 { 470 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 471 } 472 if s.ServiceType == nil { 473 invalidParams.Add(request.NewErrParamRequired("ServiceType")) 474 } 475 if s.StartTime == nil { 476 invalidParams.Add(request.NewErrParamRequired("StartTime")) 477 } 478 if s.GroupBy != nil { 479 if err := s.GroupBy.Validate(); err != nil { 480 invalidParams.AddNested("GroupBy", err.(request.ErrInvalidParams)) 481 } 482 } 483 if s.PartitionBy != nil { 484 if err := s.PartitionBy.Validate(); err != nil { 485 invalidParams.AddNested("PartitionBy", err.(request.ErrInvalidParams)) 486 } 487 } 488 489 if invalidParams.Len() > 0 { 490 return invalidParams 491 } 492 return nil 493} 494 495// SetEndTime sets the EndTime field's value. 496func (s *DescribeDimensionKeysInput) SetEndTime(v time.Time) *DescribeDimensionKeysInput { 497 s.EndTime = &v 498 return s 499} 500 501// SetFilter sets the Filter field's value. 502func (s *DescribeDimensionKeysInput) SetFilter(v map[string]*string) *DescribeDimensionKeysInput { 503 s.Filter = v 504 return s 505} 506 507// SetGroupBy sets the GroupBy field's value. 508func (s *DescribeDimensionKeysInput) SetGroupBy(v *DimensionGroup) *DescribeDimensionKeysInput { 509 s.GroupBy = v 510 return s 511} 512 513// SetIdentifier sets the Identifier field's value. 514func (s *DescribeDimensionKeysInput) SetIdentifier(v string) *DescribeDimensionKeysInput { 515 s.Identifier = &v 516 return s 517} 518 519// SetMaxResults sets the MaxResults field's value. 520func (s *DescribeDimensionKeysInput) SetMaxResults(v int64) *DescribeDimensionKeysInput { 521 s.MaxResults = &v 522 return s 523} 524 525// SetMetric sets the Metric field's value. 526func (s *DescribeDimensionKeysInput) SetMetric(v string) *DescribeDimensionKeysInput { 527 s.Metric = &v 528 return s 529} 530 531// SetNextToken sets the NextToken field's value. 532func (s *DescribeDimensionKeysInput) SetNextToken(v string) *DescribeDimensionKeysInput { 533 s.NextToken = &v 534 return s 535} 536 537// SetPartitionBy sets the PartitionBy field's value. 538func (s *DescribeDimensionKeysInput) SetPartitionBy(v *DimensionGroup) *DescribeDimensionKeysInput { 539 s.PartitionBy = v 540 return s 541} 542 543// SetPeriodInSeconds sets the PeriodInSeconds field's value. 544func (s *DescribeDimensionKeysInput) SetPeriodInSeconds(v int64) *DescribeDimensionKeysInput { 545 s.PeriodInSeconds = &v 546 return s 547} 548 549// SetServiceType sets the ServiceType field's value. 550func (s *DescribeDimensionKeysInput) SetServiceType(v string) *DescribeDimensionKeysInput { 551 s.ServiceType = &v 552 return s 553} 554 555// SetStartTime sets the StartTime field's value. 556func (s *DescribeDimensionKeysInput) SetStartTime(v time.Time) *DescribeDimensionKeysInput { 557 s.StartTime = &v 558 return s 559} 560 561type DescribeDimensionKeysOutput struct { 562 _ struct{} `type:"structure"` 563 564 // The end time for the returned dimension keys, after alignment to a granular 565 // boundary (as specified by PeriodInSeconds). AlignedEndTime will be greater 566 // than or equal to the value of the user-specified Endtime. 567 AlignedEndTime *time.Time `type:"timestamp"` 568 569 // The start time for the returned dimension keys, after alignment to a granular 570 // boundary (as specified by PeriodInSeconds). AlignedStartTime will be less 571 // than or equal to the value of the user-specified StartTime. 572 AlignedStartTime *time.Time `type:"timestamp"` 573 574 // The dimension keys that were requested. 575 Keys []*DimensionKeyDescription `type:"list"` 576 577 // An optional pagination token provided by a previous request. If this parameter 578 // is specified, the response includes only records beyond the token, up to 579 // the value specified by MaxRecords. 580 NextToken *string `min:"1" type:"string"` 581 582 // If PartitionBy was present in the request, PartitionKeys contains the breakdown 583 // of dimension keys by the specified partitions. 584 PartitionKeys []*ResponsePartitionKey `type:"list"` 585} 586 587// String returns the string representation. 588// 589// API parameter values that are decorated as "sensitive" in the API will not 590// be included in the string output. The member name will be present, but the 591// value will be replaced with "sensitive". 592func (s DescribeDimensionKeysOutput) String() string { 593 return awsutil.Prettify(s) 594} 595 596// GoString returns the string representation. 597// 598// API parameter values that are decorated as "sensitive" in the API will not 599// be included in the string output. The member name will be present, but the 600// value will be replaced with "sensitive". 601func (s DescribeDimensionKeysOutput) GoString() string { 602 return s.String() 603} 604 605// SetAlignedEndTime sets the AlignedEndTime field's value. 606func (s *DescribeDimensionKeysOutput) SetAlignedEndTime(v time.Time) *DescribeDimensionKeysOutput { 607 s.AlignedEndTime = &v 608 return s 609} 610 611// SetAlignedStartTime sets the AlignedStartTime field's value. 612func (s *DescribeDimensionKeysOutput) SetAlignedStartTime(v time.Time) *DescribeDimensionKeysOutput { 613 s.AlignedStartTime = &v 614 return s 615} 616 617// SetKeys sets the Keys field's value. 618func (s *DescribeDimensionKeysOutput) SetKeys(v []*DimensionKeyDescription) *DescribeDimensionKeysOutput { 619 s.Keys = v 620 return s 621} 622 623// SetNextToken sets the NextToken field's value. 624func (s *DescribeDimensionKeysOutput) SetNextToken(v string) *DescribeDimensionKeysOutput { 625 s.NextToken = &v 626 return s 627} 628 629// SetPartitionKeys sets the PartitionKeys field's value. 630func (s *DescribeDimensionKeysOutput) SetPartitionKeys(v []*ResponsePartitionKey) *DescribeDimensionKeysOutput { 631 s.PartitionKeys = v 632 return s 633} 634 635// A logical grouping of Performance Insights metrics for a related subject 636// area. For example, the db.sql dimension group consists of the following dimensions: 637// db.sql.id, db.sql.db_id, db.sql.statement, and db.sql.tokenized_id. 638// 639// Each response element returns a maximum of 500 bytes. For larger elements, 640// such as SQL statements, only the first 500 bytes are returned. 641type DimensionGroup struct { 642 _ struct{} `type:"structure"` 643 644 // A list of specific dimensions from a dimension group. If this parameter is 645 // not present, then it signifies that all of the dimensions in the group were 646 // requested, or are present in the response. 647 // 648 // Valid values for elements in the Dimensions array are: 649 // 650 // * db.application.name - The name of the application that is connected 651 // to the database (only Aurora PostgreSQL and RDS PostgreSQL) 652 // 653 // * db.host.id - The host ID of the connected client (all engines) 654 // 655 // * db.host.name - The host name of the connected client (all engines) 656 // 657 // * db.name - The name of the database to which the client is connected 658 // (only Aurora PostgreSQL, RDS PostgreSQL, Aurora MySQL, RDS MySQL, and 659 // MariaDB) 660 // 661 // * db.session_type.name - The type of the current session (only Aurora 662 // PostgreSQL and RDS PostgreSQL) 663 // 664 // * db.sql.id - The SQL ID generated by Performance Insights (all engines) 665 // 666 // * db.sql.db_id - The SQL ID generated by the database (all engines) 667 // 668 // * db.sql.statement - The SQL text that is being executed (all engines) 669 // 670 // * db.sql.tokenized_id 671 // 672 // * db.sql_tokenized.id - The SQL digest ID generated by Performance Insights 673 // (all engines) 674 // 675 // * db.sql_tokenized.db_id - SQL digest ID generated by the database (all 676 // engines) 677 // 678 // * db.sql_tokenized.statement - The SQL digest text (all engines) 679 // 680 // * db.user.id - The ID of the user logged in to the database (all engines) 681 // 682 // * db.user.name - The name of the user logged in to the database (all engines) 683 // 684 // * db.wait_event.name - The event for which the backend is waiting (all 685 // engines) 686 // 687 // * db.wait_event.type - The type of event for which the backend is waiting 688 // (all engines) 689 // 690 // * db.wait_event_type.name - The name of the event type for which the backend 691 // is waiting (all engines) 692 Dimensions []*string `min:"1" type:"list"` 693 694 // The name of the dimension group. Valid values are: 695 // 696 // * db - The name of the database to which the client is connected (only 697 // Aurora PostgreSQL, RDS PostgreSQL, Aurora MySQL, RDS MySQL, and MariaDB) 698 // 699 // * db.application - The name of the application that is connected to the 700 // database (only Aurora PostgreSQL and RDS PostgreSQL) 701 // 702 // * db.host - The host name of the connected client (all engines) 703 // 704 // * db.session_type - The type of the current session (only Aurora PostgreSQL 705 // and RDS PostgreSQL) 706 // 707 // * db.sql - The SQL that is currently executing (all engines) 708 // 709 // * db.sql_tokenized - The SQL digest (all engines) 710 // 711 // * db.wait_event - The event for which the database backend is waiting 712 // (all engines) 713 // 714 // * db.wait_event_type - The type of event for which the database backend 715 // is waiting (all engines) 716 // 717 // * db.user - The user logged in to the database (all engines) 718 // 719 // Group is a required field 720 Group *string `type:"string" required:"true"` 721 722 // The maximum number of items to fetch for this dimension group. 723 Limit *int64 `min:"1" type:"integer"` 724} 725 726// String returns the string representation. 727// 728// API parameter values that are decorated as "sensitive" in the API will not 729// be included in the string output. The member name will be present, but the 730// value will be replaced with "sensitive". 731func (s DimensionGroup) String() string { 732 return awsutil.Prettify(s) 733} 734 735// GoString returns the string representation. 736// 737// API parameter values that are decorated as "sensitive" in the API will not 738// be included in the string output. The member name will be present, but the 739// value will be replaced with "sensitive". 740func (s DimensionGroup) GoString() string { 741 return s.String() 742} 743 744// Validate inspects the fields of the type to determine if they are valid. 745func (s *DimensionGroup) Validate() error { 746 invalidParams := request.ErrInvalidParams{Context: "DimensionGroup"} 747 if s.Dimensions != nil && len(s.Dimensions) < 1 { 748 invalidParams.Add(request.NewErrParamMinLen("Dimensions", 1)) 749 } 750 if s.Group == nil { 751 invalidParams.Add(request.NewErrParamRequired("Group")) 752 } 753 if s.Limit != nil && *s.Limit < 1 { 754 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 755 } 756 757 if invalidParams.Len() > 0 { 758 return invalidParams 759 } 760 return nil 761} 762 763// SetDimensions sets the Dimensions field's value. 764func (s *DimensionGroup) SetDimensions(v []*string) *DimensionGroup { 765 s.Dimensions = v 766 return s 767} 768 769// SetGroup sets the Group field's value. 770func (s *DimensionGroup) SetGroup(v string) *DimensionGroup { 771 s.Group = &v 772 return s 773} 774 775// SetLimit sets the Limit field's value. 776func (s *DimensionGroup) SetLimit(v int64) *DimensionGroup { 777 s.Limit = &v 778 return s 779} 780 781// An array of descriptions and aggregated values for each dimension within 782// a dimension group. 783type DimensionKeyDescription struct { 784 _ struct{} `type:"structure"` 785 786 // A map of name-value pairs for the dimensions in the group. 787 Dimensions map[string]*string `type:"map"` 788 789 // If PartitionBy was specified, PartitionKeys contains the dimensions that 790 // were. 791 Partitions []*float64 `type:"list"` 792 793 // The aggregated metric value for the dimension(s), over the requested time 794 // range. 795 Total *float64 `type:"double"` 796} 797 798// String returns the string representation. 799// 800// API parameter values that are decorated as "sensitive" in the API will not 801// be included in the string output. The member name will be present, but the 802// value will be replaced with "sensitive". 803func (s DimensionKeyDescription) String() string { 804 return awsutil.Prettify(s) 805} 806 807// GoString returns the string representation. 808// 809// API parameter values that are decorated as "sensitive" in the API will not 810// be included in the string output. The member name will be present, but the 811// value will be replaced with "sensitive". 812func (s DimensionKeyDescription) GoString() string { 813 return s.String() 814} 815 816// SetDimensions sets the Dimensions field's value. 817func (s *DimensionKeyDescription) SetDimensions(v map[string]*string) *DimensionKeyDescription { 818 s.Dimensions = v 819 return s 820} 821 822// SetPartitions sets the Partitions field's value. 823func (s *DimensionKeyDescription) SetPartitions(v []*float64) *DimensionKeyDescription { 824 s.Partitions = v 825 return s 826} 827 828// SetTotal sets the Total field's value. 829func (s *DimensionKeyDescription) SetTotal(v float64) *DimensionKeyDescription { 830 s.Total = &v 831 return s 832} 833 834// An object that describes the details for a specified dimension. 835type DimensionKeyDetail struct { 836 _ struct{} `type:"structure"` 837 838 // The full name of the dimension. The full name includes the group name and 839 // key name. The only valid value is db.sql.statement. 840 Dimension *string `type:"string"` 841 842 // The status of the dimension detail data. Possible values include the following: 843 // 844 // * AVAILABLE - The dimension detail data is ready to be retrieved. 845 // 846 // * PROCESSING - The dimension detail data isn't ready to be retrieved because 847 // more processing time is required. If the requested detail data for db.sql.statement 848 // has the status PROCESSING, Performance Insights returns the truncated 849 // query. 850 // 851 // * UNAVAILABLE - The dimension detail data could not be collected successfully. 852 Status *string `type:"string" enum:"DetailStatus"` 853 854 // The value of the dimension detail data. For the db.sql.statement dimension, 855 // this value is either the full or truncated SQL query, depending on the return 856 // status. 857 Value *string `type:"string"` 858} 859 860// String returns the string representation. 861// 862// API parameter values that are decorated as "sensitive" in the API will not 863// be included in the string output. The member name will be present, but the 864// value will be replaced with "sensitive". 865func (s DimensionKeyDetail) String() string { 866 return awsutil.Prettify(s) 867} 868 869// GoString returns the string representation. 870// 871// API parameter values that are decorated as "sensitive" in the API will not 872// be included in the string output. The member name will be present, but the 873// value will be replaced with "sensitive". 874func (s DimensionKeyDetail) GoString() string { 875 return s.String() 876} 877 878// SetDimension sets the Dimension field's value. 879func (s *DimensionKeyDetail) SetDimension(v string) *DimensionKeyDetail { 880 s.Dimension = &v 881 return s 882} 883 884// SetStatus sets the Status field's value. 885func (s *DimensionKeyDetail) SetStatus(v string) *DimensionKeyDetail { 886 s.Status = &v 887 return s 888} 889 890// SetValue sets the Value field's value. 891func (s *DimensionKeyDetail) SetValue(v string) *DimensionKeyDetail { 892 s.Value = &v 893 return s 894} 895 896type GetDimensionKeyDetailsInput struct { 897 _ struct{} `type:"structure"` 898 899 // The name of the dimension group. The only valid value is db.sql. Performance 900 // Insights searches the specified group for the dimension group ID. 901 // 902 // Group is a required field 903 Group *string `type:"string" required:"true"` 904 905 // The ID of the dimension group from which to retrieve dimension details. For 906 // dimension group db.sql, the group ID is db.sql.id. 907 // 908 // GroupIdentifier is a required field 909 GroupIdentifier *string `type:"string" required:"true"` 910 911 // The ID for a data source from which to gather dimension data. This ID must 912 // be immutable and unique within an AWS Region. When a DB instance is the data 913 // source, specify its DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X. 914 // 915 // Identifier is a required field 916 Identifier *string `type:"string" required:"true"` 917 918 // A list of dimensions to retrieve the detail data for within the given dimension 919 // group. For the dimension group db.sql, specify either the full dimension 920 // name db.sql.statement or the short dimension name statement. If you don't 921 // specify this parameter, Performance Insights returns all dimension data within 922 // the specified dimension group. 923 RequestedDimensions []*string `min:"1" type:"list"` 924 925 // The AWS service for which Performance Insights returns data. The only valid 926 // value is RDS. 927 // 928 // ServiceType is a required field 929 ServiceType *string `type:"string" required:"true" enum:"ServiceType"` 930} 931 932// String returns the string representation. 933// 934// API parameter values that are decorated as "sensitive" in the API will not 935// be included in the string output. The member name will be present, but the 936// value will be replaced with "sensitive". 937func (s GetDimensionKeyDetailsInput) String() string { 938 return awsutil.Prettify(s) 939} 940 941// GoString returns the string representation. 942// 943// API parameter values that are decorated as "sensitive" in the API will not 944// be included in the string output. The member name will be present, but the 945// value will be replaced with "sensitive". 946func (s GetDimensionKeyDetailsInput) GoString() string { 947 return s.String() 948} 949 950// Validate inspects the fields of the type to determine if they are valid. 951func (s *GetDimensionKeyDetailsInput) Validate() error { 952 invalidParams := request.ErrInvalidParams{Context: "GetDimensionKeyDetailsInput"} 953 if s.Group == nil { 954 invalidParams.Add(request.NewErrParamRequired("Group")) 955 } 956 if s.GroupIdentifier == nil { 957 invalidParams.Add(request.NewErrParamRequired("GroupIdentifier")) 958 } 959 if s.Identifier == nil { 960 invalidParams.Add(request.NewErrParamRequired("Identifier")) 961 } 962 if s.RequestedDimensions != nil && len(s.RequestedDimensions) < 1 { 963 invalidParams.Add(request.NewErrParamMinLen("RequestedDimensions", 1)) 964 } 965 if s.ServiceType == nil { 966 invalidParams.Add(request.NewErrParamRequired("ServiceType")) 967 } 968 969 if invalidParams.Len() > 0 { 970 return invalidParams 971 } 972 return nil 973} 974 975// SetGroup sets the Group field's value. 976func (s *GetDimensionKeyDetailsInput) SetGroup(v string) *GetDimensionKeyDetailsInput { 977 s.Group = &v 978 return s 979} 980 981// SetGroupIdentifier sets the GroupIdentifier field's value. 982func (s *GetDimensionKeyDetailsInput) SetGroupIdentifier(v string) *GetDimensionKeyDetailsInput { 983 s.GroupIdentifier = &v 984 return s 985} 986 987// SetIdentifier sets the Identifier field's value. 988func (s *GetDimensionKeyDetailsInput) SetIdentifier(v string) *GetDimensionKeyDetailsInput { 989 s.Identifier = &v 990 return s 991} 992 993// SetRequestedDimensions sets the RequestedDimensions field's value. 994func (s *GetDimensionKeyDetailsInput) SetRequestedDimensions(v []*string) *GetDimensionKeyDetailsInput { 995 s.RequestedDimensions = v 996 return s 997} 998 999// SetServiceType sets the ServiceType field's value. 1000func (s *GetDimensionKeyDetailsInput) SetServiceType(v string) *GetDimensionKeyDetailsInput { 1001 s.ServiceType = &v 1002 return s 1003} 1004 1005type GetDimensionKeyDetailsOutput struct { 1006 _ struct{} `type:"structure"` 1007 1008 // The details for the requested dimensions. 1009 Dimensions []*DimensionKeyDetail `type:"list"` 1010} 1011 1012// String returns the string representation. 1013// 1014// API parameter values that are decorated as "sensitive" in the API will not 1015// be included in the string output. The member name will be present, but the 1016// value will be replaced with "sensitive". 1017func (s GetDimensionKeyDetailsOutput) String() string { 1018 return awsutil.Prettify(s) 1019} 1020 1021// GoString returns the string representation. 1022// 1023// API parameter values that are decorated as "sensitive" in the API will not 1024// be included in the string output. The member name will be present, but the 1025// value will be replaced with "sensitive". 1026func (s GetDimensionKeyDetailsOutput) GoString() string { 1027 return s.String() 1028} 1029 1030// SetDimensions sets the Dimensions field's value. 1031func (s *GetDimensionKeyDetailsOutput) SetDimensions(v []*DimensionKeyDetail) *GetDimensionKeyDetailsOutput { 1032 s.Dimensions = v 1033 return s 1034} 1035 1036type GetResourceMetricsInput struct { 1037 _ struct{} `type:"structure"` 1038 1039 // The date and time specifying the end of the requested time series data. The 1040 // value specified is exclusive - data points less than (but not equal to) EndTime 1041 // will be returned. 1042 // 1043 // The value for EndTime must be later than the value for StartTime. 1044 // 1045 // EndTime is a required field 1046 EndTime *time.Time `type:"timestamp" required:"true"` 1047 1048 // An immutable, AWS Region-unique identifier for a data source. Performance 1049 // Insights gathers metrics from this data source. 1050 // 1051 // To use a DB instance as a data source, specify its DbiResourceId value. For 1052 // example, specify db-FAIHNTYBKTGAUSUZQYPDS2GW4A. 1053 // 1054 // Identifier is a required field 1055 Identifier *string `type:"string" required:"true"` 1056 1057 // The maximum number of items to return in the response. If more items exist 1058 // than the specified MaxRecords value, a pagination token is included in the 1059 // response so that the remaining results can be retrieved. 1060 MaxResults *int64 `type:"integer"` 1061 1062 // An array of one or more queries to perform. Each query must specify a Performance 1063 // Insights metric, and can optionally specify aggregation and filtering criteria. 1064 // 1065 // MetricQueries is a required field 1066 MetricQueries []*MetricQuery `min:"1" type:"list" required:"true"` 1067 1068 // An optional pagination token provided by a previous request. If this parameter 1069 // is specified, the response includes only records beyond the token, up to 1070 // the value specified by MaxRecords. 1071 NextToken *string `min:"1" type:"string"` 1072 1073 // The granularity, in seconds, of the data points returned from Performance 1074 // Insights. A period can be as short as one second, or as long as one day (86400 1075 // seconds). Valid values are: 1076 // 1077 // * 1 (one second) 1078 // 1079 // * 60 (one minute) 1080 // 1081 // * 300 (five minutes) 1082 // 1083 // * 3600 (one hour) 1084 // 1085 // * 86400 (twenty-four hours) 1086 // 1087 // If you don't specify PeriodInSeconds, then Performance Insights will choose 1088 // a value for you, with a goal of returning roughly 100-200 data points in 1089 // the response. 1090 PeriodInSeconds *int64 `type:"integer"` 1091 1092 // The AWS service for which Performance Insights returns metrics. The only 1093 // valid value for ServiceType is RDS. 1094 // 1095 // ServiceType is a required field 1096 ServiceType *string `type:"string" required:"true" enum:"ServiceType"` 1097 1098 // The date and time specifying the beginning of the requested time series data. 1099 // You can't specify a StartTime that's earlier than 7 days ago. The value specified 1100 // is inclusive - data points equal to or greater than StartTime will be returned. 1101 // 1102 // The value for StartTime must be earlier than the value for EndTime. 1103 // 1104 // StartTime is a required field 1105 StartTime *time.Time `type:"timestamp" required:"true"` 1106} 1107 1108// String returns the string representation. 1109// 1110// API parameter values that are decorated as "sensitive" in the API will not 1111// be included in the string output. The member name will be present, but the 1112// value will be replaced with "sensitive". 1113func (s GetResourceMetricsInput) String() string { 1114 return awsutil.Prettify(s) 1115} 1116 1117// GoString returns the string representation. 1118// 1119// API parameter values that are decorated as "sensitive" in the API will not 1120// be included in the string output. The member name will be present, but the 1121// value will be replaced with "sensitive". 1122func (s GetResourceMetricsInput) GoString() string { 1123 return s.String() 1124} 1125 1126// Validate inspects the fields of the type to determine if they are valid. 1127func (s *GetResourceMetricsInput) Validate() error { 1128 invalidParams := request.ErrInvalidParams{Context: "GetResourceMetricsInput"} 1129 if s.EndTime == nil { 1130 invalidParams.Add(request.NewErrParamRequired("EndTime")) 1131 } 1132 if s.Identifier == nil { 1133 invalidParams.Add(request.NewErrParamRequired("Identifier")) 1134 } 1135 if s.MetricQueries == nil { 1136 invalidParams.Add(request.NewErrParamRequired("MetricQueries")) 1137 } 1138 if s.MetricQueries != nil && len(s.MetricQueries) < 1 { 1139 invalidParams.Add(request.NewErrParamMinLen("MetricQueries", 1)) 1140 } 1141 if s.NextToken != nil && len(*s.NextToken) < 1 { 1142 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 1143 } 1144 if s.ServiceType == nil { 1145 invalidParams.Add(request.NewErrParamRequired("ServiceType")) 1146 } 1147 if s.StartTime == nil { 1148 invalidParams.Add(request.NewErrParamRequired("StartTime")) 1149 } 1150 if s.MetricQueries != nil { 1151 for i, v := range s.MetricQueries { 1152 if v == nil { 1153 continue 1154 } 1155 if err := v.Validate(); err != nil { 1156 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricQueries", i), err.(request.ErrInvalidParams)) 1157 } 1158 } 1159 } 1160 1161 if invalidParams.Len() > 0 { 1162 return invalidParams 1163 } 1164 return nil 1165} 1166 1167// SetEndTime sets the EndTime field's value. 1168func (s *GetResourceMetricsInput) SetEndTime(v time.Time) *GetResourceMetricsInput { 1169 s.EndTime = &v 1170 return s 1171} 1172 1173// SetIdentifier sets the Identifier field's value. 1174func (s *GetResourceMetricsInput) SetIdentifier(v string) *GetResourceMetricsInput { 1175 s.Identifier = &v 1176 return s 1177} 1178 1179// SetMaxResults sets the MaxResults field's value. 1180func (s *GetResourceMetricsInput) SetMaxResults(v int64) *GetResourceMetricsInput { 1181 s.MaxResults = &v 1182 return s 1183} 1184 1185// SetMetricQueries sets the MetricQueries field's value. 1186func (s *GetResourceMetricsInput) SetMetricQueries(v []*MetricQuery) *GetResourceMetricsInput { 1187 s.MetricQueries = v 1188 return s 1189} 1190 1191// SetNextToken sets the NextToken field's value. 1192func (s *GetResourceMetricsInput) SetNextToken(v string) *GetResourceMetricsInput { 1193 s.NextToken = &v 1194 return s 1195} 1196 1197// SetPeriodInSeconds sets the PeriodInSeconds field's value. 1198func (s *GetResourceMetricsInput) SetPeriodInSeconds(v int64) *GetResourceMetricsInput { 1199 s.PeriodInSeconds = &v 1200 return s 1201} 1202 1203// SetServiceType sets the ServiceType field's value. 1204func (s *GetResourceMetricsInput) SetServiceType(v string) *GetResourceMetricsInput { 1205 s.ServiceType = &v 1206 return s 1207} 1208 1209// SetStartTime sets the StartTime field's value. 1210func (s *GetResourceMetricsInput) SetStartTime(v time.Time) *GetResourceMetricsInput { 1211 s.StartTime = &v 1212 return s 1213} 1214 1215type GetResourceMetricsOutput struct { 1216 _ struct{} `type:"structure"` 1217 1218 // The end time for the returned metrics, after alignment to a granular boundary 1219 // (as specified by PeriodInSeconds). AlignedEndTime will be greater than or 1220 // equal to the value of the user-specified Endtime. 1221 AlignedEndTime *time.Time `type:"timestamp"` 1222 1223 // The start time for the returned metrics, after alignment to a granular boundary 1224 // (as specified by PeriodInSeconds). AlignedStartTime will be less than or 1225 // equal to the value of the user-specified StartTime. 1226 AlignedStartTime *time.Time `type:"timestamp"` 1227 1228 // An immutable, AWS Region-unique identifier for a data source. Performance 1229 // Insights gathers metrics from this data source. 1230 // 1231 // To use a DB instance as a data source, you specify its DbiResourceId value 1232 // - for example: db-FAIHNTYBKTGAUSUZQYPDS2GW4A 1233 Identifier *string `type:"string"` 1234 1235 // An array of metric results,, where each array element contains all of the 1236 // data points for a particular dimension. 1237 MetricList []*MetricKeyDataPoints `type:"list"` 1238 1239 // An optional pagination token provided by a previous request. If this parameter 1240 // is specified, the response includes only records beyond the token, up to 1241 // the value specified by MaxRecords. 1242 NextToken *string `min:"1" type:"string"` 1243} 1244 1245// String returns the string representation. 1246// 1247// API parameter values that are decorated as "sensitive" in the API will not 1248// be included in the string output. The member name will be present, but the 1249// value will be replaced with "sensitive". 1250func (s GetResourceMetricsOutput) String() string { 1251 return awsutil.Prettify(s) 1252} 1253 1254// GoString returns the string representation. 1255// 1256// API parameter values that are decorated as "sensitive" in the API will not 1257// be included in the string output. The member name will be present, but the 1258// value will be replaced with "sensitive". 1259func (s GetResourceMetricsOutput) GoString() string { 1260 return s.String() 1261} 1262 1263// SetAlignedEndTime sets the AlignedEndTime field's value. 1264func (s *GetResourceMetricsOutput) SetAlignedEndTime(v time.Time) *GetResourceMetricsOutput { 1265 s.AlignedEndTime = &v 1266 return s 1267} 1268 1269// SetAlignedStartTime sets the AlignedStartTime field's value. 1270func (s *GetResourceMetricsOutput) SetAlignedStartTime(v time.Time) *GetResourceMetricsOutput { 1271 s.AlignedStartTime = &v 1272 return s 1273} 1274 1275// SetIdentifier sets the Identifier field's value. 1276func (s *GetResourceMetricsOutput) SetIdentifier(v string) *GetResourceMetricsOutput { 1277 s.Identifier = &v 1278 return s 1279} 1280 1281// SetMetricList sets the MetricList field's value. 1282func (s *GetResourceMetricsOutput) SetMetricList(v []*MetricKeyDataPoints) *GetResourceMetricsOutput { 1283 s.MetricList = v 1284 return s 1285} 1286 1287// SetNextToken sets the NextToken field's value. 1288func (s *GetResourceMetricsOutput) SetNextToken(v string) *GetResourceMetricsOutput { 1289 s.NextToken = &v 1290 return s 1291} 1292 1293// The request failed due to an unknown error. 1294type InternalServiceError struct { 1295 _ struct{} `type:"structure"` 1296 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1297 1298 Message_ *string `locationName:"Message" type:"string"` 1299} 1300 1301// String returns the string representation. 1302// 1303// API parameter values that are decorated as "sensitive" in the API will not 1304// be included in the string output. The member name will be present, but the 1305// value will be replaced with "sensitive". 1306func (s InternalServiceError) String() string { 1307 return awsutil.Prettify(s) 1308} 1309 1310// GoString returns the string representation. 1311// 1312// API parameter values that are decorated as "sensitive" in the API will not 1313// be included in the string output. The member name will be present, but the 1314// value will be replaced with "sensitive". 1315func (s InternalServiceError) GoString() string { 1316 return s.String() 1317} 1318 1319func newErrorInternalServiceError(v protocol.ResponseMetadata) error { 1320 return &InternalServiceError{ 1321 RespMetadata: v, 1322 } 1323} 1324 1325// Code returns the exception type name. 1326func (s *InternalServiceError) Code() string { 1327 return "InternalServiceError" 1328} 1329 1330// Message returns the exception's message. 1331func (s *InternalServiceError) Message() string { 1332 if s.Message_ != nil { 1333 return *s.Message_ 1334 } 1335 return "" 1336} 1337 1338// OrigErr always returns nil, satisfies awserr.Error interface. 1339func (s *InternalServiceError) OrigErr() error { 1340 return nil 1341} 1342 1343func (s *InternalServiceError) Error() string { 1344 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1345} 1346 1347// Status code returns the HTTP status code for the request's response error. 1348func (s *InternalServiceError) StatusCode() int { 1349 return s.RespMetadata.StatusCode 1350} 1351 1352// RequestID returns the service's response RequestID for request. 1353func (s *InternalServiceError) RequestID() string { 1354 return s.RespMetadata.RequestID 1355} 1356 1357// One of the arguments provided is invalid for this request. 1358type InvalidArgumentException struct { 1359 _ struct{} `type:"structure"` 1360 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1361 1362 Message_ *string `locationName:"Message" type:"string"` 1363} 1364 1365// String returns the string representation. 1366// 1367// API parameter values that are decorated as "sensitive" in the API will not 1368// be included in the string output. The member name will be present, but the 1369// value will be replaced with "sensitive". 1370func (s InvalidArgumentException) String() string { 1371 return awsutil.Prettify(s) 1372} 1373 1374// GoString returns the string representation. 1375// 1376// API parameter values that are decorated as "sensitive" in the API will not 1377// be included in the string output. The member name will be present, but the 1378// value will be replaced with "sensitive". 1379func (s InvalidArgumentException) GoString() string { 1380 return s.String() 1381} 1382 1383func newErrorInvalidArgumentException(v protocol.ResponseMetadata) error { 1384 return &InvalidArgumentException{ 1385 RespMetadata: v, 1386 } 1387} 1388 1389// Code returns the exception type name. 1390func (s *InvalidArgumentException) Code() string { 1391 return "InvalidArgumentException" 1392} 1393 1394// Message returns the exception's message. 1395func (s *InvalidArgumentException) Message() string { 1396 if s.Message_ != nil { 1397 return *s.Message_ 1398 } 1399 return "" 1400} 1401 1402// OrigErr always returns nil, satisfies awserr.Error interface. 1403func (s *InvalidArgumentException) OrigErr() error { 1404 return nil 1405} 1406 1407func (s *InvalidArgumentException) Error() string { 1408 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1409} 1410 1411// Status code returns the HTTP status code for the request's response error. 1412func (s *InvalidArgumentException) StatusCode() int { 1413 return s.RespMetadata.StatusCode 1414} 1415 1416// RequestID returns the service's response RequestID for request. 1417func (s *InvalidArgumentException) RequestID() string { 1418 return s.RespMetadata.RequestID 1419} 1420 1421// A time-ordered series of data points, corresponding to a dimension of a Performance 1422// Insights metric. 1423type MetricKeyDataPoints struct { 1424 _ struct{} `type:"structure"` 1425 1426 // An array of timestamp-value pairs, representing measurements over a period 1427 // of time. 1428 DataPoints []*DataPoint `type:"list"` 1429 1430 // The dimension(s) to which the data points apply. 1431 Key *ResponseResourceMetricKey `type:"structure"` 1432} 1433 1434// String returns the string representation. 1435// 1436// API parameter values that are decorated as "sensitive" in the API will not 1437// be included in the string output. The member name will be present, but the 1438// value will be replaced with "sensitive". 1439func (s MetricKeyDataPoints) String() string { 1440 return awsutil.Prettify(s) 1441} 1442 1443// GoString returns the string representation. 1444// 1445// API parameter values that are decorated as "sensitive" in the API will not 1446// be included in the string output. The member name will be present, but the 1447// value will be replaced with "sensitive". 1448func (s MetricKeyDataPoints) GoString() string { 1449 return s.String() 1450} 1451 1452// SetDataPoints sets the DataPoints field's value. 1453func (s *MetricKeyDataPoints) SetDataPoints(v []*DataPoint) *MetricKeyDataPoints { 1454 s.DataPoints = v 1455 return s 1456} 1457 1458// SetKey sets the Key field's value. 1459func (s *MetricKeyDataPoints) SetKey(v *ResponseResourceMetricKey) *MetricKeyDataPoints { 1460 s.Key = v 1461 return s 1462} 1463 1464// A single query to be processed. You must provide the metric to query. If 1465// no other parameters are specified, Performance Insights returns all of the 1466// data points for that metric. You can optionally request that the data points 1467// be aggregated by dimension group ( GroupBy), and return only those data points 1468// that match your criteria (Filter). 1469type MetricQuery struct { 1470 _ struct{} `type:"structure"` 1471 1472 // One or more filters to apply in the request. Restrictions: 1473 // 1474 // * Any number of filters by the same dimension, as specified in the GroupBy 1475 // parameter. 1476 // 1477 // * A single filter for any other dimension in this dimension group. 1478 Filter map[string]*string `type:"map"` 1479 1480 // A specification for how to aggregate the data points from a query result. 1481 // You must specify a valid dimension group. Performance Insights will return 1482 // all of the dimensions within that group, unless you provide the names of 1483 // specific dimensions within that group. You can also request that Performance 1484 // Insights return a limited number of values for a dimension. 1485 GroupBy *DimensionGroup `type:"structure"` 1486 1487 // The name of a Performance Insights metric to be measured. 1488 // 1489 // Valid values for Metric are: 1490 // 1491 // * db.load.avg - a scaled representation of the number of active sessions 1492 // for the database engine. 1493 // 1494 // * db.sampledload.avg - the raw number of active sessions for the database 1495 // engine. 1496 // 1497 // If the number of active sessions is less than an internal Performance Insights 1498 // threshold, db.load.avg and db.sampledload.avg are the same value. If the 1499 // number of active sessions is greater than the internal threshold, Performance 1500 // Insights samples the active sessions, with db.load.avg showing the scaled 1501 // values, db.sampledload.avg showing the raw values, and db.sampledload.avg 1502 // less than db.load.avg. For most use cases, you can query db.load.avg only. 1503 // 1504 // Metric is a required field 1505 Metric *string `type:"string" required:"true"` 1506} 1507 1508// String returns the string representation. 1509// 1510// API parameter values that are decorated as "sensitive" in the API will not 1511// be included in the string output. The member name will be present, but the 1512// value will be replaced with "sensitive". 1513func (s MetricQuery) String() string { 1514 return awsutil.Prettify(s) 1515} 1516 1517// GoString returns the string representation. 1518// 1519// API parameter values that are decorated as "sensitive" in the API will not 1520// be included in the string output. The member name will be present, but the 1521// value will be replaced with "sensitive". 1522func (s MetricQuery) GoString() string { 1523 return s.String() 1524} 1525 1526// Validate inspects the fields of the type to determine if they are valid. 1527func (s *MetricQuery) Validate() error { 1528 invalidParams := request.ErrInvalidParams{Context: "MetricQuery"} 1529 if s.Metric == nil { 1530 invalidParams.Add(request.NewErrParamRequired("Metric")) 1531 } 1532 if s.GroupBy != nil { 1533 if err := s.GroupBy.Validate(); err != nil { 1534 invalidParams.AddNested("GroupBy", err.(request.ErrInvalidParams)) 1535 } 1536 } 1537 1538 if invalidParams.Len() > 0 { 1539 return invalidParams 1540 } 1541 return nil 1542} 1543 1544// SetFilter sets the Filter field's value. 1545func (s *MetricQuery) SetFilter(v map[string]*string) *MetricQuery { 1546 s.Filter = v 1547 return s 1548} 1549 1550// SetGroupBy sets the GroupBy field's value. 1551func (s *MetricQuery) SetGroupBy(v *DimensionGroup) *MetricQuery { 1552 s.GroupBy = v 1553 return s 1554} 1555 1556// SetMetric sets the Metric field's value. 1557func (s *MetricQuery) SetMetric(v string) *MetricQuery { 1558 s.Metric = &v 1559 return s 1560} 1561 1562// The user is not authorized to perform this request. 1563type NotAuthorizedException struct { 1564 _ struct{} `type:"structure"` 1565 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1566 1567 Message_ *string `locationName:"Message" type:"string"` 1568} 1569 1570// String returns the string representation. 1571// 1572// API parameter values that are decorated as "sensitive" in the API will not 1573// be included in the string output. The member name will be present, but the 1574// value will be replaced with "sensitive". 1575func (s NotAuthorizedException) String() string { 1576 return awsutil.Prettify(s) 1577} 1578 1579// GoString returns the string representation. 1580// 1581// API parameter values that are decorated as "sensitive" in the API will not 1582// be included in the string output. The member name will be present, but the 1583// value will be replaced with "sensitive". 1584func (s NotAuthorizedException) GoString() string { 1585 return s.String() 1586} 1587 1588func newErrorNotAuthorizedException(v protocol.ResponseMetadata) error { 1589 return &NotAuthorizedException{ 1590 RespMetadata: v, 1591 } 1592} 1593 1594// Code returns the exception type name. 1595func (s *NotAuthorizedException) Code() string { 1596 return "NotAuthorizedException" 1597} 1598 1599// Message returns the exception's message. 1600func (s *NotAuthorizedException) Message() string { 1601 if s.Message_ != nil { 1602 return *s.Message_ 1603 } 1604 return "" 1605} 1606 1607// OrigErr always returns nil, satisfies awserr.Error interface. 1608func (s *NotAuthorizedException) OrigErr() error { 1609 return nil 1610} 1611 1612func (s *NotAuthorizedException) Error() string { 1613 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1614} 1615 1616// Status code returns the HTTP status code for the request's response error. 1617func (s *NotAuthorizedException) StatusCode() int { 1618 return s.RespMetadata.StatusCode 1619} 1620 1621// RequestID returns the service's response RequestID for request. 1622func (s *NotAuthorizedException) RequestID() string { 1623 return s.RespMetadata.RequestID 1624} 1625 1626// If PartitionBy was specified in a DescribeDimensionKeys request, the dimensions 1627// are returned in an array. Each element in the array specifies one dimension. 1628type ResponsePartitionKey struct { 1629 _ struct{} `type:"structure"` 1630 1631 // A dimension map that contains the dimension(s) for this partition. 1632 // 1633 // Dimensions is a required field 1634 Dimensions map[string]*string `type:"map" required:"true"` 1635} 1636 1637// String returns the string representation. 1638// 1639// API parameter values that are decorated as "sensitive" in the API will not 1640// be included in the string output. The member name will be present, but the 1641// value will be replaced with "sensitive". 1642func (s ResponsePartitionKey) String() string { 1643 return awsutil.Prettify(s) 1644} 1645 1646// GoString returns the string representation. 1647// 1648// API parameter values that are decorated as "sensitive" in the API will not 1649// be included in the string output. The member name will be present, but the 1650// value will be replaced with "sensitive". 1651func (s ResponsePartitionKey) GoString() string { 1652 return s.String() 1653} 1654 1655// SetDimensions sets the Dimensions field's value. 1656func (s *ResponsePartitionKey) SetDimensions(v map[string]*string) *ResponsePartitionKey { 1657 s.Dimensions = v 1658 return s 1659} 1660 1661// An object describing a Performance Insights metric and one or more dimensions 1662// for that metric. 1663type ResponseResourceMetricKey struct { 1664 _ struct{} `type:"structure"` 1665 1666 // The valid dimensions for the metric. 1667 Dimensions map[string]*string `type:"map"` 1668 1669 // The name of a Performance Insights metric to be measured. 1670 // 1671 // Valid values for Metric are: 1672 // 1673 // * db.load.avg - a scaled representation of the number of active sessions 1674 // for the database engine. 1675 // 1676 // * db.sampledload.avg - the raw number of active sessions for the database 1677 // engine. 1678 // 1679 // If the number of active sessions is less than an internal Performance Insights 1680 // threshold, db.load.avg and db.sampledload.avg are the same value. If the 1681 // number of active sessions is greater than the internal threshold, Performance 1682 // Insights samples the active sessions, with db.load.avg showing the scaled 1683 // values, db.sampledload.avg showing the raw values, and db.sampledload.avg 1684 // less than db.load.avg. For most use cases, you can query db.load.avg only. 1685 // 1686 // Metric is a required field 1687 Metric *string `type:"string" required:"true"` 1688} 1689 1690// String returns the string representation. 1691// 1692// API parameter values that are decorated as "sensitive" in the API will not 1693// be included in the string output. The member name will be present, but the 1694// value will be replaced with "sensitive". 1695func (s ResponseResourceMetricKey) String() string { 1696 return awsutil.Prettify(s) 1697} 1698 1699// GoString returns the string representation. 1700// 1701// API parameter values that are decorated as "sensitive" in the API will not 1702// be included in the string output. The member name will be present, but the 1703// value will be replaced with "sensitive". 1704func (s ResponseResourceMetricKey) GoString() string { 1705 return s.String() 1706} 1707 1708// SetDimensions sets the Dimensions field's value. 1709func (s *ResponseResourceMetricKey) SetDimensions(v map[string]*string) *ResponseResourceMetricKey { 1710 s.Dimensions = v 1711 return s 1712} 1713 1714// SetMetric sets the Metric field's value. 1715func (s *ResponseResourceMetricKey) SetMetric(v string) *ResponseResourceMetricKey { 1716 s.Metric = &v 1717 return s 1718} 1719 1720const ( 1721 // DetailStatusAvailable is a DetailStatus enum value 1722 DetailStatusAvailable = "AVAILABLE" 1723 1724 // DetailStatusProcessing is a DetailStatus enum value 1725 DetailStatusProcessing = "PROCESSING" 1726 1727 // DetailStatusUnavailable is a DetailStatus enum value 1728 DetailStatusUnavailable = "UNAVAILABLE" 1729) 1730 1731// DetailStatus_Values returns all elements of the DetailStatus enum 1732func DetailStatus_Values() []string { 1733 return []string{ 1734 DetailStatusAvailable, 1735 DetailStatusProcessing, 1736 DetailStatusUnavailable, 1737 } 1738} 1739 1740const ( 1741 // ServiceTypeRds is a ServiceType enum value 1742 ServiceTypeRds = "RDS" 1743) 1744 1745// ServiceType_Values returns all elements of the ServiceType enum 1746func ServiceType_Values() []string { 1747 return []string{ 1748 ServiceTypeRds, 1749 } 1750} 1751