gcloud alpha monitoring metrics-scopes create Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha monitoring metrics-scopes create - create a monitored project in a metrics scope
- SYNOPSIS
gcloud alpha monitoring metrics-scopes createMONITORED_RESOURCE_CONTAINER_NAME[GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)This command can fail for the following reasons:- The projects specified do not exist.
- The active account does not have permission to access one of the given project.
- The monitored project already exists in the metrics scope.
More details can be found athttps://cloud.google.com/monitoring/api/ref_v3/rest/v1/locations.global.metricsScopes.projects/create
- EXAMPLES
- The following command adds a monitored project with the ID
monitored-project-1to a metrics scope with project idmetrics-scope-1assuming themetrics-scope-1is thedefault project:gcloudalphamonitoringmetrics-scopescreateprojects/monitored-project-1The following command adds a monitored project with the ID
monitored-project-1to a metrics scope with project idmetrics-scope-1:gcloudalphamonitoringmetrics-scopescreateprojects/monitored-project-1--project=metrics-scope-1gcloudalphamonitoringmetrics-scopescreatelocations/global/metricsScopes/metrics-scope-1/projects/monitored-project-1 - POSITIONAL ARGUMENTS
MONITORED_RESOURCE_CONTAINER_NAME- Monitored resource container (example - projects/PROJECT_ID) project you want tocreate.
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$gcloud helpfor details. - NOTES
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. This variant is also available:
gcloudbetamonitoringmetrics-scopescreate
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-05-07 UTC.