google-cloud-monitoring-v3 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +8 -8
  3. data/README.md +1 -1
  4. data/lib/google/cloud/monitoring/v3/alert_policy_service/client.rb +4 -13
  5. data/lib/google/cloud/monitoring/v3/alert_policy_service/paths.rb +14 -0
  6. data/lib/google/cloud/monitoring/v3/group_service/client.rb +6 -21
  7. data/lib/google/cloud/monitoring/v3/group_service/paths.rb +14 -0
  8. data/lib/google/cloud/monitoring/v3/metric_service/client.rb +7 -25
  9. data/lib/google/cloud/monitoring/v3/notification_channel_service/client.rb +8 -29
  10. data/lib/google/cloud/monitoring/v3/notification_channel_service/paths.rb +14 -0
  11. data/lib/google/cloud/monitoring/v3/query_service/client.rb +1 -1
  12. data/lib/google/cloud/monitoring/v3/service_monitoring_service/client.rb +7 -25
  13. data/lib/google/cloud/monitoring/v3/service_monitoring_service/paths.rb +14 -0
  14. data/lib/google/cloud/monitoring/v3/uptime_check_service/client.rb +5 -17
  15. data/lib/google/cloud/monitoring/v3/uptime_check_service/paths.rb +14 -0
  16. data/lib/google/cloud/monitoring/v3/version.rb +1 -1
  17. data/lib/google/monitoring/v3/alert_service_services_pb.rb +1 -1
  18. data/lib/google/monitoring/v3/group_service_services_pb.rb +1 -1
  19. data/lib/google/monitoring/v3/metric_service_services_pb.rb +1 -1
  20. data/lib/google/monitoring/v3/notification_service_services_pb.rb +1 -1
  21. data/lib/google/monitoring/v3/query_service_services_pb.rb +1 -1
  22. data/lib/google/monitoring/v3/service_service_services_pb.rb +1 -1
  23. data/lib/google/monitoring/v3/uptime_service_services_pb.rb +1 -1
  24. data/proto_docs/google/api/distribution.rb +2 -2
  25. data/proto_docs/google/api/field_behavior.rb +7 -1
  26. data/proto_docs/google/api/launch_stage.rb +7 -1
  27. data/proto_docs/google/api/metric.rb +109 -36
  28. data/proto_docs/google/api/monitored_resource.rb +7 -6
  29. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 82d58ea887dc8fd5c201c2609b6506d9c8ff121563487f6d61bc71ffe9261d92
4
- data.tar.gz: 21cc2aed83e4cf23ce294977a7cd07628039fe21327f7a12b69135c74574b921
3
+ metadata.gz: 7dec6d95d8bd4486aa11ae3ec9dff1d78bec82ab8e9a3cf05f9b46ad5d64dba2
4
+ data.tar.gz: 1dbef9169213f4c1f5c359eed7303ea8c1bb7c28415be568dfde9b7a2f2ca817
5
5
  SHA512:
6
- metadata.gz: 141173d2a28529db926cab02554643b1c4981849f9e4c9bddc7e714e5538976705fd0b5b2bbc60300e924c85307b18d789e8fc72974eefbd1e89ed3b232b6b75
7
- data.tar.gz: 7ffdf57253c7676d844a07cb16889c73eceb0e118159243822033ff192aeed8fd9b9741a4481742c4ee3585f081ca86f0d3402d113c090c7e0013372636b0420
6
+ metadata.gz: 6bd4ed90760607805d6156f95224fd7552d3817826095f45fb252af63990417baa6f64f9dd82969d043093c08a70c1cdcc169f7e0c65145ab30ed869d6a885b9
7
+ data.tar.gz: 0c2a694792313db4ed25401ff15c914e61ce1ea8f153b932741e57bc3c96381e40b8c522635c192fa069172d80975af2f071d74086064c5907851d5028ae2887
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-monitoring-v3
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Monitoring::V3::AlertPolicyService::Credentials}):
68
68
 
69
- 1. `MONITORING_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `MONITORING_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `MONITORING_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `MONITORING_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/monitoring/v3"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Monitoring::V3::AlertPolicyService::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/monitoring/v3"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Monitoring::V3::AlertPolicyService::Client.new do |con
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/monitoring/v3"
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/monitoring/v3"
34
34
 
35
35
  client = ::Google::Cloud::Monitoring::V3::AlertPolicyService::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Monitoring::V3::ListAlertPoliciesRequest.new # (request fields as keyword arguments...)
37
37
  response = client.list_alert_policies request
