Skip to content

Commit 5777b06

Browse files
feat: [google-cloud-monitoring] add active_only field to ListMetricDescriptorsRequest (#13421)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 713756077 Source-Link: googleapis/googleapis@d581bbe Source-Link: googleapis/googleapis-gen@448d253 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1vbml0b3JpbmcvLk93bEJvdC55YW1sIiwiaCI6IjQ0OGQyNTMxNjUyZWU5MmY4ZTgzZjJlYTFhZjQ4MzBlODU0ZGE3ZTIifQ== --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Victor Chudnovsky <vchudnov@google.com>
1 parent 9adc081 commit 5777b06

5 files changed

Lines changed: 26 additions & 4 deletions

File tree

packages/google-cloud-monitoring/google/cloud/monitoring/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.25.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-monitoring/google/cloud/monitoring_v3/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.25.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/metric_service.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,24 @@ class ListMetricDescriptorsRequest(proto.Message):
186186
the ``nextPageToken`` value returned by a previous call to
187187
this method. Using this field causes the method to return
188188
additional results from the previous method call.
189+
active_only (bool):
190+
Optional. If true, only metrics and monitored
191+
resource types that have recent data (within
192+
roughly 25 hours) will be included in the
193+
response.
194+
- If a metric descriptor enumerates monitored
195+
resource types, only the monitored resource
196+
types for which the metric type has recent
197+
data will be included in the returned
198+
metric descriptor, and if none of them have
199+
recent data, the metric descriptor will not be
200+
returned.
201+
- If a metric descriptor does not enumerate the
202+
compatible monitored resource types, it
203+
will be returned only if the metric type has
204+
recent data for some monitored resource
205+
type. The returned descriptor will not
206+
enumerate any monitored resource types.
189207
"""
190208

191209
name: str = proto.Field(
@@ -204,6 +222,10 @@ class ListMetricDescriptorsRequest(proto.Message):
204222
proto.STRING,
205223
number=4,
206224
)
225+
active_only: bool = proto.Field(
226+
proto.BOOL,
227+
number=6,
228+
)
207229

208230

209231
class ListMetricDescriptorsResponse(proto.Message):

packages/google-cloud-monitoring/samples/generated_samples/snippet_metadata_google.monitoring.v3.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-monitoring",
11-
"version": "2.25.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-monitoring/scripts/fixup_monitoring_v3_keywords.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class monitoringCallTransformer(cst.CSTTransformer):
7070
'list_alert_policies': ('name', 'filter', 'order_by', 'page_size', 'page_token', ),
7171
'list_group_members': ('name', 'page_size', 'page_token', 'filter', 'interval', ),
7272
'list_groups': ('name', 'children_of_group', 'ancestors_of_group', 'descendants_of_group', 'page_size', 'page_token', ),
73-
'list_metric_descriptors': ('name', 'filter', 'page_size', 'page_token', ),
73+
'list_metric_descriptors': ('name', 'filter', 'page_size', 'page_token', 'active_only', ),
7474
'list_monitored_resource_descriptors': ('name', 'filter', 'page_size', 'page_token', ),
7575
'list_notification_channel_descriptors': ('name', 'page_size', 'page_token', ),
7676
'list_notification_channels': ('name', 'filter', 'order_by', 'page_size', 'page_token', ),

0 commit comments

Comments
 (0)