---
title: "POST /v1/{+parent}/hubs"
method: POST
path: "/v1/{+parent}/hubs"
tags: ["projects"]
---

# POST /v1/{+parent}/hubs

`POST /v1/{+parent}/hubs`

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

## Path parameters

- `parent` string, required

## Query parameters

- `hubId` string
- `requestId` string

## Request body

- Hub — A Network Connectivity Center hub is a global management resource to which you attach spokes. A single hub can contain spokes from multiple regions. However, if any of a hub's spokes use the site-to-site data transfer feature, the resources associated with those spokes must all be in the same VPC network. Spokes that do not use site-to-site data transfer can be associated with any VPC network in your project.
  - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'ACTIVE' | 'DELETING' | 'ACCEPTING' | 'REJECTING' | 'UPDATING' | 'INACTIVE' | 'OBSOLETE' | 'FAILED' — Output only. The current lifecycle state of this hub.
  - `createTime` string, google-datetime — Output only. The time the hub was created.
  - `description` string — Optional. An optional description of the hub.
  - `routingVpcs` RoutingVPC[] — 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.
    - `uri` string — The URI of the VPC network.
    - `requiredForNewSiteToSiteDataTransferSpokes` boolean — Output only. If true, indicates that this VPC network is currently associated with spokes that use the data transfer feature (spokes where the site_to_site_data_transfer field is set to true). If you create new spokes that use data transfer, they must be associated with this VPC network. At most, one VPC network will have this field set to true.
  - `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.
  - `spokeSummary` SpokeSummary — Summarizes information about 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.
    - `spokeStateCounts` SpokeStateCount[] — Output only. Counts the number of spokes that are in each state and associated with a given hub.
      - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'ACTIVE' | 'DELETING' | 'ACCEPTING' | 'REJECTING' | 'UPDATING' | 'INACTIVE' | 'OBSOLETE' | 'FAILED' — Output only. The state of the spokes.
      - `count` string, int64 — Output only. The total number of spokes that are in this state and associated with a given hub.
    - `spokeStateReasonCounts` SpokeStateReasonCount[] — Output only. Counts the number of spokes that are inactive for each possible reason and associated with a given hub.
      - `stateReasonCode` 'CODE_UNSPECIFIED' | 'PENDING_REVIEW' | 'REJECTED' | 'PAUSED' | 'FAILED' | 'UPDATE_PENDING_REVIEW' | 'UPDATE_REJECTED' | 'UPDATE_FAILED' — Output only. The reason that a spoke is inactive.
      - `count` string, int64 — Output only. The total number of spokes that are inactive for a particular reason and associated with a given hub.
    - `spokeTypeCounts` SpokeTypeCount[] — Output only. Counts the number of spokes of each type that are associated with a specific hub.
      - `spokeType` 'SPOKE_TYPE_UNSPECIFIED' | 'VPN_TUNNEL' | 'INTERCONNECT_ATTACHMENT' | 'ROUTER_APPLIANCE' | 'VPC_NETWORK' | 'GATEWAY' | 'PRODUCER_VPC_NETWORK' — Output only. The type of the spokes.
      - `count` string, int64 — Output only. The total number of spokes of this type that are associated with the hub.
  - `labels` object — 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).
  - `presetTopology` 'PRESET_TOPOLOGY_UNSPECIFIED' | 'MESH' | 'STAR' | 'HYBRID_INSPECTION' — 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.
  - `updateTime` string, google-datetime — Output only. The time the hub was last updated.
  - `routeTables` string[] — 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.
  - `policyMode` 'POLICY_MODE_UNSPECIFIED' | 'PRESET' — Optional. The policy mode of this hub. This field can be either PRESET or CUSTOM. If unspecified, the policy_mode defaults to PRESET.
  - `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.
  - `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}`

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/networkconnectivity.md) · [All operations](https://skmtc.net/google/apis/networkconnectivity/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/networkconnectivity/versions/778637dee420/schema)