38
38
  ```
39
39
 
@@ -75,28 +75,19 @@ module Google
75
75
 
76
76
  default_config.rpcs.list_alert_policies.timeout = 30.0
77
77
  default_config.rpcs.list_alert_policies.retry_policy = {
78
- initial_delay: 0.1,
79
- max_delay: 30.0,
80
- multiplier: 1.3,
81
- retry_codes: [4, 14]
78
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
82
79
  }
83
80
 
84
81
  default_config.rpcs.get_alert_policy.timeout = 30.0
85
82
  default_config.rpcs.get_alert_policy.retry_policy = {
86
- initial_delay: 0.1,
87
- max_delay: 30.0,
88
- multiplier: 1.3,
89
- retry_codes: [4, 14]
83
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
90
84
  }
91
85
 
92
86
  default_config.rpcs.create_alert_policy.timeout = 30.0
93
87
 
94
88
  default_config.rpcs.delete_alert_policy.timeout = 30.0
95
89
  default_config.rpcs.delete_alert_policy.retry_policy = {
96
- initial_delay: 0.1,
97
- max_delay: 30.0,
98
- multiplier: 1.3,
99
- retry_codes: [4, 14]
90
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
100
91
  }
101
92
 
102
93
  default_config.rpcs.update_alert_policy.timeout = 30.0
@@ -169,7 +160,7 @@ module Google
169
160
  !@config.endpoint.split(".").first.include?("-")
170
161
  credentials ||= Credentials.default scope: @config.scope,
171
162
  enable_self_signed_jwt: enable_self_signed_jwt
172
- if credentials.is_a?(String) || credentials.is_a?(Hash)
163
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
173
164
  credentials = Credentials.new credentials, scope: @config.scope
174
165
  end
175
166
  @quota_project_id = @config.quota_project
@@ -162,6 +162,20 @@ module Google
162
162
  "organizations/#{organization}"
163
163
  end
164
164
 
165
+ ##
166
+ # Create a fully-qualified Project resource string.
167
+ #
168
+ # The resource will be in the following format:
169
+ #
170
+ # `projects/{project}`
171
+ #
172
+ # @param project [String]
173
+ #
174
+ # @return [::String]
175
+ def project_path project:
176
+ "projects/#{project}"
177
+ end
178
+
165
179
  ##
166
180
  # Create a fully-qualified Workspace resource string.
167
181
  #
@@ -78,44 +78,29 @@ module Google
78
78
 
79
79
  default_config.rpcs.list_groups.timeout = 30.0
80
80
  default_config.rpcs.list_groups.retry_policy = {
81
- initial_delay: 0.1,
82
- max_delay: 30.0,
83
- multiplier: 1.3,
84
- retry_codes: [4, 14]
81
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
85
82
  }
86
83
 
87
84
  default_config.rpcs.get_group.timeout = 30.0
88
85
  default_config.rpcs.get_group.retry_policy = {
89
- initial_delay: 0.1,
90
- max_delay: 30.0,
91
- multiplier: 1.3,
92
- retry_codes: [4, 14]
86
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
93
87
  }
94
88
 
95
89
  default_config.rpcs.create_group.timeout = 30.0
96
90
 
97
91
  default_config.rpcs.update_group.timeout = 30.0
98
92
  default_config.rpcs.update_group.retry_policy = {
99
- initial_delay: 0.1,
100
- max_delay: 30.0,
101
- multiplier: 1.3,
102
- retry_codes: [4, 14]
93
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
103
94
  }
104
95
 
105
96
  default_config.rpcs.delete_group.timeout = 30.0
106
97
  default_config.rpcs.delete_group.retry_policy = {
107
- initial_delay: 0.1,
108
- max_delay: 30.0,
109
- multiplier: 1.3,
110
- retry_codes: [4, 14]
98
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
111
99
  }
112
100
 
113
101
  default_config.rpcs.list_group_members.timeout = 30.0
114
102
  default_config.rpcs.list_group_members.retry_policy = {
115
- initial_delay: 0.1,
116
- max_delay: 30.0,
117
- multiplier: 1.3,
118
- retry_codes: [4, 14]
103
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
119
104
  }
120
105
 
121
106
  default_config
@@ -186,7 +171,7 @@ module Google
186
171
  !@config.endpoint.split(".").first.include?("-")
187
172
  credentials ||= Credentials.default scope: @config.scope,
188
173
  enable_self_signed_jwt: enable_self_signed_jwt
189
- if credentials.is_a?(String) || credentials.is_a?(Hash)
174
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
190
175
  credentials = Credentials.new credentials, scope: @config.scope
191
176
  end
192
177
  @quota_project_id = @config.quota_project
@@ -104,6 +104,20 @@ module Google
104
104
  "organizations/#{organization}"
105
105
  end
106
106
 
107
+ ##
108
+ # Create a fully-qualified Project resource string.
109
+ #
110
+ # The resource will be in the following format:
111
+ #
112
+ # `projects/{project}`
113
+ #
114
+ # @param project [String]
115
+ #
116
+ # @return [::String]
117
+ def project_path project:
118
+ "projects/#{project}"
119
+ end
120
+
107
121
  ##
108
122
  # Create a fully-qualified Workspace resource string.
109
123
  #
@@ -68,52 +68,34 @@ module Google
68
68
 
69
69
  default_config.rpcs.list_monitored_resource_descriptors.timeout = 30.0
70
70
  default_config.rpcs.list_monitored_resource_descriptors.retry_policy = {
71
- initial_delay: 0.1,
72
- max_delay: 30.0,
73
- multiplier: 1.3,
74
- retry_codes: [4, 14]
71
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
75
72
  }
76
73
 
77
74
  default_config.rpcs.get_monitored_resource_descriptor.timeout = 30.0
78
75
  default_config.rpcs.get_monitored_resource_descriptor.retry_policy = {
79
- initial_delay: 0.1,
80
- max_delay: 30.0,
81
- multiplier: 1.3,
82
- retry_codes: [4, 14]
76
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
83
77
  }
84
78
 
85
79
  default_config.rpcs.list_metric_descriptors.timeout = 30.0
86
80
  default_config.rpcs.list_metric_descriptors.retry_policy = {
87
- initial_delay: 0.1,
88
- max_delay: 30.0,
89
- multiplier: 1.3,
90
- retry_codes: [4, 14]
81
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
91
82
  }
92
83
 
93
84
  default_config.rpcs.get_metric_descriptor.timeout = 30.0
94
85
  default_config.rpcs.get_metric_descriptor.retry_policy = {
95
- initial_delay: 0.1,
96
- max_delay: 30.0,
97
- multiplier: 1.3,
98
- retry_codes: [4, 14]
86
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
99
87
  }
100
88
 
101
89
  default_config.rpcs.create_metric_descriptor.timeout = 12.0
102
90
 
103
91
  default_config.rpcs.delete_metric_descriptor.timeout = 30.0
104
92
  default_config.rpcs.delete_metric_descriptor.retry_policy = {
105
- initial_delay: 0.1,
106
- max_delay: 30.0,
107
- multiplier: 1.3,
108
- retry_codes: [4, 14]
93
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
109
94
  }
110
95
 
111
96
  default_config.rpcs.list_time_series.timeout = 30.0
112
97
  default_config.rpcs.list_time_series.retry_policy = {
113
- initial_delay: 0.1,
114
- max_delay: 30.0,
115
- multiplier: 1.3,
116
- retry_codes: [4, 14]
98
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
117
99
  }
118
100
 
119
101
  default_config.rpcs.create_time_series.timeout = 12.0
@@ -186,7 +168,7 @@ module Google
186
168
  !@config.endpoint.split(".").first.include?("-")
187
169
  credentials ||= Credentials.default scope: @config.scope,
188
170
  enable_self_signed_jwt: enable_self_signed_jwt
189
- if credentials.is_a?(String) || credentials.is_a?(Hash)
171
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
190
172
  credentials = Credentials.new credentials, scope: @config.scope
191
173
  end
192
174
  @quota_project_id = @config.quota_project
@@ -68,34 +68,22 @@ module Google
68
68
 
69
69
  default_config.rpcs.list_notification_channel_descriptors.timeout = 30.0
70
70
  default_config.rpcs.list_notification_channel_descriptors.retry_policy = {
71
- initial_delay: 0.1,
72
- max_delay: 30.0,
73
- multiplier: 1.3,
74
- retry_codes: [4, 14]
71
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
75
72
  }
76
73
 
77
74
  default_config.rpcs.get_notification_channel_descriptor.timeout = 30.0
78
75
  default_config.rpcs.get_notification_channel_descriptor.retry_policy = {
79
- initial_delay: 0.1,
80
- max_delay: 30.0,
81
- multiplier: 1.3,
82
- retry_codes: [4, 14]
76
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
83
77
  }
84
78
 
85
79
  default_config.rpcs.list_notification_channels.timeout = 30.0
86
80
  default_config.rpcs.list_notification_channels.retry_policy = {
87
- initial_delay: 0.1,
88
- max_delay: 30.0,
89
- multiplier: 1.3,
90
- retry_codes: [4, 14]
81
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
91
82
  }
92
83
 
93
84
  default_config.rpcs.get_notification_channel.timeout = 30.0
94
85
  default_config.rpcs.get_notification_channel.retry_policy = {
95
- initial_delay: 0.1,
96
- max_delay: 30.0,
97
- multiplier: 1.3,
98
- retry_codes: [4, 14]
86
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
99
87
  }
100
88
 
101
89
  default_config.rpcs.create_notification_channel.timeout = 30.0
@@ -104,28 +92,19 @@ module Google
104
92
 
105
93
  default_config.rpcs.delete_notification_channel.timeout = 30.0
106
94
  default_config.rpcs.delete_notification_channel.retry_policy = {
107
- initial_delay: 0.1,
108
- max_delay: 30.0,
109
- multiplier: 1.3,
110
- retry_codes: [4, 14]
95
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
111
96
  }
112
97
 
113
98
  default_config.rpcs.send_notification_channel_verification_code.timeout = 30.0
114
99
 
115
100
  default_config.rpcs.get_notification_channel_verification_code.timeout = 30.0
116
101
  default_config.rpcs.get_notification_channel_verification_code.retry_policy = {
117
- initial_delay: 0.1,
118
- max_delay: 30.0,
119
- multiplier: 1.3,
120
- retry_codes: [4, 14]
102
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
121
103
  }
122
104
 
123
105
  default_config.rpcs.verify_notification_channel.timeout = 30.0
124
106
  default_config.rpcs.verify_notification_channel.retry_policy = {
125
- initial_delay: 0.1,
126
- max_delay: 30.0,
127
- multiplier: 1.3,
128
- retry_codes: [4, 14]
107
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
129
108
  }
130
109
 
131
110
  default_config
@@ -196,7 +175,7 @@ module Google
196
175
  !@config.endpoint.split(".").first.include?("-")
197
176
  credentials ||= Credentials.default scope: @config.scope,
198
177
  enable_self_signed_jwt: enable_self_signed_jwt
199
- if credentials.is_a?(String) || credentials.is_a?(Hash)
178
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
200
179
  credentials = Credentials.new credentials, scope: @config.scope
201
180
  end
202
181
  @quota_project_id = @config.quota_project
@@ -156,6 +156,20 @@ module Google
156
156
  "organizations/#{organization}"
157
157
  end
158
158
 
159
+ ##
160
+ # Create a fully-qualified Project resource string.
161
+ #
162
+ # The resource will be in the following format:
163
+ #
164
+ # `projects/{project}`
165
+ #
166
+ # @param project [String]
167
+ #
168
+ # @return [::String]
169
+ def project_path project:
170
+ "projects/#{project}"
171
+ end
172
+
159
173
  ##
160
174
  # Create a fully-qualified Workspace resource string.
161
175
  #
@@ -133,7 +133,7 @@ module Google
133
133
  !@config.endpoint.split(".").first.include?("-")
134
134
  credentials ||= Credentials.default scope: @config.scope,
135
135
  enable_self_signed_jwt: enable_self_signed_jwt
136
- if credentials.is_a?(String) || credentials.is_a?(Hash)
136
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
137
137
  credentials = Credentials.new credentials, scope: @config.scope
138
138
  end
139
139
  @quota_project_id = @config.quota_project
@@ -72,56 +72,38 @@ module Google
72
72
 
73
73
  default_config.rpcs.get_service.timeout = 30.0
74
74
  default_config.rpcs.get_service.retry_policy = {
75
- initial_delay: 0.1,
76
- max_delay: 30.0,
77
- multiplier: 1.3,
78
- retry_codes: [4, 14]
75
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
79
76
  }
80
77
 
81
78
  default_config.rpcs.list_services.timeout = 30.0
82
79
  default_config.rpcs.list_services.retry_policy = {
83
- initial_delay: 0.1,
84
- max_delay: 30.0,
85
- multiplier: 1.3,
86
- retry_codes: [4, 14]
80
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
87
81
  }
88
82
 
89
83
  default_config.rpcs.update_service.timeout = 30.0
90
84
 
91
85
  default_config.rpcs.delete_service.timeout = 30.0
92
86
  default_config.rpcs.delete_service.retry_policy = {
93
- initial_delay: 0.1,
94
- max_delay: 30.0,
95
- multiplier: 1.3,
96
- retry_codes: [4, 14]
87
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
97
88
  }
98
89
 
99
90
  default_config.rpcs.create_service_level_objective.timeout = 30.0
100
91
 
101
92
  default_config.rpcs.get_service_level_objective.timeout = 30.0
102
93
  default_config.rpcs.get_service_level_objective.retry_policy = {
103
- initial_delay: 0.1,
104
- max_delay: 30.0,
105
- multiplier: 1.3,
106
- retry_codes: [4, 14]
94
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
107
95
  }
108
96
 
109
97
  default_config.rpcs.list_service_level_objectives.timeout = 30.0
110
98
  default_config.rpcs.list_service_level_objectives.retry_policy = {
111
- initial_delay: 0.1,
112
- max_delay: 30.0,
113
- multiplier: 1.3,
114
- retry_codes: [4, 14]
99
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
115
100
  }
116
101
 
117
102
  default_config.rpcs.update_service_level_objective.timeout = 30.0
118
103
 
119
104
  default_config.rpcs.delete_service_level_objective.timeout = 30.0
120
105
  default_config.rpcs.delete_service_level_objective.retry_policy = {
121
- initial_delay: 0.1,
122
- max_delay: 30.0,
123
- multiplier: 1.3,
124
- retry_codes: [4, 14]
106
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
125
107
  }
126
108
 
127
109
  default_config
@@ -192,7 +174,7 @@ module Google
192
174
  !@config.endpoint.split(".").first.include?("-")
193
175
  credentials ||= Credentials.default scope: @config.scope,
194
176
  enable_self_signed_jwt: enable_self_signed_jwt
195
- if credentials.is_a?(String) || credentials.is_a?(Hash)
177
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
196
178
  credentials = Credentials.new credentials, scope: @config.scope
197
179
  end
198
180
  @quota_project_id = @config.quota_project
@@ -52,6 +52,20 @@ module Google
52
52
  "organizations/#{organization}"
53
53
  end
54
54
 
55
+ ##
56
+ # Create a fully-qualified Project resource string.
57
+ #
58
+ # The resource will be in the following format:
59
+ #
60
+ # `projects/{project}`
61
+ #
62
+ # @param project [String]
63
+ #
64
+ # @return [::String]
65
+ def project_path project:
66
+ "projects/#{project}"
67
+ end
68
+
55
69
  ##
56
70
  # Create a fully-qualified Service resource string.
57
71
  #
@@ -74,18 +74,12 @@ module Google
74
74
 
75
75
  default_config.rpcs.list_uptime_check_configs.timeout = 30.0
76
76
  default_config.rpcs.list_uptime_check_configs.retry_policy = {
77
- initial_delay: 0.1,
78
- max_delay: 30.0,
79
- multiplier: 1.3,
80
- retry_codes: [4, 14]
77
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
81
78
  }
82
79
 
83
80
  default_config.rpcs.get_uptime_check_config.timeout = 30.0
84
81
  default_config.rpcs.get_uptime_check_config.retry_policy = {
85
- initial_delay: 0.1,
86
- max_delay: 30.0,
87
- multiplier: 1.3,
88
- retry_codes: [4, 14]
82
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
89
83
  }
90
84
 
91
85
  default_config.rpcs.create_uptime_check_config.timeout = 30.0
@@ -94,18 +88,12 @@ module Google
94
88
 
95
89
  default_config.rpcs.delete_uptime_check_config.timeout = 30.0
96
90
  default_config.rpcs.delete_uptime_check_config.retry_policy = {
97
- initial_delay: 0.1,
98
- max_delay: 30.0,
99
- multiplier: 1.3,
100
- retry_codes: [4, 14]
91
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
101
92
  }
102
93
 
103
94
  default_config.rpcs.list_uptime_check_ips.timeout = 30.0
104
95
  default_config.rpcs.list_uptime_check_ips.retry_policy = {
105
- initial_delay: 0.1,
106
- max_delay: 30.0,
107
- multiplier: 1.3,
108
- retry_codes: [4, 14]
96
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14]
109
97
  }
110
98
 
111
99
  default_config
@@ -176,7 +164,7 @@ module Google
176
164
  !@config.endpoint.split(".").first.include?("-")
177
165
  credentials ||= Credentials.default scope: @config.scope,
178
166
  enable_self_signed_jwt: enable_self_signed_jwt
179
- if credentials.is_a?(String) || credentials.is_a?(Hash)
167
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
180
168
  credentials = Credentials.new credentials, scope: @config.scope
181
169
  end
182
170
  @quota_project_id = @config.quota_project
@@ -52,6 +52,20 @@ module Google
52
52
  "organizations/#{organization}"
53
53
  end
54
54
 
55
+ ##
56
+ # Create a fully-qualified Project resource string.
57
+ #
58
+ # The resource will be in the following format:
59
+ #
60
+ # `projects/{project}`
61
+ #
62
+ # @param project [String]
63
+ #
64
+ # @return [::String]
65
+ def project_path project:
66
+ "projects/#{project}"
67
+ end
68
+
55
69
  ##
56
70
  # Create a fully-qualified UptimeCheckConfig resource string.
57
71
  #
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Monitoring
23
23
  module V3
24
- VERSION = "0.4.1"
24
+ VERSION = "0.4.2"
25
25
  end
26
26
  end
27
27
  end
@@ -35,7 +35,7 @@ module Google
35
35
  # [Cloud Console](https://console.cloud.google.com/).
36
36
  class Service
37
37
 
38
- include ::GRPC::GenericService
38
+ include GRPC::GenericService
39
39
 
40
40
  self.marshal_class_method = :encode
41
41
  self.unmarshal_class_method = :decode
@@ -38,7 +38,7 @@ module Google
38
38
  # from the infrastructure.
39
39
  class Service
40
40
 
41
- include ::GRPC::GenericService
41
+ include GRPC::GenericService
42
42
 
43
43
  self.marshal_class_method = :encode
44
44
  self.unmarshal_class_method = :decode
@@ -28,7 +28,7 @@ module Google
28
28
  # time series data.
29
29
  class Service
30
30
 
31
- include ::GRPC::GenericService
31
+ include GRPC::GenericService
32
32
 
33
33
  self.marshal_class_method = :encode
34
34
  self.unmarshal_class_method = :decode
@@ -28,7 +28,7 @@ module Google
28
28
  # controls how messages related to incidents are sent.
29
29
  class Service
30
30
 
31
- include ::GRPC::GenericService
31
+ include GRPC::GenericService
32
32
 
33
33
  self.marshal_class_method = :encode
34
34
  self.unmarshal_class_method = :decode
@@ -29,7 +29,7 @@ module Google
29
29
  # the time-varying values of a metric.
30
30
  class Service
31
31
 
32
- include ::GRPC::GenericService
32
+ include GRPC::GenericService
33
33
 
34
34
  self.marshal_class_method = :encode
35
35
  self.unmarshal_class_method = :decode
@@ -30,7 +30,7 @@ module Google
30
30
  # of categorized Health Metrics.
31
31
  class Service
32
32
 
33
- include ::GRPC::GenericService
33
+ include GRPC::GenericService
34
34
 
35
35
  self.marshal_class_method = :encode
36
36
  self.unmarshal_class_method = :decode
@@ -34,7 +34,7 @@ module Google
34
34
  # and then clicking on "Uptime".
35
35
  class Service
36
36
 
37
- include ::GRPC::GenericService
37
+ include GRPC::GenericService
38
38
 
39
39
  self.marshal_class_method = :encode
40
40
  self.unmarshal_class_method = :decode
@@ -49,7 +49,7 @@ module Google
49
49
  #
50
50
  # Sum[i=1..n]((x_i - mean)^2)
51
51
  #
52
- # Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
52
+ # Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition
53
53
  # describes Welford's method for accumulating this sum in one pass.
54
54
  #
55
55
  # If `count` is zero then this field must be zero.
@@ -207,7 +207,7 @@ module Google
207
207
  # @return [::Array<::Google::Protobuf::Any>]
208
208
  # Contextual information about the example value. Examples are:
209
209
  #
210
- # Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.Trace
210
+ # Trace: type.googleapis.com/google.monitoring.v3.SpanContext
211
211
  #
212
212
  # Literal string: type.googleapis.com/google.protobuf.StringValue
213
213
  #
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -25,6 +25,12 @@ module Google
25
25
  # Do not use this default value.
26
26
  LAUNCH_STAGE_UNSPECIFIED = 0
27
27
 
28
+ # The feature is not yet implemented. Users can not use it.
29
+ UNIMPLEMENTED = 6
30
+
31
+ # Prelaunch features are hidden from users and are only visible internally.
32
+ PRELAUNCH = 7
33
+
28
34
  # Early Access features are limited to a closed group of testers. To use
29
35
  # these features, you must sign up in advance and sign a Trusted Tester
30
36
  # agreement (which includes confidentiality provisions). These features may
@@ -36,7 +42,7 @@ module Google
36
42
  # for widespread use. By Alpha, all significant design issues are resolved
37
43
  # and we are in the process of verifying functionality. Alpha customers
38
44
  # need to apply for access, agree to applicable terms, and have their
39
- # projects whitelisted. Alpha releases don’t have to be feature complete,
45
+ # projects allowlisted. Alpha releases don’t have to be feature complete,
40
46
  # no SLAs are provided, and there are no technical support obligations, but
41
47
  # they will be far enough along that customers can actually use them in
42
48
  # test environments or for limited-use tests -- just like they would in
@@ -28,11 +28,12 @@ module Google
28
28
  # @!attribute [rw] type
29
29
  # @return [::String]
30
30
  # The metric type, including its DNS name prefix. The type is not
31
- # URL-encoded. All user-defined custom metric types have the DNS name
32
- # `custom.googleapis.com`. Metric types should use a natural hierarchical
33
- # grouping. For example:
31
+ # URL-encoded. All user-defined metric types have the DNS name
32
+ # `custom.googleapis.com` or `external.googleapis.com`. Metric types should
33
+ # use a natural hierarchical grouping. For example:
34
34
  #
35
35
  # "custom.googleapis.com/invoice/paid/amount"
36
+ # "external.googleapis.com/prometheus/up"
36
37
  # "appengine.googleapis.com/http/server/response_latencies"
37
38
  # @!attribute [rw] labels
38
39
  # @return [::Array<::Google::Api::LabelDescriptor>]
@@ -52,10 +53,28 @@ module Google
52
53
  # Some combinations of `metric_kind` and `value_type` might not be supported.
53
54
  # @!attribute [rw] unit
54
55
  # @return [::String]
55
- # The unit in which the metric value is reported. It is only applicable
56
- # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
57
- # supported units are a subset of [The Unified Code for Units of
58
- # Measure](http://unitsofmeasure.org/ucum.html) standard:
56
+ # The units in which the metric value is reported. It is only applicable
57
+ # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
58
+ # defines the representation of the stored metric values.
59
+ #
60
+ # Different systems might scale the values to be more easily displayed (so a
61
+ # value of `0.02kBy` _might_ be displayed as `20By`, and a value of
62
+ # `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
63
+ # `kBy`, then the value of the metric is always in thousands of bytes, no
64
+ # matter how it might be displayed.
65
+ #
66
+ # If you want a custom metric to record the exact number of CPU-seconds used
67
+ # by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
68
+ # `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
69
+ # CPU-seconds, then the value is written as `12005`.
70
+ #
71
+ # Alternatively, if you want a custom metric to record data in a more
72
+ # granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
73
+ # `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
74
+ # or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
75
+ #
76
+ # The supported units are a subset of [The Unified Code for Units of
77
+ # Measure](https://unitsofmeasure.org/ucum.html) standard:
59
78
  #
