Using the gcloud SDK for the Network Connectivity API

The Network Connectivity SDK enables you to create and manage Network Connectivity Center hub and spoke resources.

gcloud is a unified command-line tool that is part of the Cloud SDK. When you run the tool to perform operations on Network Connectivity Center hubs and spokes, those commands are part of the Network Connectivity API.

You can use gcloud to run the following commands. For more information, see the SDK overview for Network Connectivity.

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

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-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-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