- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- CapacityPlanFilters
- CapacityPlanKey
- ResourceIdKey
- CapacityType
- CapacityPlanView
- TimeSeriesView
Query capacity plan insights that are in the parent parameter and match your specified filters.
HTTP request
POST https://capacityplanner.googleapis.com/v1beta/{parent=projects/*}/capacityPlanInsights:query
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Required. The parent resource container. Format: projects/{project} |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"capacityPlanFilters": {
object ( |
Fields | |
---|---|
capacityPlanFilters |
Required. The filters to apply to the capacity plan. |
Response body
Response for capacity plan insights.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"aggregatedCapacityPlanView": {
object ( |
Fields | |
---|---|
aggregatedCapacityPlanView |
Optional. The aggregated capacity plan view. This is the aggregated view of all the capacity plans that match the filters. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/devstorage.full_control
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the parent
resource:
capacityplanner.capacityPlans.list
For more information, see the IAM documentation.
CapacityPlanFilters
CapacityPlanFilters is a set of filters to apply to the capacity plan.
JSON representation |
---|
{ "keys": [ { object ( |
Fields | |
---|---|
keys[] |
Required. The capacity plan keys to include in the response. |
capacityTypes[] |
Required. The capacity types to include in the response. |
capacityPlanId |
Optional. Optional capacity plan id. Should be populated for request page to lock based on the same capacity plan. |
CapacityPlanKey
CapacityPlanKey is a the unique identifier for each Capacity Plan.
JSON representation |
---|
{ "resourceContainer": { object ( |
Fields | |
---|---|
resourceContainer |
Required. The resource container associated with the capacity plan. |
resourceIdKey |
Required. The resource id key associated with the capacity plan. |
locationId |
Required. Identifier of location. |
ResourceIdKey
The id for a Google Cloud Platform resource key.
JSON representation |
---|
{ "resourceId": { object ( |
Fields | |
---|---|
resourceId |
Required. Id of the resource. |
Union field demand_fields . Demand fields for the resource. demand_fields can be only one of the following: |
|
resourceCode |
Required. resourceCode for the resource. eg: gce-ram, gce-vcpus, gce-gpu, gce-tpu, gce-vm, gce-persistent-disk, gce-local-ssd. |
CapacityType
CapacityType is the type of the capacity plan.
Enums | |
---|---|
CAPACITY_TYPE_UNKNOWN |
Default value. |
CAPACITY_TYPE_INORGANIC_DRAFT |
Latest inorganic data stored in horizon DB that is in draft state. |
CAPACITY_TYPE_INORGANIC_PENDING |
Latest inorganic data stored in horizon DB that are pending i.e. submitted or assessment. |
CAPACITY_TYPE_INORGANIC_APPROVED |
Latest inorganic data stored in horizon DB that has been approved. |
CapacityPlanView
CapacityPlanView contains the capacity plan key and the time series views.
JSON representation |
---|
{ "key": { object ( |
Fields | |
---|---|
key |
Required. The capacity plan key associated with the capacity plan view. |
timeSeriesViews[] |
Required. The time series views associated with the capacity plan view. |
TimeSeriesView
TimeSeriesView contains capacityValue which has the timeseries for a given type. Each type as a single timeseries associated with it.
JSON representation |
---|
{ "type": enum ( |
Fields | |
---|---|
type |
Required. The capacity type associated with the time series view. |
capacityValue |
Required. The capacity value associated with the time series view. |