gcloud_alpha_compute_networks_subnets_update (1)
NAME
- gcloud alpha compute networks subnets update - updates properties of an existing Google Compute Engine subnetwork
SYNOPSIS
-
gcloud alpha compute networks subnets update NAME [--aggregation-interval=AGGREGATION_INTERVAL] [--drain-timeout=DRAIN_TIMEOUT; default="0s"] [--flow-sampling=FLOW_SAMPLING] [--metadata=METADATA] [--region=REGION] [--add-secondary-ranges=PROPERTY=VALUE,[...] | --[no-]enable-flow-logs | --[no-]enable-private-ip-google-access | --[no-]enable-private-ipv6-access | --remove-secondary-ranges=PROPERTY=VALUE,[...] | --role=ROLE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Updates properties of an existing Google Compute Engine
POSITIONAL ARGUMENTS
-
- NAME
-
Name of the subnetwork to update.
FLAGS
-
- --aggregation-interval=AGGREGATION_INTERVAL
-
Can only be specified if VPC flow logging for this subnetwork is enabled.
Toggles the aggregation interval for collecting flow logs. Increasing the
interval time will reduce the amount of generated flow logs for long lasting
connections. Default is an interval of 5 seconds per connection.
AGGREGATION_INTERVAL must be one of: interval-5-sec,
interval-30-sec, interval-1-min, interval-5-min,
interval-10-min, interval-15-min.
- --drain-timeout=DRAIN_TIMEOUT; default="0s"
-
The time period for draining traffic from Internal HTTP(S) Load Balancer proxies
that are assigned addresses in the current ACTIVE subnetwork. For example,
1h, 60m and 3600s each specify a duration of
1 hour for draining the traffic. Longer times reduce the number of proxies that
are draining traffic at any one time, and so improve the availability of proxies
for load balancing. The drain timeout is only applicable when the
[--role=ACTIVE] flag is being used.
- --flow-sampling=FLOW_SAMPLING
-
Can only be specified if VPC flow logging for this subnetwork is enabled. The
value of the field must be in [0, 1]. Set the sampling rate of VPC flow logs
within the subnetwork where 1.0 means all collected logs are reported and 0.0
means no logs are reported. Default is 0.5 which means half of all collected
logs are reported.
- --metadata=METADATA
-
Can only be specified if VPC flow logging for this subnetwork is enabled.
Configures whether metadata fields should be added to the reported VPC flow
logs. Default is to include all metadata. METADATA must be one of:
include-all-metadata, exclude-all-metadata.
- --region=REGION
-
Region of the subnetwork to update. If not specified, you may be prompted to
select a region.
To avoid prompting when this flag is omitted, you can set the compute/region property:
- $ gcloud config set compute/region REGION
A list of regions can be fetched by running:
- $ gcloud compute regions list
To unset the property, run:
- $ gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable CLOUDSDK_COMPUTE_REGION.
-
At most one of these may be specified:
-
- --add-secondary-ranges=PROPERTY=VALUE,[...]
-
Adds secondary IP ranges to the subnetwork for use in IP aliasing.
For example, --add-secondary-ranges range1=192.168.64.0/24 adds a secondary range 192.168.64.0/24 with name range1.
-
- *
- RANGE_NAME - Name of the secondary range.
- *
- RANGE - IP range in CIDR format.
-
-
-
- --[no-]enable-flow-logs
-
Enable/disable VPC flow logging for this subnet. More information for VPC flow
logs can be found at cloud.google.com/vpc/docs/using-flow-logs Use
--enable-flow-logs to enable and --no-enable-flow-logs to
disable.
-
- --[no-]enable-private-ip-google-access
-
Enable/disable access to Google Cloud APIs from this subnet for instances
without a public ip address. Use --enable-private-ip-google-access
to enable and --no-enable-private-ip-google-access to disable.
- --[no-]enable-private-ipv6-access
-
Enable/disable private IPv6 access for the subnet. Use
--enable-private-ipv6-access to enable and
--no-enable-private-ipv6-access to disable.
- --remove-secondary-ranges=PROPERTY=VALUE,[...]
-
Removes secondary ranges from the subnetwork.
For example, --remove-secondary-ranges range2,range3 removes the secondary ranges with names range2 and range3.
- --role=ROLE
-
The role is set to ACTIVE to update a BACKUP reserved address range to be the
new ACTIVE address range. Note that the only supported value for this flag is
ACTIVE since setting an address range to BACKUP is not supported.
This field is only valid when updating a reserved IP address range used for the purpose of Internal HTTP(S) Load Balancer.
ROLE must be (currently only one value is supported):
-
- ACTIVE
- The ACTIVE subnet that is currently used.
-
-
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
NOTES
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support These variants are also available:
- $ gcloud compute networks subnets update $ gcloud beta compute networks subnets update