Skip to main content

spokes

Creates, updates, deletes, gets or lists a spokes resource.

Overview

Namespokes
TypeResource
Idgoogle.networkconnectivity.spokes

Fields

NameDatatypeDescription
namestringImmutable. The name of the spoke. Spoke names must be unique. They use the following form: projects/{project_number}/locations/{region}/spokes/{spoke_id}
descriptionstringAn optional description of the spoke.
createTimestringOutput only. The time the spoke was created.
groupstringOptional. The name of the group that this spoke is associated with.
hubstringImmutable. The name of the hub that this spoke is attached to.
labelsobjectOptional labels in key-value pair format. For more information about labels, see Requirements for labels.
linkedInterconnectAttachmentsobjectA collection of VLAN attachment resources. These resources should be redundant attachments that all advertise the same prefixes to Google Cloud. Alternatively, in active/passive configurations, all attachments should be capable of advertising the same prefixes.
linkedRouterApplianceInstancesobjectA collection of router appliance instances. If you configure multiple router appliance instances to receive data from the same set of sites outside of Google Cloud, we recommend that you associate those instances with the same spoke.
linkedVpcNetworkobjectAn existing VPC network.
linkedVpnTunnelsobjectA collection of Cloud VPN tunnel resources. These resources should be redundant HA VPN tunnels that all advertise the same prefixes to Google Cloud. Alternatively, in a passive/active configuration, all tunnels should be capable of advertising the same prefixes.
reasonsarrayOutput only. The reasons for current state of the spoke. Only present when the spoke is in the INACTIVE state.
spokeTypestringOutput only. The type of resource associated with the spoke.
statestringOutput only. The current lifecycle state of this spoke.
uniqueIdstringOutput only. The Google-generated UUID for the spoke. This value is unique across all spoke resources. If a spoke is deleted and another with the same name is created, the new spoke is assigned a different unique_id.
updateTimestringOutput only. The time the spoke was last updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, spokesIdGets details about a Network Connectivity Center spoke.
listSELECTlocationsId, projectsIdLists the Network Connectivity Center spokes in a specified project and location.
list_spokesSELECThubsId, projectsIdLists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted.
createINSERTlocationsId, projectsIdCreates a Network Connectivity Center spoke.
deleteDELETElocationsId, projectsId, spokesIdDeletes a Network Connectivity Center spoke.
patchUPDATElocationsId, projectsId, spokesIdUpdates the parameters of a Network Connectivity Center spoke.

SELECT examples

Lists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted.

SELECT
name,
description,
createTime,
group,
hub,
labels,
linkedInterconnectAttachments,
linkedRouterApplianceInstances,
linkedVpcNetwork,
linkedVpnTunnels,
reasons,
spokeType,
state,
uniqueId,
updateTime
FROM google.networkconnectivity.spokes
WHERE hubsId = '{{ hubsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new spokes resource.

/*+ create */
INSERT INTO google.networkconnectivity.spokes (
locationsId,
projectsId,
name,
labels,
description,
hub,
group,
linkedVpnTunnels,
linkedInterconnectAttachments,
linkedRouterApplianceInstances,
linkedVpcNetwork
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ labels }}',
'{{ description }}',
'{{ hub }}',
'{{ group }}',
'{{ linkedVpnTunnels }}',
'{{ linkedInterconnectAttachments }}',
'{{ linkedRouterApplianceInstances }}',
'{{ linkedVpcNetwork }}'
;

UPDATE example

Updates a spokes resource.

/*+ update */
UPDATE google.networkconnectivity.spokes
SET
name = '{{ name }}',
labels = '{{ labels }}',
description = '{{ description }}',
hub = '{{ hub }}',
group = '{{ group }}',
linkedVpnTunnels = '{{ linkedVpnTunnels }}',
linkedInterconnectAttachments = '{{ linkedInterconnectAttachments }}',
linkedRouterApplianceInstances = '{{ linkedRouterApplianceInstances }}',
linkedVpcNetwork = '{{ linkedVpcNetwork }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND spokesId = '{{ spokesId }}';

DELETE example

Deletes the specified spokes resource.

/*+ delete */
DELETE FROM google.networkconnectivity.spokes
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND spokesId = '{{ spokesId }}';