Documentation ¶
Overview ¶
Package monitoring provides access to the Stackdriver Monitoring API.
This package is DEPRECATED. Use package cloud.google.com/go/monitoring/apiv3 instead.
For product documentation, see: https://cloud.google.com/monitoring/api/
Creating a client ¶
Usage example:
import "google.golang.org/api/monitoring/v1" ... ctx := context.Background() monitoringService, err := monitoring.NewService(ctx)
In this example, Google Application Default Credentials are used for authentication.
For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options ¶
By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
monitoringService, err := monitoring.NewService(ctx, option.WithScopes(monitoring.MonitoringWriteScope))
To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
monitoringService, err := monitoring.NewService(ctx, option.WithAPIKey("AIza..."))
To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
config := &oauth2.Config{...} // ... token, err := config.Exchange(ctx, ...) monitoringService, err := monitoring.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
See https://godoc.org/google.golang.org/api/option/ for details on options.
Index ¶
- Constants
- type Aggregation
- type Axis
- type ChartOptions
- type Column
- type ColumnLayout
- type Dashboard
- type DataSet
- type DroppedLabels
- type Empty
- type Field
- type GaugeView
- type GridLayout
- type ListDashboardsResponse
- type Option
- type PickTimeSeriesFilter
- type ProjectsDashboardsCreateCall
- func (c *ProjectsDashboardsCreateCall) Context(ctx context.Context) *ProjectsDashboardsCreateCall
- func (c *ProjectsDashboardsCreateCall) Do(opts ...googleapi.CallOption) (*Dashboard, error)
- func (c *ProjectsDashboardsCreateCall) Fields(s ...googleapi.Field) *ProjectsDashboardsCreateCall
- func (c *ProjectsDashboardsCreateCall) Header() http.Header
- type ProjectsDashboardsDeleteCall
- func (c *ProjectsDashboardsDeleteCall) Context(ctx context.Context) *ProjectsDashboardsDeleteCall
- func (c *ProjectsDashboardsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *ProjectsDashboardsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDashboardsDeleteCall
- func (c *ProjectsDashboardsDeleteCall) Header() http.Header
- type ProjectsDashboardsGetCall
- func (c *ProjectsDashboardsGetCall) Context(ctx context.Context) *ProjectsDashboardsGetCall
- func (c *ProjectsDashboardsGetCall) Do(opts ...googleapi.CallOption) (*Dashboard, error)
- func (c *ProjectsDashboardsGetCall) Fields(s ...googleapi.Field) *ProjectsDashboardsGetCall
- func (c *ProjectsDashboardsGetCall) Header() http.Header
- func (c *ProjectsDashboardsGetCall) IfNoneMatch(entityTag string) *ProjectsDashboardsGetCall
- type ProjectsDashboardsListCall
- func (c *ProjectsDashboardsListCall) Context(ctx context.Context) *ProjectsDashboardsListCall
- func (c *ProjectsDashboardsListCall) Do(opts ...googleapi.CallOption) (*ListDashboardsResponse, error)
- func (c *ProjectsDashboardsListCall) Fields(s ...googleapi.Field) *ProjectsDashboardsListCall
- func (c *ProjectsDashboardsListCall) Header() http.Header
- func (c *ProjectsDashboardsListCall) IfNoneMatch(entityTag string) *ProjectsDashboardsListCall
- func (c *ProjectsDashboardsListCall) PageSize(pageSize int64) *ProjectsDashboardsListCall
- func (c *ProjectsDashboardsListCall) PageToken(pageToken string) *ProjectsDashboardsListCall
- func (c *ProjectsDashboardsListCall) Pages(ctx context.Context, f func(*ListDashboardsResponse) error) error
- type ProjectsDashboardsPatchCall
- func (c *ProjectsDashboardsPatchCall) Context(ctx context.Context) *ProjectsDashboardsPatchCall
- func (c *ProjectsDashboardsPatchCall) Do(opts ...googleapi.CallOption) (*Dashboard, error)
- func (c *ProjectsDashboardsPatchCall) Fields(s ...googleapi.Field) *ProjectsDashboardsPatchCall
- func (c *ProjectsDashboardsPatchCall) Header() http.Header
- type ProjectsDashboardsService
- func (r *ProjectsDashboardsService) Create(parent string, dashboard *Dashboard) *ProjectsDashboardsCreateCall
- func (r *ProjectsDashboardsService) Delete(name string) *ProjectsDashboardsDeleteCall
- func (r *ProjectsDashboardsService) Get(name string) *ProjectsDashboardsGetCall
- func (r *ProjectsDashboardsService) List(parent string) *ProjectsDashboardsListCall
- func (r *ProjectsDashboardsService) Patch(name string, dashboard *Dashboard) *ProjectsDashboardsPatchCall
- type ProjectsService
- type RatioPart
- type Row
- type RowLayout
- type Scorecard
- type Service
- type SourceContext
- type SpanContext
- type SparkChartView
- type StatisticalTimeSeriesFilter
- type Text
- type Threshold
- type TimeSeriesFilter
- type TimeSeriesFilterRatio
- type TimeSeriesQuery
- type Type
- type Widget
- type XyChart
Constants ¶
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" // View monitoring data for all of your Google Cloud and third-party // projects MonitoringReadScope = "https://www.googleapis.com/auth/monitoring.read" // Publish metric data to your Google Cloud projects MonitoringWriteScope = "https://www.googleapis.com/auth/monitoring.write" )
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregation ¶
type Aggregation struct { // AlignmentPeriod: The alignment period for per-time series alignment. // If present, alignmentPeriod must be at least 60 seconds. After // per-time series alignment, each time series will contain data points // only on the period boundaries. If perSeriesAligner is not specified // or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner // is specified and does not equal ALIGN_NONE, then this field must be // defined; otherwise an error is returned. AlignmentPeriod string `json:"alignmentPeriod,omitempty"` // CrossSeriesReducer: The approach to be used to combine time series. // Not all reducer functions may be applied to all time series, // depending on the metric type and the value type of the original time // series. Reduction may change the metric type of value type of the // time series.Time series data must be aligned in order to perform // cross-time series reduction. If crossSeriesReducer is specified, then // perSeriesAligner must be specified and not equal ALIGN_NONE and // alignmentPeriod must be specified; otherwise, an error is returned. // // Possible values: // "REDUCE_NONE" - No cross-time series reduction. The output of the // aligner is returned. // "REDUCE_MEAN" - Reduce by computing the mean across time series for // each alignment period. This reducer is valid for delta and gauge // metrics with numeric or distribution values. The value type of the // output is DOUBLE. // "REDUCE_MIN" - Reduce by computing the minimum across time series // for each alignment period. This reducer is valid for delta and gauge // metrics with numeric values. The value type of the output is the same // as the value type of the input. // "REDUCE_MAX" - Reduce by computing the maximum across time series // for each alignment period. This reducer is valid for delta and gauge // metrics with numeric values. The value type of the output is the same // as the value type of the input. // "REDUCE_SUM" - Reduce by computing the sum across time series for // each alignment period. This reducer is valid for delta and gauge // metrics with numeric and distribution values. The value type of the // output is the same as the value type of the input. // "REDUCE_STDDEV" - Reduce by computing the standard deviation across // time series for each alignment period. This reducer is valid for // delta and gauge metrics with numeric or distribution values. The // value type of the output is DOUBLE. // "REDUCE_COUNT" - Reduce by computing the count of data points // across time series for each alignment period. This reducer is valid // for delta and gauge metrics of numeric, Boolean, distribution, and // string value type. The value type of the output is INT64. // "REDUCE_COUNT_TRUE" - Reduce by computing the count of True-valued // data points across time series for each alignment period. This // reducer is valid for delta and gauge metrics of Boolean value type. // The value type of the output is INT64. // "REDUCE_COUNT_FALSE" - Reduce by computing the count of // False-valued data points across time series for each alignment // period. This reducer is valid for delta and gauge metrics of Boolean // value type. The value type of the output is INT64. // "REDUCE_FRACTION_TRUE" - Reduce by computing the fraction of // True-valued data points across time series for each alignment period. // This reducer is valid for delta and gauge metrics of Boolean value // type. The output value is in the range 0, 1 and has value type // DOUBLE. // "REDUCE_PERCENTILE_99" - Reduce by computing 99th percentile of // data points across time series for each alignment period. This // reducer is valid for gauge and delta metrics of numeric and // distribution type. The value of the output is DOUBLE // "REDUCE_PERCENTILE_95" - Reduce by computing 95th percentile of // data points across time series for each alignment period. This // reducer is valid for gauge and delta metrics of numeric and // distribution type. The value of the output is DOUBLE // "REDUCE_PERCENTILE_50" - Reduce by computing 50th percentile of // data points across time series for each alignment period. This // reducer is valid for gauge and delta metrics of numeric and // distribution type. The value of the output is DOUBLE // "REDUCE_PERCENTILE_05" - Reduce by computing 5th percentile of data // points across time series for each alignment period. This reducer is // valid for gauge and delta metrics of numeric and distribution type. // The value of the output is DOUBLE CrossSeriesReducer string `json:"crossSeriesReducer,omitempty"` // GroupByFields: The set of fields to preserve when crossSeriesReducer // is specified. The groupByFields determine how the time series are // partitioned into subsets prior to applying the aggregation function. // Each subset contains time series that have the same value for each of // the grouping fields. Each individual time series is a member of // exactly one subset. The crossSeriesReducer is applied to each subset // of time series. It is not possible to reduce across different // resource types, so this field implicitly contains resource.type. // Fields not specified in groupByFields are aggregated away. If // groupByFields is not specified and all the time series have the same // resource type, then the time series are aggregated into a single // output time series. If crossSeriesReducer is not defined, this field // is ignored. GroupByFields []string `json:"groupByFields,omitempty"` // PerSeriesAligner: The approach to be used to align individual time // series. Not all alignment functions may be applied to all time // series, depending on the metric type and value type of the original // time series. Alignment may change the metric type or the value type // of the time series.Time series data must be aligned in order to // perform cross-time series reduction. If crossSeriesReducer is // specified, then perSeriesAligner must be specified and not equal // ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error // is returned. // // Possible values: // "ALIGN_NONE" - No alignment. Raw data is returned. Not valid if // cross-time series reduction is requested. The value type of the // result is the same as the value type of the input. // "ALIGN_DELTA" - Align and convert to delta metric type. This // alignment is valid for cumulative metrics and delta metrics. Aligning // an existing delta metric to a delta metric requires that the // alignment period be increased. The value type of the result is the // same as the value type of the input.One can think of this aligner as // a rate but without time units; that is, the output is conceptually // (second_point - first_point). // "ALIGN_RATE" - Align and convert to a rate. This alignment is valid // for cumulative metrics and delta metrics with numeric values. The // output is a gauge metric with value type DOUBLE.One can think of this // aligner as conceptually providing the slope of the line that passes // through the value at the start and end of the window. In other words, // this is conceptually ((y1 - y0)/(t1 - t0)), and the output unit is // one that has a "/time" dimension.If, by rate, you are looking for // percentage change, see the ALIGN_PERCENT_CHANGE aligner option. // "ALIGN_INTERPOLATE" - Align by interpolating between adjacent // points around the period boundary. This alignment is valid for gauge // metrics with numeric values. The value type of the result is the same // as the value type of the input. // "ALIGN_NEXT_OLDER" - Align by shifting the oldest data point before // the period boundary to the boundary. This alignment is valid for // gauge metrics. The value type of the result is the same as the value // type of the input. // "ALIGN_MIN" - Align time series via aggregation. The resulting data // point in the alignment period is the minimum of all data points in // the period. This alignment is valid for gauge and delta metrics with // numeric values. The value type of the result is the same as the value // type of the input. // "ALIGN_MAX" - Align time series via aggregation. The resulting data // point in the alignment period is the maximum of all data points in // the period. This alignment is valid for gauge and delta metrics with // numeric values. The value type of the result is the same as the value // type of the input. // "ALIGN_MEAN" - Align time series via aggregation. The resulting // data point in the alignment period is the average or arithmetic mean // of all data points in the period. This alignment is valid for gauge // and delta metrics with numeric values. The value type of the output // is DOUBLE. // "ALIGN_COUNT" - Align time series via aggregation. The resulting // data point in the alignment period is the count of all data points in // the period. This alignment is valid for gauge and delta metrics with // numeric or Boolean values. The value type of the output is INT64. // "ALIGN_SUM" - Align time series via aggregation. The resulting data // point in the alignment period is the sum of all data points in the // period. This alignment is valid for gauge and delta metrics with // numeric and distribution values. The value type of the output is the // same as the value type of the input. // "ALIGN_STDDEV" - Align time series via aggregation. The resulting // data point in the alignment period is the standard deviation of all // data points in the period. This alignment is valid for gauge and // delta metrics with numeric values. The value type of the output is // DOUBLE. // "ALIGN_COUNT_TRUE" - Align time series via aggregation. The // resulting data point in the alignment period is the count of // True-valued data points in the period. This alignment is valid for // gauge metrics with Boolean values. The value type of the output is // INT64. // "ALIGN_COUNT_FALSE" - Align time series via aggregation. The // resulting data point in the alignment period is the count of // False-valued data points in the period. This alignment is valid for // gauge metrics with Boolean values. The value type of the output is // INT64. // "ALIGN_FRACTION_TRUE" - Align time series via aggregation. The // resulting data point in the alignment period is the fraction of // True-valued data points in the period. This alignment is valid for // gauge metrics with Boolean values. The output value is in the range // 0, 1 and has value type DOUBLE. // "ALIGN_PERCENTILE_99" - Align time series via aggregation. The // resulting data point in the alignment period is the 99th percentile // of all data points in the period. This alignment is valid for gauge // and delta metrics with distribution values. The output is a gauge // metric with value type DOUBLE. // "ALIGN_PERCENTILE_95" - Align time series via aggregation. The // resulting data point in the alignment period is the 95th percentile // of all data points in the period. This alignment is valid for gauge // and delta metrics with distribution values. The output is a gauge // metric with value type DOUBLE. // "ALIGN_PERCENTILE_50" - Align time series via aggregation. The // resulting data point in the alignment period is the 50th percentile // of all data points in the period. This alignment is valid for gauge // and delta metrics with distribution values. The output is a gauge // metric with value type DOUBLE. // "ALIGN_PERCENTILE_05" - Align time series via aggregation. The // resulting data point in the alignment period is the 5th percentile of // all data points in the period. This alignment is valid for gauge and // delta metrics with distribution values. The output is a gauge metric // with value type DOUBLE. // "ALIGN_PERCENT_CHANGE" - Align and convert to a percentage change. // This alignment is valid for gauge and delta metrics with numeric // values. This alignment conceptually computes the equivalent of // "((current - previous)/previous)*100" where previous value is // determined based on the alignmentPeriod. In the event that previous // is 0 the calculated value is infinity with the exception that if both // (current - previous) and previous are 0 the calculated value is 0. A // 10 minute moving mean is computed at each point of the time window // prior to the above calculation to smooth the metric and prevent false // positives from very short lived spikes. Only applicable for data that // is >= 0. Any values < 0 are treated as no data. While delta metrics // are accepted by this alignment special care should be taken that the // values for the metric will always be positive. The output is a gauge // metric with value type DOUBLE. PerSeriesAligner string `json:"perSeriesAligner,omitempty"` // ForceSendFields is a list of field names (e.g. "AlignmentPeriod") 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:"-"` // NullFields is a list of field names (e.g. "AlignmentPeriod") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
Aggregation: Describes how to combine multiple time series to provide different views of the data. Aggregation consists of an alignment step on individual time series (alignment_period and per_series_aligner) followed by an optional reduction step of the data across the aligned time series (cross_series_reducer and group_by_fields). For more details, see Aggregation.
func (*Aggregation) MarshalJSON ¶
func (s *Aggregation) MarshalJSON() ([]byte, error)
type Axis ¶
type Axis struct { // Label: The label of the axis. Label string `json:"label,omitempty"` // Scale: The axis scale. By default, a linear scale is used. // // Possible values: // "SCALE_UNSPECIFIED" - Scale is unspecified. The view will default // to LINEAR. // "LINEAR" - Linear scale. // "LOG10" - Logarithmic scale (base 10). Scale string `json:"scale,omitempty"` // ForceSendFields is a list of field names (e.g. "Label") 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:"-"` // NullFields is a list of field names (e.g. "Label") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Axis: A chart axis.
func (*Axis) MarshalJSON ¶
type ChartOptions ¶
type ChartOptions struct { // Mode: The chart mode. // // Possible values: // "MODE_UNSPECIFIED" - Mode is unspecified. The view will default to // COLOR. // "COLOR" - The chart distinguishes data series using different // color. Line colors may get reused when there are many lines in the // chart. // "X_RAY" - The chart uses the Stackdriver x-ray mode, in which each // data set is plotted using the same semi-transparent color. // "STATS" - The chart displays statistics such as average, median, // 95th percentile, and more. Mode string `json:"mode,omitempty"` // ForceSendFields is a list of field names (e.g. "Mode") 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:"-"` // NullFields is a list of field names (e.g. "Mode") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
ChartOptions: Options to control visual rendering of a chart.
func (*ChartOptions) MarshalJSON ¶
func (s *ChartOptions) MarshalJSON() ([]byte, error)
type Column ¶
type Column struct { // Weight: The relative weight of this column. The column weight is used // to adjust the width of columns on the screen (relative to peers). // Greater the weight, greater the width of the column on the screen. If // omitted, a value of 1 is used while rendering. Weight int64 `json:"weight,omitempty,string"` // Widgets: The display widgets arranged vertically in this column. Widgets []*Widget `json:"widgets,omitempty"` // ForceSendFields is a list of field names (e.g. "Weight") 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:"-"` // NullFields is a list of field names (e.g. "Weight") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Column: Defines the layout properties and content for a column.
func (*Column) MarshalJSON ¶
type ColumnLayout ¶
type ColumnLayout struct { // Columns: The columns of content to display. Columns []*Column `json:"columns,omitempty"` // ForceSendFields is a list of field names (e.g. "Columns") 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:"-"` // NullFields is a list of field names (e.g. "Columns") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
ColumnLayout: A simplified layout that divides the available space into vertical columns and arranges a set of widgets vertically in each column.
func (*ColumnLayout) MarshalJSON ¶
func (s *ColumnLayout) MarshalJSON() ([]byte, error)
type Dashboard ¶
type Dashboard struct { // ColumnLayout: The content is divided into equally spaced columns and // the widgets are arranged vertically. ColumnLayout *ColumnLayout `json:"columnLayout,omitempty"` // DisplayName: The mutable, human-readable name. DisplayName string `json:"displayName,omitempty"` // Etag: etag is used for optimistic concurrency control as a way to // help prevent simultaneous updates of a policy from overwriting each // other. An etag is returned in the response to GetDashboard, and users // are expected to put that etag in the request to UpdateDashboard to // ensure that their change will be applied to the same version of the // Dashboard configuration. The field should not be passed during // dashboard creation. Etag string `json:"etag,omitempty"` // GridLayout: Content is arranged with a basic layout that re-flows a // simple list of informational elements like widgets or tiles. GridLayout *GridLayout `json:"gridLayout,omitempty"` // Name: The resource name of the dashboard. Name string `json:"name,omitempty"` // RowLayout: The content is divided into equally spaced rows and the // widgets are arranged horizontally. RowLayout *RowLayout `json:"rowLayout,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "ColumnLayout") 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:"-"` // NullFields is a list of field names (e.g. "ColumnLayout") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Dashboard: A Google Stackdriver dashboard. Dashboards define the content and layout of pages in the Stackdriver web application.
func (*Dashboard) MarshalJSON ¶
type DataSet ¶
type DataSet struct { // LegendTemplate: A template string for naming TimeSeries in the // resulting data set. This should be a string with interpolations of // the form ${label_name}, which will resolve to the label's value. LegendTemplate string `json:"legendTemplate,omitempty"` // MinAlignmentPeriod: Optional. The lower bound on data point frequency // for this data set, implemented by specifying the minimum alignment // period to use in a time series query For example, if the data is // published once every 10 minutes, the min_alignment_period should be // at least 10 minutes. It would not make sense to fetch and align data // at one minute intervals. MinAlignmentPeriod string `json:"minAlignmentPeriod,omitempty"` // PlotType: How this data should be plotted on the chart. // // Possible values: // "PLOT_TYPE_UNSPECIFIED" - Plot type is unspecified. The view will // default to LINE. // "LINE" - The data is plotted as a set of lines (one line per // series). // "STACKED_AREA" - The data is plotted as a set of filled areas (one // area per series), with the areas stacked vertically (the base of each // area is the top of its predecessor, and the base of the first area is // the X axis). Since the areas do not overlap, each is filled with a // different opaque color. // "STACKED_BAR" - The data is plotted as a set of rectangular boxes // (one box per series), with the boxes stacked vertically (the base of // each box is the top of its predecessor, and the base of the first box // is the X axis). Since the boxes do not overlap, each is filled with a // different opaque color. // "HEATMAP" - The data is plotted as a heatmap. The series being // plotted must have a DISTRIBUTION value type. The value of each bucket // in the distribution is displayed as a color. This type is not // currently available in the Stackdriver Monitoring application. PlotType string `json:"plotType,omitempty"` // TimeSeriesQuery: Fields for querying time series data from the // Stackdriver metrics API. TimeSeriesQuery *TimeSeriesQuery `json:"timeSeriesQuery,omitempty"` // ForceSendFields is a list of field names (e.g. "LegendTemplate") 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:"-"` // NullFields is a list of field names (e.g. "LegendTemplate") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
DataSet: Groups a time series query definition with charting options.
func (*DataSet) MarshalJSON ¶
type DroppedLabels ¶
type DroppedLabels struct { // Label: Map from label to its value, for all labels dropped in any // aggregation. Label map[string]string `json:"label,omitempty"` // ForceSendFields is a list of field names (e.g. "Label") 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:"-"` // NullFields is a list of field names (e.g. "Label") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
DroppedLabels: A set of (label, value) pairs which were dropped during aggregation, attached to google.api.Distribution.Exemplars in google.api.Distribution values during aggregation.These values are used in combination with the label values that remain on the aggregated Distribution timeseries to construct the full label set for the exemplar values. The resulting full label set may be used to identify the specific task/job/instance (for example) which may be contributing to a long-tail, while allowing the storage savings of only storing aggregated distribution values for a large group.Note that there are no guarantees on ordering of the labels from exemplar-to-exemplar and from distribution-to-distribution in the same stream, and there may be duplicates. It is up to clients to resolve any ambiguities.
func (*DroppedLabels) MarshalJSON ¶
func (s *DroppedLabels) MarshalJSON() ([]byte, error)
type Empty ¶
type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` }
Empty: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
service Foo { rpc Bar(google.protobuf.Empty) returns
(google.protobuf.Empty); } The JSON representation for Empty is empty JSON object {}.
type Field ¶
type Field struct { // Cardinality: The field cardinality. // // Possible values: // "CARDINALITY_UNKNOWN" - For fields with unknown cardinality. // "CARDINALITY_OPTIONAL" - For optional fields. // "CARDINALITY_REQUIRED" - For required fields. Proto2 syntax only. // "CARDINALITY_REPEATED" - For repeated fields. Cardinality string `json:"cardinality,omitempty"` // DefaultValue: The string value of the default value of this field. // Proto2 syntax only. DefaultValue string `json:"defaultValue,omitempty"` // JsonName: The field JSON name. JsonName string `json:"jsonName,omitempty"` // Kind: The field type. // // Possible values: // "TYPE_UNKNOWN" - Field type unknown. // "TYPE_DOUBLE" - Field type double. // "TYPE_FLOAT" - Field type float. // "TYPE_INT64" - Field type int64. // "TYPE_UINT64" - Field type uint64. // "TYPE_INT32" - Field type int32. // "TYPE_FIXED64" - Field type fixed64. // "TYPE_FIXED32" - Field type fixed32. // "TYPE_BOOL" - Field type bool. // "TYPE_STRING" - Field type string. // "TYPE_GROUP" - Field type group. Proto2 syntax only, and // deprecated. // "TYPE_MESSAGE" - Field type message. // "TYPE_BYTES" - Field type bytes. // "TYPE_UINT32" - Field type uint32. // "TYPE_ENUM" - Field type enum. // "TYPE_SFIXED32" - Field type sfixed32. // "TYPE_SFIXED64" - Field type sfixed64. // "TYPE_SINT32" - Field type sint32. // "TYPE_SINT64" - Field type sint64. Kind string `json:"kind,omitempty"` // Name: The field name. Name string `json:"name,omitempty"` // Number: The field number. Number int64 `json:"number,omitempty"` // OneofIndex: The index of the field type in Type.oneofs, for message // or enumeration types. The first type has index 1; zero means the type // is not in the list. OneofIndex int64 `json:"oneofIndex,omitempty"` // Options: The protocol buffer options. Options []*Option `json:"options,omitempty"` // Packed: Whether to use alternative packed wire representation. Packed bool `json:"packed,omitempty"` // TypeUrl: The field type URL, without the scheme, for message or // enumeration types. Example: // "type.googleapis.com/google.protobuf.Timestamp". TypeUrl string `json:"typeUrl,omitempty"` // ForceSendFields is a list of field names (e.g. "Cardinality") 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:"-"` // NullFields is a list of field names (e.g. "Cardinality") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Field: A single field of a message type.
func (*Field) MarshalJSON ¶
type GaugeView ¶
type GaugeView struct { // LowerBound: The lower bound for this gauge chart. The value of the // chart should always be greater than or equal to this. LowerBound float64 `json:"lowerBound,omitempty"` // UpperBound: The upper bound for this gauge chart. The value of the // chart should always be less than or equal to this. UpperBound float64 `json:"upperBound,omitempty"` // ForceSendFields is a list of field names (e.g. "LowerBound") 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:"-"` // NullFields is a list of field names (e.g. "LowerBound") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
GaugeView: A gauge chart shows where the current value sits within a pre-defined range. The upper and lower bounds should define the possible range of values for the scorecard's query (inclusive).
func (*GaugeView) MarshalJSON ¶
func (*GaugeView) UnmarshalJSON ¶
type GridLayout ¶
type GridLayout struct { // Columns: The number of columns into which the view's width is // divided. If omitted or set to zero, a system default will be used // while rendering. Columns int64 `json:"columns,omitempty,string"` // Widgets: The informational elements that are arranged into the // columns row-first. Widgets []*Widget `json:"widgets,omitempty"` // ForceSendFields is a list of field names (e.g. "Columns") 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:"-"` // NullFields is a list of field names (e.g. "Columns") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
GridLayout: A basic layout divides the available space into vertical columns of equal width and arranges a list of widgets using a row-first strategy.
func (*GridLayout) MarshalJSON ¶
func (s *GridLayout) MarshalJSON() ([]byte, error)
type ListDashboardsResponse ¶
type ListDashboardsResponse struct { // Dashboards: The list of requested dashboards. Dashboards []*Dashboard `json:"dashboards,omitempty"` // NextPageToken: If there are more results than have been returned, // then this field is set to a non-empty value. To see the additional // results, use that value as pageToken in the next call to this method. 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. "Dashboards") 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:"-"` // NullFields is a list of field names (e.g. "Dashboards") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
ListDashboardsResponse: The ListDashboards request.
func (*ListDashboardsResponse) MarshalJSON ¶
func (s *ListDashboardsResponse) MarshalJSON() ([]byte, error)
type Option ¶
type Option struct { // Name: The option's name. For protobuf built-in options (options // defined in descriptor.proto), this is the short name. For example, // "map_entry". For custom options, it should be the fully-qualified // name. For example, "google.api.http". Name string `json:"name,omitempty"` // Value: The option's value packed in an Any message. If the value is a // primitive, the corresponding wrapper type defined in // google/protobuf/wrappers.proto should be used. If the value is an // enum, it should be stored as an int32 value using the // google.protobuf.Int32Value type. Value googleapi.RawMessage `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") 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:"-"` // NullFields is a list of field names (e.g. "Name") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Option: A protocol buffer option, which can be attached to a message, field, enumeration, etc.
func (*Option) MarshalJSON ¶
type PickTimeSeriesFilter ¶
type PickTimeSeriesFilter struct { // Direction: How to use the ranking to select time series that pass // through the filter. // // Possible values: // "DIRECTION_UNSPECIFIED" - Not allowed in well-formed requests. // "TOP" - Pass the highest ranking inputs. // "BOTTOM" - Pass the lowest ranking inputs. Direction string `json:"direction,omitempty"` // NumTimeSeries: How many time series to return. NumTimeSeries int64 `json:"numTimeSeries,omitempty"` // RankingMethod: rankingMethod is applied to each time series // independently to produce the value which will be used to compare the // time series to other time series. // // Possible values: // "METHOD_UNSPECIFIED" - Not allowed in well-formed requests. // "METHOD_MEAN" - Select the mean of all values. // "METHOD_MAX" - Select the maximum value. // "METHOD_MIN" - Select the minimum value. // "METHOD_SUM" - Compute the sum of all values. // "METHOD_LATEST" - Select the most recent value. RankingMethod string `json:"rankingMethod,omitempty"` // ForceSendFields is a list of field names (e.g. "Direction") 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:"-"` // NullFields is a list of field names (e.g. "Direction") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
PickTimeSeriesFilter: Describes a ranking-based time series filter. Each input time series is ranked with an aligner. The filter lets through up to num_time_series time series, selecting them based on the relative ranking.
func (*PickTimeSeriesFilter) MarshalJSON ¶
func (s *PickTimeSeriesFilter) MarshalJSON() ([]byte, error)
type ProjectsDashboardsCreateCall ¶
type ProjectsDashboardsCreateCall struct {
// contains filtered or unexported fields
}
func (*ProjectsDashboardsCreateCall) Context ¶
func (c *ProjectsDashboardsCreateCall) Context(ctx context.Context) *ProjectsDashboardsCreateCall
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 (*ProjectsDashboardsCreateCall) Do ¶
func (c *ProjectsDashboardsCreateCall) Do(opts ...googleapi.CallOption) (*Dashboard, error)
Do executes the "monitoring.projects.dashboards.create" call. Exactly one of *Dashboard or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Dashboard.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 (*ProjectsDashboardsCreateCall) Fields ¶
func (c *ProjectsDashboardsCreateCall) Fields(s ...googleapi.Field) *ProjectsDashboardsCreateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsDashboardsCreateCall) Header ¶
func (c *ProjectsDashboardsCreateCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsDashboardsDeleteCall ¶
type ProjectsDashboardsDeleteCall struct {
// contains filtered or unexported fields
}
func (*ProjectsDashboardsDeleteCall) Context ¶
func (c *ProjectsDashboardsDeleteCall) Context(ctx context.Context) *ProjectsDashboardsDeleteCall
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 (*ProjectsDashboardsDeleteCall) Do ¶
func (c *ProjectsDashboardsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "monitoring.projects.dashboards.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.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 (*ProjectsDashboardsDeleteCall) Fields ¶
func (c *ProjectsDashboardsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDashboardsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsDashboardsDeleteCall) Header ¶
func (c *ProjectsDashboardsDeleteCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsDashboardsGetCall ¶
type ProjectsDashboardsGetCall struct {
// contains filtered or unexported fields
}
func (*ProjectsDashboardsGetCall) Context ¶
func (c *ProjectsDashboardsGetCall) Context(ctx context.Context) *ProjectsDashboardsGetCall
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 (*ProjectsDashboardsGetCall) Do ¶
func (c *ProjectsDashboardsGetCall) Do(opts ...googleapi.CallOption) (*Dashboard, error)
Do executes the "monitoring.projects.dashboards.get" call. Exactly one of *Dashboard or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Dashboard.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 (*ProjectsDashboardsGetCall) Fields ¶
func (c *ProjectsDashboardsGetCall) Fields(s ...googleapi.Field) *ProjectsDashboardsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsDashboardsGetCall) Header ¶
func (c *ProjectsDashboardsGetCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsDashboardsGetCall) IfNoneMatch ¶
func (c *ProjectsDashboardsGetCall) IfNoneMatch(entityTag string) *ProjectsDashboardsGetCall
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.
type ProjectsDashboardsListCall ¶
type ProjectsDashboardsListCall struct {
// contains filtered or unexported fields
}
func (*ProjectsDashboardsListCall) Context ¶
func (c *ProjectsDashboardsListCall) Context(ctx context.Context) *ProjectsDashboardsListCall
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 (*ProjectsDashboardsListCall) Do ¶
func (c *ProjectsDashboardsListCall) Do(opts ...googleapi.CallOption) (*ListDashboardsResponse, error)
Do executes the "monitoring.projects.dashboards.list" call. Exactly one of *ListDashboardsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListDashboardsResponse.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 (*ProjectsDashboardsListCall) Fields ¶
func (c *ProjectsDashboardsListCall) Fields(s ...googleapi.Field) *ProjectsDashboardsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsDashboardsListCall) Header ¶
func (c *ProjectsDashboardsListCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsDashboardsListCall) IfNoneMatch ¶
func (c *ProjectsDashboardsListCall) IfNoneMatch(entityTag string) *ProjectsDashboardsListCall
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 (*ProjectsDashboardsListCall) PageSize ¶
func (c *ProjectsDashboardsListCall) PageSize(pageSize int64) *ProjectsDashboardsListCall
PageSize sets the optional parameter "pageSize": A positive number that is the maximum number of results to return. If unspecified, a default of 1000 is used.
func (*ProjectsDashboardsListCall) PageToken ¶
func (c *ProjectsDashboardsListCall) PageToken(pageToken string) *ProjectsDashboardsListCall
PageToken sets the optional parameter "pageToken": If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.
func (*ProjectsDashboardsListCall) Pages ¶
func (c *ProjectsDashboardsListCall) Pages(ctx context.Context, f func(*ListDashboardsResponse) error) error
Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.
type ProjectsDashboardsPatchCall ¶
type ProjectsDashboardsPatchCall struct {
// contains filtered or unexported fields
}
func (*ProjectsDashboardsPatchCall) Context ¶
func (c *ProjectsDashboardsPatchCall) Context(ctx context.Context) *ProjectsDashboardsPatchCall
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 (*ProjectsDashboardsPatchCall) Do ¶
func (c *ProjectsDashboardsPatchCall) Do(opts ...googleapi.CallOption) (*Dashboard, error)
Do executes the "monitoring.projects.dashboards.patch" call. Exactly one of *Dashboard or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Dashboard.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 (*ProjectsDashboardsPatchCall) Fields ¶
func (c *ProjectsDashboardsPatchCall) Fields(s ...googleapi.Field) *ProjectsDashboardsPatchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsDashboardsPatchCall) Header ¶
func (c *ProjectsDashboardsPatchCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsDashboardsService ¶
type ProjectsDashboardsService struct {
// contains filtered or unexported fields
}
func NewProjectsDashboardsService ¶
func NewProjectsDashboardsService(s *Service) *ProjectsDashboardsService
func (*ProjectsDashboardsService) Create ¶
func (r *ProjectsDashboardsService) Create(parent string, dashboard *Dashboard) *ProjectsDashboardsCreateCall
Create: Creates a new custom dashboard.This method requires the monitoring.dashboards.create permission on the specified project. For more information, see Google Cloud IAM (https://cloud.google.com/iam).
func (*ProjectsDashboardsService) Delete ¶
func (r *ProjectsDashboardsService) Delete(name string) *ProjectsDashboardsDeleteCall
Delete: Deletes an existing custom dashboard.This method requires the monitoring.dashboards.delete permission on the specified dashboard. For more information, see Google Cloud IAM (https://cloud.google.com/iam).
func (*ProjectsDashboardsService) Get ¶
func (r *ProjectsDashboardsService) Get(name string) *ProjectsDashboardsGetCall
Get: Fetches a specific dashboard.This method requires the monitoring.dashboards.get permission on the specified dashboard. For more information, see Google Cloud IAM (https://cloud.google.com/iam).
func (*ProjectsDashboardsService) List ¶
func (r *ProjectsDashboardsService) List(parent string) *ProjectsDashboardsListCall
List: Lists the existing dashboards.This method requires the monitoring.dashboards.list permission on the specified project. For more information, see Google Cloud IAM (https://cloud.google.com/iam).
func (*ProjectsDashboardsService) Patch ¶
func (r *ProjectsDashboardsService) Patch(name string, dashboard *Dashboard) *ProjectsDashboardsPatchCall
Patch: Replaces an existing custom dashboard with a new definition.This method requires the monitoring.dashboards.update permission on the specified dashboard. For more information, see Google Cloud IAM (https://cloud.google.com/iam).
type ProjectsService ¶
type ProjectsService struct { Dashboards *ProjectsDashboardsService // contains filtered or unexported fields }
func NewProjectsService ¶
func NewProjectsService(s *Service) *ProjectsService
type RatioPart ¶
type RatioPart struct { // Aggregation: By default, the raw time series data is returned. Use // this field to combine multiple time series for different views of the // data. Aggregation *Aggregation `json:"aggregation,omitempty"` // Filter: Required. The monitoring filter that identifies the metric // types, resources, and projects to query. Filter string `json:"filter,omitempty"` // ForceSendFields is a list of field names (e.g. "Aggregation") 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:"-"` // NullFields is a list of field names (e.g. "Aggregation") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
RatioPart: Describes a query to build the numerator or denominator of a TimeSeriesFilterRatio.
func (*RatioPart) MarshalJSON ¶
type Row ¶
type Row struct { // Weight: The relative weight of this row. The row weight is used to // adjust the height of rows on the screen (relative to peers). Greater // the weight, greater the height of the row on the screen. If omitted, // a value of 1 is used while rendering. Weight int64 `json:"weight,omitempty,string"` // Widgets: The display widgets arranged horizontally in this row. Widgets []*Widget `json:"widgets,omitempty"` // ForceSendFields is a list of field names (e.g. "Weight") 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:"-"` // NullFields is a list of field names (e.g. "Weight") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Row: Defines the layout properties and content for a row.
func (*Row) MarshalJSON ¶
type RowLayout ¶
type RowLayout struct { // Rows: The rows of content to display. Rows []*Row `json:"rows,omitempty"` // ForceSendFields is a list of field names (e.g. "Rows") 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:"-"` // NullFields is a list of field names (e.g. "Rows") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
RowLayout: A simplified layout that divides the available space into rows and arranges a set of widgets horizontally in each row.
func (*RowLayout) MarshalJSON ¶
type Scorecard ¶
type Scorecard struct { // GaugeView: Will cause the scorecard to show a gauge chart. GaugeView *GaugeView `json:"gaugeView,omitempty"` // SparkChartView: Will cause the scorecard to show a spark chart. SparkChartView *SparkChartView `json:"sparkChartView,omitempty"` // Thresholds: The thresholds used to determine the state of the // scorecard given the time series' current value. For an actual value // x, the scorecard is in a danger state if x is less than or equal to a // danger threshold that triggers below, or greater than or equal to a // danger threshold that triggers above. Similarly, if x is above/below // a warning threshold that triggers above/below, then the scorecard is // in a warning state - unless x also puts it in a danger state. (Danger // trumps warning.)As an example, consider a scorecard with the // following four thresholds: { value: 90, category: 'DANGER', // trigger: 'ABOVE', }, { value: 70, category: 'WARNING', trigger: // 'ABOVE', }, { value: 10, category: 'DANGER', trigger: 'BELOW', }, // { value: 20, category: 'WARNING', trigger: 'BELOW', }Then: values // less than or equal to 10 would put the scorecard in a DANGER state, // values greater than 10 but less than or equal to 20 a WARNING state, // values strictly between 20 and 70 an OK state, values greater than or // equal to 70 but less than 90 a WARNING state, and values greater than // or equal to 90 a DANGER state. Thresholds []*Threshold `json:"thresholds,omitempty"` // TimeSeriesQuery: Fields for querying time series data from the // Stackdriver metrics API. TimeSeriesQuery *TimeSeriesQuery `json:"timeSeriesQuery,omitempty"` // ForceSendFields is a list of field names (e.g. "GaugeView") 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:"-"` // NullFields is a list of field names (e.g. "GaugeView") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Scorecard: A widget showing the latest value of a metric, and how this value relates to one or more thresholds.
func (*Scorecard) MarshalJSON ¶
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Projects *ProjectsService // contains filtered or unexported fields }
func New
deprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func NewService ¶
NewService creates a new Service.
type SourceContext ¶
type SourceContext struct { // FileName: The path-qualified name of the .proto file that contained // the associated protobuf element. For example: // "google/protobuf/source_context.proto". FileName string `json:"fileName,omitempty"` // ForceSendFields is a list of field names (e.g. "FileName") 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:"-"` // NullFields is a list of field names (e.g. "FileName") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
SourceContext: SourceContext represents information about the source of a protobuf element, like the file in which it is defined.
func (*SourceContext) MarshalJSON ¶
func (s *SourceContext) MarshalJSON() ([]byte, error)
type SpanContext ¶
type SpanContext struct { // SpanName: The resource name of the span in the following // format: // projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] // TRACE_ // ID is a unique identifier for a trace within a project; it is a // 32-character hexadecimal encoding of a 16-byte array.SPAN_ID is a // unique identifier for a span within a trace; it is a 16-character // hexadecimal encoding of an 8-byte array. SpanName string `json:"spanName,omitempty"` // ForceSendFields is a list of field names (e.g. "SpanName") 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:"-"` // NullFields is a list of field names (e.g. "SpanName") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
SpanContext: The context of a span, attached to google.api.Distribution.Exemplars in google.api.Distribution values during aggregation.It contains the name of a span with format: projects/PROJECT_ID/traces/TRACE_ID/spans/SPAN_ID
func (*SpanContext) MarshalJSON ¶
func (s *SpanContext) MarshalJSON() ([]byte, error)
type SparkChartView ¶
type SparkChartView struct { // MinAlignmentPeriod: The lower bound on data point frequency in the // chart implemented by specifying the minimum alignment period to use // in a time series query. For example, if the data is published once // every 10 minutes it would not make sense to fetch and align data at // one minute intervals. This field is optional and exists only as a // hint. MinAlignmentPeriod string `json:"minAlignmentPeriod,omitempty"` // SparkChartType: The type of sparkchart to show in this chartView. // // Possible values: // "SPARK_CHART_TYPE_UNSPECIFIED" - Not allowed in well-formed // requests. // "SPARK_LINE" - The sparkline will be rendered as a small line // chart. // "SPARK_BAR" - The sparkbar will be rendered as a small bar chart. SparkChartType string `json:"sparkChartType,omitempty"` // ForceSendFields is a list of field names (e.g. "MinAlignmentPeriod") // 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:"-"` // NullFields is a list of field names (e.g. "MinAlignmentPeriod") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
SparkChartView: A sparkChart is a small chart suitable for inclusion in a table-cell or inline in text. This message contains the configuration for a sparkChart to show up on a Scorecard, showing recent trends of the scorecard's timeseries.
func (*SparkChartView) MarshalJSON ¶
func (s *SparkChartView) MarshalJSON() ([]byte, error)
type StatisticalTimeSeriesFilter ¶
type StatisticalTimeSeriesFilter struct { // NumTimeSeries: How many time series to output. NumTimeSeries int64 `json:"numTimeSeries,omitempty"` // RankingMethod: rankingMethod is applied to a set of time series, and // then the produced value for each individual time series is used to // compare a given time series to others. These are methods that cannot // be applied stream-by-stream, but rather require the full context of a // request to evaluate time series. // // Possible values: // "METHOD_UNSPECIFIED" - Not allowed in well-formed requests. // "METHOD_CLUSTER_OUTLIER" - Compute the outlier score of each // stream. RankingMethod string `json:"rankingMethod,omitempty"` // ForceSendFields is a list of field names (e.g. "NumTimeSeries") 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:"-"` // NullFields is a list of field names (e.g. "NumTimeSeries") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
StatisticalTimeSeriesFilter: A filter that ranks streams based on their statistical relation to other streams in a request.
func (*StatisticalTimeSeriesFilter) MarshalJSON ¶
func (s *StatisticalTimeSeriesFilter) MarshalJSON() ([]byte, error)
type Text ¶
type Text struct { // Content: The text content to be displayed. Content string `json:"content,omitempty"` // Format: How the text content is formatted. // // Possible values: // "FORMAT_UNSPECIFIED" - Format is unspecified. Defaults to MARKDOWN. // "MARKDOWN" - The text contains Markdown formatting. // "RAW" - The text contains no special formatting. Format string `json:"format,omitempty"` // ForceSendFields is a list of field names (e.g. "Content") 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:"-"` // NullFields is a list of field names (e.g. "Content") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Text: A widget that displays textual content.
func (*Text) MarshalJSON ¶
type Threshold ¶
type Threshold struct { // Color: The state color for this threshold. Color is not allowed in a // XyChart. // // Possible values: // "COLOR_UNSPECIFIED" - Color is unspecified. Not allowed in // well-formed requests. // "YELLOW" - Crossing the threshold is "concerning" behavior. // "RED" - Crossing the threshold is "emergency" behavior. Color string `json:"color,omitempty"` // Direction: The direction for the current threshold. Direction is not // allowed in a XyChart. // // Possible values: // "DIRECTION_UNSPECIFIED" - Not allowed in well-formed requests. // "ABOVE" - The threshold will be considered crossed if the actual // value is above the threshold value. // "BELOW" - The threshold will be considered crossed if the actual // value is below the threshold value. Direction string `json:"direction,omitempty"` // Label: A label for the threshold. Label string `json:"label,omitempty"` // Value: The value of the threshold. The value should be defined in the // native scale of the metric. Value float64 `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Color") 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:"-"` // NullFields is a list of field names (e.g. "Color") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Threshold: Defines a threshold for categorizing time series values.
func (*Threshold) MarshalJSON ¶
func (*Threshold) UnmarshalJSON ¶
type TimeSeriesFilter ¶
type TimeSeriesFilter struct { // Aggregation: By default, the raw time series data is returned. Use // this field to combine multiple time series for different views of the // data. Aggregation *Aggregation `json:"aggregation,omitempty"` // Filter: Required. The monitoring filter that identifies the metric // types, resources, and projects to query. Filter string `json:"filter,omitempty"` // PickTimeSeriesFilter: Ranking based time series filter. PickTimeSeriesFilter *PickTimeSeriesFilter `json:"pickTimeSeriesFilter,omitempty"` // StatisticalTimeSeriesFilter: Statistics based time series filter. StatisticalTimeSeriesFilter *StatisticalTimeSeriesFilter `json:"statisticalTimeSeriesFilter,omitempty"` // ForceSendFields is a list of field names (e.g. "Aggregation") 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:"-"` // NullFields is a list of field names (e.g. "Aggregation") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
TimeSeriesFilter: A filter that defines a subset of time series data that is displayed in a widget. Time series data is fetched using the ListTimeSeries method.
func (*TimeSeriesFilter) MarshalJSON ¶
func (s *TimeSeriesFilter) MarshalJSON() ([]byte, error)
type TimeSeriesFilterRatio ¶
type TimeSeriesFilterRatio struct { // Denominator: The denominator of the ratio. Denominator *RatioPart `json:"denominator,omitempty"` // Numerator: The numerator of the ratio. Numerator *RatioPart `json:"numerator,omitempty"` // PickTimeSeriesFilter: Ranking based time series filter. PickTimeSeriesFilter *PickTimeSeriesFilter `json:"pickTimeSeriesFilter,omitempty"` // SecondaryAggregation: Apply a second aggregation after the ratio is // computed. SecondaryAggregation *Aggregation `json:"secondaryAggregation,omitempty"` // StatisticalTimeSeriesFilter: Statistics based time series filter. StatisticalTimeSeriesFilter *StatisticalTimeSeriesFilter `json:"statisticalTimeSeriesFilter,omitempty"` // ForceSendFields is a list of field names (e.g. "Denominator") 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:"-"` // NullFields is a list of field names (e.g. "Denominator") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
TimeSeriesFilterRatio: A pair of time series filters that define a ratio computation. The output time series is the pair-wise division of each aligned element from the numerator and denominator time series.
func (*TimeSeriesFilterRatio) MarshalJSON ¶
func (s *TimeSeriesFilterRatio) MarshalJSON() ([]byte, error)
type TimeSeriesQuery ¶
type TimeSeriesQuery struct { // TimeSeriesFilter: Filter parameters to fetch time series. TimeSeriesFilter *TimeSeriesFilter `json:"timeSeriesFilter,omitempty"` // TimeSeriesFilterRatio: Parameters to fetch a ratio between two time // series filters. TimeSeriesFilterRatio *TimeSeriesFilterRatio `json:"timeSeriesFilterRatio,omitempty"` // UnitOverride: The unit of data contained in fetched time series. If // non-empty, this unit will override any unit that accompanies fetched // data. The format is the same as the unit field in MetricDescriptor. UnitOverride string `json:"unitOverride,omitempty"` // ForceSendFields is a list of field names (e.g. "TimeSeriesFilter") 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:"-"` // NullFields is a list of field names (e.g. "TimeSeriesFilter") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
TimeSeriesQuery: TimeSeriesQuery collects the set of supported methods for querying time series data from the Stackdriver metrics API.
func (*TimeSeriesQuery) MarshalJSON ¶
func (s *TimeSeriesQuery) MarshalJSON() ([]byte, error)
type Type ¶
type Type struct { // Fields: The list of fields. Fields []*Field `json:"fields,omitempty"` // Name: The fully qualified message name. Name string `json:"name,omitempty"` // Oneofs: The list of types appearing in oneof definitions in this // type. Oneofs []string `json:"oneofs,omitempty"` // Options: The protocol buffer options. Options []*Option `json:"options,omitempty"` // SourceContext: The source context. SourceContext *SourceContext `json:"sourceContext,omitempty"` // Syntax: The source syntax. // // Possible values: // "SYNTAX_PROTO2" - Syntax proto2. // "SYNTAX_PROTO3" - Syntax proto3. Syntax string `json:"syntax,omitempty"` // ForceSendFields is a list of field names (e.g. "Fields") 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:"-"` // NullFields is a list of field names (e.g. "Fields") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Type: A protocol buffer message type.
func (*Type) MarshalJSON ¶
type Widget ¶
type Widget struct { // Blank: A blank space. Blank *Empty `json:"blank,omitempty"` // Scorecard: A scorecard summarizing time series data. Scorecard *Scorecard `json:"scorecard,omitempty"` // Text: A raw string or markdown displaying textual content. Text *Text `json:"text,omitempty"` // Title: Optional. The title of the widget. Title string `json:"title,omitempty"` // XyChart: A chart of time series data. XyChart *XyChart `json:"xyChart,omitempty"` // ForceSendFields is a list of field names (e.g. "Blank") 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:"-"` // NullFields is a list of field names (e.g. "Blank") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Widget: Widget contains a single dashboard component and configuration of how to present the component in the dashboard.
func (*Widget) MarshalJSON ¶
type XyChart ¶
type XyChart struct { // ChartOptions: Display options for the chart. ChartOptions *ChartOptions `json:"chartOptions,omitempty"` // DataSets: The data displayed in this chart. DataSets []*DataSet `json:"dataSets,omitempty"` // Thresholds: Threshold lines drawn horizontally across the chart. Thresholds []*Threshold `json:"thresholds,omitempty"` // TimeshiftDuration: The duration used to display a comparison chart. A // comparison chart simultaneously shows values from two similar-length // time periods (e.g., week-over-week metrics). The duration must be // positive, and it can only be applied to charts with data sets of LINE // plot type. TimeshiftDuration string `json:"timeshiftDuration,omitempty"` // XAxis: The properties applied to the X axis. XAxis *Axis `json:"xAxis,omitempty"` // YAxis: The properties applied to the Y axis. YAxis *Axis `json:"yAxis,omitempty"` // ForceSendFields is a list of field names (e.g. "ChartOptions") 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:"-"` // NullFields is a list of field names (e.g. "ChartOptions") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
XyChart: A chart that displays data on a 2D (X and Y axes) plane.