/
summarize_metrics_data_details.go
84 lines (71 loc) · 4.69 KB
/
summarize_metrics_data_details.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
// Code generated. DO NOT EDIT.
// Monitoring API
//
// Use the Monitoring API to manage metric queries and alarms for assessing the health, capacity, and performance of your cloud resources.
// Endpoints vary by operation. For PostMetricData, use the `telemetry-ingestion` endpoints; for all other operations, use the `telemetry` endpoints.
// For more information, see
// the Monitoring documentation (https://docs.cloud.oracle.com/iaas/Content/Monitoring/home.htm).
//
package monitoring
import (
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"strings"
)
// SummarizeMetricsDataDetails The request details for retrieving aggregated data.
// Use the query and optional properties to filter the returned results.
type SummarizeMetricsDataDetails struct {
// The source service or application to use when searching for metric data points to aggregate.
// Example: `oci_computeagent`
Namespace *string `mandatory:"true" json:"namespace"`
// The Monitoring Query Language (MQL) expression to use when searching for metric data points to
// aggregate. The query must specify a metric, statistic, and interval.
// Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges.
// You can optionally specify dimensions and grouping functions.
// When specifying a dimension value, surround it with double quotes, and escape each double quote with a backslash (`\`) character.
// Supported grouping functions: `grouping()`, `groupBy()`.
// Construct your query to avoid exceeding limits on returned data. See MetricData.
// For details about Monitoring Query Language (MQL), see
// Monitoring Query Language (MQL) Reference (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Reference/mql.htm).
// For available dimensions, review the metric definition for the supported service. See
// Supported Services (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#SupportedServices).
// Example 1: `CpuUtilization[1m].sum()`
// Example 2 (escaped double quotes for value string): `CpuUtilization[1m]{resourceId = \"<var><instance_OCID></var>\"}.max()`
Query *string `mandatory:"true" json:"query"`
// Resource group that you want to match. A null value returns only metric data that has no resource groups. The specified resource group must exist in the definition of the posted metric. Only one resource group can be applied per metric.
// A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($).
// Example: `frontend-fleet`
ResourceGroup *string `mandatory:"false" json:"resourceGroup"`
// The beginning of the time range to use when searching for metric data points.
// Format is defined by RFC3339. The response includes metric data points for the startTime.
// Default value: the timestamp 3 hours before the call was sent.
// Example: `2023-02-01T01:02:29.600Z`
StartTime *common.SDKTime `mandatory:"false" json:"startTime"`
// The end of the time range to use when searching for metric data points.
// Format is defined by RFC3339. The response excludes metric data points for the endTime.
// Default value: the timestamp representing when the call was sent.
// Example: `2023-02-01T02:02:29.600Z`
EndTime *common.SDKTime `mandatory:"false" json:"endTime"`
// The time between calculated aggregation windows. Use with the query interval to vary the
// frequency for returning aggregated data points. For example, use a query interval of
// 5 minutes with a resolution of 1 minute to retrieve five-minute aggregations at a one-minute
// frequency. The resolution must be equal or less than the interval in the query. The default
// resolution is 1m (one minute). Supported values: `1m`-`60m`, `1h`-`24h`, `1d`.
// Example: `5m`
Resolution *string `mandatory:"false" json:"resolution"`
}
func (m SummarizeMetricsDataDetails) String() string {
return common.PointerString(m)
}
// ValidateEnumValue returns an error when providing an unsupported enum value
// This function is being called during constructing API request process
// Not recommended for calling this function directly
func (m SummarizeMetricsDataDetails) ValidateEnumValue() (bool, error) {
errMessage := []string{}
if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}