# REST Resource: projects.locations.global.hubs.groups

- [Resource: Group](https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.groups#Group)
  - [JSON representation](https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.groups#Group.SCHEMA_REPRESENTATION)
- [AutoAccept](https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.groups#AutoAccept)
  - [JSON representation](https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.groups#AutoAccept.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.groups#METHODS_SUMMARY)

## Resource: Group

A group represents a subset of spokes attached to a hub.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "description": string, "uid": string, "state": enum (`https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/Shared.Types/State`), "autoAccept": { object (`https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.groups#AutoAccept`) }, "routeTable": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Immutable. The name of the group. Group names must be unique. They use the following form: `projects/{projectNumber}/locations/global/hubs/{hub}/groups/{groupId}` |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time the group was created. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time the group was last updated. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `labels` | `map (key: string, value: string)` 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). An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `description` | `string` Optional. The description of the group. |
| `uid` | `string` Output only. The Google-generated UUID for the group. This value is unique across all group resources. If a group is deleted and another with the same name is created, the new route table is assigned a different uniqueId. |
| `state` | ``enum (`https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/Shared.Types/State`)`` Output only. The current lifecycle state of this group. |
| `autoAccept` | ``object (`https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.groups#AutoAccept`)`` Optional. The auto-accept setting for this group. |
| `routeTable` | `string` Output only. The name of the route table that corresponds to this group. They use the following form: `projects/{projectNumber}/locations/global/hubs/{hubId}/routeTables/{route_table_id}` |

## AutoAccept

The auto-accept setting for a group controls whether proposed spokes are automatically attached to the hub. If auto-accept is enabled, the spoke immediately is attached to the hub and becomes part of the group. In this case, the new spoke is in the ACTIVE state. If auto-accept is disabled, the spoke goes to the INACTIVE state, and it must be reviewed and accepted by a hub administrator.

| JSON representation |
|---|
| ``` { "autoAcceptProjects": [ string ] } ``` |

| Fields ||
|---|---|
| `autoAcceptProjects[]` | `string` Optional. A list of project ids or project numbers for which you want to enable auto-accept. The auto-accept setting is applied to spokes being created or updated in these projects. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.groups/get` | Gets details about a Network Connectivity Center group. |
| ### `https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.groups/getIamPolicy` | Gets the access control policy for a resource. |
| ### `https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.groups/list` | Lists groups in a given hub. |
| ### `https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.groups/patch` | Updates the parameters of a Network Connectivity Center group. |
| ### `https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.groups/setIamPolicy` | Sets the access control policy on the specified resource. |
| ### `https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.groups/testIamPermissions` | Returns permissions that a caller has on the specified resource. |