gcloud alpha compute security-policies create

NAME
gcloud alpha compute security-policies create - create a Compute Engine security policy
SYNOPSIS
gcloud alpha compute security-policies createNAME[--description=DESCRIPTION][--file-format=FILE_FORMAT][--file-name=FILE_NAME    |--type=SECURITY_POLICY_TYPE][--global    |--region=REGION][GCLOUD_WIDE_FLAG]
DESCRIPTION
(ALPHA)gcloud alpha compute security-policies createis used to create security policies. A security policy policy is a set of rulesthat controls access to various resources.
EXAMPLES
To create a security policy with a given type and description, run:
gcloudalphacomputesecurity-policiescreatemy-policy--type=CLOUD_ARMOR_EDGE--description="policy description"

To create a security from an input file, run:

gcloudalphacomputesecurity-policiescreatemy-policy--file-name=my-file-name
POSITIONAL ARGUMENTS
NAME
Name of the security policy to create.
FLAGS
--description=DESCRIPTION
An optional, textual description for the security policy.
--file-format=FILE_FORMAT
The format of the file to create the security policy config from. Specify eitheryaml or json. Defaults to yaml if not specified. Will be ignored if --file-nameis not specified.FILE_FORMAT must be one of:json,yaml.
Creation options.

At most one of these can be specified:

--file-name=FILE_NAME
The name of the JSON or YAML file to create a security policy config from.
--type=SECURITY_POLICY_TYPE
The type indicates the intended use of the security policy.SECURITY_POLICY_TYPE must be one of:CLOUD_ARMOR,CLOUD_ARMOR_EDGE,CLOUD_ARMOR_NETWORK,CLOUD_ARMOR_INTERNAL_SERVICE.
At most one of these can be specified:
--global
If set, the security policy is global.
--region=REGION
Region of the security policy to create. Overrides the defaultcompute/region property 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 help for 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. These variants are also available:
gcloudcomputesecurity-policiescreate
gcloudbetacomputesecurity-policiescreate

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-13 UTC.