- NAME
-
- gcloud compute security-policies create - create a Compute Engine security policy
- SYNOPSIS
-
-
gcloud 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
-
gcloud 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 compute security-policies create my-policy --type=CLOUD_ARMOR_EDGE --description="policy description"
To create a security from an input file, run:
gcloud 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
.
-
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
-
These variants are also available:
gcloud alpha compute security-policies create
gcloud beta compute security-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 2024-06-04 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"last_modified": "Last updated 2024-06-04 UTC.",
"state": ""
}