60
79
  # **Basic units (UNIT)**
61
80
  #
@@ -65,36 +84,44 @@ module Google
65
84
  # * `min` minute
66
85
  # * `h` hour
67
86
  # * `d` day
87
+ # * `1` dimensionless
68
88
  #
69
89
  # **Prefixes (PREFIX)**
70
90
  #
71
- # * `k` kilo (10**3)
72
- # * `M` mega (10**6)
73
- # * `G` giga (10**9)
74
- # * `T` tera (10**12)
75
- # * `P` peta (10**15)
76
- # * `E` exa (10**18)
77
- # * `Z` zetta (10**21)
78
- # * `Y` yotta (10**24)
79
- # * `m` milli (10**-3)
80
- # * `u` micro (10**-6)
81
- # * `n` nano (10**-9)
82
- # * `p` pico (10**-12)
83
- # * `f` femto (10**-15)
84
- # * `a` atto (10**-18)
85
- # * `z` zepto (10**-21)
86
- # * `y` yocto (10**-24)
87
- # * `Ki` kibi (2**10)
88
- # * `Mi` mebi (2**20)
89
- # * `Gi` gibi (2**30)
90
- # * `Ti` tebi (2**40)
91
+ # * `k` kilo (10^3)
92
+ # * `M` mega (10^6)
93
+ # * `G` giga (10^9)
94
+ # * `T` tera (10^12)
95
+ # * `P` peta (10^15)
96
+ # * `E` exa (10^18)
97
+ # * `Z` zetta (10^21)
98
+ # * `Y` yotta (10^24)
99
+ #
100
+ # * `m` milli (10^-3)
101
+ # * `u` micro (10^-6)
102
+ # * `n` nano (10^-9)
103
+ # * `p` pico (10^-12)
104
+ # * `f` femto (10^-15)
105
+ # * `a` atto (10^-18)
106
+ # * `z` zepto (10^-21)
107
+ # * `y` yocto (10^-24)
108
+ #
109
+ # * `Ki` kibi (2^10)
110
+ # * `Mi` mebi (2^20)
111
+ # * `Gi` gibi (2^30)
112
+ # * `Ti` tebi (2^40)
113
+ # * `Pi` pebi (2^50)
91
114
  #
