hubs
Creates, updates, deletes, gets or lists a hubs
resource.
Overview
Name | hubs |
Type | Resource |
Id | google.networkconnectivity.hubs |
Fields
The following fields are returned by SELECT
queries:
- get
- query_status
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. The name of the hub. Hub names must be unique. They use the following form: projects/{project_number}/locations/global/hubs/{hub_id} |
createTime | string (google-datetime) | Output only. The time the hub was created. |
description | string | Optional. An optional description of the hub. |
exportPsc | boolean | Optional. Whether Private Service Connect connection propagation is enabled for the hub. If true, Private Service Connect endpoints in VPC spokes attached to the hub are made accessible to other VPC spokes attached to the hub. The default value is false. |
labels | object | Optional labels in key-value pair format. For more information about labels, see Requirements for labels. |
policyMode | string | Optional. The policy mode of this hub. This field can be either PRESET or CUSTOM. If unspecified, the policy_mode defaults to PRESET. |
presetTopology | string | Optional. The topology implemented in this hub. Currently, this field is only used when policy_mode = PRESET. The available preset topologies are MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET, the preset_topology defaults to MESH. When policy_mode = CUSTOM, the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED. |
routeTables | array | Output only. The route tables that belong to this hub. They use the following form: projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id} This field is read-only. Network Connectivity Center automatically populates it based on the route tables nested under the hub. |
routingVpcs | array | Output only. The VPC networks associated with this hub's spokes. This field is read-only. Network Connectivity Center automatically populates it based on the set of spokes attached to the hub. |
spokeSummary | object | Output only. A summary of the spokes associated with a hub. The summary includes a count of spokes according to type and according to state. If any spokes are inactive, the summary also lists the reasons they are inactive, including a count for each reason. (id: SpokeSummary) |
state | string | Output only. The current lifecycle state of this hub. |
uniqueId | string | Output only. The Google-generated UUID for the hub. This value is unique across all hub resources. If a hub is deleted and another with the same name is created, the new hub is assigned a different unique_id. |
updateTime | string (google-datetime) | Output only. The time the hub was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
hubStatusEntries | array | The list of hub status. |
nextPageToken | string | The 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. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. The name of the hub. Hub names must be unique. They use the following form: projects/{project_number}/locations/global/hubs/{hub_id} |
createTime | string (google-datetime) | Output only. The time the hub was created. |
description | string | Optional. An optional description of the hub. |
exportPsc | boolean | Optional. Whether Private Service Connect connection propagation is enabled for the hub. If true, Private Service Connect endpoints in VPC spokes attached to the hub are made accessible to other VPC spokes attached to the hub. The default value is false. |
labels | object | Optional labels in key-value pair format. For more information about labels, see Requirements for labels. |
policyMode | string | Optional. The policy mode of this hub. This field can be either PRESET or CUSTOM. If unspecified, the policy_mode defaults to PRESET. |
presetTopology | string | Optional. The topology implemented in this hub. Currently, this field is only used when policy_mode = PRESET. The available preset topologies are MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET, the preset_topology defaults to MESH. When policy_mode = CUSTOM, the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED. |
routeTables | array | Output only. The route tables that belong to this hub. They use the following form: projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id} This field is read-only. Network Connectivity Center automatically populates it based on the route tables nested under the hub. |
routingVpcs | array | Output only. The VPC networks associated with this hub's spokes. This field is read-only. Network Connectivity Center automatically populates it based on the set of spokes attached to the hub. |
spokeSummary | object | Output only. A summary of the spokes associated with a hub. The summary includes a count of spokes according to type and according to state. If any spokes are inactive, the summary also lists the reasons they are inactive, including a count for each reason. (id: SpokeSummary) |
state | string | Output only. The current lifecycle state of this hub. |
uniqueId | string | Output only. The Google-generated UUID for the hub. This value is unique across all hub resources. If a hub is deleted and another with the same name is created, the new hub is assigned a different unique_id. |
updateTime | string (google-datetime) | Output only. The time the hub was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , hubsId | Gets details about a Network Connectivity Center hub. | |
query_status | select | projectsId , hubsId | pageSize , pageToken , filter , orderBy , groupBy | Query the Private Service Connect propagation status of a Network Connectivity Center hub. |
list | select | projectsId | pageSize , pageToken , filter , orderBy | Lists the Network Connectivity Center hubs associated with a given project. |
create | insert | projectsId | hubId , requestId | Creates a new Network Connectivity Center hub in the specified project. |
patch | update | projectsId , hubsId | updateMask , requestId | Updates the description and/or labels of a Network Connectivity Center hub. |
delete | delete | projectsId , hubsId | requestId | Deletes a Network Connectivity Center hub. |
reject_spoke | exec | projectsId , hubsId | Rejects 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. | |
accept_spoke | exec | projectsId , hubsId | Accepts a proposal to attach a Network Connectivity Center spoke to a hub. | |
accept_spoke_update | exec | projectsId , hubsId | Accepts a proposal to update a Network Connectivity Center spoke in a hub. | |
reject_spoke_update | exec | projectsId , hubsId | Rejects a proposal to update a Network Connectivity Center spoke in a 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.
Name | Datatype | Description |
---|---|---|
hubsId | string | |
projectsId | string | |
filter | string | |
groupBy | string | |
hubId | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- query_status
- list
Gets details about a Network Connectivity Center hub.
SELECT
name,
createTime,
description,
exportPsc,
labels,
policyMode,
presetTopology,
routeTables,
routingVpcs,
spokeSummary,
state,
uniqueId,
updateTime
FROM google.networkconnectivity.hubs
WHERE projectsId = '{{ projectsId }}' -- required
AND hubsId = '{{ hubsId }}' -- required;
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 }}';
Lists the Network Connectivity Center hubs associated with a given project.
SELECT
name,
createTime,
description,
exportPsc,
labels,
policyMode,
presetTopology,
routeTables,
routingVpcs,
spokeSummary,
state,
uniqueId,
updateTime
FROM google.networkconnectivity.hubs
WHERE projectsId = '{{ projectsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a new Network Connectivity Center hub in the specified project.
INSERT INTO google.networkconnectivity.hubs (
data__name,
data__labels,
data__description,
data__policyMode,
data__presetTopology,
data__exportPsc,
projectsId,
hubId,
requestId
)
SELECT
'{{ name }}',
'{{ labels }}',
'{{ description }}',
'{{ policyMode }}',
'{{ presetTopology }}',
{{ exportPsc }},
'{{ projectsId }}',
'{{ hubId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: hubs
props:
- name: projectsId
value: string
description: Required parameter for the hubs resource.
- name: name
value: string
description: >
Immutable. The name of the hub. Hub names must be unique. They use the following form: `projects/{project_number}/locations/global/hubs/{hub_id}`
- name: labels
value: object
description: >
Optional labels in key-value pair format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
- name: description
value: string
description: >
Optional. An optional description of the hub.
- name: policyMode
value: string
description: >
Optional. The policy mode of this hub. This field can be either PRESET or CUSTOM. If unspecified, the policy_mode defaults to PRESET.
valid_values: ['POLICY_MODE_UNSPECIFIED', 'PRESET']
- name: presetTopology
value: string
description: >
Optional. The topology implemented in this hub. Currently, this field is only used when policy_mode = PRESET. The available preset topologies are MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET, the preset_topology defaults to MESH. When policy_mode = CUSTOM, the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED.
valid_values: ['PRESET_TOPOLOGY_UNSPECIFIED', 'MESH', 'STAR']
- name: exportPsc
value: boolean
description: >
Optional. Whether Private Service Connect connection propagation is enabled for the hub. If true, Private Service Connect endpoints in VPC spokes attached to the hub are made accessible to other VPC spokes attached to the hub. The default value is false.
- name: hubId
value: string
- name: requestId
value: string
UPDATE
examples
- patch
Updates the description and/or labels of a Network Connectivity Center hub.
UPDATE google.networkconnectivity.hubs
SET
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__description = '{{ description }}',
data__policyMode = '{{ policyMode }}',
data__presetTopology = '{{ presetTopology }}',
data__exportPsc = {{ exportPsc }}
WHERE
projectsId = '{{ projectsId }}' --required
AND hubsId = '{{ hubsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a Network Connectivity Center hub.
DELETE FROM google.networkconnectivity.hubs
WHERE projectsId = '{{ projectsId }}' --required
AND hubsId = '{{ hubsId }}' --required
AND requestId = '{{ requestId }}';
Lifecycle Methods
- reject_spoke
- accept_spoke
- accept_spoke_update
- reject_spoke_update
Rejects 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.
EXEC google.networkconnectivity.hubs.reject_spoke
@projectsId='{{ projectsId }}' --required,
@hubsId='{{ hubsId }}' --required
@@json=
'{
"spokeUri": "{{ spokeUri }}",
"requestId": "{{ requestId }}",
"details": "{{ details }}"
}';
Accepts a proposal to attach a Network Connectivity Center spoke to a hub.
EXEC google.networkconnectivity.hubs.accept_spoke
@projectsId='{{ projectsId }}' --required,
@hubsId='{{ hubsId }}' --required
@@json=
'{
"spokeUri": "{{ spokeUri }}",
"requestId": "{{ requestId }}"
}';
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=
'{
"spokeUri": "{{ spokeUri }}",
"spokeEtag": "{{ spokeEtag }}",
"requestId": "{{ requestId }}"
}';
Rejects a proposal to update a Network Connectivity Center spoke in a hub.
EXEC google.networkconnectivity.hubs.reject_spoke_update
@projectsId='{{ projectsId }}' --required,
@hubsId='{{ hubsId }}' --required
@@json=
'{
"spokeUri": "{{ spokeUri }}",
"spokeEtag": "{{ spokeEtag }}",
"details": "{{ details }}",
"requestId": "{{ requestId }}"
}';