# REST Resource: projects.locations.privateClouds.subnets

- [Resource: Subnet](https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.subnets#Subnet)
  - [JSON representation](https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.subnets#Subnet.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.subnets#State)
- [Methods](https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.subnets#METHODS_SUMMARY)

## Resource: Subnet

Subnet in a private cloud. Either `management` subnets (such as vMotion) that are read-only, or `userDefined`, which can also be updated.

| JSON representation |
|---|
| ``` { "name": string, "ipCidrRange": string, "gatewayIp": string, "type": string, "state": enum (`https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.subnets#State`), "vlanId": integer } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. Identifier. The resource name of this subnet. Resource names are schemeless URIs that follow the conventions in <https://cloud.google.com/apis/design/resource_names>. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` |
| `ipCidrRange` | `string` The IP address range of the subnet in CIDR format '10.0.0.0/24'. |
| `gatewayIp` | `string` The IP address of the gateway of this subnet. Must fall within the IP prefix defined above. |
| `type` | `string` Output only. The type of the subnet. For example "management" or "userDefined". |
| `state` | ``enum (`https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.subnets#State`)`` Output only. The state of the resource. |
| `vlanId` | `integer` Output only. VLAN ID of the VLAN on which the subnet is configured |

## State

Defines possible states of subnets.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | The default value. This value should never be used. |
| `ACTIVE` | The subnet is ready. |
| `CREATING` | The subnet is being created. |
| `UPDATING` | The subnet is being updated. |
| `DELETING` | The subnet is being deleted. |
| `RECONCILING` | Changes requested in the last operation are being propagated. |
| `FAILED` | Last operation on the subnet did not succeed. Subnet's payload is reverted back to its most recent working state. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.subnets/get` | Gets details of a single subnet. |
| ### `https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.subnets/list` | Lists subnets in a given private cloud. |
| ### `https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.subnets/patch` | Updates the parameters of a single subnet. |