gcloud CLI command reference

Network Connectivity Google Cloud CLI commands enable connectivity with and between Google Cloud resources.

When you run Network Connectivity gcloud CLI commands, you perform operations on resources that are part of the Network Connectivity API. For more information about the API, see the Network Connectivity API reference.

Commands for working with Network Connectivity Center hubs

Use these commands when working with Network Connectivity Center hubs. For more information, see Working with hubs.

Command Task
gcloud network-connectivity hubs list Lists Network Connectivity Center hubs for a project
gcloud network-connectivity hubs create Creates a Network Connectivity Center hub
gcloud network-connectivity hubs describe Lists detailed information for a Network Connectivity Center hub
gcloud network-connectivity hubs update Adds a label or description to a Network Connectivity Center hub
gcloud network-connectivity hubs delete Deletes a Network Connectivity Center hub
gcloud network-connectivity hubs accept-spoke Accepts a VPC spoke from a different project into a hub
gcloud network-connectivity hubs list-spoke Lists VPCs connected to a hub
gcloud network-connectivity hubs reject-spoke Rejects a VPC spoke from a different project from being accepted into a hub
gcloud network-connectivity hubs add-iam-policy-binding Adds an Identity and Access Management (IAM) policy binding to the IAM policy of a hub resource
gcloud network-connectivity hubs get-iam-policy-binding Gets the IAM policy for a hub resource
gcloud network-connectivity hubs remove-iam-policy-binding Removes an IAM policy binding from the IAM policy of a hub resource
gcloud network-connectivity hubs route-tables describe Describes a Network Connectivity Center hub route table
gcloud network-connectivity hubs route-tables list Lists a Network Connectivity Center hub route table
gcloud network-connectivity hubs route-tables routes describe Describes a Network Connectivity Center hub route
gcloud network-connectivity hubs route-tables routes list Lists a Network Connectivity Center hub route

Commands for working with Network Connectivity Center spokes

Use these commands when working with Network Connectivity Center spokes. For more information, see Working with spokes.

Command Task
gcloud network-connectivity spokes list Lists all spokes in the specified region
gcloud network-connectivity spokes linked-vpc-network create Creates a VPC spoke
gcloud network-connectivity spokes linked-router-appliances create Creates a Router appliance spoke
gcloud network-connectivity spokes linked-interconnect-attachments create Creates a VLAN attachment spoke
gcloud network-connectivity spokes linked-vpn-tunnels create Creates a VPN spoke
gcloud network-connectivity spokes describe Lists detailed information for a Network Connectivity Center spoke
gcloud network-connectivity spokes linked-vpc-network update Updates a VPC spoke
gcloud network-connectivity spokes linked-router-appliances update Updates a Router appliance spoke
gcloud network-connectivity spokes linked-interconnect-attachments update Adds a label or description to a VLAN attachment spoke
gcloud network-connectivity spokes linked-vpn-tunnels update Adds a label or description to a VPN spoke
gcloud network-connectivity spokes delete Deletes a Network Connectivity Center spoke