- INFORMATION
-
gcloud beta compute snapshot-recycle-bin-policy updateis not available in universe domainuniverse. - NAME
-
- gcloud beta compute snapshot-recycle-bin-policy update - update the project's or organization's snapshot recycle bin policy
- SYNOPSIS
-
-
gcloud beta compute snapshot-recycle-bin-policy update(--remove-rule=RULE_KEY| [--standard-snapshots-retention-duration-days=STANDARD_SNAPSHOTS_RETENTION_DURATION_DAYS:--set-rule=RULE_KEY]) [--organization=ORGANIZATION|--project=PROJECT] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
(BETA)Update the project's or organization's snapshot recycle bin policy. - EXAMPLES
-
To set retention days for the default rule to 10 days for a project:
gcloud beta compute snapshot-recycle-bin-policy update --set-rule=default --standard-snapshots-retention-duration-days=10To set retention days for the default rule to 6 days for organization 123456789:
gcloud beta compute snapshot-recycle-bin-policy update --organization=123456789 --set-rule=default --standard-snapshots-retention-duration-days=6To set retention days for a tag-based rule '12345/env/prod' to 5 days for a project:
gcloud beta compute snapshot-recycle-bin-policy update --set-rule='12345/env/prod' --standard-snapshots-retention-duration-days=5To remove rule '12345/env/prod' for a project:
gcloud beta compute snapshot-recycle-bin-policy update --remove-rule='12345/env/prod' - REQUIRED FLAGS
-
-
Exactly one of these must be specified:
--remove-rule=RULE_KEY- Key of the rule to remove. Rule keys are 'default' or tag-based keys like '12345/env/prod'.
-
Or at least one of these can be specified:
--standard-snapshots-retention-duration-days=STANDARD_SNAPSHOTS_RETENTION_DURATION_DAYS-
Retention duration in days for standard snapshots. Must be provided with
--set-rule.
This flag argument must be specified if any of the other arguments in this group are specified.
--set-rule=RULE_KEY- Key of the rule to set. Rule keys are 'default' or tag-based keys like '12345/env/prod'.
-
Exactly one of these must be specified:
- OPTIONAL FLAGS
-
-
At most one of these can be specified:
--organization=ORGANIZATION- Organization ID to apply this policy to.
--project=PROJECT- Project ID to apply this policy to.
-
At most one of these can be specified:
- 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 beta and might change without notice. This variant
is also available:
gcloud alpha compute snapshot-recycle-bin-policy update
gcloud beta compute snapshot-recycle-bin-policy update
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-09-01 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-09-01 UTC."],[],[]]