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

# POST /v1/{+parent}/spokes

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

Creates a Network Connectivity Center spoke.

## Path parameters

- `parent` string, required

## Query parameters

- `requestId` string
- `spokeId` string

## Request body

- Spoke — A Network Connectivity Center spoke represents one or more network connectivity resources. When you create a spoke, you associate it with a hub. You must also identify a value for exactly one of the following fields: * linked_vpn_tunnels * linked_interconnect_attachments * linked_router_appliance_instances * linked_vpc_network
  - `spokeType` 'SPOKE_TYPE_UNSPECIFIED' | 'VPN_TUNNEL' | 'INTERCONNECT_ATTACHMENT' | 'ROUTER_APPLIANCE' | 'VPC_NETWORK' | 'GATEWAY' | 'PRODUCER_VPC_NETWORK' — Output only. The type of resource associated with the spoke.
  - `reasons` StateReason[] — Output only. The reasons for current state of the spoke.
    - `message` string — Human-readable details about this reason.
    - `code` 'CODE_UNSPECIFIED' | 'PENDING_REVIEW' | 'REJECTED' | 'PAUSED' | 'FAILED' | 'UPDATE_PENDING_REVIEW' | 'UPDATE_REJECTED' | 'UPDATE_FAILED' — The code associated with this reason.
    - `userDetails` string — Additional information provided by the user in the RejectSpoke call.
  - `description` string — Optional. An optional description of the spoke.
  - `hub` string — Immutable. The name of the hub that this spoke is attached to.
  - `createTime` string, google-datetime — Output only. The time the spoke was created.
  - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'ACTIVE' | 'DELETING' | 'ACCEPTING' | 'REJECTING' | 'UPDATING' | 'INACTIVE' | 'OBSOLETE' | 'FAILED' — Output only. The current lifecycle state of this spoke.
  - `linkedVpcNetwork` LinkedVpcNetwork — An existing VPC network.
    - `includeExportRanges` string[] — Optional. IP ranges allowed to be included from peering.
    - `excludeExportRanges` string[] — Optional. IP ranges encompassing the subnets to be excluded from peering.
    - `uri` string — Required. The URI of the VPC network resource.
    - `producerVpcSpokes` string[] — Output only. The list of Producer VPC spokes that this VPC spoke is a service consumer VPC spoke for. These producer VPCs are connected through VPC peering to this spoke's backing VPC network. Because they are directly connected through VPC peering, NCC export filters do not apply between the service consumer VPC spoke and any of its producer VPC spokes. This VPC spoke cannot be deleted as long as any of these producer VPC spokes are connected to the NCC Hub.
    - `proposedIncludeExportRanges` string[] — Output only. The proposed include export IP ranges waiting for hub administrator's approval.
    - `proposedExcludeExportRanges` string[] — Output only. The proposed exclude export IP ranges waiting for hub administrator's approval.
  - `gateway` Gateway — A gateway that can apply specialized traffic processing.
    - `ipRangeReservations` IpRangeReservation[] — Optional. A list of IP ranges that are reserved for this gateway's internal intfrastructure.
      - `ipRange` string — Required. A block of IP addresses used to allocate supporting infrastructure for this gateway. This block must not overlap with subnets in any spokes or peer VPC networks that the gateway can communicate with. Example: "10.1.2.0/24"
    - `cloudRouters` string[] — Output only. The list of Cloud Routers that are connected to this gateway. Should be in the form: https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
    - `capacity` 'GATEWAY_CAPACITY_UNSPECIFIED' | 'CAPACITY_1_GBPS' | 'CAPACITY_10_GBPS' — Optional. The aggregate processing capacity of this gateway.
    - `sacAttachment` string — Output only. The URI of the connected SACAttachment. Should be in the form: projects/{project}/locations/{location}/sacAttachments/{sac_attachment}
  - `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).
  - `group` string — Optional. The name of the group that this spoke is associated with.
  - `fieldPathsPendingUpdate` string[] — Optional. The list of fields waiting for hub administrator's approval.
  - `linkedProducerVpcNetwork` LinkedProducerVpcNetwork
    - `peering` string — Immutable. The name of the VPC peering between the Service Consumer VPC and the Producer VPC (defined in the Tenant project) which is added to the NCC hub. This peering must be in ACTIVE state.
    - `producerNetwork` string — Output only. The URI of the Producer VPC.
    - `proposedIncludeExportRanges` string[] — Output only. The proposed include export IP ranges waiting for hub administrator's approval.
    - `proposedExcludeExportRanges` string[] — Output only. The proposed exclude export IP ranges waiting for hub administrator's approval.
    - `network` string — Immutable. The URI of the Service Consumer VPC that the Producer VPC is peered with.
    - `serviceConsumerVpcSpoke` string — Output only. The Service Consumer Network spoke.
    - `includeExportRanges` string[] — Optional. IP ranges allowed to be included from peering.
    - `excludeExportRanges` string[] — Optional. IP ranges encompassing the subnets to be excluded from peering.
  - `updateTime` string, google-datetime — Output only. The time the spoke was last updated.
  - `linkedVpnTunnels` LinkedVpnTunnels — A 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.
    - `uris` string[] — The URIs of linked VPN tunnel resources.
    - `siteToSiteDataTransfer` boolean — A value that controls whether site-to-site data transfer is enabled for these resources. Data transfer is available only in [supported locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
    - `includeExportRanges` string[] — Optional. Dynamic routes fully encompassed by include export ranges are included during export to hub.
    - `excludeExportRanges` string[] — Optional. Dynamic routes overlapped/encompassed by exclude export ranges are excluded during export to hub.
    - `excludeImportRanges` string[] — Optional. Hub routes overlapped/encompassed by exclude import ranges are excluded during import from hub.
    - `vpcNetwork` string — Output only. The VPC network where these VPN tunnels are located.
    - `includeImportRanges` string[] — Optional. Hub routes fully encompassed by include import ranges are included during import from hub.
  - `name` string — Immutable. The name of the spoke. Spoke names must be unique. They use the following form: `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
  - `linkedInterconnectAttachments` LinkedInterconnectAttachments — A 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.
    - `excludeImportRanges` string[] — Optional. Hub routes overlapped/encompassed by exclude import ranges are excluded during import from hub.
    - `vpcNetwork` string — Output only. The VPC network where these VLAN attachments are located.
    - `uris` string[] — The URIs of linked interconnect attachment resources
    - `siteToSiteDataTransfer` boolean — A value that controls whether site-to-site data transfer is enabled for these resources. Data transfer is available only in [supported locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
    - `includeExportRanges` string[] — Optional. Dynamic routes fully encompassed by include export ranges are included during export to hub.
    - `excludeExportRanges` string[] — Optional. Dynamic routes overlapped/encompassed by exclude export ranges are excluded during export to hub.
    - `includeImportRanges` string[] — Optional. Hub routes fully encompassed by include import ranges are included during import from hub.
  - `linkedRouterApplianceInstances` LinkedRouterApplianceInstances — A 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.
    - `excludeImportRanges` string[] — Optional. Hub routes overlapped/encompassed by exclude import ranges are excluded during import from hub.
    - `vpcNetwork` string — Output only. The VPC network where these router appliance instances are located.
    - `siteToSiteDataTransfer` boolean — A value that controls whether site-to-site data transfer is enabled for these resources. Data transfer is available only in [supported locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
    - `includeExportRanges` string[] — Optional. Dynamic routes fully encompassed by include export ranges are included during export to hub.
    - `excludeExportRanges` string[] — Optional. Dynamic routes overlapped/encompassed by exclude export ranges are excluded during export to hub.
    - `instances` RouterApplianceInstance[] — The list of router appliance instances.
      - `virtualMachine` string — The URI of the VM.
      - `ipAddress` string — The IP address on the VM to use for peering.
    - `includeImportRanges` string[] — Optional. Hub routes fully encompassed by include import ranges are included during import from hub.
  - `uniqueId` string — Output 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`.
  - `etag` string — Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

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