Exports historical usage data requested by user into either an existing Cloud Storage bucket or a BigQuery table.
HTTP request
POST https://capacityplanner.googleapis.com/v1beta/{parent=organizations/*/locations/*}/usageHistories:export
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
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} |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "machineFamily": string, "machineShape": { object ( |
Fields | |
---|---|
machineFamily |
Optional. The machine family for the |
machineShape |
Optional. The machine shape for the time series values to export. |
diskType |
Optional. The diskType for the |
gpuType |
Optional. The GPU type for the |
tpuType |
Optional. The TPU type for the |
resourceType |
Required. The resource for the |
usageAggregationMethod |
Optional. The method that should be used to convert sampled usage data to daily usage values. AGGREGATION_METHOD_UNSPECIFIED will return results matching all the aggregation methods. |
startDate |
Optional. The start date of usage. |
endDate |
Optional. The end date of usage. |
outputConfig |
Required. Output configuration indicating where the results will be output to. |
Response body
If successful, the response body contains an instance of Operation
.
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.usageHistories.list
For more information, see the IAM documentation.