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 a MonitoredProject with the given project ID to the specified Metrics 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 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.

DeleteMonitoredProject

rpc DeleteMonitoredProject(DeleteMonitoredProjectRequest) returns (Operation)

Deletes a MonitoredProject from the specified Metrics 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 the Authentication Overview.

GetMetricsScope

rpc GetMetricsScope(GetMetricsScopeRequest) returns (MetricsScope)

Returns a specific Metrics Scope, including the list of projects monitored by the specified Metrics 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 the Authentication Overview.

ListMetricsScopesByMonitoredProject

rpc ListMetricsScopesByMonitoredProject(ListMetricsScopesByMonitoredProjectRequest) returns (ListMetricsScopesByMonitoredProjectResponse)

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.

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.

CreateMonitoredProjectRequest

Request for the CreateMonitoredProject method.

Fields
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}

monitored_project

MonitoredProject

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

DeleteMonitoredProjectRequest

Request for the DeleteMonitoredProject method.

Fields
name

string

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

Authorization requires the following Google IAM permissions on both the Metrics Scope and on the MonitoredProject: monitoring.metricsScopes.link

GetMetricsScopeRequest

Request for the GetMetricsScope method.

Fields
name

string

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

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

  • resourcemanager.projects.get

ListMetricsScopesByMonitoredProjectRequest

Request for the ListMetricsScopesByMonitoredProject method.

Fields
monitored_resource_container

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

ListMetricsScopesByMonitoredProjectResponse

Response for the ListMetricsScopesByMonitoredProject method.

Fields
metrics_scopes[]

MetricsScope

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

MetricsScope

Represents a Metrics 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 this Metrics Scope was created.

update_time

Timestamp

Output only. The time when this Metrics Scope record was last updated.

monitored_projects[]

MonitoredProject

Output only. The list of projects monitored by this Metrics Scope.

MonitoredProject

A project being monitored by a Metrics Scope.

Fields
name

string

Immutable. The resource name of the MonitoredProject. 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 this MonitoredProject was created.

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_UNSPECIFIED Invalid.
CREATED Request has been received.
RUNNING Request is actively being processed.
DONE The batch processing is done.
CANCELLED The batch processing was cancelled.