Method: projects.metricDescriptors.create Stay organized with collections Save and categorize content based on your preferences.
Creates a new metric descriptor. The creation is executed asynchronously. User-created metric descriptors definecustom metrics. The metric descriptor is updated if it already exists, except that metric labels are never removed.
HTTP request
POST https://monitoring.googleapis.com/v3/{name}/metricDescriptors
Path parameters
| Parameters | |
|---|---|
name |
Required. Theproject on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER] |
Request body
The request body contains an instance ofMetricDescriptor.
Response body
If successful, the response body contains a newly created instance ofMetricDescriptor.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/monitoringhttps://www.googleapis.com/auth/monitoring.write
For more information, see theAuthentication Overview.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-23 UTC.