google-apis-monitoring_v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-monitoring_v1.rb +15 -0
- data/lib/google/apis/monitoring_v1.rb +49 -0
- data/lib/google/apis/monitoring_v1/classes.rb +1360 -0
- data/lib/google/apis/monitoring_v1/gem_version.rb +28 -0
- data/lib/google/apis/monitoring_v1/representations.rb +566 -0
- data/lib/google/apis/monitoring_v1/service.rb +247 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cd990252d4ef4afe5dea91551f1cd9cbcef5c6d896ace6304ced45ede6b6f0d8
|
4
|
+
data.tar.gz: 00ed521cd18177655b13121a116e29ab160564fa5ed2c314d90bb226b939f7e3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fd8ba8d60799608c4888b21b04a6078f6c758d6d5a54898457d94e67a8cac22294c82393e39569aa0afe177794152bac48a11d80f59f696aaee3e5d59bf4053e
|
7
|
+
data.tar.gz: 8790ae49a8ba6dd5202c343a225ee3446df8b7baaf30a046da82b61feafc5eb4926861ab8cd26561f3fd6b558441394f29dedb5b99568b68fd97dcb2ca78788c
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-monitoring_v1
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/monitoring_v1/*.rb
|
9
|
+
lib/google/apis/monitoring_v1.rb
|
10
|
+
-
|
11
|
+
OVERVIEW.md
|
12
|
+
CHANGELOG.md
|
13
|
+
LICENSE.md
|
data/CHANGELOG.md
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
data/OVERVIEW.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Simple REST client for version V1 of the Cloud Monitoring API
|
2
|
+
|
3
|
+
This is a simple client library for version V1 of the Cloud Monitoring API. It provides:
|
4
|
+
|
5
|
+
* A client object that connects to the HTTP/JSON REST endpoint for the service.
|
6
|
+
* Ruby objects for data structures related to the service.
|
7
|
+
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
|
8
|
+
* Control of retry, pagination, and timeouts.
|
9
|
+
|
10
|
+
Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
|
11
|
+
|
12
|
+
## Getting started
|
13
|
+
|
14
|
+
### Before you begin
|
15
|
+
|
16
|
+
There are a few setup steps you need to complete before you can use this library:
|
17
|
+
|
18
|
+
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
|
19
|
+
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
|
20
|
+
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/monitoring.googleapis.com) in the console.
|
21
|
+
|
22
|
+
### Installation
|
23
|
+
|
24
|
+
Add this line to your application's Gemfile:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem 'google-apis-monitoring_v1', '~> 0.1'
|
28
|
+
```
|
29
|
+
|
30
|
+
And then execute:
|
31
|
+
|
32
|
+
```
|
33
|
+
$ bundle
|
34
|
+
```
|
35
|
+
|
36
|
+
Or install it yourself as:
|
37
|
+
|
38
|
+
```
|
39
|
+
$ gem install google-apis-monitoring_v1
|
40
|
+
```
|
41
|
+
|
42
|
+
### Creating a client object
|
43
|
+
|
44
|
+
Once the gem is installed, you can load the client code and instantiate a client.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
# Load the client
|
48
|
+
require "google/apis/monitoring_v1"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::MonitoringV1::MonitoringService.new
|
52
|
+
|
53
|
+
# Authenticate calls
|
54
|
+
client.authentication = # ... use the googleauth gem to create credentials
|
55
|
+
```
|
56
|
+
|
57
|
+
See the class reference docs for information on the methods you can call from a client.
|
58
|
+
|
59
|
+
## Documentation
|
60
|
+
|
61
|
+
More detailed descriptions of the Google simple REST clients are available in two documents.
|
62
|
+
|
63
|
+
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
64
|
+
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
65
|
+
|
66
|
+
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Monitoring service in particular.)
|
67
|
+
|
68
|
+
For reference information on specific calls in the Cloud Monitoring API, see the {Google::Apis::MonitoringV1::MonitoringService class reference docs}.
|
69
|
+
|
70
|
+
## Which client should I use?
|
71
|
+
|
72
|
+
Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
|
73
|
+
|
74
|
+
This library, `google-apis-monitoring_v1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
|
75
|
+
|
76
|
+
Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
|
77
|
+
|
78
|
+
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
|
79
|
+
|
80
|
+
**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
|
81
|
+
|
82
|
+
The [product documentation](https://cloud.google.com/monitoring/api/) may provide guidance regarding the preferred client library to use.
|
83
|
+
|
84
|
+
## Supported Ruby versions
|
85
|
+
|
86
|
+
This library is supported on Ruby 2.5+.
|
87
|
+
|
88
|
+
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
|
89
|
+
|
90
|
+
## License
|
91
|
+
|
92
|
+
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
|
93
|
+
|
94
|
+
## Support
|
95
|
+
|
96
|
+
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require "google/apis/monitoring_v1"
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/monitoring_v1/service.rb'
|
16
|
+
require 'google/apis/monitoring_v1/classes.rb'
|
17
|
+
require 'google/apis/monitoring_v1/representations.rb'
|
18
|
+
require 'google/apis/monitoring_v1/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Cloud Monitoring API
|
23
|
+
#
|
24
|
+
# Manages your Cloud Monitoring data and configurations. Most projects must be
|
25
|
+
# associated with a Workspace, with a few exceptions as noted on the individual
|
26
|
+
# method pages. The table entries below are presented in alphabetical order, not
|
27
|
+
# in order of common use. For explanations of the concepts found in the table
|
28
|
+
# entries, read the Cloud Monitoring documentation.
|
29
|
+
#
|
30
|
+
# @see https://cloud.google.com/monitoring/api/
|
31
|
+
module MonitoringV1
|
32
|
+
# Version of the Cloud Monitoring API this client connects to.
|
33
|
+
# This is NOT the gem version.
|
34
|
+
VERSION = 'V1'
|
35
|
+
|
36
|
+
# View and manage your data across Google Cloud Platform services
|
37
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
38
|
+
|
39
|
+
# View and write monitoring data for all of your Google and third-party Cloud and API projects
|
40
|
+
AUTH_MONITORING = 'https://www.googleapis.com/auth/monitoring'
|
41
|
+
|
42
|
+
# View monitoring data for all of your Google Cloud and third-party projects
|
43
|
+
AUTH_MONITORING_READ = 'https://www.googleapis.com/auth/monitoring.read'
|
44
|
+
|
45
|
+
# Publish metric data to your Google Cloud projects
|
46
|
+
AUTH_MONITORING_WRITE = 'https://www.googleapis.com/auth/monitoring.write'
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,1360 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module MonitoringV1
|
24
|
+
|
25
|
+
# Describes how to combine multiple time series to provide a different view of
|
26
|
+
# the data. Aggregation of time series is done in two steps. First, each time
|
27
|
+
# series in the set is aligned to the same time interval boundaries, then the
|
28
|
+
# set of time series is optionally reduced in number.Alignment consists of
|
29
|
+
# applying the per_series_aligner operation to each time series after its data
|
30
|
+
# has been divided into regular alignment_period time intervals. This process
|
31
|
+
# takes all of the data points in an alignment period, applies a mathematical
|
32
|
+
# transformation such as averaging, minimum, maximum, delta, etc., and converts
|
33
|
+
# them into a single data point per period.Reduction is when the aligned and
|
34
|
+
# transformed time series can optionally be combined, reducing the number of
|
35
|
+
# time series through similar mathematical transformations. Reduction involves
|
36
|
+
# applying a cross_series_reducer to all the time series, optionally sorting the
|
37
|
+
# time series into subsets with group_by_fields, and applying the reducer to
|
38
|
+
# each subset.The raw time series data can contain a huge amount of information
|
39
|
+
# from multiple sources. Alignment and reduction transforms this mass of data
|
40
|
+
# into a more manageable and representative collection of data, for example "the
|
41
|
+
# 95% latency across the average of all tasks in a cluster". This representative
|
42
|
+
# data can be more easily graphed and comprehended, and the individual time
|
43
|
+
# series data is still available for later drilldown. For more details, see
|
44
|
+
# Filtering and aggregation (https://cloud.google.com/monitoring/api/v3/
|
45
|
+
# aggregation).
|
46
|
+
class Aggregation
|
47
|
+
include Google::Apis::Core::Hashable
|
48
|
+
|
49
|
+
# The alignment_period specifies a time interval, in seconds, that is used to
|
50
|
+
# divide the data in all the time series into consistent blocks of time. This
|
51
|
+
# will be done before the per-series aligner can be applied to the data.The
|
52
|
+
# value must be at least 60 seconds. If a per-series aligner other than
|
53
|
+
# ALIGN_NONE is specified, this field is required or an error is returned. If no
|
54
|
+
# per-series aligner is specified, or the aligner ALIGN_NONE is specified, then
|
55
|
+
# this field is ignored.The maximum value of the alignment_period is 2 years, or
|
56
|
+
# 104 weeks.
|
57
|
+
# Corresponds to the JSON property `alignmentPeriod`
|
58
|
+
# @return [String]
|
59
|
+
attr_accessor :alignment_period
|
60
|
+
|
61
|
+
# The reduction operation to be used to combine time series into a single time
|
62
|
+
# series, where the value of each data point in the resulting series is a
|
63
|
+
# function of all the already aligned values in the input time series.Not all
|
64
|
+
# reducer operations can be applied to all time series. The valid choices depend
|
65
|
+
# on the metric_kind and the value_type of the original time series. Reduction
|
66
|
+
# can yield a time series with a different metric_kind or value_type than the
|
67
|
+
# input time series.Time series data must first be aligned (see
|
68
|
+
# per_series_aligner) in order to perform cross-time series reduction. If
|
69
|
+
# cross_series_reducer is specified, then per_series_aligner must be specified,
|
70
|
+
# and must not be ALIGN_NONE. An alignment_period must also be specified;
|
71
|
+
# otherwise, an error is returned.
|
72
|
+
# Corresponds to the JSON property `crossSeriesReducer`
|
73
|
+
# @return [String]
|
74
|
+
attr_accessor :cross_series_reducer
|
75
|
+
|
76
|
+
# The set of fields to preserve when cross_series_reducer is specified. The
|
77
|
+
# group_by_fields determine how the time series are partitioned into subsets
|
78
|
+
# prior to applying the aggregation operation. Each subset contains time series
|
79
|
+
# that have the same value for each of the grouping fields. Each individual time
|
80
|
+
# series is a member of exactly one subset. The cross_series_reducer is applied
|
81
|
+
# to each subset of time series. It is not possible to reduce across different
|
82
|
+
# resource types, so this field implicitly contains resource.type. Fields not
|
83
|
+
# specified in group_by_fields are aggregated away. If group_by_fields is not
|
84
|
+
# specified and all the time series have the same resource type, then the time
|
85
|
+
# series are aggregated into a single output time series. If
|
86
|
+
# cross_series_reducer is not defined, this field is ignored.
|
87
|
+
# Corresponds to the JSON property `groupByFields`
|
88
|
+
# @return [Array<String>]
|
89
|
+
attr_accessor :group_by_fields
|
90
|
+
|
91
|
+
# An Aligner describes how to bring the data points in a single time series into
|
92
|
+
# temporal alignment. Except for ALIGN_NONE, all alignments cause all the data
|
93
|
+
# points in an alignment_period to be mathematically grouped together, resulting
|
94
|
+
# in a single data point for each alignment_period with end timestamp at the end
|
95
|
+
# of the period.Not all alignment operations may be applied to all time series.
|
96
|
+
# The valid choices depend on the metric_kind and value_type of the original
|
97
|
+
# time series. Alignment can change the metric_kind or the value_type of the
|
98
|
+
# time series.Time series data must be aligned in order to perform cross-time
|
99
|
+
# series reduction. If cross_series_reducer is specified, then
|
100
|
+
# per_series_aligner must be specified and not equal to ALIGN_NONE and
|
101
|
+
# alignment_period must be specified; otherwise, an error is returned.
|
102
|
+
# Corresponds to the JSON property `perSeriesAligner`
|
103
|
+
# @return [String]
|
104
|
+
attr_accessor :per_series_aligner
|
105
|
+
|
106
|
+
def initialize(**args)
|
107
|
+
update!(**args)
|
108
|
+
end
|
109
|
+
|
110
|
+
# Update properties of this object
|
111
|
+
def update!(**args)
|
112
|
+
@alignment_period = args[:alignment_period] if args.key?(:alignment_period)
|
113
|
+
@cross_series_reducer = args[:cross_series_reducer] if args.key?(:cross_series_reducer)
|
114
|
+
@group_by_fields = args[:group_by_fields] if args.key?(:group_by_fields)
|
115
|
+
@per_series_aligner = args[:per_series_aligner] if args.key?(:per_series_aligner)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# A chart axis.
|
120
|
+
class Axis
|
121
|
+
include Google::Apis::Core::Hashable
|
122
|
+
|
123
|
+
# The label of the axis.
|
124
|
+
# Corresponds to the JSON property `label`
|
125
|
+
# @return [String]
|
126
|
+
attr_accessor :label
|
127
|
+
|
128
|
+
# The axis scale. By default, a linear scale is used.
|
129
|
+
# Corresponds to the JSON property `scale`
|
130
|
+
# @return [String]
|
131
|
+
attr_accessor :scale
|
132
|
+
|
133
|
+
def initialize(**args)
|
134
|
+
update!(**args)
|
135
|
+
end
|
136
|
+
|
137
|
+
# Update properties of this object
|
138
|
+
def update!(**args)
|
139
|
+
@label = args[:label] if args.key?(:label)
|
140
|
+
@scale = args[:scale] if args.key?(:scale)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
# Options to control visual rendering of a chart.
|
145
|
+
class ChartOptions
|
146
|
+
include Google::Apis::Core::Hashable
|
147
|
+
|
148
|
+
# The chart mode.
|
149
|
+
# Corresponds to the JSON property `mode`
|
150
|
+
# @return [String]
|
151
|
+
attr_accessor :mode
|
152
|
+
|
153
|
+
def initialize(**args)
|
154
|
+
update!(**args)
|
155
|
+
end
|
156
|
+
|
157
|
+
# Update properties of this object
|
158
|
+
def update!(**args)
|
159
|
+
@mode = args[:mode] if args.key?(:mode)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
# Defines the layout properties and content for a column.
|
164
|
+
class Column
|
165
|
+
include Google::Apis::Core::Hashable
|
166
|
+
|
167
|
+
# The relative weight of this column. The column weight is used to adjust the
|
168
|
+
# width of columns on the screen (relative to peers). Greater the weight,
|
169
|
+
# greater the width of the column on the screen. If omitted, a value of 1 is
|
170
|
+
# used while rendering.
|
171
|
+
# Corresponds to the JSON property `weight`
|
172
|
+
# @return [Fixnum]
|
173
|
+
attr_accessor :weight
|
174
|
+
|
175
|
+
# The display widgets arranged vertically in this column.
|
176
|
+
# Corresponds to the JSON property `widgets`
|
177
|
+
# @return [Array<Google::Apis::MonitoringV1::Widget>]
|
178
|
+
attr_accessor :widgets
|
179
|
+
|
180
|
+
def initialize(**args)
|
181
|
+
update!(**args)
|
182
|
+
end
|
183
|
+
|
184
|
+
# Update properties of this object
|
185
|
+
def update!(**args)
|
186
|
+
@weight = args[:weight] if args.key?(:weight)
|
187
|
+
@widgets = args[:widgets] if args.key?(:widgets)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
# A simplified layout that divides the available space into vertical columns and
|
192
|
+
# arranges a set of widgets vertically in each column.
|
193
|
+
class ColumnLayout
|
194
|
+
include Google::Apis::Core::Hashable
|
195
|
+
|
196
|
+
# The columns of content to display.
|
197
|
+
# Corresponds to the JSON property `columns`
|
198
|
+
# @return [Array<Google::Apis::MonitoringV1::Column>]
|
199
|
+
attr_accessor :columns
|
200
|
+
|
201
|
+
def initialize(**args)
|
202
|
+
update!(**args)
|
203
|
+
end
|
204
|
+
|
205
|
+
# Update properties of this object
|
206
|
+
def update!(**args)
|
207
|
+
@columns = args[:columns] if args.key?(:columns)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# A Google Stackdriver dashboard. Dashboards define the content and layout of
|
212
|
+
# pages in the Stackdriver web application.
|
213
|
+
class Dashboard
|
214
|
+
include Google::Apis::Core::Hashable
|
215
|
+
|
216
|
+
# A simplified layout that divides the available space into vertical columns and
|
217
|
+
# arranges a set of widgets vertically in each column.
|
218
|
+
# Corresponds to the JSON property `columnLayout`
|
219
|
+
# @return [Google::Apis::MonitoringV1::ColumnLayout]
|
220
|
+
attr_accessor :column_layout
|
221
|
+
|
222
|
+
# Required. The mutable, human-readable name.
|
223
|
+
# Corresponds to the JSON property `displayName`
|
224
|
+
# @return [String]
|
225
|
+
attr_accessor :display_name
|
226
|
+
|
227
|
+
# etag is used for optimistic concurrency control as a way to help prevent
|
228
|
+
# simultaneous updates of a policy from overwriting each other. An etag is
|
229
|
+
# returned in the response to GetDashboard, and users are expected to put that
|
230
|
+
# etag in the request to UpdateDashboard to ensure that their change will be
|
231
|
+
# applied to the same version of the Dashboard configuration. The field should
|
232
|
+
# not be passed during dashboard creation.
|
233
|
+
# Corresponds to the JSON property `etag`
|
234
|
+
# @return [String]
|
235
|
+
attr_accessor :etag
|
236
|
+
|
237
|
+
# A basic layout divides the available space into vertical columns of equal
|
238
|
+
# width and arranges a list of widgets using a row-first strategy.
|
239
|
+
# Corresponds to the JSON property `gridLayout`
|
240
|
+
# @return [Google::Apis::MonitoringV1::GridLayout]
|
241
|
+
attr_accessor :grid_layout
|
242
|
+
|
243
|
+
# A mosaic layout divides the available space into a grid of blocks, and
|
244
|
+
# overlays the grid with tiles. Unlike GridLayout, tiles may span multiple grid
|
245
|
+
# blocks and can be placed at arbitrary locations in the grid.
|
246
|
+
# Corresponds to the JSON property `mosaicLayout`
|
247
|
+
# @return [Google::Apis::MonitoringV1::MosaicLayout]
|
248
|
+
attr_accessor :mosaic_layout
|
249
|
+
|
250
|
+
# Immutable. The resource name of the dashboard.
|
251
|
+
# Corresponds to the JSON property `name`
|
252
|
+
# @return [String]
|
253
|
+
attr_accessor :name
|
254
|
+
|
255
|
+
# A simplified layout that divides the available space into rows and arranges a
|
256
|
+
# set of widgets horizontally in each row.
|
257
|
+
# Corresponds to the JSON property `rowLayout`
|
258
|
+
# @return [Google::Apis::MonitoringV1::RowLayout]
|
259
|
+
attr_accessor :row_layout
|
260
|
+
|
261
|
+
def initialize(**args)
|
262
|
+
update!(**args)
|
263
|
+
end
|
264
|
+
|
265
|
+
# Update properties of this object
|
266
|
+
def update!(**args)
|
267
|
+
@column_layout = args[:column_layout] if args.key?(:column_layout)
|
268
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
269
|
+
@etag = args[:etag] if args.key?(:etag)
|
270
|
+
@grid_layout = args[:grid_layout] if args.key?(:grid_layout)
|
271
|
+
@mosaic_layout = args[:mosaic_layout] if args.key?(:mosaic_layout)
|
272
|
+
@name = args[:name] if args.key?(:name)
|
273
|
+
@row_layout = args[:row_layout] if args.key?(:row_layout)
|
274
|
+
end
|
275
|
+
end
|
276
|
+
|
277
|
+
# Groups a time series query definition with charting options.
|
278
|
+
class DataSet
|
279
|
+
include Google::Apis::Core::Hashable
|
280
|
+
|
281
|
+
# A template string for naming TimeSeries in the resulting data set. This should
|
282
|
+
# be a string with interpolations of the form $`label_name`, which will resolve
|
283
|
+
# to the label's value.
|
284
|
+
# Corresponds to the JSON property `legendTemplate`
|
285
|
+
# @return [String]
|
286
|
+
attr_accessor :legend_template
|
287
|
+
|
288
|
+
# Optional. The lower bound on data point frequency for this data set,
|
289
|
+
# implemented by specifying the minimum alignment period to use in a time series
|
290
|
+
# query For example, if the data is published once every 10 minutes, the
|
291
|
+
# min_alignment_period should be at least 10 minutes. It would not make sense to
|
292
|
+
# fetch and align data at one minute intervals.
|
293
|
+
# Corresponds to the JSON property `minAlignmentPeriod`
|
294
|
+
# @return [String]
|
295
|
+
attr_accessor :min_alignment_period
|
296
|
+
|
297
|
+
# How this data should be plotted on the chart.
|
298
|
+
# Corresponds to the JSON property `plotType`
|
299
|
+
# @return [String]
|
300
|
+
attr_accessor :plot_type
|
301
|
+
|
302
|
+
# TimeSeriesQuery collects the set of supported methods for querying time series
|
303
|
+
# data from the Stackdriver metrics API.
|
304
|
+
# Corresponds to the JSON property `timeSeriesQuery`
|
305
|
+
# @return [Google::Apis::MonitoringV1::TimeSeriesQuery]
|
306
|
+
attr_accessor :time_series_query
|
307
|
+
|
308
|
+
def initialize(**args)
|
309
|
+
update!(**args)
|
310
|
+
end
|
311
|
+
|
312
|
+
# Update properties of this object
|
313
|
+
def update!(**args)
|
314
|
+
@legend_template = args[:legend_template] if args.key?(:legend_template)
|
315
|
+
@min_alignment_period = args[:min_alignment_period] if args.key?(:min_alignment_period)
|
316
|
+
@plot_type = args[:plot_type] if args.key?(:plot_type)
|
317
|
+
@time_series_query = args[:time_series_query] if args.key?(:time_series_query)
|
318
|
+
end
|
319
|
+
end
|
320
|
+
|
321
|
+
# A set of (label, value) pairs that were removed from a Distribution time
|
322
|
+
# series during aggregation and then added as an attachment to a Distribution.
|
323
|
+
# Exemplar.The full label set for the exemplars is constructed by using the
|
324
|
+
# dropped pairs in combination with the label values that remain on the
|
325
|
+
# aggregated Distribution time series. The constructed full label set can be
|
326
|
+
# used to identify the specific entity, such as the instance or job, which might
|
327
|
+
# be contributing to a long-tail. However, with dropped labels, the storage
|
328
|
+
# requirements are reduced because only the aggregated distribution values for a
|
329
|
+
# large group of time series are stored.Note that there are no guarantees on
|
330
|
+
# ordering of the labels from exemplar-to-exemplar and from distribution-to-
|
331
|
+
# distribution in the same stream, and there may be duplicates. It is up to
|
332
|
+
# clients to resolve any ambiguities.
|
333
|
+
class DroppedLabels
|
334
|
+
include Google::Apis::Core::Hashable
|
335
|
+
|
336
|
+
# Map from label to its value, for all labels dropped in any aggregation.
|
337
|
+
# Corresponds to the JSON property `label`
|
338
|
+
# @return [Hash<String,String>]
|
339
|
+
attr_accessor :label
|
340
|
+
|
341
|
+
def initialize(**args)
|
342
|
+
update!(**args)
|
343
|
+
end
|
344
|
+
|
345
|
+
# Update properties of this object
|
346
|
+
def update!(**args)
|
347
|
+
@label = args[:label] if args.key?(:label)
|
348
|
+
end
|
349
|
+
end
|
350
|
+
|
351
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
352
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
353
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
354
|
+
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
|
355
|
+
# Empty is empty JSON object ``.
|
356
|
+
class Empty
|
357
|
+
include Google::Apis::Core::Hashable
|
358
|
+
|
359
|
+
def initialize(**args)
|
360
|
+
update!(**args)
|
361
|
+
end
|
362
|
+
|
363
|
+
# Update properties of this object
|
364
|
+
def update!(**args)
|
365
|
+
end
|
366
|
+
end
|
367
|
+
|
368
|
+
# A single field of a message type.
|
369
|
+
class Field
|
370
|
+
include Google::Apis::Core::Hashable
|
371
|
+
|
372
|
+
# The field cardinality.
|
373
|
+
# Corresponds to the JSON property `cardinality`
|
374
|
+
# @return [String]
|
375
|
+
attr_accessor :cardinality
|
376
|
+
|
377
|
+
# The string value of the default value of this field. Proto2 syntax only.
|
378
|
+
# Corresponds to the JSON property `defaultValue`
|
379
|
+
# @return [String]
|
380
|
+
attr_accessor :default_value
|
381
|
+
|
382
|
+
# The field JSON name.
|
383
|
+
# Corresponds to the JSON property `jsonName`
|
384
|
+
# @return [String]
|
385
|
+
attr_accessor :json_name
|
386
|
+
|
387
|
+
# The field type.
|
388
|
+
# Corresponds to the JSON property `kind`
|
389
|
+
# @return [String]
|
390
|
+
attr_accessor :kind
|
391
|
+
|
392
|
+
# The field name.
|
393
|
+
# Corresponds to the JSON property `name`
|
394
|
+
# @return [String]
|
395
|
+
attr_accessor :name
|
396
|
+
|
397
|
+
# The field number.
|
398
|
+
# Corresponds to the JSON property `number`
|
399
|
+
# @return [Fixnum]
|
400
|
+
attr_accessor :number
|
401
|
+
|
402
|
+
# The index of the field type in Type.oneofs, for message or enumeration types.
|
403
|
+
# The first type has index 1; zero means the type is not in the list.
|
404
|
+
# Corresponds to the JSON property `oneofIndex`
|
405
|
+
# @return [Fixnum]
|
406
|
+
attr_accessor :oneof_index
|
407
|
+
|
408
|
+
# The protocol buffer options.
|
409
|
+
# Corresponds to the JSON property `options`
|
410
|
+
# @return [Array<Google::Apis::MonitoringV1::Option>]
|
411
|
+
attr_accessor :options
|
412
|
+
|
413
|
+
# Whether to use alternative packed wire representation.
|
414
|
+
# Corresponds to the JSON property `packed`
|
415
|
+
# @return [Boolean]
|
416
|
+
attr_accessor :packed
|
417
|
+
alias_method :packed?, :packed
|
418
|
+
|
419
|
+
# The field type URL, without the scheme, for message or enumeration types.
|
420
|
+
# Example: "type.googleapis.com/google.protobuf.Timestamp".
|
421
|
+
# Corresponds to the JSON property `typeUrl`
|
422
|
+
# @return [String]
|
423
|
+
attr_accessor :type_url
|
424
|
+
|
425
|
+
def initialize(**args)
|
426
|
+
update!(**args)
|
427
|
+
end
|
428
|
+
|
429
|
+
# Update properties of this object
|
430
|
+
def update!(**args)
|
431
|
+
@cardinality = args[:cardinality] if args.key?(:cardinality)
|
432
|
+
@default_value = args[:default_value] if args.key?(:default_value)
|
433
|
+
@json_name = args[:json_name] if args.key?(:json_name)
|
434
|
+
@kind = args[:kind] if args.key?(:kind)
|
435
|
+
@name = args[:name] if args.key?(:name)
|
436
|
+
@number = args[:number] if args.key?(:number)
|
437
|
+
@oneof_index = args[:oneof_index] if args.key?(:oneof_index)
|
438
|
+
@options = args[:options] if args.key?(:options)
|
439
|
+
@packed = args[:packed] if args.key?(:packed)
|
440
|
+
@type_url = args[:type_url] if args.key?(:type_url)
|
441
|
+
end
|
442
|
+
end
|
443
|
+
|
444
|
+
# A gauge chart shows where the current value sits within a pre-defined range.
|
445
|
+
# The upper and lower bounds should define the possible range of values for the
|
446
|
+
# scorecard's query (inclusive).
|
447
|
+
class GaugeView
|
448
|
+
include Google::Apis::Core::Hashable
|
449
|
+
|
450
|
+
# The lower bound for this gauge chart. The value of the chart should always be
|
451
|
+
# greater than or equal to this.
|
452
|
+
# Corresponds to the JSON property `lowerBound`
|
453
|
+
# @return [Float]
|
454
|
+
attr_accessor :lower_bound
|
455
|
+
|
456
|
+
# The upper bound for this gauge chart. The value of the chart should always be
|
457
|
+
# less than or equal to this.
|
458
|
+
# Corresponds to the JSON property `upperBound`
|
459
|
+
# @return [Float]
|
460
|
+
attr_accessor :upper_bound
|
461
|
+
|
462
|
+
def initialize(**args)
|
463
|
+
update!(**args)
|
464
|
+
end
|
465
|
+
|
466
|
+
# Update properties of this object
|
467
|
+
def update!(**args)
|
468
|
+
@lower_bound = args[:lower_bound] if args.key?(:lower_bound)
|
469
|
+
@upper_bound = args[:upper_bound] if args.key?(:upper_bound)
|
470
|
+
end
|
471
|
+
end
|
472
|
+
|
473
|
+
# A basic layout divides the available space into vertical columns of equal
|
474
|
+
# width and arranges a list of widgets using a row-first strategy.
|
475
|
+
class GridLayout
|
476
|
+
include Google::Apis::Core::Hashable
|
477
|
+
|
478
|
+
# The number of columns into which the view's width is divided. If omitted or
|
479
|
+
# set to zero, a system default will be used while rendering.
|
480
|
+
# Corresponds to the JSON property `columns`
|
481
|
+
# @return [Fixnum]
|
482
|
+
attr_accessor :columns
|
483
|
+
|
484
|
+
# The informational elements that are arranged into the columns row-first.
|
485
|
+
# Corresponds to the JSON property `widgets`
|
486
|
+
# @return [Array<Google::Apis::MonitoringV1::Widget>]
|
487
|
+
attr_accessor :widgets
|
488
|
+
|
489
|
+
def initialize(**args)
|
490
|
+
update!(**args)
|
491
|
+
end
|
492
|
+
|
493
|
+
# Update properties of this object
|
494
|
+
def update!(**args)
|
495
|
+
@columns = args[:columns] if args.key?(:columns)
|
496
|
+
@widgets = args[:widgets] if args.key?(:widgets)
|
497
|
+
end
|
498
|
+
end
|
499
|
+
|
500
|
+
# The ListDashboards request.
|
501
|
+
class ListDashboardsResponse
|
502
|
+
include Google::Apis::Core::Hashable
|
503
|
+
|
504
|
+
# The list of requested dashboards.
|
505
|
+
# Corresponds to the JSON property `dashboards`
|
506
|
+
# @return [Array<Google::Apis::MonitoringV1::Dashboard>]
|
507
|
+
attr_accessor :dashboards
|
508
|
+
|
509
|
+
# If there are more results than have been returned, then this field is set to a
|
510
|
+
# non-empty value. To see the additional results, use that value as page_token
|
511
|
+
# in the next call to this method.
|
512
|
+
# Corresponds to the JSON property `nextPageToken`
|
513
|
+
# @return [String]
|
514
|
+
attr_accessor :next_page_token
|
515
|
+
|
516
|
+
def initialize(**args)
|
517
|
+
update!(**args)
|
518
|
+
end
|
519
|
+
|
520
|
+
# Update properties of this object
|
521
|
+
def update!(**args)
|
522
|
+
@dashboards = args[:dashboards] if args.key?(:dashboards)
|
523
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
524
|
+
end
|
525
|
+
end
|
526
|
+
|
527
|
+
# A mosaic layout divides the available space into a grid of blocks, and
|
528
|
+
# overlays the grid with tiles. Unlike GridLayout, tiles may span multiple grid
|
529
|
+
# blocks and can be placed at arbitrary locations in the grid.
|
530
|
+
class MosaicLayout
|
531
|
+
include Google::Apis::Core::Hashable
|
532
|
+
|
533
|
+
# The number of columns in the mosaic grid. The number of columns must be
|
534
|
+
# between 1 and 12, inclusive.
|
535
|
+
# Corresponds to the JSON property `columns`
|
536
|
+
# @return [Fixnum]
|
537
|
+
attr_accessor :columns
|
538
|
+
|
539
|
+
# The tiles to display.
|
540
|
+
# Corresponds to the JSON property `tiles`
|
541
|
+
# @return [Array<Google::Apis::MonitoringV1::Tile>]
|
542
|
+
attr_accessor :tiles
|
543
|
+
|
544
|
+
def initialize(**args)
|
545
|
+
update!(**args)
|
546
|
+
end
|
547
|
+
|
548
|
+
# Update properties of this object
|
549
|
+
def update!(**args)
|
550
|
+
@columns = args[:columns] if args.key?(:columns)
|
551
|
+
@tiles = args[:tiles] if args.key?(:tiles)
|
552
|
+
end
|
553
|
+
end
|
554
|
+
|
555
|
+
# A protocol buffer option, which can be attached to a message, field,
|
556
|
+
# enumeration, etc.
|
557
|
+
class Option
|
558
|
+
include Google::Apis::Core::Hashable
|
559
|
+
|
560
|
+
# The option's name. For protobuf built-in options (options defined in
|
561
|
+
# descriptor.proto), this is the short name. For example, "map_entry". For
|
562
|
+
# custom options, it should be the fully-qualified name. For example, "google.
|
563
|
+
# api.http".
|
564
|
+
# Corresponds to the JSON property `name`
|
565
|
+
# @return [String]
|
566
|
+
attr_accessor :name
|
567
|
+
|
568
|
+
# The option's value packed in an Any message. If the value is a primitive, the
|
569
|
+
# corresponding wrapper type defined in google/protobuf/wrappers.proto should be
|
570
|
+
# used. If the value is an enum, it should be stored as an int32 value using the
|
571
|
+
# google.protobuf.Int32Value type.
|
572
|
+
# Corresponds to the JSON property `value`
|
573
|
+
# @return [Hash<String,Object>]
|
574
|
+
attr_accessor :value
|
575
|
+
|
576
|
+
def initialize(**args)
|
577
|
+
update!(**args)
|
578
|
+
end
|
579
|
+
|
580
|
+
# Update properties of this object
|
581
|
+
def update!(**args)
|
582
|
+
@name = args[:name] if args.key?(:name)
|
583
|
+
@value = args[:value] if args.key?(:value)
|
584
|
+
end
|
585
|
+
end
|
586
|
+
|
587
|
+
# Describes a ranking-based time series filter. Each input time series is ranked
|
588
|
+
# with an aligner. The filter will allow up to num_time_series time series to
|
589
|
+
# pass through it, selecting them based on the relative ranking.For example, if
|
590
|
+
# ranking_method is METHOD_MEAN,direction is BOTTOM, and num_time_series is 3,
|
591
|
+
# then the 3 times series with the lowest mean values will pass through the
|
592
|
+
# filter.
|
593
|
+
class PickTimeSeriesFilter
|
594
|
+
include Google::Apis::Core::Hashable
|
595
|
+
|
596
|
+
# How to use the ranking to select time series that pass through the filter.
|
597
|
+
# Corresponds to the JSON property `direction`
|
598
|
+
# @return [String]
|
599
|
+
attr_accessor :direction
|
600
|
+
|
601
|
+
# How many time series to allow to pass through the filter.
|
602
|
+
# Corresponds to the JSON property `numTimeSeries`
|
603
|
+
# @return [Fixnum]
|
604
|
+
attr_accessor :num_time_series
|
605
|
+
|
606
|
+
# ranking_method is applied to each time series independently to produce the
|
607
|
+
# value which will be used to compare the time series to other time series.
|
608
|
+
# Corresponds to the JSON property `rankingMethod`
|
609
|
+
# @return [String]
|
610
|
+
attr_accessor :ranking_method
|
611
|
+
|
612
|
+
def initialize(**args)
|
613
|
+
update!(**args)
|
614
|
+
end
|
615
|
+
|
616
|
+
# Update properties of this object
|
617
|
+
def update!(**args)
|
618
|
+
@direction = args[:direction] if args.key?(:direction)
|
619
|
+
@num_time_series = args[:num_time_series] if args.key?(:num_time_series)
|
620
|
+
@ranking_method = args[:ranking_method] if args.key?(:ranking_method)
|
621
|
+
end
|
622
|
+
end
|
623
|
+
|
624
|
+
# Describes a query to build the numerator or denominator of a
|
625
|
+
# TimeSeriesFilterRatio.
|
626
|
+
class RatioPart
|
627
|
+
include Google::Apis::Core::Hashable
|
628
|
+
|
629
|
+
# Describes how to combine multiple time series to provide a different view of
|
630
|
+
# the data. Aggregation of time series is done in two steps. First, each time
|
631
|
+
# series in the set is aligned to the same time interval boundaries, then the
|
632
|
+
# set of time series is optionally reduced in number.Alignment consists of
|
633
|
+
# applying the per_series_aligner operation to each time series after its data
|
634
|
+
# has been divided into regular alignment_period time intervals. This process
|
635
|
+
# takes all of the data points in an alignment period, applies a mathematical
|
636
|
+
# transformation such as averaging, minimum, maximum, delta, etc., and converts
|
637
|
+
# them into a single data point per period.Reduction is when the aligned and
|
638
|
+
# transformed time series can optionally be combined, reducing the number of
|
639
|
+
# time series through similar mathematical transformations. Reduction involves
|
640
|
+
# applying a cross_series_reducer to all the time series, optionally sorting the
|
641
|
+
# time series into subsets with group_by_fields, and applying the reducer to
|
642
|
+
# each subset.The raw time series data can contain a huge amount of information
|
643
|
+
# from multiple sources. Alignment and reduction transforms this mass of data
|
644
|
+
# into a more manageable and representative collection of data, for example "the
|
645
|
+
# 95% latency across the average of all tasks in a cluster". This representative
|
646
|
+
# data can be more easily graphed and comprehended, and the individual time
|
647
|
+
# series data is still available for later drilldown. For more details, see
|
648
|
+
# Filtering and aggregation (https://cloud.google.com/monitoring/api/v3/
|
649
|
+
# aggregation).
|
650
|
+
# Corresponds to the JSON property `aggregation`
|
651
|
+
# @return [Google::Apis::MonitoringV1::Aggregation]
|
652
|
+
attr_accessor :aggregation
|
653
|
+
|
654
|
+
# Required. The monitoring filter (https://cloud.google.com/monitoring/api/v3/
|
655
|
+
# filters) that identifies the metric types, resources, and projects to query.
|
656
|
+
# Corresponds to the JSON property `filter`
|
657
|
+
# @return [String]
|
658
|
+
attr_accessor :filter
|
659
|
+
|
660
|
+
def initialize(**args)
|
661
|
+
update!(**args)
|
662
|
+
end
|
663
|
+
|
664
|
+
# Update properties of this object
|
665
|
+
def update!(**args)
|
666
|
+
@aggregation = args[:aggregation] if args.key?(:aggregation)
|
667
|
+
@filter = args[:filter] if args.key?(:filter)
|
668
|
+
end
|
669
|
+
end
|
670
|
+
|
671
|
+
# Defines the layout properties and content for a row.
|
672
|
+
class Row
|
673
|
+
include Google::Apis::Core::Hashable
|
674
|
+
|
675
|
+
# The relative weight of this row. The row weight is used to adjust the height
|
676
|
+
# of rows on the screen (relative to peers). Greater the weight, greater the
|
677
|
+
# height of the row on the screen. If omitted, a value of 1 is used while
|
678
|
+
# rendering.
|
679
|
+
# Corresponds to the JSON property `weight`
|
680
|
+
# @return [Fixnum]
|
681
|
+
attr_accessor :weight
|
682
|
+
|
683
|
+
# The display widgets arranged horizontally in this row.
|
684
|
+
# Corresponds to the JSON property `widgets`
|
685
|
+
# @return [Array<Google::Apis::MonitoringV1::Widget>]
|
686
|
+
attr_accessor :widgets
|
687
|
+
|
688
|
+
def initialize(**args)
|
689
|
+
update!(**args)
|
690
|
+
end
|
691
|
+
|
692
|
+
# Update properties of this object
|
693
|
+
def update!(**args)
|
694
|
+
@weight = args[:weight] if args.key?(:weight)
|
695
|
+
@widgets = args[:widgets] if args.key?(:widgets)
|
696
|
+
end
|
697
|
+
end
|
698
|
+
|
699
|
+
# A simplified layout that divides the available space into rows and arranges a
|
700
|
+
# set of widgets horizontally in each row.
|
701
|
+
class RowLayout
|
702
|
+
include Google::Apis::Core::Hashable
|
703
|
+
|
704
|
+
# The rows of content to display.
|
705
|
+
# Corresponds to the JSON property `rows`
|
706
|
+
# @return [Array<Google::Apis::MonitoringV1::Row>]
|
707
|
+
attr_accessor :rows
|
708
|
+
|
709
|
+
def initialize(**args)
|
710
|
+
update!(**args)
|
711
|
+
end
|
712
|
+
|
713
|
+
# Update properties of this object
|
714
|
+
def update!(**args)
|
715
|
+
@rows = args[:rows] if args.key?(:rows)
|
716
|
+
end
|
717
|
+
end
|
718
|
+
|
719
|
+
# A widget showing the latest value of a metric, and how this value relates to
|
720
|
+
# one or more thresholds.
|
721
|
+
class Scorecard
|
722
|
+
include Google::Apis::Core::Hashable
|
723
|
+
|
724
|
+
# A gauge chart shows where the current value sits within a pre-defined range.
|
725
|
+
# The upper and lower bounds should define the possible range of values for the
|
726
|
+
# scorecard's query (inclusive).
|
727
|
+
# Corresponds to the JSON property `gaugeView`
|
728
|
+
# @return [Google::Apis::MonitoringV1::GaugeView]
|
729
|
+
attr_accessor :gauge_view
|
730
|
+
|
731
|
+
# A sparkChart is a small chart suitable for inclusion in a table-cell or inline
|
732
|
+
# in text. This message contains the configuration for a sparkChart to show up
|
733
|
+
# on a Scorecard, showing recent trends of the scorecard's timeseries.
|
734
|
+
# Corresponds to the JSON property `sparkChartView`
|
735
|
+
# @return [Google::Apis::MonitoringV1::SparkChartView]
|
736
|
+
attr_accessor :spark_chart_view
|
737
|
+
|
738
|
+
# The thresholds used to determine the state of the scorecard given the time
|
739
|
+
# series' current value. For an actual value x, the scorecard is in a danger
|
740
|
+
# state if x is less than or equal to a danger threshold that triggers below, or
|
741
|
+
# greater than or equal to a danger threshold that triggers above. Similarly, if
|
742
|
+
# x is above/below a warning threshold that triggers above/below, then the
|
743
|
+
# scorecard is in a warning state - unless x also puts it in a danger state. (
|
744
|
+
# Danger trumps warning.)As an example, consider a scorecard with the following
|
745
|
+
# four thresholds: ` value: 90, category: 'DANGER', trigger: 'ABOVE', `, ` value:
|
746
|
+
# 70, category: 'WARNING', trigger: 'ABOVE', `, ` value: 10, category: 'DANGER',
|
747
|
+
# trigger: 'BELOW', `, ` value: 20, category: 'WARNING', trigger: 'BELOW', `
|
748
|
+
# Then: values less than or equal to 10 would put the scorecard in a DANGER
|
749
|
+
# state, values greater than 10 but less than or equal to 20 a WARNING state,
|
750
|
+
# values strictly between 20 and 70 an OK state, values greater than or equal to
|
751
|
+
# 70 but less than 90 a WARNING state, and values greater than or equal to 90 a
|
752
|
+
# DANGER state.
|
753
|
+
# Corresponds to the JSON property `thresholds`
|
754
|
+
# @return [Array<Google::Apis::MonitoringV1::Threshold>]
|
755
|
+
attr_accessor :thresholds
|
756
|
+
|
757
|
+
# TimeSeriesQuery collects the set of supported methods for querying time series
|
758
|
+
# data from the Stackdriver metrics API.
|
759
|
+
# Corresponds to the JSON property `timeSeriesQuery`
|
760
|
+
# @return [Google::Apis::MonitoringV1::TimeSeriesQuery]
|
761
|
+
attr_accessor :time_series_query
|
762
|
+
|
763
|
+
def initialize(**args)
|
764
|
+
update!(**args)
|
765
|
+
end
|
766
|
+
|
767
|
+
# Update properties of this object
|
768
|
+
def update!(**args)
|
769
|
+
@gauge_view = args[:gauge_view] if args.key?(:gauge_view)
|
770
|
+
@spark_chart_view = args[:spark_chart_view] if args.key?(:spark_chart_view)
|
771
|
+
@thresholds = args[:thresholds] if args.key?(:thresholds)
|
772
|
+
@time_series_query = args[:time_series_query] if args.key?(:time_series_query)
|
773
|
+
end
|
774
|
+
end
|
775
|
+
|
776
|
+
# SourceContext represents information about the source of a protobuf element,
|
777
|
+
# like the file in which it is defined.
|
778
|
+
class SourceContext
|
779
|
+
include Google::Apis::Core::Hashable
|
780
|
+
|
781
|
+
# The path-qualified name of the .proto file that contained the associated
|
782
|
+
# protobuf element. For example: "google/protobuf/source_context.proto".
|
783
|
+
# Corresponds to the JSON property `fileName`
|
784
|
+
# @return [String]
|
785
|
+
attr_accessor :file_name
|
786
|
+
|
787
|
+
def initialize(**args)
|
788
|
+
update!(**args)
|
789
|
+
end
|
790
|
+
|
791
|
+
# Update properties of this object
|
792
|
+
def update!(**args)
|
793
|
+
@file_name = args[:file_name] if args.key?(:file_name)
|
794
|
+
end
|
795
|
+
end
|
796
|
+
|
797
|
+
# The context of a span, attached to Exemplars in Distribution values during
|
798
|
+
# aggregation.It contains the name of a span with format: projects/[
|
799
|
+
# PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]
|
800
|
+
class SpanContext
|
801
|
+
include Google::Apis::Core::Hashable
|
802
|
+
|
803
|
+
# The resource name of the span. The format is: projects/[PROJECT_ID_OR_NUMBER]/
|
804
|
+
# traces/[TRACE_ID]/spans/[SPAN_ID] [TRACE_ID] is a unique identifier for a
|
805
|
+
# trace within a project; it is a 32-character hexadecimal encoding of a 16-byte
|
806
|
+
# array.[SPAN_ID] is a unique identifier for a span within a trace; it is a 16-
|
807
|
+
# character hexadecimal encoding of an 8-byte array.
|
808
|
+
# Corresponds to the JSON property `spanName`
|
809
|
+
# @return [String]
|
810
|
+
attr_accessor :span_name
|
811
|
+
|
812
|
+
def initialize(**args)
|
813
|
+
update!(**args)
|
814
|
+
end
|
815
|
+
|
816
|
+
# Update properties of this object
|
817
|
+
def update!(**args)
|
818
|
+
@span_name = args[:span_name] if args.key?(:span_name)
|
819
|
+
end
|
820
|
+
end
|
821
|
+
|
822
|
+
# A sparkChart is a small chart suitable for inclusion in a table-cell or inline
|
823
|
+
# in text. This message contains the configuration for a sparkChart to show up
|
824
|
+
# on a Scorecard, showing recent trends of the scorecard's timeseries.
|
825
|
+
class SparkChartView
|
826
|
+
include Google::Apis::Core::Hashable
|
827
|
+
|
828
|
+
# The lower bound on data point frequency in the chart implemented by specifying
|
829
|
+
# the minimum alignment period to use in a time series query. For example, if
|
830
|
+
# the data is published once every 10 minutes it would not make sense to fetch
|
831
|
+
# and align data at one minute intervals. This field is optional and exists only
|
832
|
+
# as a hint.
|
833
|
+
# Corresponds to the JSON property `minAlignmentPeriod`
|
834
|
+
# @return [String]
|
835
|
+
attr_accessor :min_alignment_period
|
836
|
+
|
837
|
+
# Required. The type of sparkchart to show in this chartView.
|
838
|
+
# Corresponds to the JSON property `sparkChartType`
|
839
|
+
# @return [String]
|
840
|
+
attr_accessor :spark_chart_type
|
841
|
+
|
842
|
+
def initialize(**args)
|
843
|
+
update!(**args)
|
844
|
+
end
|
845
|
+
|
846
|
+
# Update properties of this object
|
847
|
+
def update!(**args)
|
848
|
+
@min_alignment_period = args[:min_alignment_period] if args.key?(:min_alignment_period)
|
849
|
+
@spark_chart_type = args[:spark_chart_type] if args.key?(:spark_chart_type)
|
850
|
+
end
|
851
|
+
end
|
852
|
+
|
853
|
+
# A filter that ranks streams based on their statistical relation to other
|
854
|
+
# streams in a request. Note: This field is deprecated and completely ignored by
|
855
|
+
# the API.
|
856
|
+
class StatisticalTimeSeriesFilter
|
857
|
+
include Google::Apis::Core::Hashable
|
858
|
+
|
859
|
+
# How many time series to output.
|
860
|
+
# Corresponds to the JSON property `numTimeSeries`
|
861
|
+
# @return [Fixnum]
|
862
|
+
attr_accessor :num_time_series
|
863
|
+
|
864
|
+
# rankingMethod is applied to a set of time series, and then the produced value
|
865
|
+
# for each individual time series is used to compare a given time series to
|
866
|
+
# others. These are methods that cannot be applied stream-by-stream, but rather
|
867
|
+
# require the full context of a request to evaluate time series.
|
868
|
+
# Corresponds to the JSON property `rankingMethod`
|
869
|
+
# @return [String]
|
870
|
+
attr_accessor :ranking_method
|
871
|
+
|
872
|
+
def initialize(**args)
|
873
|
+
update!(**args)
|
874
|
+
end
|
875
|
+
|
876
|
+
# Update properties of this object
|
877
|
+
def update!(**args)
|
878
|
+
@num_time_series = args[:num_time_series] if args.key?(:num_time_series)
|
879
|
+
@ranking_method = args[:ranking_method] if args.key?(:ranking_method)
|
880
|
+
end
|
881
|
+
end
|
882
|
+
|
883
|
+
# A widget that displays textual content.
|
884
|
+
class Text
|
885
|
+
include Google::Apis::Core::Hashable
|
886
|
+
|
887
|
+
# The text content to be displayed.
|
888
|
+
# Corresponds to the JSON property `content`
|
889
|
+
# @return [String]
|
890
|
+
attr_accessor :content
|
891
|
+
|
892
|
+
# How the text content is formatted.
|
893
|
+
# Corresponds to the JSON property `format`
|
894
|
+
# @return [String]
|
895
|
+
attr_accessor :format
|
896
|
+
|
897
|
+
def initialize(**args)
|
898
|
+
update!(**args)
|
899
|
+
end
|
900
|
+
|
901
|
+
# Update properties of this object
|
902
|
+
def update!(**args)
|
903
|
+
@content = args[:content] if args.key?(:content)
|
904
|
+
@format = args[:format] if args.key?(:format)
|
905
|
+
end
|
906
|
+
end
|
907
|
+
|
908
|
+
# Defines a threshold for categorizing time series values.
|
909
|
+
class Threshold
|
910
|
+
include Google::Apis::Core::Hashable
|
911
|
+
|
912
|
+
# The state color for this threshold. Color is not allowed in a XyChart.
|
913
|
+
# Corresponds to the JSON property `color`
|
914
|
+
# @return [String]
|
915
|
+
attr_accessor :color
|
916
|
+
|
917
|
+
# The direction for the current threshold. Direction is not allowed in a XyChart.
|
918
|
+
# Corresponds to the JSON property `direction`
|
919
|
+
# @return [String]
|
920
|
+
attr_accessor :direction
|
921
|
+
|
922
|
+
# A label for the threshold.
|
923
|
+
# Corresponds to the JSON property `label`
|
924
|
+
# @return [String]
|
925
|
+
attr_accessor :label
|
926
|
+
|
927
|
+
# The value of the threshold. The value should be defined in the native scale of
|
928
|
+
# the metric.
|
929
|
+
# Corresponds to the JSON property `value`
|
930
|
+
# @return [Float]
|
931
|
+
attr_accessor :value
|
932
|
+
|
933
|
+
def initialize(**args)
|
934
|
+
update!(**args)
|
935
|
+
end
|
936
|
+
|
937
|
+
# Update properties of this object
|
938
|
+
def update!(**args)
|
939
|
+
@color = args[:color] if args.key?(:color)
|
940
|
+
@direction = args[:direction] if args.key?(:direction)
|
941
|
+
@label = args[:label] if args.key?(:label)
|
942
|
+
@value = args[:value] if args.key?(:value)
|
943
|
+
end
|
944
|
+
end
|
945
|
+
|
946
|
+
# A single tile in the mosaic. The placement and size of the tile are
|
947
|
+
# configurable.
|
948
|
+
class Tile
|
949
|
+
include Google::Apis::Core::Hashable
|
950
|
+
|
951
|
+
# The height of the tile, measured in grid blocks. Tiles must have a minimum
|
952
|
+
# height of 1.
|
953
|
+
# Corresponds to the JSON property `height`
|
954
|
+
# @return [Fixnum]
|
955
|
+
attr_accessor :height
|
956
|
+
|
957
|
+
# Widget contains a single dashboard component and configuration of how to
|
958
|
+
# present the component in the dashboard.
|
959
|
+
# Corresponds to the JSON property `widget`
|
960
|
+
# @return [Google::Apis::MonitoringV1::Widget]
|
961
|
+
attr_accessor :widget
|
962
|
+
|
963
|
+
# The width of the tile, measured in grid blocks. Tiles must have a minimum
|
964
|
+
# width of 1.
|
965
|
+
# Corresponds to the JSON property `width`
|
966
|
+
# @return [Fixnum]
|
967
|
+
attr_accessor :width
|
968
|
+
|
969
|
+
# The zero-indexed position of the tile in grid blocks relative to the left edge
|
970
|
+
# of the grid. Tiles must be contained within the specified number of columns.
|
971
|
+
# x_pos cannot be negative.
|
972
|
+
# Corresponds to the JSON property `xPos`
|
973
|
+
# @return [Fixnum]
|
974
|
+
attr_accessor :x_pos
|
975
|
+
|
976
|
+
# The zero-indexed position of the tile in grid blocks relative to the top edge
|
977
|
+
# of the grid. y_pos cannot be negative.
|
978
|
+
# Corresponds to the JSON property `yPos`
|
979
|
+
# @return [Fixnum]
|
980
|
+
attr_accessor :y_pos
|
981
|
+
|
982
|
+
def initialize(**args)
|
983
|
+
update!(**args)
|
984
|
+
end
|
985
|
+
|
986
|
+
# Update properties of this object
|
987
|
+
def update!(**args)
|
988
|
+
@height = args[:height] if args.key?(:height)
|
989
|
+
@widget = args[:widget] if args.key?(:widget)
|
990
|
+
@width = args[:width] if args.key?(:width)
|
991
|
+
@x_pos = args[:x_pos] if args.key?(:x_pos)
|
992
|
+
@y_pos = args[:y_pos] if args.key?(:y_pos)
|
993
|
+
end
|
994
|
+
end
|
995
|
+
|
996
|
+
# A filter that defines a subset of time series data that is displayed in a
|
997
|
+
# widget. Time series data is fetched using the ListTimeSeries (https://cloud.
|
998
|
+
# google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) method.
|
999
|
+
class TimeSeriesFilter
|
1000
|
+
include Google::Apis::Core::Hashable
|
1001
|
+
|
1002
|
+
# Describes how to combine multiple time series to provide a different view of
|
1003
|
+
# the data. Aggregation of time series is done in two steps. First, each time
|
1004
|
+
# series in the set is aligned to the same time interval boundaries, then the
|
1005
|
+
# set of time series is optionally reduced in number.Alignment consists of
|
1006
|
+
# applying the per_series_aligner operation to each time series after its data
|
1007
|
+
# has been divided into regular alignment_period time intervals. This process
|
1008
|
+
# takes all of the data points in an alignment period, applies a mathematical
|
1009
|
+
# transformation such as averaging, minimum, maximum, delta, etc., and converts
|
1010
|
+
# them into a single data point per period.Reduction is when the aligned and
|
1011
|
+
# transformed time series can optionally be combined, reducing the number of
|
1012
|
+
# time series through similar mathematical transformations. Reduction involves
|
1013
|
+
# applying a cross_series_reducer to all the time series, optionally sorting the
|
1014
|
+
# time series into subsets with group_by_fields, and applying the reducer to
|
1015
|
+
# each subset.The raw time series data can contain a huge amount of information
|
1016
|
+
# from multiple sources. Alignment and reduction transforms this mass of data
|
1017
|
+
# into a more manageable and representative collection of data, for example "the
|
1018
|
+
# 95% latency across the average of all tasks in a cluster". This representative
|
1019
|
+
# data can be more easily graphed and comprehended, and the individual time
|
1020
|
+
# series data is still available for later drilldown. For more details, see
|
1021
|
+
# Filtering and aggregation (https://cloud.google.com/monitoring/api/v3/
|
1022
|
+
# aggregation).
|
1023
|
+
# Corresponds to the JSON property `aggregation`
|
1024
|
+
# @return [Google::Apis::MonitoringV1::Aggregation]
|
1025
|
+
attr_accessor :aggregation
|
1026
|
+
|
1027
|
+
# Required. The monitoring filter (https://cloud.google.com/monitoring/api/v3/
|
1028
|
+
# filters) that identifies the metric types, resources, and projects to query.
|
1029
|
+
# Corresponds to the JSON property `filter`
|
1030
|
+
# @return [String]
|
1031
|
+
attr_accessor :filter
|
1032
|
+
|
1033
|
+
# Describes a ranking-based time series filter. Each input time series is ranked
|
1034
|
+
# with an aligner. The filter will allow up to num_time_series time series to
|
1035
|
+
# pass through it, selecting them based on the relative ranking.For example, if
|
1036
|
+
# ranking_method is METHOD_MEAN,direction is BOTTOM, and num_time_series is 3,
|
1037
|
+
# then the 3 times series with the lowest mean values will pass through the
|
1038
|
+
# filter.
|
1039
|
+
# Corresponds to the JSON property `pickTimeSeriesFilter`
|
1040
|
+
# @return [Google::Apis::MonitoringV1::PickTimeSeriesFilter]
|
1041
|
+
attr_accessor :pick_time_series_filter
|
1042
|
+
|
1043
|
+
# Describes how to combine multiple time series to provide a different view of
|
1044
|
+
# the data. Aggregation of time series is done in two steps. First, each time
|
1045
|
+
# series in the set is aligned to the same time interval boundaries, then the
|
1046
|
+
# set of time series is optionally reduced in number.Alignment consists of
|
1047
|
+
# applying the per_series_aligner operation to each time series after its data
|
1048
|
+
# has been divided into regular alignment_period time intervals. This process
|
1049
|
+
# takes all of the data points in an alignment period, applies a mathematical
|
1050
|
+
# transformation such as averaging, minimum, maximum, delta, etc., and converts
|
1051
|
+
# them into a single data point per period.Reduction is when the aligned and
|
1052
|
+
# transformed time series can optionally be combined, reducing the number of
|
1053
|
+
# time series through similar mathematical transformations. Reduction involves
|
1054
|
+
# applying a cross_series_reducer to all the time series, optionally sorting the
|
1055
|
+
# time series into subsets with group_by_fields, and applying the reducer to
|
1056
|
+
# each subset.The raw time series data can contain a huge amount of information
|
1057
|
+
# from multiple sources. Alignment and reduction transforms this mass of data
|
1058
|
+
# into a more manageable and representative collection of data, for example "the
|
1059
|
+
# 95% latency across the average of all tasks in a cluster". This representative
|
1060
|
+
# data can be more easily graphed and comprehended, and the individual time
|
1061
|
+
# series data is still available for later drilldown. For more details, see
|
1062
|
+
# Filtering and aggregation (https://cloud.google.com/monitoring/api/v3/
|
1063
|
+
# aggregation).
|
1064
|
+
# Corresponds to the JSON property `secondaryAggregation`
|
1065
|
+
# @return [Google::Apis::MonitoringV1::Aggregation]
|
1066
|
+
attr_accessor :secondary_aggregation
|
1067
|
+
|
1068
|
+
# A filter that ranks streams based on their statistical relation to other
|
1069
|
+
# streams in a request. Note: This field is deprecated and completely ignored by
|
1070
|
+
# the API.
|
1071
|
+
# Corresponds to the JSON property `statisticalTimeSeriesFilter`
|
1072
|
+
# @return [Google::Apis::MonitoringV1::StatisticalTimeSeriesFilter]
|
1073
|
+
attr_accessor :statistical_time_series_filter
|
1074
|
+
|
1075
|
+
def initialize(**args)
|
1076
|
+
update!(**args)
|
1077
|
+
end
|
1078
|
+
|
1079
|
+
# Update properties of this object
|
1080
|
+
def update!(**args)
|
1081
|
+
@aggregation = args[:aggregation] if args.key?(:aggregation)
|
1082
|
+
@filter = args[:filter] if args.key?(:filter)
|
1083
|
+
@pick_time_series_filter = args[:pick_time_series_filter] if args.key?(:pick_time_series_filter)
|
1084
|
+
@secondary_aggregation = args[:secondary_aggregation] if args.key?(:secondary_aggregation)
|
1085
|
+
@statistical_time_series_filter = args[:statistical_time_series_filter] if args.key?(:statistical_time_series_filter)
|
1086
|
+
end
|
1087
|
+
end
|
1088
|
+
|
1089
|
+
# A pair of time series filters that define a ratio computation. The output time
|
1090
|
+
# series is the pair-wise division of each aligned element from the numerator
|
1091
|
+
# and denominator time series.
|
1092
|
+
class TimeSeriesFilterRatio
|
1093
|
+
include Google::Apis::Core::Hashable
|
1094
|
+
|
1095
|
+
# Describes a query to build the numerator or denominator of a
|
1096
|
+
# TimeSeriesFilterRatio.
|
1097
|
+
# Corresponds to the JSON property `denominator`
|
1098
|
+
# @return [Google::Apis::MonitoringV1::RatioPart]
|
1099
|
+
attr_accessor :denominator
|
1100
|
+
|
1101
|
+
# Describes a query to build the numerator or denominator of a
|
1102
|
+
# TimeSeriesFilterRatio.
|
1103
|
+
# Corresponds to the JSON property `numerator`
|
1104
|
+
# @return [Google::Apis::MonitoringV1::RatioPart]
|
1105
|
+
attr_accessor :numerator
|
1106
|
+
|
1107
|
+
# Describes a ranking-based time series filter. Each input time series is ranked
|
1108
|
+
# with an aligner. The filter will allow up to num_time_series time series to
|
1109
|
+
# pass through it, selecting them based on the relative ranking.For example, if
|
1110
|
+
# ranking_method is METHOD_MEAN,direction is BOTTOM, and num_time_series is 3,
|
1111
|
+
# then the 3 times series with the lowest mean values will pass through the
|
1112
|
+
# filter.
|
1113
|
+
# Corresponds to the JSON property `pickTimeSeriesFilter`
|
1114
|
+
# @return [Google::Apis::MonitoringV1::PickTimeSeriesFilter]
|
1115
|
+
attr_accessor :pick_time_series_filter
|
1116
|
+
|
1117
|
+
# Describes how to combine multiple time series to provide a different view of
|
1118
|
+
# the data. Aggregation of time series is done in two steps. First, each time
|
1119
|
+
# series in the set is aligned to the same time interval boundaries, then the
|
1120
|
+
# set of time series is optionally reduced in number.Alignment consists of
|
1121
|
+
# applying the per_series_aligner operation to each time series after its data
|
1122
|
+
# has been divided into regular alignment_period time intervals. This process
|
1123
|
+
# takes all of the data points in an alignment period, applies a mathematical
|
1124
|
+
# transformation such as averaging, minimum, maximum, delta, etc., and converts
|
1125
|
+
# them into a single data point per period.Reduction is when the aligned and
|
1126
|
+
# transformed time series can optionally be combined, reducing the number of
|
1127
|
+
# time series through similar mathematical transformations. Reduction involves
|
1128
|
+
# applying a cross_series_reducer to all the time series, optionally sorting the
|
1129
|
+
# time series into subsets with group_by_fields, and applying the reducer to
|
1130
|
+
# each subset.The raw time series data can contain a huge amount of information
|
1131
|
+
# from multiple sources. Alignment and reduction transforms this mass of data
|
1132
|
+
# into a more manageable and representative collection of data, for example "the
|
1133
|
+
# 95% latency across the average of all tasks in a cluster". This representative
|
1134
|
+
# data can be more easily graphed and comprehended, and the individual time
|
1135
|
+
# series data is still available for later drilldown. For more details, see
|
1136
|
+
# Filtering and aggregation (https://cloud.google.com/monitoring/api/v3/
|
1137
|
+
# aggregation).
|
1138
|
+
# Corresponds to the JSON property `secondaryAggregation`
|
1139
|
+
# @return [Google::Apis::MonitoringV1::Aggregation]
|
1140
|
+
attr_accessor :secondary_aggregation
|
1141
|
+
|
1142
|
+
# A filter that ranks streams based on their statistical relation to other
|
1143
|
+
# streams in a request. Note: This field is deprecated and completely ignored by
|
1144
|
+
# the API.
|
1145
|
+
# Corresponds to the JSON property `statisticalTimeSeriesFilter`
|
1146
|
+
# @return [Google::Apis::MonitoringV1::StatisticalTimeSeriesFilter]
|
1147
|
+
attr_accessor :statistical_time_series_filter
|
1148
|
+
|
1149
|
+
def initialize(**args)
|
1150
|
+
update!(**args)
|
1151
|
+
end
|
1152
|
+
|
1153
|
+
# Update properties of this object
|
1154
|
+
def update!(**args)
|
1155
|
+
@denominator = args[:denominator] if args.key?(:denominator)
|
1156
|
+
@numerator = args[:numerator] if args.key?(:numerator)
|
1157
|
+
@pick_time_series_filter = args[:pick_time_series_filter] if args.key?(:pick_time_series_filter)
|
1158
|
+
@secondary_aggregation = args[:secondary_aggregation] if args.key?(:secondary_aggregation)
|
1159
|
+
@statistical_time_series_filter = args[:statistical_time_series_filter] if args.key?(:statistical_time_series_filter)
|
1160
|
+
end
|
1161
|
+
end
|
1162
|
+
|
1163
|
+
# TimeSeriesQuery collects the set of supported methods for querying time series
|
1164
|
+
# data from the Stackdriver metrics API.
|
1165
|
+
class TimeSeriesQuery
|
1166
|
+
include Google::Apis::Core::Hashable
|
1167
|
+
|
1168
|
+
# A filter that defines a subset of time series data that is displayed in a
|
1169
|
+
# widget. Time series data is fetched using the ListTimeSeries (https://cloud.
|
1170
|
+
# google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) method.
|
1171
|
+
# Corresponds to the JSON property `timeSeriesFilter`
|
1172
|
+
# @return [Google::Apis::MonitoringV1::TimeSeriesFilter]
|
1173
|
+
attr_accessor :time_series_filter
|
1174
|
+
|
1175
|
+
# A pair of time series filters that define a ratio computation. The output time
|
1176
|
+
# series is the pair-wise division of each aligned element from the numerator
|
1177
|
+
# and denominator time series.
|
1178
|
+
# Corresponds to the JSON property `timeSeriesFilterRatio`
|
1179
|
+
# @return [Google::Apis::MonitoringV1::TimeSeriesFilterRatio]
|
1180
|
+
attr_accessor :time_series_filter_ratio
|
1181
|
+
|
1182
|
+
# A query used to fetch time series.
|
1183
|
+
# Corresponds to the JSON property `timeSeriesQueryLanguage`
|
1184
|
+
# @return [String]
|
1185
|
+
attr_accessor :time_series_query_language
|
1186
|
+
|
1187
|
+
# The unit of data contained in fetched time series. If non-empty, this unit
|
1188
|
+
# will override any unit that accompanies fetched data. The format is the same
|
1189
|
+
# as the unit (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.
|
1190
|
+
# metricDescriptors) field in MetricDescriptor.
|
1191
|
+
# Corresponds to the JSON property `unitOverride`
|
1192
|
+
# @return [String]
|
1193
|
+
attr_accessor :unit_override
|
1194
|
+
|
1195
|
+
def initialize(**args)
|
1196
|
+
update!(**args)
|
1197
|
+
end
|
1198
|
+
|
1199
|
+
# Update properties of this object
|
1200
|
+
def update!(**args)
|
1201
|
+
@time_series_filter = args[:time_series_filter] if args.key?(:time_series_filter)
|
1202
|
+
@time_series_filter_ratio = args[:time_series_filter_ratio] if args.key?(:time_series_filter_ratio)
|
1203
|
+
@time_series_query_language = args[:time_series_query_language] if args.key?(:time_series_query_language)
|
1204
|
+
@unit_override = args[:unit_override] if args.key?(:unit_override)
|
1205
|
+
end
|
1206
|
+
end
|
1207
|
+
|
1208
|
+
# A protocol buffer message type.
|
1209
|
+
class Type
|
1210
|
+
include Google::Apis::Core::Hashable
|
1211
|
+
|
1212
|
+
# The list of fields.
|
1213
|
+
# Corresponds to the JSON property `fields`
|
1214
|
+
# @return [Array<Google::Apis::MonitoringV1::Field>]
|
1215
|
+
attr_accessor :fields
|
1216
|
+
|
1217
|
+
# The fully qualified message name.
|
1218
|
+
# Corresponds to the JSON property `name`
|
1219
|
+
# @return [String]
|
1220
|
+
attr_accessor :name
|
1221
|
+
|
1222
|
+
# The list of types appearing in oneof definitions in this type.
|
1223
|
+
# Corresponds to the JSON property `oneofs`
|
1224
|
+
# @return [Array<String>]
|
1225
|
+
attr_accessor :oneofs
|
1226
|
+
|
1227
|
+
# The protocol buffer options.
|
1228
|
+
# Corresponds to the JSON property `options`
|
1229
|
+
# @return [Array<Google::Apis::MonitoringV1::Option>]
|
1230
|
+
attr_accessor :options
|
1231
|
+
|
1232
|
+
# SourceContext represents information about the source of a protobuf element,
|
1233
|
+
# like the file in which it is defined.
|
1234
|
+
# Corresponds to the JSON property `sourceContext`
|
1235
|
+
# @return [Google::Apis::MonitoringV1::SourceContext]
|
1236
|
+
attr_accessor :source_context
|
1237
|
+
|
1238
|
+
# The source syntax.
|
1239
|
+
# Corresponds to the JSON property `syntax`
|
1240
|
+
# @return [String]
|
1241
|
+
attr_accessor :syntax
|
1242
|
+
|
1243
|
+
def initialize(**args)
|
1244
|
+
update!(**args)
|
1245
|
+
end
|
1246
|
+
|
1247
|
+
# Update properties of this object
|
1248
|
+
def update!(**args)
|
1249
|
+
@fields = args[:fields] if args.key?(:fields)
|
1250
|
+
@name = args[:name] if args.key?(:name)
|
1251
|
+
@oneofs = args[:oneofs] if args.key?(:oneofs)
|
1252
|
+
@options = args[:options] if args.key?(:options)
|
1253
|
+
@source_context = args[:source_context] if args.key?(:source_context)
|
1254
|
+
@syntax = args[:syntax] if args.key?(:syntax)
|
1255
|
+
end
|
1256
|
+
end
|
1257
|
+
|
1258
|
+
# Widget contains a single dashboard component and configuration of how to
|
1259
|
+
# present the component in the dashboard.
|
1260
|
+
class Widget
|
1261
|
+
include Google::Apis::Core::Hashable
|
1262
|
+
|
1263
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
1264
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
1265
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
1266
|
+
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
|
1267
|
+
# Empty is empty JSON object ``.
|
1268
|
+
# Corresponds to the JSON property `blank`
|
1269
|
+
# @return [Google::Apis::MonitoringV1::Empty]
|
1270
|
+
attr_accessor :blank
|
1271
|
+
|
1272
|
+
# A widget showing the latest value of a metric, and how this value relates to
|
1273
|
+
# one or more thresholds.
|
1274
|
+
# Corresponds to the JSON property `scorecard`
|
1275
|
+
# @return [Google::Apis::MonitoringV1::Scorecard]
|
1276
|
+
attr_accessor :scorecard
|
1277
|
+
|
1278
|
+
# A widget that displays textual content.
|
1279
|
+
# Corresponds to the JSON property `text`
|
1280
|
+
# @return [Google::Apis::MonitoringV1::Text]
|
1281
|
+
attr_accessor :text
|
1282
|
+
|
1283
|
+
# Optional. The title of the widget.
|
1284
|
+
# Corresponds to the JSON property `title`
|
1285
|
+
# @return [String]
|
1286
|
+
attr_accessor :title
|
1287
|
+
|
1288
|
+
# A chart that displays data on a 2D (X and Y axes) plane.
|
1289
|
+
# Corresponds to the JSON property `xyChart`
|
1290
|
+
# @return [Google::Apis::MonitoringV1::XyChart]
|
1291
|
+
attr_accessor :xy_chart
|
1292
|
+
|
1293
|
+
def initialize(**args)
|
1294
|
+
update!(**args)
|
1295
|
+
end
|
1296
|
+
|
1297
|
+
# Update properties of this object
|
1298
|
+
def update!(**args)
|
1299
|
+
@blank = args[:blank] if args.key?(:blank)
|
1300
|
+
@scorecard = args[:scorecard] if args.key?(:scorecard)
|
1301
|
+
@text = args[:text] if args.key?(:text)
|
1302
|
+
@title = args[:title] if args.key?(:title)
|
1303
|
+
@xy_chart = args[:xy_chart] if args.key?(:xy_chart)
|
1304
|
+
end
|
1305
|
+
end
|
1306
|
+
|
1307
|
+
# A chart that displays data on a 2D (X and Y axes) plane.
|
1308
|
+
class XyChart
|
1309
|
+
include Google::Apis::Core::Hashable
|
1310
|
+
|
1311
|
+
# Options to control visual rendering of a chart.
|
1312
|
+
# Corresponds to the JSON property `chartOptions`
|
1313
|
+
# @return [Google::Apis::MonitoringV1::ChartOptions]
|
1314
|
+
attr_accessor :chart_options
|
1315
|
+
|
1316
|
+
# Required. The data displayed in this chart.
|
1317
|
+
# Corresponds to the JSON property `dataSets`
|
1318
|
+
# @return [Array<Google::Apis::MonitoringV1::DataSet>]
|
1319
|
+
attr_accessor :data_sets
|
1320
|
+
|
1321
|
+
# Threshold lines drawn horizontally across the chart.
|
1322
|
+
# Corresponds to the JSON property `thresholds`
|
1323
|
+
# @return [Array<Google::Apis::MonitoringV1::Threshold>]
|
1324
|
+
attr_accessor :thresholds
|
1325
|
+
|
1326
|
+
# The duration used to display a comparison chart. A comparison chart
|
1327
|
+
# simultaneously shows values from two similar-length time periods (e.g., week-
|
1328
|
+
# over-week metrics). The duration must be positive, and it can only be applied
|
1329
|
+
# to charts with data sets of LINE plot type.
|
1330
|
+
# Corresponds to the JSON property `timeshiftDuration`
|
1331
|
+
# @return [String]
|
1332
|
+
attr_accessor :timeshift_duration
|
1333
|
+
|
1334
|
+
# A chart axis.
|
1335
|
+
# Corresponds to the JSON property `xAxis`
|
1336
|
+
# @return [Google::Apis::MonitoringV1::Axis]
|
1337
|
+
attr_accessor :x_axis
|
1338
|
+
|
1339
|
+
# A chart axis.
|
1340
|
+
# Corresponds to the JSON property `yAxis`
|
1341
|
+
# @return [Google::Apis::MonitoringV1::Axis]
|
1342
|
+
attr_accessor :y_axis
|
1343
|
+
|
1344
|
+
def initialize(**args)
|
1345
|
+
update!(**args)
|
1346
|
+
end
|
1347
|
+
|
1348
|
+
# Update properties of this object
|
1349
|
+
def update!(**args)
|
1350
|
+
@chart_options = args[:chart_options] if args.key?(:chart_options)
|
1351
|
+
@data_sets = args[:data_sets] if args.key?(:data_sets)
|
1352
|
+
@thresholds = args[:thresholds] if args.key?(:thresholds)
|
1353
|
+
@timeshift_duration = args[:timeshift_duration] if args.key?(:timeshift_duration)
|
1354
|
+
@x_axis = args[:x_axis] if args.key?(:x_axis)
|
1355
|
+
@y_axis = args[:y_axis] if args.key?(:y_axis)
|
1356
|
+
end
|
1357
|
+
end
|
1358
|
+
end
|
1359
|
+
end
|
1360
|
+
end
|