Package google.monitoring.metricsscope.v1

Index

MetricsScopes

Manages Cloud Monitoring Metrics Scopes, and the monitoring of Google Cloud projects and AWS accounts.

CreateMonitoredProject

rpc CreateMonitoredProject(CreateMonitoredProjectRequest) returns (Operation)

Adds aMonitoredProject with the given project ID to the specifiedMetrics Scope.

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 theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on thename resource:

  • monitoring.metricsScopes.link

Requires the followingIAM permission on theparent resource:

  • monitoring.metricsScopes.link

For more information, see theIAM documentation.

DeleteMonitoredProject

rpc DeleteMonitoredProject(DeleteMonitoredProjectRequest) returns (Operation)

Deletes aMonitoredProject from the specifiedMetrics Scope.

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 theAuthentication Overview.

GetMetricsScope

rpc GetMetricsScope(GetMetricsScopeRequest) returns (MetricsScope)

Returns a specificMetrics Scope, including the list of projects monitored by the specifiedMetrics Scope.

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 theAuthentication Overview.

ListMetricsScopesByMonitoredProject

rpc ListMetricsScopesByMonitoredProject(ListMetricsScopesByMonitoredProjectRequest) returns (ListMetricsScopesByMonitoredProjectResponse)

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

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 theAuthentication Overview.

CreateMonitoredProjectRequest

Request for theCreateMonitoredProject method.

Fields
parent

string

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

monitored_project

MonitoredProject

Required. The initialMonitoredProject configuration. Specify only themonitored_project.name field. All other fields are ignored. Themonitored_project.name must be in the format:locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}/projects/{MONITORED_PROJECT_ID_OR_NUMBER}

DeleteMonitoredProjectRequest

Request for theDeleteMonitoredProject method.

Fields
name

string

Required. The resource name of theMonitoredProject. Example:locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}/projects/{MONITORED_PROJECT_ID_OR_NUMBER}

Authorization requires the followingGoogle IAM permissions on both theMetrics Scope and on theMonitoredProject:monitoring.metricsScopes.link

GetMetricsScopeRequest

Request for theGetMetricsScope method.

Fields
name

string

Required. The resource name of theMetrics Scope. Example:locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}

Authorization requires the followingIAM permission on the specified resourcename:

  • resourcemanager.projects.get

ListMetricsScopesByMonitoredProjectRequest

Request for theListMetricsScopesByMonitoredProject method.

Fields
monitored_resource_container

string

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

Authorization requires the followingIAM permission on the specified resourcemonitoredResourceContainer:

  • resourcemanager.projects.get

ListMetricsScopesByMonitoredProjectResponse

Response for theListMetricsScopesByMonitoredProject method.

Fields
metrics_scopes[]

MetricsScope

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

MetricsScope

Represents aMetrics Scope in Cloud Monitoring, which specifies one or more Google projects and zero or more AWS accounts to monitor together.

Fields
name

string

Immutable. The resource name of the Monitoring Metrics Scope. On input, the resource name can be specified with the scoping project ID or number. On output, the resource name is specified with the scoping project number. Example:locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}

create_time

Timestamp

Output only. The time when thisMetrics Scope was created.

update_time

Timestamp

Output only. The time when thisMetrics Scope record was last updated.

monitored_projects[]

MonitoredProject

Output only. The list of projects monitored by thisMetrics Scope.

MonitoredProject

Aproject being monitored by aMetrics Scope.

Fields
name

string

Immutable. The resource name of theMonitoredProject. On input, the resource name includes the scoping project ID and monitored project ID. On output, it contains the equivalent project numbers. Example:locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}/projects/{MONITORED_PROJECT_ID_OR_NUMBER}

create_time

Timestamp

Output only. The time when thisMonitoredProject was created.

is_tombstoned

bool

Output only. Set if the project has been tombstoned by the user.

OperationMetadata

Contains metadata for longrunning operation for the edit Metrics Scope endpoints.

Fields
state

State

Current state of the batch operation.

create_time

Timestamp

The time when the batch request was received.

update_time

Timestamp

The time when the operation result was last updated.

State

Batch operation states.

Enums
STATE_UNSPECIFIEDInvalid.
CREATEDRequest has been received.
RUNNINGRequest is actively being processed.
DONEThe batch processing is done.
CANCELLEDThe batch processing was cancelled.

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.