cloudmonitoring

package
v2.3.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2016 License: BSD-3-Clause, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package cloudmonitoring provides access to the Cloud Monitoring API.

See https://cloud.google.com/monitoring/v2beta2/

Usage example:

import "google.golang.org/api/cloudmonitoring/v2beta2"
...
cloudmonitoringService, err := cloudmonitoring.New(oauthHttpClient)

Index

Constants

View Source
const (
	// View and manage your data across Google Cloud Platform services
	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"

	// View and write monitoring data for all of your Google and third-party
	// Cloud and API projects
	MonitoringScope = "https://www.googleapis.com/auth/monitoring"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteMetricDescriptorResponse

type DeleteMetricDescriptorResponse struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "cloudmonitoring#deleteMetricDescriptorResponse".
	Kind string `json:"kind,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

DeleteMetricDescriptorResponse: The response of cloudmonitoring.metricDescriptors.delete.

func (*DeleteMetricDescriptorResponse) MarshalJSON

func (s *DeleteMetricDescriptorResponse) MarshalJSON() ([]byte, error)

type ListMetricDescriptorsRequest

type ListMetricDescriptorsRequest struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "cloudmonitoring#listMetricDescriptorsRequest".
	Kind string `json:"kind,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

ListMetricDescriptorsRequest: The request of cloudmonitoring.metricDescriptors.list.

func (*ListMetricDescriptorsRequest) MarshalJSON

func (s *ListMetricDescriptorsRequest) MarshalJSON() ([]byte, error)

type ListMetricDescriptorsResponse

type ListMetricDescriptorsResponse struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "cloudmonitoring#listMetricDescriptorsResponse".
	Kind string `json:"kind,omitempty"`

	// Metrics: The returned metric descriptors.
	Metrics []*MetricDescriptor `json:"metrics,omitempty"`

	// NextPageToken: Pagination token. If present, indicates that
	// additional results are available for retrieval. To access the results
	// past the pagination limit, pass this value to the pageToken query
	// parameter.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

ListMetricDescriptorsResponse: The response of cloudmonitoring.metricDescriptors.list.

func (*ListMetricDescriptorsResponse) MarshalJSON

func (s *ListMetricDescriptorsResponse) MarshalJSON() ([]byte, error)

type ListTimeseriesDescriptorsRequest

type ListTimeseriesDescriptorsRequest struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "cloudmonitoring#listTimeseriesDescriptorsRequest".
	Kind string `json:"kind,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

ListTimeseriesDescriptorsRequest: The request of cloudmonitoring.timeseriesDescriptors.list

func (*ListTimeseriesDescriptorsRequest) MarshalJSON

func (s *ListTimeseriesDescriptorsRequest) MarshalJSON() ([]byte, error)

type ListTimeseriesDescriptorsResponse

type ListTimeseriesDescriptorsResponse struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "cloudmonitoring#listTimeseriesDescriptorsResponse".
	Kind string `json:"kind,omitempty"`

	// NextPageToken: Pagination token. If present, indicates that
	// additional results are available for retrieval. To access the results
	// past the pagination limit, set this value to the pageToken query
	// parameter.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// Oldest: The oldest timestamp of the interval of this query, as an RFC
	// 3339 string.
	Oldest string `json:"oldest,omitempty"`

	// Timeseries: The returned time series descriptors.
	Timeseries []*TimeseriesDescriptor `json:"timeseries,omitempty"`

	// Youngest: The youngest timestamp of the interval of this query, as an
	// RFC 3339 string.
	Youngest string `json:"youngest,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

ListTimeseriesDescriptorsResponse: The response of cloudmonitoring.timeseriesDescriptors.list

func (*ListTimeseriesDescriptorsResponse) MarshalJSON

func (s *ListTimeseriesDescriptorsResponse) MarshalJSON() ([]byte, error)

type ListTimeseriesRequest

type ListTimeseriesRequest struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "cloudmonitoring#listTimeseriesRequest".
	Kind string `json:"kind,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

ListTimeseriesRequest: The request of cloudmonitoring.timeseries.list

func (*ListTimeseriesRequest) MarshalJSON

func (s *ListTimeseriesRequest) MarshalJSON() ([]byte, error)

type ListTimeseriesResponse

type ListTimeseriesResponse struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "cloudmonitoring#listTimeseriesResponse".
	Kind string `json:"kind,omitempty"`

	// NextPageToken: Pagination token. If present, indicates that
	// additional results are available for retrieval. To access the results
	// past the pagination limit, set the pageToken query parameter to this
	// value. All of the points of a time series will be returned before
	// returning any point of the subsequent time series.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// Oldest: The oldest timestamp of the interval of this query as an RFC
	// 3339 string.
	Oldest string `json:"oldest,omitempty"`

	// Timeseries: The returned time series.
	Timeseries []*Timeseries `json:"timeseries,omitempty"`

	// Youngest: The youngest timestamp of the interval of this query as an
	// RFC 3339 string.
	Youngest string `json:"youngest,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

ListTimeseriesResponse: The response of cloudmonitoring.timeseries.list

func (*ListTimeseriesResponse) MarshalJSON

func (s *ListTimeseriesResponse) MarshalJSON() ([]byte, error)

type MetricDescriptor

type MetricDescriptor struct {
	// Description: Description of this metric.
	Description string `json:"description,omitempty"`

	// Labels: Labels defined for this metric.
	Labels []*MetricDescriptorLabelDescriptor `json:"labels,omitempty"`

	// Name: The name of this metric.
	Name string `json:"name,omitempty"`

	// Project: The project ID to which the metric belongs.
	Project string `json:"project,omitempty"`

	// TypeDescriptor: Type description for this metric.
	TypeDescriptor *MetricDescriptorTypeDescriptor `json:"typeDescriptor,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Description") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

MetricDescriptor: A metricDescriptor defines the name, label keys, and data type of a particular metric.

func (*MetricDescriptor) MarshalJSON

func (s *MetricDescriptor) MarshalJSON() ([]byte, error)

type MetricDescriptorLabelDescriptor

type MetricDescriptorLabelDescriptor struct {
	// Description: Label description.
	Description string `json:"description,omitempty"`

	// Key: Label key.
	Key string `json:"key,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Description") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

MetricDescriptorLabelDescriptor: A label in a metric is a description of this metric, including the key of this description (what the description is), and the value for this description.

func (*MetricDescriptorLabelDescriptor) MarshalJSON

func (s *MetricDescriptorLabelDescriptor) MarshalJSON() ([]byte, error)

type MetricDescriptorTypeDescriptor

type MetricDescriptorTypeDescriptor struct {
	// MetricType: The method of collecting data for the metric. See Metric
	// types.
	MetricType string `json:"metricType,omitempty"`

	// ValueType: The data type of of individual points in the metric's time
	// series. See Metric value types.
	ValueType string `json:"valueType,omitempty"`

	// ForceSendFields is a list of field names (e.g. "MetricType") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

MetricDescriptorTypeDescriptor: A type in a metric contains information about how the metric is collected and what its data points look like.

func (*MetricDescriptorTypeDescriptor) MarshalJSON

func (s *MetricDescriptorTypeDescriptor) MarshalJSON() ([]byte, error)

type MetricDescriptorsCreateCall

type MetricDescriptorsCreateCall struct {
	// contains filtered or unexported fields
}

func (*MetricDescriptorsCreateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*MetricDescriptorsCreateCall) Do

Do executes the "cloudmonitoring.metricDescriptors.create" call. Exactly one of *MetricDescriptor or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *MetricDescriptor.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*MetricDescriptorsCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type MetricDescriptorsDeleteCall

type MetricDescriptorsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*MetricDescriptorsDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*MetricDescriptorsDeleteCall) Do

Do executes the "cloudmonitoring.metricDescriptors.delete" call. Exactly one of *DeleteMetricDescriptorResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *DeleteMetricDescriptorResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*MetricDescriptorsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type MetricDescriptorsListCall

type MetricDescriptorsListCall struct {
	// contains filtered or unexported fields
}

func (*MetricDescriptorsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*MetricDescriptorsListCall) Count

Count sets the optional parameter "count": Maximum number of metric descriptors per page. Used for pagination. If not specified, count = 100.

func (*MetricDescriptorsListCall) Do

Do executes the "cloudmonitoring.metricDescriptors.list" call. Exactly one of *ListMetricDescriptorsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListMetricDescriptorsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*MetricDescriptorsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*MetricDescriptorsListCall) IfNoneMatch

