# Method: projects.locations.reservations.list

- [HTTP request](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#body.request_body)
- [Response body](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#body.ListReservationsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#body.aspect_1)
- [Reservation](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#Reservation)
  - [JSON representation](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#Reservation.SCHEMA_REPRESENTATION)
- [Standard](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#Standard)
  - [JSON representation](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#Standard.SCHEMA_REPRESENTATION)
- [CapacityUnits](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#CapacityUnits)
- [Usage](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#Usage)
  - [JSON representation](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#Usage.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#State)
- [Try it!](https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#try-it)

Retrieves the reservations for the given project in the given location.

### HTTP request

`GET https://tpu.googleapis.com/v2alpha1/{parent=projects/*/locations/*}/reservations`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent for reservations. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` The maximum number of items to return. Defaults to 0 if not specified, which means no limit. |
| `pageToken` | `string` The nextPageToken value returned from a previous List request, if any. |

### Request body

The request body must be empty.

### Response body

Response for `https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#google.cloud.tpu.v2alpha1.Tpu.ListReservations`.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "reservations": [ { object (`https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#Reservation`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `reservations[]` | ``object (`https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#Reservation`)`` The listed reservations. |
| `nextPageToken` | `string` The next page token or empty if none. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud.tpu`
- `
  https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `tpu.nodes.get`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## Reservation

A reservation describes the amount of a resource 'allotted' for a defined period of time.

| JSON representation |
|---|
| ``` { "name": string, "state": enum (`https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#State`), // Union field `kind` can be only one of the following: "standard": { object (`https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#Standard`) } // End of list of possible types for union field `kind`. } ``` |

| Fields ||
|---|---|
| `name` | `string` The reservation name with the format: projects/{projectID}/locations/{location}/reservations/{reservationID} |
| `state` | ``enum (`https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#State`)`` Output only. The state of the Reservation. |
| Union field `kind`. The kind of reservation. `kind` can be only one of the following: ||
| `standard` | ``object (`https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#Standard`)`` A standard reservation. |

## Standard

Details of a standard reservation.

| JSON representation |
|---|
| ``` { "size": integer, "capacityUnits": enum (`https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#CapacityUnits`), "resourceType": string, "interval": { object (`https://docs.cloud.google.com/tpu/docs/reference/rest/Shared.Types/Interval`) }, "usage": { object (`https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#Usage`) } } ``` |

| Fields ||
|---|---|
| `size` | `integer` The size of the reservation, in the units specified in the 'capacityUnits' field. |
| `capacityUnits` | ``enum (`https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#CapacityUnits`)`` Capacity units this reservation is measured in. |
| `resourceType` | `string` The resource type of the reservation. |
| `interval` | ``object (`https://docs.cloud.google.com/tpu/docs/reference/rest/Shared.Types/Interval`)`` The start and end time of the reservation. |
| `usage` | ``object (`https://docs.cloud.google.com/tpu/docs/reference/rest/v2alpha1/projects.locations.reservations/list#Usage`)`` The current usage of the reservation. |

## CapacityUnits

Units in which capacity for a reservation is measured.

| Enums ||
|---|---|
| `CAPACITY_UNITS_UNSPECIFIED` | The capacity units is not known/set. |
| `CORES` | The capacity unit is set to CORES. |
| `CHIPS` | The capacity unit is set to CHIPS. |

## Usage

Usage details of a reservation.

| JSON representation |
|---|
| ``` { "total": string } ``` |

| Fields ||
|---|---|
| `total` | `string (https://developers.google.com/discovery/v1/type-format format)` The real-time value of usage within the reservation, with the unit specified in field capacityUnits. |

## State

State of the Reservation.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | The Reservation state is unspecified. |
| `APPROVED` | The Reservation has been approved. |
| `PROVISIONING` | The Reservation is being provisioned. |
| `ACTIVE` | The Reservation is active. |
| `DEPROVISIONING` | The Reservation is being deprovisioned. |
| `EXPIRED` | The Reservation is past its end date. |
| `FAILED` | The Reservation encountered a failure during mutation. |