- NAME
-
- gcloud beta compute security-policies import - import security policy configs into your project
- SYNOPSIS
-
-
gcloud beta compute security-policies importNAME--file-name=FILE_NAME[--file-format=FILE_FORMAT] [--global|--region=REGION] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
(BETA)gcloud beta compute security-policies importimports a security policy to update an existing policy. To create a new policy from a file please use the create command instead. - EXAMPLES
- To import a security policy from a YAML file run this:
gcloud beta compute security-policies import --file-name = myFile - POSITIONAL ARGUMENTS
-
-
NAME - Name of the security policy to import.
-
- REQUIRED FLAGS
-
-
--file-name=FILE_NAME - The name of the JSON or YAML file to import the security policy config from.
-
- OPTIONAL FLAGS
-
-
--file-format=FILE_FORMAT - The format of the file to import the security policy config from. Specify either
yaml or json. Defaults to yaml if not specified.
FILE_FORMATmust be one of:json,yaml. - At most one of these can be specified:
-
--global - If set, the security policy is global.
-
--region=REGION - Region of the security policy to import. Overrides the default
compute/regionproperty value for this command invocation.
-
-
- 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. These
variants are also available:
gcloud compute security-policies importgcloud alpha compute security-policies importgcloud preview compute security-policies import
gcloud beta compute security-policies import
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-05-27 UTC.

