gcloud compute packet-mirrorings update NAME [--async] [--collector-ilb=COLLECTOR_ILB] [--description=DESCRIPTION] [--enable] [--filter-direction=DIRECTION] [--region=REGION] [--add-filter-cidr-ranges=[CIDR_RANGE,…] | --clear-filter-cidr-ranges | --remove-filter-cidr-ranges=[CIDR_RANGE,…] | --set-filter-cidr-ranges=[CIDR_RANGE,…]] [--add-filter-protocols=[PROTOCOL,…] | --clear-filter-protocols | --remove-filter-protocols=[PROTOCOL,…] | --set-filter-protocols=[PROTOCOL,…]] [--add-mirrored-instances=[INSTANCE,…] | --clear-mirrored-instances | --remove-mirrored-instances=[INSTANCE,…] | --set-mirrored-instances=[INSTANCE,…]] [--add-mirrored-subnets=[SUBNET,…] | --clear-mirrored-subnets | --remove-mirrored-subnets=[SUBNET,…] | --set-mirrored-subnets=[SUBNET,…]] [--add-mirrored-tags=[TAG,…] | --clear-mirrored-tags | --remove-mirrored-tags=[TAG,…] | --set-mirrored-tags=[TAG,…]] [GCLOUD_WIDE_FLAG …]
gcloud compute packet-mirrorings update my-pm --region us-central1 --clear-mirrored-tags --add-mirrored-subnets subnet-1Change the load-balancer to send mirrored traffic to.
gcloud compute packet-mirrorings update my-pm --region us-central1 --collector-ilb new-forwarding-ruleDisable a Packet Mirroring policy.
gcloud compute packet-mirrorings update my-pm --region us-central1 --no-enableRe-enable a disabled Packet Mirroring policy.
gcloud compute packet-mirrorings update my-pm --region us-central1 --enableNAME--async--collector-ilb=COLLECTOR_ILB--description=DESCRIPTION--enable--filter-direction=DIRECTIONingress, only ingress traffic is mirrored.
egress, only egress traffic is mirrored.
both (default), both directions are mirrored.
DIRECTION must be one of: both,
egress, ingress.
--region=REGIONcompute/region property value for this command invocation.
--add-filter-cidr-ranges=[CIDR_RANGE,…]--clear-filter-cidr-ranges--remove-filter-cidr-ranges=[CIDR_RANGE,…]--set-filter-cidr-ranges=[CIDR_RANGE,…]--add-filter-protocols=[PROTOCOL,…]--clear-filter-protocols--remove-filter-protocols=[PROTOCOL,…]--set-filter-protocols=[PROTOCOL,…]--add-mirrored-instances=[INSTANCE,…]--clear-mirrored-instances--remove-mirrored-instances=[INSTANCE,…]--set-mirrored-instances=[INSTANCE,…]--add-mirrored-subnets=[SUBNET,…]--clear-mirrored-subnets--remove-mirrored-subnets=[SUBNET,…]--set-mirrored-subnets=[SUBNET,…]To read more about configuring network tags, read this guide: https://cloud.google.com/vpc/docs/add-remove-network-tags
The virtual machines with the provided tags must live in zones contained in the same region as this packet mirroring.
--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.
gcloud alpha compute packet-mirrorings updategcloud beta compute packet-mirrorings updategcloud preview compute packet-mirrorings update
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 2026-05-27 UTC.