Reference documentation and code samples for the Stackdriver Monitoring V3 Client class ListMetricDescriptorsRequest.
TheListMetricDescriptorsrequest.
Generated from protobuf messagegoogle.monitoring.v3.ListMetricDescriptorsRequest
Namespace
Google \ Cloud \ Monitoring \ V3
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Required. Theprojecton which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]
↳ filter
string
Optional. If this field is empty, all custom and system-defined metric descriptors are returned. Otherwise, thefilterspecifies which metric descriptors are to be returned. For example, the following filter matches allcustom metrics: metric.type = starts_with("custom.googleapis.com/")
↳ page_size
int
Optional. A positive number that is the maximum number of results to return. The default and maximum value is 10,000. If a page_size <= 0 or > 10,000 is submitted, will instead return a maximum of 10,000 results.
↳ page_token
string
Optional. If this field is not empty then it must contain thenextPageTokenvalue 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.
getName
Required. Theprojecton which
to execute the request. The format is:
projects/[PROJECT_ID_OR_NUMBER]
Returns
Type
Description
string
setName
Required. Theprojecton which
to execute the request. The format is:
projects/[PROJECT_ID_OR_NUMBER]
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getFilter
Optional. If this field is empty, all custom and
system-defined metric descriptors are returned.
Otherwise, thefilterspecifies which metric descriptors are to be
returned. For example, the following filter matches allcustom metrics:
metric.type = starts_with("custom.googleapis.com/")
Returns
Type
Description
string
setFilter
Optional. If this field is empty, all custom and
system-defined metric descriptors are returned.
Otherwise, thefilterspecifies which metric descriptors are to be
returned. For example, the following filter matches allcustom metrics:
metric.type = starts_with("custom.googleapis.com/")
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getPageSize
Optional. A positive number that is the maximum number of results to
return. The default and maximum value is 10,000. If a page_size <= 0 or >
10,000 is submitted, will instead return a maximum of 10,000 results.
Returns
Type
Description
int
setPageSize
Optional. A positive number that is the maximum number of results to
return. The default and maximum value is 10,000. If a page_size <= 0 or >
10,000 is submitted, will instead return a maximum of 10,000 results.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getPageToken
Optional. If this field is not empty then it must contain thenextPageTokenvalue returned by a previous call to this method. Using
this field causes the method to return additional results from the previous
method call.
Returns
Type
Description
string
setPageToken
Optional. If this field is not empty then it must contain thenextPageTokenvalue returned by a previous call to this method. Using
this field causes the method to return additional results from the previous
method call.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getActiveOnly
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.
Returns
Type
Description
bool
setActiveOnly
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.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
static::build
Parameter
Name
Description
name
string
Required. Theprojecton which
to execute the request. The format is:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Stackdriver Monitoring V3 Client - Class ListMetricDescriptorsRequest (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-monitoring/latest/V3.ListMetricDescriptorsRequest)\n- [2.1.1](/php/docs/reference/cloud-monitoring/2.1.1/V3.ListMetricDescriptorsRequest)\n- [2.0.1](/php/docs/reference/cloud-monitoring/2.0.1/V3.ListMetricDescriptorsRequest)\n- [1.12.1](/php/docs/reference/cloud-monitoring/1.12.1/V3.ListMetricDescriptorsRequest)\n- [1.11.1](/php/docs/reference/cloud-monitoring/1.11.1/V3.ListMetricDescriptorsRequest)\n- [1.10.3](/php/docs/reference/cloud-monitoring/1.10.3/V3.ListMetricDescriptorsRequest)\n- [1.9.0](/php/docs/reference/cloud-monitoring/1.9.0/V3.ListMetricDescriptorsRequest)\n- [1.8.0](/php/docs/reference/cloud-monitoring/1.8.0/V3.ListMetricDescriptorsRequest)\n- [1.7.1](/php/docs/reference/cloud-monitoring/1.7.1/V3.ListMetricDescriptorsRequest)\n- [1.6.0](/php/docs/reference/cloud-monitoring/1.6.0/V3.ListMetricDescriptorsRequest)\n- [1.5.1](/php/docs/reference/cloud-monitoring/1.5.1/V3.ListMetricDescriptorsRequest)\n- [1.4.0](/php/docs/reference/cloud-monitoring/1.4.0/V3.ListMetricDescriptorsRequest)\n- [1.3.2](/php/docs/reference/cloud-monitoring/1.3.2/V3.ListMetricDescriptorsRequest)\n- [1.2.2](/php/docs/reference/cloud-monitoring/1.2.2/V3.ListMetricDescriptorsRequest) \nReference documentation and code samples for the Stackdriver Monitoring V3 Client class ListMetricDescriptorsRequest.\n\nThe `ListMetricDescriptors` request.\n\nGenerated from protobuf message `google.monitoring.v3.ListMetricDescriptorsRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Monitoring \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nRequired. The\n[project](https://cloud.google.com/monitoring/api/v3#project_name) on which\nto execute the request. The format is:\nprojects/\\[PROJECT_ID_OR_NUMBER\\]\n\n### setName\n\nRequired. The\n[project](https://cloud.google.com/monitoring/api/v3#project_name) on which\nto execute the request. The format is:\nprojects/\\[PROJECT_ID_OR_NUMBER\\]\n\n### getFilter\n\nOptional. If this field is empty, all custom and\nsystem-defined metric descriptors are returned.\n\nOtherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters)\nspecifies which metric descriptors are to be\nreturned. For example, the following filter matches all\n[custom metrics](https://cloud.google.com/monitoring/custom-metrics):\nmetric.type = starts_with(\"custom.googleapis.com/\")\n\n### setFilter\n\nOptional. If this field is empty, all custom and\nsystem-defined metric descriptors are returned.\n\nOtherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters)\nspecifies which metric descriptors are to be\nreturned. For example, the following filter matches all\n[custom metrics](https://cloud.google.com/monitoring/custom-metrics):\nmetric.type = starts_with(\"custom.googleapis.com/\")\n\n### getPageSize\n\nOptional. A positive number that is the maximum number of results to\nreturn. The default and maximum value is 10,000. If a page_size \\\u003c= 0 or \\\u003e\n10,000 is submitted, will instead return a maximum of 10,000 results.\n\n### setPageSize\n\nOptional. A positive number that is the maximum number of results to\nreturn. The default and maximum value is 10,000. If a page_size \\\u003c= 0 or \\\u003e\n10,000 is submitted, will instead return a maximum of 10,000 results.\n\n### getPageToken\n\nOptional. If this field is not empty then it must contain the\n`nextPageToken` value returned by a previous call to this method. Using\nthis field causes the method to return additional results from the previous\nmethod call.\n\n### setPageToken\n\nOptional. If this field is not empty then it must contain the\n`nextPageToken` value returned by a previous call to this method. Using\nthis field causes the method to return additional results from the previous\nmethod call.\n\n### getActiveOnly\n\nOptional. If true, only metrics and monitored resource types that have\nrecent data (within roughly 25 hours) will be included in the response.\n\n- 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.\n - 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.\n\n### setActiveOnly\n\nOptional. If true, only metrics and monitored resource types that have\nrecent data (within roughly 25 hours) will be included in the response.\n\n- 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.\n - 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.\n\n### static::build"]]