Skip to main content

hubs

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

Overview

Namehubs
TypeResource
Idgoogle.networkconnectivity.hubs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
hubStatusEntriesarrayThe list of hub status.
nextPageTokenstringThe token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
query_statusselectprojectsId, hubsIdpageSize, pageToken, filter, orderBy, groupByQuery the Private Service Connect propagation status of a Network Connectivity Center hub.
getselectprojectsId, hubsIdGets details about a Network Connectivity Center hub.
listselectprojectsIdorderBy, filter, pageSize, pageTokenLists the Network Connectivity Center hubs associated with a given project.
createinsertprojectsIdrequestId, hubIdCreates a new Network Connectivity Center hub in the specified project.
patchupdateprojectsId, hubsIdrequestId, updateMaskUpdates the description and/or labels of a Network Connectivity Center hub.
deletedeleteprojectsId, hubsIdrequestIdDeletes a Network Connectivity Center hub.
accept_spoke_updateexecprojectsId, hubsIdAccepts a proposal to update a Network Connectivity Center spoke in a hub.
reject_spoke_updateexecprojectsId, hubsIdRejects a proposal to update a Network Connectivity Center spoke in a hub.
accept_spokeexecprojectsId, hubsIdAccepts a proposal to attach a Network Connectivity Center spoke to a hub.
reject_spokeexecprojectsId, hubsIdRejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the ACTIVE state, it transitions to the INACTIVE state and is no longer able to connect to other spokes that are attached to the hub.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
hubsIdstring
projectsIdstring
filterstring
groupBystring
hubIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Query the Private Service Connect propagation status of a Network Connectivity Center hub.

SELECT
hubStatusEntries,
nextPageToken
FROM google.networkconnectivity.hubs
WHERE projectsId = '{{ projectsId }}' -- required
AND hubsId = '{{ hubsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND groupBy = '{{ groupBy }}'
;

INSERT examples

Creates a new Network Connectivity Center hub in the specified project.

INSERT INTO google.networkconnectivity.hubs (
data__policyMode,
data__presetTopology,
data__labels,
data__exportPsc,
data__name,
data__description,
projectsId,
requestId,
hubId
)
SELECT
'{{ policyMode }}',
'{{ presetTopology }}',
'{{ labels }}',
{{ exportPsc }},
'{{ name }}',
'{{ description }}',
'{{ projectsId }}',
'{{ requestId }}',
'{{ hubId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the description and/or labels of a Network Connectivity Center hub.

UPDATE google.networkconnectivity.hubs
SET
data__policyMode = '{{ policyMode }}',
data__presetTopology = '{{ presetTopology }}',
data__labels = '{{ labels }}',
data__exportPsc = {{ exportPsc }},
data__name = '{{ name }}',
data__description = '{{ description }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND hubsId = '{{ hubsId }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a Network Connectivity Center hub.

DELETE FROM google.networkconnectivity.hubs
WHERE projectsId = '{{ projectsId }}' --required
AND hubsId = '{{ hubsId }}' --required
AND requestId = '{{ requestId }}'
;

Lifecycle Methods

Accepts a proposal to update a Network Connectivity Center spoke in a hub.

EXEC google.networkconnectivity.hubs.accept_spoke_update 
@projectsId='{{ projectsId }}' --required,
@hubsId='{{ hubsId }}' --required
@@json=
'{
"requestId": "{{ requestId }}",
"spokeEtag": "{{ spokeEtag }}",
"spokeUri": "{{ spokeUri }}"
}'
;