Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [google-cloud-monitoring] add active_only field to ListMetricDescriptorsRequest #13421

Merged
merged 4 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading