Optional. The location level of the reservations usage timeseries.
machineFamily
string
Optional. The machine family to use to select the aggregate reserved values to return. Possible values include "n1", and "n2d" etc. Empty machineFamily will return results matching all machine families.
Optional. The machineShape as a filter to select matching reservations.
gpuType
string
Optional. The GPU type for the reserved values to return. Sample values are "nvidia-tesla-t4", and "nvidia-tesla-a100". See https://cloud.google.com/compute/docs/gpus for a list. Empty gpuType will return results matching all GPUs.
cloudResourceType
string
Optional. The resource for the reserved values to return. Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-gpu" and "gce-vm".
Optional. Types of ownerships to filter reservations based on. In case of OWNED, it filters reservations which are owned by selected parent project/folder/organization. If unspecified, all types are included.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n\nReturns a list of the reservations that are in the parent parameter and match your specified filters.\n\nHTTP request\n\n`GET https://capacityplanner.googleapis.com/v1beta/{parent=projects/*/locations/*}/reservations:query`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The compute engine resource and location for the time series values to return. The format is: projects/{project}/locations/{location} or organizations/{organization}/locations/{location} or folders/{folder}/locations/{location} |\n\nQuery parameters\n\n| Parameters ||\n|---------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `locationLevel` | `enum (`[LocationType](/capacity-planner/docs/reference/rest/v1beta/LocationType)`)` Optional. The location level of the reservations usage timeseries. |\n| `machineFamily` | `string` Optional. The machine family to use to select the aggregate reserved values to return. Possible values include \"n1\", and \"n2d\" etc. Empty machineFamily will return results matching all machine families. |\n| `machineShape` | `object (`[MachineShape](/capacity-planner/docs/reference/rest/v1beta/MachineShape)`)` Optional. The machineShape as a filter to select matching reservations. |\n| `gpuType` | `string` Optional. The GPU type for the reserved values to return. Sample values are \"nvidia-tesla-t4\", and \"nvidia-tesla-a100\". See \u003chttps://cloud.google.com/compute/docs/gpus\u003e for a list. Empty gpuType will return results matching all GPUs. |\n| `cloudResourceType` | `string` Optional. The resource for the reserved values to return. Possible values include \"gce-vcpus\", \"gce-ram\", \"gce-local-ssd\", \"gce-gpu\" and \"gce-vm\". |\n| `reservationType` | `enum (`[ReservationType](/capacity-planner/docs/reference/rest/v1beta/ReservationType)`)` Optional. The Reservation type for example, future reservation request and allocation. If unspecified, all types are included. |\n| `shareType` | `enum (``ShareType``)` Optional. Types of share settings to filter reservations in response. If unspecified, all types are included. |\n| `ownershipType` | `enum (`[OwnershipType](/capacity-planner/docs/reference/rest/v1beta/OwnershipType)`)` Optional. Types of ownerships to filter reservations based on. In case of OWNED, it filters reservations which are owned by selected parent project/folder/organization. If unspecified, all types are included. |\n| `reservationDataLevel` | `enum (`[ReservationDataLevel](/capacity-planner/docs/reference/rest/v1beta/ReservationDataLevel)`)` Optional. Reservations output data format. |\n| `includeUnapprovedReservations` | `boolean` Optional. Whether to include pending for approval reservations in the response. This field is only applicable for future reservations. |\n| `aggregationMethod` | `enum (`[AggregationMethod](/capacity-planner/docs/reference/rest/v1beta/AggregationMethod)`)` Optional. Aggregation Method of the historical reservation usage |\n| `startDate` | `object (`[Date](/capacity-planner/docs/reference/rest/v1beta/Date)`)` Optional. The start date of reservations usage. |\n| `endDate` | `object (`[Date](/capacity-planner/docs/reference/rest/v1beta/Date)`)` Optional. The end date of reservations usage. |\n\nRequest body\n\nThe request body must be empty.\n\nResponse body\n\nIf successful, the response body contains an instance of [QueryReservationsResponse](/capacity-planner/docs/reference/rest/v1beta/QueryReservationsResponse).\n\nAuthorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `https://www.googleapis.com/auth/devstorage.full_control`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\nIAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:\n\n- `capacityplanner.usageHistories.list`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]