gcloud alpha services policies update Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha services policies update - update consumer policy for a project, folder or organization
- SYNOPSIS
gcloud alpha services policies update--consumer-policy-file=CONSUMER_POLICY_FILE[--bypass-api-usage-check][--bypass-dependency-check][--validate-only][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)Update consumer policy for a project, folder ororganization.- EXAMPLES
- Update consumer policy
gcloudalphaservicespoliciesupdate--consumer-policy-file=/path/to/the/file.yamlValidate the update action on the policy:
gcloudalphaservicespoliciesupdate--consumer-policy-file=/path/to/the/file.yaml--validate-onlyUpdate consumer policy and bypass dependency check:
gcloudalphaservicespoliciesupdate--consumer-policy-file=/path/to/the/file.yaml--bypass-dependency-checkUpdate consumer policy and bypass api usage check:
gcloudalphaservicespoliciesupdate--consumer-policy-file=/path/to/the/file.yaml--bypass-api-usage-check - REQUIRED FLAGS
--consumer-policy-file=CONSUMER_POLICY_FILE- Path to the file that contains the consumer policy in the YAML format.
- OPTIONAL FLAGS
--bypass-api-usage-check- If true, the system will bypass usage checks for services that are beingremoved. If false, the system will check if the service to be removed was usedin the last 30 days or enabled in the last 3 days. If so, an error will bereturned.
--bypass-dependency-check- This flag controls dependency management within the consumer policy. If false,dependencies are enforced. When adding a new service, it verifies that all theservices dependencies are already present in the policy. When removing aservice, the system will ensure that no other services in the policy depend onit. If the policy lacks any required dependencies, the update will not succeed,and an error will be returned.
--validate-only- Validate the to update action, but don't actually perform it
- 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:
gcloudbetaservicespoliciesupdate
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-11-11 UTC.