Class: Google::Apis::MonitoringV3::TimeSeries
- Inherits:
-
Object
- Object
- Google::Apis::MonitoringV3::TimeSeries
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/monitoring_v3/classes.rb,
generated/google/apis/monitoring_v3/representations.rb,
generated/google/apis/monitoring_v3/representations.rb
Overview
A collection of data points that describes the time-varying values of a metric. A time series is identified by a combination of a fully-specified monitored resource and a fully-specified metric. This type is used for both listing and creating time series.
Instance Attribute Summary collapse
-
#metric ⇒ Google::Apis::MonitoringV3::Metric
A specific metric, identified by specifying values for all of the labels of a MetricDescriptor.
-
#metric_kind ⇒ String
The metric kind of the time series.
-
#points ⇒ Array<Google::Apis::MonitoringV3::Point>
The data points of this time series.
-
#resource ⇒ Google::Apis::MonitoringV3::MonitoredResource
An object representing a resource that can be used for monitoring, logging, billing, or other purposes.
-
#value_type ⇒ String
The value type of the time series.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TimeSeries
constructor
A new instance of TimeSeries.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ TimeSeries
Returns a new instance of TimeSeries
1081 1082 1083 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1081 def initialize(**args) update!(**args) end |
Instance Attribute Details
#metric ⇒ Google::Apis::MonitoringV3::Metric
A specific metric, identified by specifying values for all of the labels of a
MetricDescriptor.
Corresponds to the JSON property metric
1033 1034 1035 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1033 def metric @metric end |
#metric_kind ⇒ String
The metric kind of the time series. When listing time series, this metric kind
might be different from the metric kind of the associated metric if this time
series is an alignment or reduction of other time series.When creating a time
series, this field is optional. If present, it must be the same as the metric
kind of the associated metric. If the associated metric's descriptor must be
auto-created, then this field specifies the metric kind of the new descriptor
and must be either GAUGE (the default) or CUMULATIVE.
Corresponds to the JSON property metricKind
1079 1080 1081 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1079 def metric_kind @metric_kind end |
#points ⇒ Array<Google::Apis::MonitoringV3::Point>
The data points of this time series. When listing time series, the order of
the points is specified by the list method.When creating a time series, this
field must contain exactly one point and the point's type must be the same as
the value type of the associated metric. If the associated metric's descriptor
must be auto-created, then the value type of the descriptor is determined by
the point's type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION.
Corresponds to the JSON property points
1043 1044 1045 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1043 def points @points end |
#resource ⇒ Google::Apis::MonitoringV3::MonitoredResource
An object representing a resource that can be used for monitoring, logging,
billing, or other purposes. Examples include virtual machine instances,
databases, and storage devices such as disks. The type field identifies a
MonitoredResourceDescriptor object that describes the resource's schema.
Information in the labels field identifies the actual resource and its
attributes according to the schema. For example, a particular Compute Engine
VM instance could be represented by the following object, because the
MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
zone":
"type": "gce_instance",
"labels":
"instance_id": "12345678901234",
"zone": "us-central1-a" `
Corresponds to the JSON property
resource`
1068 1069 1070 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1068 def resource @resource end |
#value_type ⇒ String
The value type of the time series. When listing time series, this value type
might be different from the value type of the associated metric if this time
series is an alignment or reduction of other time series.When creating a time
series, this field is optional. If present, it must be the same as the type of
the data in the points field.
Corresponds to the JSON property valueType
1052 1053 1054 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1052 def value_type @value_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1086 1087 1088 1089 1090 1091 1092 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1086 def update!(**args) @metric = args[:metric] if args.key?(:metric) @points = args[:points] if args.key?(:points) @value_type = args[:value_type] if args.key?(:value_type) @resource = args[:resource] if args.key?(:resource) @metric_kind = args[:metric_kind] if args.key?(:metric_kind) end |