Method: projects.capacityPlanInsights.query

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

string

Required. The parent resource container. Format: projects/{project}

Request body

The request body contains data with the following structure:

JSON representation
{
  "capacityPlanFilters": {
    object (CapacityPlanFilters)
  }
}
Fields
capacityPlanFilters

object (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 (CapacityPlanView)
  }
}
Fields
aggregatedCapacityPlanView

object (CapacityPlanView)

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 (CapacityPlanKey)
    }
  ],
  "capacityTypes": [
    enum (CapacityType)
  ],
  "capacityPlanId": string
}
Fields
keys[]

object (CapacityPlanKey)

Required. The capacity plan keys to include in the response.

capacityTypes[]

enum (CapacityType)

Required. The capacity types to include in the response.

capacityPlanId

string

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 (ResourceContainer)
  },
  "resourceIdKey": {
    object (ResourceIdKey)
  },
  "locationId": {
    object (LocationIdentifier)
  }
}
Fields
resourceContainer

object (ResourceContainer)

Required. The resource container associated with the capacity plan.

resourceIdKey

object (ResourceIdKey)

Required. The resource id key associated with the capacity plan.

locationId

object (LocationIdentifier)

Required. Identifier of location.

ResourceIdKey

The id for a Google Cloud Platform resource key.

JSON representation
{
  "resourceId": {
    object (ResourceIdentifier)
  },

  // Union field demand_fields can be only one of the following:
  "resourceCode": string
  // End of list of possible types for union field demand_fields.
}
Fields
resourceId

object (ResourceIdentifier)

Required. Id of the resource.

Union field demand_fields. Demand fields for the resource. demand_fields can be only one of the following:
resourceCode

string

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 (CapacityPlanKey)
  },
  "timeSeriesViews": [
    {
      object (TimeSeriesView)
    }
  ]
}
Fields
key

object (CapacityPlanKey)

Required. The capacity plan key associated with the capacity plan view.

timeSeriesViews[]

object (TimeSeriesView)

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 (CapacityType),
  "capacityValue": {
    object (DemandValue)
  }
}
Fields
type

enum (CapacityType)

Required. The capacity type associated with the time series view.

capacityValue

object (DemandValue)

Required. The capacity value associated with the time series view.