92
115
  # **Grammar**
93
116
  #
94
117
  # The grammar also includes these connectors:
95
118
  #
96
- # * `/` division (as an infix operator, e.g. `1/s`).
97
- # * `.` multiplication (as an infix operator, e.g. `GBy.d`)
119
+ # * `/` division or ratio (as an infix operator). For examples,
120
+ # `kBy/{email}` or `MiBy/10ms` (although you should almost never
121
+ # have `/s` in a metric `unit`; rates should always be computed at
122
+ # query time from the underlying cumulative or delta value).
123
+ # * `.` multiplication or composition (as an infix operator). For
124
+ # examples, `GBy.d` or `k{watt}.h`.
98
125
  #
99
126
  # The grammar for a unit is as follows:
100
127
  #
@@ -109,14 +136,25 @@ module Google
109
136
  #
110
137
  # Notes:
111
138
  #
112
- # * `Annotation` is just a comment if it follows a `UNIT` and is
113
- # equivalent to `1` if it is used alone. For examples,
114
- # `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
139
+ # * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
140
+ # is used alone, then the unit is equivalent to `1`. For examples,
141
+ # `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
115
142
  # * `NAME` is a sequence of non-blank printable ASCII characters not
116
- # containing '\\{' or '}'.
117
- # * `1` represents dimensionless value 1, such as in `1/s`.
118
- # * `%` represents dimensionless value 1/100, and annotates values giving
119
- # a percentage.
143
+ # containing `{` or `}`.
144
+ # * `1` represents a unitary [dimensionless
145
+ # unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
146
+ # as in `1/s`. It is typically used when none of the basic units are
147
+ # appropriate. For example, "new users per day" can be represented as
148
+ # `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
149
+ # users). Alternatively, "thousands of page views per day" would be
150
+ # represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
151
+ # value of `5.3` would mean "5300 page views per day").
152
+ # * `%` represents dimensionless value of 1/100, and annotates values giving
153
+ # a percentage (so the metric values are typically in the range of 0..100,
154
+ # and a metric value `3` means "3 percent").
155
+ # * `10^2.%` indicates a metric contains a ratio, typically in the range
156
+ # 0..1, that will be multiplied by 100 and displayed as a percentage
157
+ # (so a metric value `0.03` means "3 percent").
120
158
  # @!attribute [rw] description