func (c *MetricDescriptorsListCall) IfNoneMatch(entityTag string) *MetricDescriptorsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*MetricDescriptorsListCall) PageToken

PageToken sets the optional parameter "pageToken": The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results.

func (*MetricDescriptorsListCall) Query

Query sets the optional parameter "query": The query used to search against existing metrics. Separate keywords with a space; the service joins all keywords with AND, meaning that all keywords must match for a metric to be returned. If this field is omitted, all metrics are returned. If an empty string is passed with this field, no metrics are returned.

type MetricDescriptorsService

type MetricDescriptorsService struct {
	// contains filtered or unexported fields
}

func NewMetricDescriptorsService

func NewMetricDescriptorsService(s *Service) *MetricDescriptorsService

func (*MetricDescriptorsService) Create

func (r *MetricDescriptorsService) Create(project string, metricdescriptor *MetricDescriptor) *MetricDescriptorsCreateCall

Create: Create a new metric.

func (*MetricDescriptorsService) Delete

Delete: Delete an existing metric.

func (*MetricDescriptorsService) List

func (r *MetricDescriptorsService) List(project string, listmetricdescriptorsrequest *ListMetricDescriptorsRequest) *MetricDescriptorsListCall

List: List metric descriptors that match the query. If the query is not set, then all of the metric descriptors will be returned. Large responses will be paginated, use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.

