Create
|
|||||
|
|
Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- View and manage your data across Google Cloud Platform services
- View and write monitoring data for all of your Google and third-party Cloud and API projects
- Publish metric data to your Google Cloud projects
Input
This building block consumes 20 input parameters
Name | Format | Description |
---|---|---|
name Required |
STRING |
The project on which to execute the request. The format is "projects/{project_id_or_number}" |
timeSeries[] |
OBJECT |
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 |
timeSeries[].metadata |
OBJECT |
Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message |
timeSeries[].metadata.userLabels |
OBJECT |
Output only. A map of user-defined metadata labels |
timeSeries[].metadata.userLabels.customKey.value Required |
STRING |
Output only. A map of user-defined metadata labels |
timeSeries[].metadata.systemLabels |
OBJECT |
Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including "machine_image", "vpc", "subnet_id", "security_group", "name", etc. System label values can be only strings, Boolean values, or a list of strings. For example: { "name": "my-test-instance", "security_group": ["a", "b", "c"], "spot_instance": false } |
timeSeries[].metadata.systemLabels.customKey.value Required |
ANY |
Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including "machine_image", "vpc", "subnet_id", "security_group", "name", etc. System label values can be only strings, Boolean values, or a list of strings. For example: { "name": "my-test-instance", "security_group": ["a", "b", "c"], "spot_instance": false } |
timeSeries[].valueType |
ENUMERATION |
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 |
timeSeries[].metricKind |
ENUMERATION |
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 |
timeSeries[].points[] |
OBJECT |
A single data point in a time series |
timeSeries[].points[].value |
OBJECT |
A single strongly-typed value |
timeSeries[].points[].interval |
OBJECT |
A time interval extending just after a start time through an end time. The start time must not be later than the end time. The default start time is the end time, making the startTime value technically optional. Whether this is useful depends on the MetricKind. If the start and end times are the same, the interval represents a point in time. This is appropriate for GAUGE metrics, but not for DELTA and CUMULATIVE metrics, which cover a span of time |
timeSeries[].metric |
OBJECT |
A specific metric, identified by specifying values for all of the labels of a MetricDescriptor |
timeSeries[].metric.type |
STRING |
An existing metric type, see google.api.MetricDescriptor. For example, custom.googleapis.com/invoice/paid/amount |
timeSeries[].metric.labels |
OBJECT |
The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values |
timeSeries[].metric.labels.customKey.value Required |
STRING |
The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values |
timeSeries[].resource |
OBJECT |
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" }} |
timeSeries[].resource.type |
STRING |
Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types and Logging resource types |
timeSeries[].resource.labels |
OBJECT |
Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone" |
timeSeries[].resource.labels.customKey.value Required |
STRING |
Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone" |
= Parameter name
= Format
name STRING Required The project on which to execute the request. The format is "projects/{project_id_or_number}" |
timeSeries[] OBJECT 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 |
timeSeries[].metadata OBJECT Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message |
timeSeries[].metadata.userLabels OBJECT Output only. A map of user-defined metadata labels |
timeSeries[].metadata.userLabels.customKey.value STRING Required Output only. A map of user-defined metadata labels |
timeSeries[].metadata.systemLabels OBJECT Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including "machine_image", "vpc", "subnet_id", "security_group", "name", etc. System label values can be only strings, Boolean values, or a list of strings. For example: { "name": "my-test-instance", "security_group": ["a", "b", "c"], "spot_instance": false } |
timeSeries[].metadata.systemLabels.customKey.value ANY Required Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including "machine_image", "vpc", "subnet_id", "security_group", "name", etc. System label values can be only strings, Boolean values, or a list of strings. For example: { "name": "my-test-instance", "security_group": ["a", "b", "c"], "spot_instance": false } |
timeSeries[].valueType ENUMERATION 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 |
timeSeries[].metricKind ENUMERATION 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 |
timeSeries[].points[] OBJECT A single data point in a time series |
timeSeries[].points[].value OBJECT A single strongly-typed value |
timeSeries[].points[].interval OBJECT A time interval extending just after a start time through an end time. The start time must not be later than the end time. The default start time is the end time, making the startTime value technically optional. Whether this is useful depends on the MetricKind. If the start and end times are the same, the interval represents a point in time. This is appropriate for GAUGE metrics, but not for DELTA and CUMULATIVE metrics, which cover a span of time |
timeSeries[].metric OBJECT A specific metric, identified by specifying values for all of the labels of a MetricDescriptor |
timeSeries[].metric.type STRING An existing metric type, see google.api.MetricDescriptor. For example, custom.googleapis.com/invoice/paid/amount |
timeSeries[].metric.labels OBJECT The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values |
timeSeries[].metric.labels.customKey.value STRING Required The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values |
timeSeries[].resource OBJECT 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" }} |
timeSeries[].resource.type STRING Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types and Logging resource types |
timeSeries[].resource.labels OBJECT Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone" |
timeSeries[].resource.labels.customKey.value STRING Required Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone" |