Method: locations.global.metricsScopes.listMetricsScopesByMonitoredProject

Returns a list of every Metrics Scope that a specific MonitoredProject has been added to. The metrics scope representing the specified monitored project will always be the first entry in the response.

HTTP request

GET https://monitoring.googleapis.com/v1/locations/global/metricsScopes:listMetricsScopesByMonitoredProject

Query parameters

Parameters
monitoredResourceContainer

string

Required. The resource name of the Monitored Project being requested. Example: projects/{MONITORED_PROJECT_ID_OR_NUMBER}

Authorization requires the following IAM permission on the specified resource monitoredResourceContainer:

  • resourcemanager.projects.get

Request body

The request body must be empty.

Response body

Response for the metricsScopes.listMetricsScopesByMonitoredProject method.

If successful, the response body contains data with the following structure:

JSON representation
{
  "metricsScopes": [
    {
      object (MetricsScope)
    }
  ]
}
Fields
metricsScopes[]

object (MetricsScope)

A set of all metrics scopes that the specified monitored project has been added to.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/monitoring
  • https://www.googleapis.com/auth/monitoring.read

For more information, see the Authentication Overview.