121
159
  # @return [::String]
122
160
  # A detailed description of the metric, which can be used in documentation.
@@ -126,11 +164,46 @@ module Google
126
164
  # Use sentence case without an ending period, for example "Request count".
127
165
  # This field is optional but it is recommended to be set for any metrics
128
166
  # associated with user-visible concepts, such as Quota.
167
+ # @!attribute [rw] metadata
168
+ # @return [::Google::Api::MetricDescriptor::MetricDescriptorMetadata]
169
+ # Optional. Metadata which can be used to guide usage of the metric.
170
+ # @!attribute [rw] launch_stage
171
+ # @return [::Google::Api::LaunchStage]
172
+ # Optional. The launch stage of the metric definition.
173
+ # @!attribute [rw] monitored_resource_types
174
+ # @return [::Array<::String>]
175
+ # Read-only. If present, then a [time
176
+ # series][google.monitoring.v3.TimeSeries], which is identified partially by
177
+ # a metric type and a {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor}, that is associated
178
+ # with this metric type can only be associated with one of the monitored
179
+ # resource types listed here.
129
180
  class MetricDescriptor
130
181
  include ::Google::Protobuf::MessageExts
131
182
  extend ::Google::Protobuf::MessageExts::ClassMethods
132
183
 
184
+ # Additional annotations that can be used to guide the usage of a metric.
185
+ # @!attribute [rw] launch_stage
186
+ # @return [::Google::Api::LaunchStage]
187
+ # Deprecated. Must use the {::Google::Api::MetricDescriptor#launch_stage MetricDescriptor.launch_stage} instead.
188
+ # @!attribute [rw] sample_period
189
+ # @return [::Google::Protobuf::Duration]
190
+ # The sampling period of metric data points. For metrics which are written
191
+ # periodically, consecutive data points are stored at this time interval,
192
+ # excluding data loss due to errors. Metrics with a higher granularity have
193
+ # a smaller sampling period.
194
+ # @!attribute [rw] ingest_delay
195
+ # @return [::Google::Protobuf::Duration]
196
+ # The delay of data points caused by ingestion. Data points older than this
197
+ # age are guaranteed to be ingested and available to be read, excluding
198
+ # data loss due to errors.
199
+ class MetricDescriptorMetadata
200
+ include ::Google::Protobuf::MessageExts
201
+ extend ::Google::Protobuf::MessageExts::ClassMethods
202
+ end
203
+
133
204
  # The kind of measurement. It describes how the data is reported.
