gcloud beta compute org-security-policies rules create

NAME
gcloud beta compute org-security-policies rules create - create a Compute Engine organizationsecurity policy rule
SYNOPSIS
gcloud beta compute org-security-policies rules create PRIORITY --action=ACTION --security-policy=SECURITY_POLICY [--cloud-armor] [--description=DESCRIPTION] [--dest-ip-ranges=[DEST_IP_RANGE,…]] [--direction=DIRECTION] [--[no-]enable-logging] [--layer4-configs=[LAYER4_CONFIG,…]] [--organization=ORGANIZATION] [--preview] [--target-resources=[TARGET_RESOURCES,…]] [--target-service-accounts=[TARGET_SERVICE_ACCOUNTS,…]] [--expression=EXPRESSION     | --src-ip-ranges=[SRC_IP_RANGE,…]] [GCLOUD_WIDE_FLAG …]
DESCRIPTION
(BETA) gcloud beta compute org-security-policies rules create is used to create organization security policy rules.
EXAMPLES
To create a rule with priority 10 in an organization security policy with ID 123456789, run:
gcloud beta compute org-security-policies rules create 10 --security-policy=123456789 --action=allow --description=example-rule --cloud-armor
POSITIONAL ARGUMENTS
PRIORITY
Priority of the security policy rule to create.
REQUIRED FLAGS
--action=ACTION
Action to take if the request matches the match condition. ACTION must be one of:
allow
Allows the request from HTTP(S) Load Balancing.
deny
(DEPRECATED) Only used for Hierarchical Firewalls.
deny-403
Denies the request from HTTP(S) Load Balancing, with an HTTP response status code of 403.
deny-404
Denies the request from HTTP(S) Load Balancing, with an HTTP response status code of 404.
deny-502
Denies the request from HTTP(S) Load Balancing, with an HTTP response status code of 502.
goto-next
Defers enforcement to the next policy in the hierarchy.
redirect
Redirects the request from HTTP(S) Load Balancing, based on redirect options.
--security-policy=SECURITY_POLICY
Short name or numeric ID of the existing organization security policy into which the rule is inserted. This value must be provided as a plain text string representing either the numeric policy ID (for example, 123456789) or the policy short name (for example, my-org-policy, which requires --organization), rather than a file path, YAML file, JSON configuration, or full resource URI.
OPTIONAL FLAGS
--cloud-armor
Configure the newly created organization security policy rule as a Hierarchical Cloud Armor rule rather than a standard hierarchical firewall rule. Include this boolean flag when adding rules to an organization security policy of type CLOUD_ARMOR.
--description=DESCRIPTION
An optional, textual description for the rule.
--dest-ip-ranges=[DEST_IP_RANGE,…]
Destination IP ranges to match for this rule. Can only be specified if DIRECTION is egress.
--direction=DIRECTION
Direction of the traffic the rule is applied. The default is to apply on incoming traffic. DIRECTION must be one of: INGRESS, EGRESS.
--[no-]enable-logging
Use this flag to enable logging of connections that allowed or denied by this rule. Use --enable-logging to enable and --no-enable-logging to disable.
--layer4-configs=[LAYER4_CONFIG,…]
Comma-separated list of destination protocols and ports to which the firewall rule applies. Each entry consists of a protocol name optionally followed by a colon and a single port or port range (for example, tcp:80,udp:67-68). If a protocol is specified without a port range (for example, icmp), the rule applies to all ports for that protocol.
--organization=ORGANIZATION
Organization which the organization security policy belongs to. Must be set if SECURITY_POLICY is short name.
--preview
If specified, the action will not be enforced.
--target-resources=[TARGET_RESOURCES,…]
List of URLs of target resources to which the rule is applied.
--target-service-accounts=[TARGET_SERVICE_ACCOUNTS,…]
List of target service accounts for the rule.
Security policy rule matcher.

At most one of these can be specified:

--expression=EXPRESSION
The Cloud Armor rules language expression to match for this rule.
--src-ip-ranges=[SRC_IP_RANGE,…]
The source IPs/IP ranges to match for this rule. To match all IPs specify *.
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 beta and might change without notice. These variants are also available:
gcloud compute org-security-policies rules create
gcloud alpha compute org-security-policies rules create
gcloud preview compute org-security-policies rules create