- NAME
-
- gcloud beta backup-dr auto-protection-policies create - create a Backup and DR AutoProtectionPolicy
- SYNOPSIS
-
-
gcloud beta backup-dr auto-protection-policies create(AUTO_PROTECTION_POLICY:--location=LOCATION)--backup-plan-details=[backup-plan=BACKUP-PLAN],[resource-type=RESOURCE-TYPE]--criteria=key=KEY,values=VALUES[--async] [--description=DESCRIPTION] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
(BETA)Create a Backup and DR AutoProtectionPolicy. - EXAMPLES
-
To create an AutoProtectionPolicy 'my-policy' in 'us-central1' with a criteria
label, run:
# gcloud-disable-gdu-domain
gcloud beta backup-dr auto-protection-policies create my-policy --location=us-central1 --criteria=key=environment,values=prod --description="My Policy" --backup-plan-details="resource-type=compute.googleapis.com/Instance,backup-plan=projects/my-proj/locations/us-central1/backupPlans/my-plan" - POSITIONAL ARGUMENTS
-
-
AutoProtectionPolicy resource - Name of the AutoProtectionPolicy to create. The
arguments in this group can be used to specify the attributes of this resource.
(NOTE) Some attributes are not given arguments in this group but can be set in
other ways.
To set the
projectattribute:-
provide the argument
auto_protection_policyon the command line with a fully specified name; -
provide the argument
--projecton the command line; -
set the property
core/project.
This must be specified.
AUTO_PROTECTION_POLICY-
ID of the AutoProtectionPolicy or fully qualified identifier for the
AutoProtectionPolicy.
To set the
nameattribute:-
provide the argument
auto_protection_policyon the command line.
This positional argument must be specified if any of the other arguments in this group are specified.
-
provide the argument
--location=LOCATION-
The location of the AutoProtectionPolicy.
To set the
locationattribute:-
provide the argument
auto_protection_policyon the command line with a fully specified name; -
provide the argument
--locationon the command line.
-
provide the argument
-
provide the argument
-
AutoProtectionPolicy resource - Name of the AutoProtectionPolicy to create. The
arguments in this group can be used to specify the attributes of this resource.
(NOTE) Some attributes are not given arguments in this group but can be set in
other ways.
- REQUIRED FLAGS
-
--backup-plan-details=[backup-plan=BACKUP-PLAN],[resource-type=RESOURCE-TYPE]- Backup plan details in format resource-type=VALUE,backup-plan=VALUE. This flag can be repeated to specify multiple backup plans.
--criteria=key=KEY,values=VALUES- Criteria of the policy in format key=KEY,values=VALUE.
- OPTIONAL FLAGS
-
--async-
Return immediately, without waiting for the operation in progress to complete.
The default is
True. Enabled by default, use--no-asyncto disable. --description=DESCRIPTION- Description for the policy.
- 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. - BRIEF
- Create a Backup and DR AutoProtectionPolicy.
- NOTES
-
This command is currently in beta and might change without notice. This variant
is also available:
gcloud alpha backup-dr auto-protection-policies create
gcloud beta backup-dr auto-protection-policies create
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-09 UTC.