type Point

type Point struct {
	// BoolValue: The value of this data point. Either "true" or "false".
	BoolValue *bool `json:"boolValue,omitempty"`

	// DistributionValue: The value of this data point as a distribution. A
	// distribution value can contain a list of buckets and/or an
	// underflowBucket and an overflowBucket. The values of these points can
	// be used to create a histogram.
	DistributionValue *PointDistribution `json:"distributionValue,omitempty"`

	// DoubleValue: The value of this data point as a double-precision
	// floating-point number.
	DoubleValue *float64 `json:"doubleValue,omitempty"`

	// End: The interval [start, end] is the time period to which the
	// point's value applies. For gauge metrics, whose values are
	// instantaneous measurements, this interval should be empty (start
	// should equal end). For cumulative metrics (of which deltas and rates
	// are special cases), the interval should be non-empty. Both start and
	// end are RFC 3339 strings.
	End string `json:"end,omitempty"`

	// Int64Value: The value of this data point as a 64-bit integer.
	Int64Value *int64 `json:"int64Value,omitempty,string"`

	// Start: The interval [start, end] is the time period to which the
	// point's value applies. For gauge metrics, whose values are
	// instantaneous measurements, this interval should be empty (start
	// should equal end). For cumulative metrics (of which deltas and rates
	// are special cases), the interval should be non-empty. Both start and
	// end are RFC 3339 strings.
	Start string `json:"start,omitempty"`

	// StringValue: The value of this data point in string format.
	StringValue *string `json:"stringValue,omitempty"`

	// ForceSendFields is a list of field names (e.g. "BoolValue") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Point: Point is a single point in a time series. It consists of a start time, an end time, and a value.

func (*Point) MarshalJSON

func (s *Point) MarshalJSON() ([]byte, error)

type PointDistribution

type PointDistribution struct {
	// Buckets: The finite buckets.
	Buckets []*PointDistributionBucket `json:"buckets,omitempty"`

	// OverflowBucket: The overflow bucket.
	OverflowBucket *PointDistributionOverflowBucket `json:"overflowBucket,omitempty"`

	// UnderflowBucket: The underflow bucket.
	UnderflowBucket *PointDistributionUnderflowBucket `json:"underflowBucket,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Buckets") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

PointDistribution: Distribution data point value type. When writing distribution points, try to be consistent with the boundaries of your buckets. If you must modify the bucket boundaries, then do so by merging, partitioning, or appending rather than skewing them.

func (*PointDistribution) MarshalJSON

func (s *PointDistribution) MarshalJSON() ([]byte, error)

type PointDistributionBucket

type PointDistributionBucket struct {
	// Count: The number of events whose values are in the interval defined
	// by this bucket.
	Count int64 `json:"count,omitempty,string"`

	// LowerBound: The lower bound of the value interval of this bucket
	// (inclusive).
	LowerBound float64 `json:"lowerBound,omitempty"`

	// UpperBound: The upper bound of the value interval of this bucket
	// (exclusive).
	UpperBound float64 `json:"upperBound,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Count") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

PointDistributionBucket: The histogram's bucket. Buckets that form the histogram of a distribution value. If the upper bound of a bucket, say U1, does not equal the lower bound of the next bucket, say L2, this means that there is no event in [U1, L2).

func (*PointDistributionBucket) MarshalJSON

func (s *PointDistributionBucket) MarshalJSON() ([]byte, error)

type PointDistributionOverflowBucket

type PointDistributionOverflowBucket struct {
	// Count: The number of events whose values are in the interval defined
	// by this bucket.
	Count int64 `json:"count,omitempty,string"`

	// LowerBound: The lower bound of the value interval of this bucket
	// (inclusive).
	LowerBound float64 `json:"lowerBound,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Count") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

PointDistributionOverflowBucket: The overflow bucket is a special bucket that does not have the upperBound field; it includes all of the events that are no less than its lower bound.

func (*PointDistributionOverflowBucket) MarshalJSON

func (s *PointDistributionOverflowBucket) MarshalJSON() ([]byte, error)

type PointDistributionUnderflowBucket

type PointDistributionUnderflowBucket struct {
	// Count: The number of events whose values are in the interval defined
	// by this bucket.
	Count int64 `json:"count,omitempty,string"`

	// UpperBound: The upper bound of the value interval of this bucket
	// (exclusive).
	UpperBound float64 `json:"upperBound,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Count") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

PointDistributionUnderflowBucket: The underflow bucket is a special bucket that does not have the lowerBound field; it includes all of the events that are less than its upper bound.

func (*PointDistributionUnderflowBucket) MarshalJSON

func (s *PointDistributionUnderflowBucket) MarshalJSON() ([]byte, error)

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	MetricDescriptors *MetricDescriptorsService

	Timeseries *TimeseriesService

	TimeseriesDescriptors *TimeseriesDescriptorsService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

type Timeseries

type Timeseries struct {
	// Points: The data points of this time series. The points are listed in
	// order of their end timestamp, from younger to older.
	Points []*Point `json:"points,omitempty"`

	// TimeseriesDesc: The descriptor of this time series.
	TimeseriesDesc *TimeseriesDescriptor `json:"timeseriesDesc,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Points") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Timeseries: The monitoring data is organized as metrics and stored as data points that are recorded over time. Each data point represents information like the CPU utilization of your virtual machine. A historical record of these data points is called a time series.

func (*Timeseries) MarshalJSON

func (s *Timeseries) MarshalJSON() ([]byte, error)

type TimeseriesDescriptor

type TimeseriesDescriptor struct {
	// Labels: The label's name.
	Labels map[string]string `json:"labels,omitempty"`

	// Metric: The name of the metric.
	Metric string `json:"metric,omitempty"`

	// Project: The Developers Console project number to which this time
	// series belongs.
	Project string `json:"project,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Labels") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

TimeseriesDescriptor: TimeseriesDescriptor identifies a single time series.

func (*TimeseriesDescriptor) MarshalJSON

func (s *TimeseriesDescriptor) MarshalJSON() ([]byte, error)

type TimeseriesDescriptorLabel

type TimeseriesDescriptorLabel struct {
	// Key: The label's name.
	Key string `json:"key,omitempty"`

	// Value: The label's value.
	Value string `json:"value,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Key") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

func (*TimeseriesDescriptorLabel) MarshalJSON

func (s *TimeseriesDescriptorLabel) MarshalJSON() ([]byte, error)

type TimeseriesDescriptorsListCall

type TimeseriesDescriptorsListCall struct {
	// contains filtered or unexported fields
}

func (*TimeseriesDescriptorsListCall) Aggregator

Aggregator sets the optional parameter "aggregator": The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metrics with a value type of INT64 or DOUBLE.

Possible values:

"max"
"mean"
"min"
"sum"

func (*TimeseriesDescriptorsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*TimeseriesDescriptorsListCall) Count

Count sets the optional parameter "count": Maximum number of time series descriptors per page. Used for pagination. If not specified, count = 100.

func (*TimeseriesDescriptorsListCall) Do

Do executes the "cloudmonitoring.timeseriesDescriptors.list" call. Exactly one of *ListTimeseriesDescriptorsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListTimeseriesDescriptorsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*TimeseriesDescriptorsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*TimeseriesDescriptorsListCall) IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*TimeseriesDescriptorsListCall) Labels

Labels sets the optional parameter "labels": A collection of labels for the matching time series, which are represented as: - key==value: key equals the value - key=~value: key regex matches the value - key!=value: key does not equal the value - key!~value: key regex does not match the value For example, to list all of the time series descriptors for the region us-central1, you could specify: label=cloud.googleapis.com%2Flocation=~us-central1.*

func (*TimeseriesDescriptorsListCall) Oldest

Oldest sets the optional parameter "oldest": Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest]

func (*TimeseriesDescriptorsListCall) PageToken

PageToken sets the optional parameter "pageToken": The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results.

func (*TimeseriesDescriptorsListCall) Timespan

Timespan sets the optional parameter "timespan": Length of the time interval to query, which is an alternative way to declare the interval: (youngest - timespan, youngest]. The timespan and oldest parameters should not be used together. Units: - s: second - m: minute - h: hour - d: day - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.

If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest].

func (*TimeseriesDescriptorsListCall) Window

Window sets the optional parameter "window": The sampling window. At most one data point will be returned for each window in the requested time interval. This parameter is only valid for non-cumulative metric types. Units: - m: minute - h: hour - d: day - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.

type TimeseriesDescriptorsService

type TimeseriesDescriptorsService struct {
	// contains filtered or unexported fields
}

func NewTimeseriesDescriptorsService

func NewTimeseriesDescriptorsService(s *Service) *TimeseriesDescriptorsService

func (*TimeseriesDescriptorsService) List

func (r *TimeseriesDescriptorsService) List(project string, metric string, youngest string, listtimeseriesdescriptorsrequest *ListTimeseriesDescriptorsRequest) *TimeseriesDescriptorsListCall

List: List the descriptors of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.

type TimeseriesListCall

type TimeseriesListCall struct {
	// contains filtered or unexported fields
}

func (*TimeseriesListCall) Aggregator

func (c *TimeseriesListCall) Aggregator(aggregator string) *TimeseriesListCall

Aggregator sets the optional parameter "aggregator": The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metrics with a value type of INT64 or DOUBLE.

Possible values:

"max"
"mean"
"min"
"sum"

func (*TimeseriesListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*TimeseriesListCall) Count

func (c *TimeseriesListCall) Count(count int64) *TimeseriesListCall

Count sets the optional parameter "count": Maximum number of data points per page, which is used for pagination of results.

func (*TimeseriesListCall) Do

Do executes the "cloudmonitoring.timeseries.list" call. Exactly one of *ListTimeseriesResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListTimeseriesResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*TimeseriesListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*TimeseriesListCall) IfNoneMatch

func (c *TimeseriesListCall) IfNoneMatch(entityTag string) *TimeseriesListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*TimeseriesListCall) Labels

func (c *TimeseriesListCall) Labels(labels string) *TimeseriesListCall

Labels sets the optional parameter "labels": A collection of labels for the matching time series, which are represented as: - key==value: key equals the value - key=~value: key regex matches the value - key!=value: key does not equal the value - key!~value: key regex does not match the value For example, to list all of the time series descriptors for the region us-central1, you could specify: label=cloud.googleapis.com%2Flocation=~us-central1.*

func (*TimeseriesListCall) Oldest

func (c *TimeseriesListCall) Oldest(oldest string) *TimeseriesListCall

Oldest sets the optional parameter "oldest": Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest]

func (*TimeseriesListCall) PageToken

func (c *TimeseriesListCall) PageToken(pageToken string) *TimeseriesListCall

PageToken sets the optional parameter "pageToken": The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results.

func (*TimeseriesListCall) Timespan

func (c *TimeseriesListCall) Timespan(timespan string) *TimeseriesListCall

Timespan sets the optional parameter "timespan": Length of the time interval to query, which is an alternative way to declare the interval: (youngest - timespan, youngest]. The timespan and oldest parameters should not be used together. Units: - s: second - m: minute - h: hour - d: day - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.

If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest].

func (*TimeseriesListCall) Window

func (c *TimeseriesListCall) Window(window string) *TimeseriesListCall

Window sets the optional parameter "window": The sampling window. At most one data point will be returned for each window in the requested time interval. This parameter is only valid for non-cumulative metric types. Units: - m: minute - h: hour - d: day - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.

type TimeseriesPoint

type TimeseriesPoint struct {
	// Point: The data point in this time series snapshot.
	Point *Point `json:"point,omitempty"`

	// TimeseriesDesc: The descriptor of this time series.
	TimeseriesDesc *TimeseriesDescriptor `json:"timeseriesDesc,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Point") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

TimeseriesPoint: When writing time series, TimeseriesPoint should be used instead of Timeseries, to enforce single point for each time series in the timeseries.write request.

func (*TimeseriesPoint) MarshalJSON

func (s *TimeseriesPoint) MarshalJSON() ([]byte, error)

type TimeseriesService

type TimeseriesService struct {
	// contains filtered or unexported fields
}

func NewTimeseriesService

func NewTimeseriesService(s *Service) *TimeseriesService

func (*TimeseriesService) List

func (r *TimeseriesService) List(project string, metric string, youngest string, listtimeseriesrequest *ListTimeseriesRequest) *TimeseriesListCall

List: List the data points of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.

func (*TimeseriesService) Write

func (r *TimeseriesService) Write(project string, writetimeseriesrequest *WriteTimeseriesRequest) *TimeseriesWriteCall

Write: Put data points to one or more time series for one or more metrics. If a time series does not exist, a new time series will be created. It is not allowed to write a time series point that is older than the existing youngest point of that time series. Points that are older than the existing youngest point of that time series will be discarded silently. Therefore, users should make sure that points of a time series are written sequentially in the order of their end time.

type TimeseriesWriteCall

type TimeseriesWriteCall struct {
	// contains filtered or unexported fields
}

func (*TimeseriesWriteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*TimeseriesWriteCall) Do

Do executes the "cloudmonitoring.timeseries.write" call. Exactly one of *WriteTimeseriesResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *WriteTimeseriesResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*TimeseriesWriteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type WriteTimeseriesRequest

type WriteTimeseriesRequest struct {
	// CommonLabels: The label's name.
	CommonLabels map[string]string `json:"commonLabels,omitempty"`

	// Timeseries: Provide time series specific labels and the data points
	// for each time series. The labels in timeseries and the common_labels
	// should form a complete list of labels that required by the metric.
	Timeseries []*TimeseriesPoint `json:"timeseries,omitempty"`

	// ForceSendFields is a list of field names (e.g. "CommonLabels") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

WriteTimeseriesRequest: The request of cloudmonitoring.timeseries.write

func (*WriteTimeseriesRequest) MarshalJSON

func (s *WriteTimeseriesRequest) MarshalJSON() ([]byte, error)

type WriteTimeseriesResponse

type WriteTimeseriesResponse struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "cloudmonitoring#writeTimeseriesResponse".
	Kind string `json:"kind,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Kind") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

WriteTimeseriesResponse: The response of cloudmonitoring.timeseries.write

func (*WriteTimeseriesResponse) MarshalJSON

func (s *WriteTimeseriesResponse) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL