Skip to content

Commit

Permalink
feat: [google-cloud-monitoring] add active_only field to ListMetricDe…
Browse files Browse the repository at this point in the history
…scriptorsRequest (#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>
  • Loading branch information
3 people authored Jan 10, 2025
1 parent 9adc081 commit 5777b06
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "2.25.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "2.25.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,24 @@ class ListMetricDescriptorsRequest(proto.Message):
the ``nextPageToken`` value returned by a previous call to
this method. Using this field causes the method to return
additional results from the previous method call.
active_only (bool):
Optional. If true, only metrics and monitored
resource types that have recent data (within
roughly 25 hours) will be included in the
response.
- If a metric descriptor enumerates monitored
resource types, only the monitored resource
types for which the metric type has recent
data will be included in the returned
metric descriptor, and if none of them have
recent data, the metric descriptor will not be
returned.
- If a metric descriptor does not enumerate the
compatible monitored resource types, it
will be returned only if the metric type has
recent data for some monitored resource
type. The returned descriptor will not
enumerate any monitored resource types.
"""

name: str = proto.Field(
Expand All @@ -204,6 +222,10 @@ class ListMetricDescriptorsRequest(proto.Message):
proto.STRING,
number=4,
)
active_only: bool = proto.Field(
proto.BOOL,
number=6,
)


class ListMetricDescriptorsResponse(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-monitoring",
"version": "2.25.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class monitoringCallTransformer(cst.CSTTransformer):
'list_alert_policies': ('name', 'filter', 'order_by', 'page_size', 'page_token', ),
'list_group_members': ('name', 'page_size', 'page_token', 'filter', 'interval', ),
'list_groups': ('name', 'children_of_group', 'ancestors_of_group', 'descendants_of_group', 'page_size', 'page_token', ),
'list_metric_descriptors': ('name', 'filter', 'page_size', 'page_token', ),
'list_metric_descriptors': ('name', 'filter', 'page_size', 'page_token', 'active_only', ),
'list_monitored_resource_descriptors': ('name', 'filter', 'page_size', 'page_token', ),
'list_notification_channel_descriptors': ('name', 'page_size', 'page_token', ),
'list_notification_channels': ('name', 'filter', 'order_by', 'page_size', 'page_token', ),
Expand Down

0 comments on commit 5777b06

Please sign in to comment.