205
+ # For information on setting the start time and end time based on
206
+ # the MetricKind, see {::Google::Cloud::Monitoring::V3::TimeInterval TimeInterval}.
134
207
  module MetricKind
135
208
  # Do not use this default value.
136
209
  METRIC_KIND_UNSPECIFIED = 0
@@ -40,7 +40,6 @@ module Google
40
40
  # @return [::String]
41
41
  # Required. The monitored resource type. For example, the type
42
42
  # `"cloudsql_database"` represents databases in Google Cloud SQL.
43
- # The maximum length of this value is 256 characters.
44
43
  # @!attribute [rw] display_name
45
44
  # @return [::String]
46
45
  # Optional. A concise name for the monitored resource type that might be
@@ -56,6 +55,9 @@ module Google
56
55
  # Required. A set of labels used to describe instances of this monitored
57
56
  # resource type. For example, an individual Google Cloud SQL database is
58
57
  # identified by values for the labels `"database_id"` and `"zone"`.
58
+ # @!attribute [rw] launch_stage
59
+ # @return [::Google::Api::LaunchStage]
60
+ # Optional. The launch stage of the monitored resource definition.
59
61
  class MonitoredResourceDescriptor
60
62
  include ::Google::Protobuf::MessageExts
61
63
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -101,15 +103,14 @@ module Google
101
103
  # Auxiliary metadata for a {::Google::Api::MonitoredResource MonitoredResource} object.
102
104
  # {::Google::Api::MonitoredResource MonitoredResource} objects contain the minimum set of information to
103
105
  # uniquely identify a monitored resource instance. There is some other useful
104
- # auxiliary metadata. Google Stackdriver Monitoring & Logging uses an ingestion
105
- # pipeline to extract metadata for cloud resources of all types , and stores
106
+ # auxiliary metadata. Monitoring and Logging use an ingestion
107
+ # pipeline to extract metadata for cloud resources of all types, and store
106
108
  # the metadata in this message.
107
109
  # @!attribute [rw] system_labels
108
110
  # @return [::Google::Protobuf::Struct]
109
111
  # Output only. Values for predefined system metadata labels.
110
- # System labels are a kind of metadata extracted by Google Stackdriver.
111
- # Stackdriver determines what system labels are useful and how to obtain
112
- # their values. Some examples: "machine_image", "vpc", "subnet_id",
112
+ # System labels are a kind of metadata extracted by Google, including
113
+ # "machine_image", "vpc", "subnet_id",
113
114
  # "security_group", "name", etc.
114
115
  # System label values can be only strings, Boolean values, or a list of
115
116
  # strings. For example:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-monitoring-v3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2021-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common