NAME

gcloud alpha compute security-policies create - create a Compute Engine security policy

SYNOPSIS

gcloud alpha compute security-policies create NAME [--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 create is used to create security policies. A security policy policy is a set of rules that controls access to various resources.

EXAMPLES

To create a security policy with a given type and description, run:

$ gcloud alpha compute security-policies create my-policy \ --type=CLOUD_ARMOR_EDGE --description="policy description"

To create a security from an input file, run:

$ gcloud alpha compute security-policies create my-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 either yaml or json. Defaults to yaml if not specified. Will be ignored if --file-name is 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 default compute/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 this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist. These variants are also available:

$ gcloud compute security-policies create

$ gcloud beta compute security-policies create