Method: locations.global.metricsScopes.projects.create

Adds a MonitoredProject with the given project ID to the specified Metrics Scope.

HTTP request

POST https://monitoring.googleapis.com/v1/{parent}/projects

Path parameters

Parameters
parent

string

Required. The resource name of the existing Metrics Scope that will monitor this project. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}

Request body

The request body contains an instance of MonitoredProject.

Response body

If successful, the response body contains a newly created instance of Operation.

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.write

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • monitoring.metricsScopes.link

Requires the following IAM permission on the parent resource:

  • monitoring.metricsScopes.link

For more information, see the IAM documentation.