Service Client: Google::Cloud::Capacityplanner::V1beta::UsageService::UsageServiceClient
Client stub representing the remote UsageService gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to capacityplanner.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Capacityplanner::V1beta::UsageService - Compiled Protocol Buffers messages for google/cloud/capacityplanner/v1beta/usage_service.proto
SYNOPSIS
use Google::Cloud::Capacityplanner::V1beta::UsageService;
my $msg = Google::Cloud::Capacityplanner::V1beta::UsageService::QueryUsageHistoriesRequest->new({
parent => $parent,
location_level => $location_level,
is_spot => $is_spot,
machine_family => $machine_family,
});
# Read or update a field
my $val = $msg->parent();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Capacityplanner::V1beta::UsageService::QueryUsageHistoriesRequest->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/capacityplanner/v1beta/usage_service.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Capacityplanner::V1beta::UsageService::QueryUsageHistoriesRequest
The `QueryUsageHistories` request. Next : 16
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. 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}$msg->location_level()/$msg->location_level($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::TimeSeries::LocationType)Optional. The location level of the reservations usage timeseries.
$msg->is_spot()/$msg->is_spot($value)Type:
BoolOptional. The is_spot flag is used to fetch the usage data for preemptible Resources.
$msg->machine_family()/$msg->machine_family($value)Type:
StringThe machine family for the `UsageHistory` values to return. Possible values include "n1", and "n2d". See https://cloud.google.com/compute/docs/machine-types for more examples. Empty machine_family will return results matching all machine families.
$msg->machine_shape()/$msg->machine_shape($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::MachineShape)Optional. The machine shape for the `UsageHistory` values to return.
$msg->disk_type()/$msg->disk_type($value)Type:
StringOptional. The disk_type for the `UsageHistory` values to return request with persistent-disk cloud_resource_type. Empty disk_type will return results matching all disk types.
$msg->confidential_mode()/$msg->confidential_mode($value)Type:
BoolOptional. Whether the persistent disk is in confidential mode.
$msg->gpu_type()/$msg->gpu_type($value)Type:
StringOptional. The GPU type for the `UsageHistory` 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 gpu_type will return results matching all GPUs.
$msg->tpu_type()/$msg->tpu_type($value)Type:
StringOptional. The TPU type for the `UsageHistory` values to return. Empty tpu_type will return results matching all TPUs.
$msg->cloud_resource_type()/$msg->cloud_resource_type($value)Type:
StringRequired. The resource for the `UsageHistory` values to return. Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", "gce-gpu" and "gce-tpu". Empty cloud_resource_type will return results matching all resources.
$msg->usage_aggregation_method()/$msg->usage_aggregation_method($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::UsageHistory::AggregationMethod)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.
$msg->start_date()/$msg->start_date($value)Type:
Message(Google::Type::Date::Date)Optional. The start date of reservations usage.
$msg->end_date()/$msg->end_date($value)Type:
Message(Google::Type::Date::Date)Optional. The end date of reservations usage.
Google::Cloud::Capacityplanner::V1beta::UsageService::QueryUsageHistoriesResponse
The `QueryUsageHistories` response.
Inherits from Protobuf::Message.
Accessors
$msg->usage_histories()/$msg->usage_histories($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::UsageHistory)The usage histories that match the request.
Google::Cloud::Capacityplanner::V1beta::UsageService::QueryForecastsRequest
The `QueryForecasts` request. Next : 14
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. 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}
$msg->machine_family()/$msg->machine_family($value)Type:
StringThe machine family to use to select the `Forecast` values to return. Possible values include "n1", and "n2d". Empty machine_family will return results matching all machine families.
$msg->machine_shape()/$msg->machine_shape($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::MachineShape)Optional. The machine shape for the time series values to return.
$msg->disk_type()/$msg->disk_type($value)Type:
StringOptional. The disk_type for the `Forecast` values to return with request persistent-disk cloud_resource_type. Empty disk_type will return results matching all disk types.
$msg->confidential_mode()/$msg->confidential_mode($value)Type:
BoolOptional. Whether the persistent disk is in confidential mode.
$msg->gpu_type()/$msg->gpu_type($value)Type:
StringOptional. The GPU type for the `Forecast` 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 gpu_type will return results matching all GPUs.
$msg->tpu_type()/$msg->tpu_type($value)Type:
StringOptional. The TPU type for the `Forecast` values to return. Empty tpu_type will return results matching all TPUs.
$msg->cloud_resource_type()/$msg->cloud_resource_type($value)Type:
StringRequired. The resource for the `Forecast` values to return. Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", "gce-gpu" and "gce-tpu". Empty cloud_resource_type will return results matching all resources.
$msg->forecast_type()/$msg->forecast_type($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::Forecast::ForecastType)The type of forecast to use to select the `Forecast` values to return. FORECAST_TYPE_UNSPECIFIED will return results matching all the forecast types.
$msg->prediction_interval()/$msg->prediction_interval($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::Forecast::PredictionInterval)The prediction interval to use to select the `Forecast` values to return. PREDICTION_INTERVAL_UNSPECIFIED will return results matching all prediction intervals.
$msg->aggregation_method()/$msg->aggregation_method($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::UsageHistory::AggregationMethod)Aggregation Method of the historical usage for which the forecast is generated
Google::Cloud::Capacityplanner::V1beta::UsageService::QueryForecastsResponse
The `QueryForecasts` response.
Inherits from Protobuf::Message.
Accessors
$msg->forecasts()/$msg->forecasts($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::Forecast)The forecasts that match the request.
Google::Cloud::Capacityplanner::V1beta::UsageService::QueryReservationsRequest
The `QueryReservations` request.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. 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}
$msg->location_level()/$msg->location_level($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::TimeSeries::LocationType)Optional. The location level of the reservations usage timeseries.
$msg->machine_family()/$msg->machine_family($value)Type:
StringOptional. The machine family to use to select the aggregate reserved values to return. Possible values include "n1", and "n2d" etc. Empty machine_family will return results matching all machine families.
$msg->machine_shape()/$msg->machine_shape($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::MachineShape)Optional. The machine_shape as a filter to select matching reservations.
$msg->gpu_type()/$msg->gpu_type($value)Type:
StringOptional. 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 gpu_type will return results matching all GPUs.
$msg->cloud_resource_type()/$msg->cloud_resource_type($value)Type:
StringRequired. The resource for the reserved values to return. Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-gpu" and "gce-vm".
$msg->reservation_type()/$msg->reservation_type($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::QueryReservationsRequest::ReservationType)Required. The Reservation type for example, future reservation request and allocation. If unspecified, all types are included.
$msg->share_type()/$msg->share_type($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::QueryReservationsRequest::ShareType)Optional. Types of share settings to filter reservations in response. If unspecified, all types are included.
$msg->ownership_type()/$msg->ownership_type($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::QueryReservationsRequest::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.
$msg->reservation_data_level()/$msg->reservation_data_level($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::QueryReservationsRequest::ReservationDataLevel)Required. Reservations output data format.
$msg->include_unapproved_reservations()/$msg->include_unapproved_reservations($value)Type:
BoolOptional. Whether to include pending for approval reservations in the response. This field is only applicable for future reservations.
$msg->aggregation_method()/$msg->aggregation_method($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::UsageHistory::AggregationMethod)Optional. Aggregation Method of the historical reservation usage
$msg->start_date()/$msg->start_date($value)Type:
Message(Google::Type::Date::Date)Optional. The start date of reservations usage.
$msg->end_date()/$msg->end_date($value)Type:
Message(Google::Type::Date::Date)Optional. The end date of reservations usage.
Enum: QueryReservationsRequest::ReservationType
RESERVATION_TYPE_UNSPECIFIED=>0RESERVATION_TYPE_ALLOCATION=>1RESERVATION_TYPE_FUTURE_RESERVATION=>2RESERVATION_TYPE_ALL=>3
Enum: QueryReservationsRequest::ShareType
SHARE_TYPE_UNSPECIFIED=>0SHARE_TYPE_LOCAL=>1SHARE_TYPE_SPECIFIC_PROJECTS=>2
Enum: QueryReservationsRequest::OwnershipType
OWNERSHIP_TYPE_UNSPECIFIED=>0OWNERSHIP_TYPE_OWNED=>1OWNERSHIP_TYPE_SHARED_BY_OTHERS=>2
Enum: QueryReservationsRequest::ReservationDataLevel
RESERVATION_DATA_LEVEL_UNSPECIFIED=>0RESERVATION_DATA_LEVEL_AGGREGATED=>1RESERVATION_DATA_LEVEL_PER_RESERVATION=>2
Google::Cloud::Capacityplanner::V1beta::UsageService::QueryReservationsResponse
The `QueryReservations` response.
Inherits from Protobuf::Message.
Accessors
$msg->reservations()/$msg->reservations($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::ReservationData)The reservations data that match the request.
Google::Cloud::Capacityplanner::V1beta::UsageService::Point
A single data point in a time series.
Inherits from Protobuf::Message.
Accessors
$msg->event_time()/$msg->event_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)The time which the data point applies.
$msg->value()/$msg->value($value)Type:
DoubleThe value of the data point.
Google::Cloud::Capacityplanner::V1beta::UsageService::Forecast
A collection of data points that describes the predicted time-varying values of a resource.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringThe resource name of the connection in the form of: `projects/{project_id}/locations/{location_id}/forecasts/{forecast_id}` or `organizations/{organization_id}/locations/{location_id}/forecasts/{forecast_id}` or `folders/{folder_id}/locations/{location_id}/forecasts/{forecast_id}`
$msg->time_series()/$msg->time_series($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::TimeSeries)The collection of data points that represent the predicted values. Note that some of these values may be in the past (if, for example, the forecast was created in the past and predicted values for the present day).
$msg->forecast_type()/$msg->forecast_type($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::Forecast::ForecastType)The type of forecast.
$msg->bounds()/$msg->bounds($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::Forecast::Bounds)The bounds represented by this forecast time series.
$msg->prediction_interval()/$msg->prediction_interval($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::Forecast::PredictionInterval)The prediction interval represented by the time series.
$msg->aggregation_method()/$msg->aggregation_method($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::UsageHistory::AggregationMethod)Aggregation Method of the historical usage for which the forecast is generated
Enum: Forecast::ForecastType
FORECAST_TYPE_UNSPECIFIED=>0STATISTICAL=>1STATISTICAL_WITH_BFCM=>2YEARLY_SEASONALITY=>3
Enum: Forecast::Bounds
BOUNDS_UNSPECIFIED=>0LOWER_BOUND=>1MEDIAN=>2UPPER_BOUND=>3
Enum: Forecast::PredictionInterval
PREDICTION_INTERVAL_UNSPECIFIED=>0PREDICTION_INTERVAL_90=>1PREDICTION_INTERVAL_50=>2
Google::Cloud::Capacityplanner::V1beta::UsageService::UsageHistory
A collection of data points that describes the historical time-varying values of a resource.
Inherits from Protobuf::Message.
Accessors
$msg->time_series()/$msg->time_series($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::TimeSeries)The collection of data points that represent the historical values.
$msg->aggregation_method()/$msg->aggregation_method($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::UsageHistory::AggregationMethod)Method used to convert sampled usage data to time series values.
Enum: UsageHistory::AggregationMethod
AGGREGATION_METHOD_UNSPECIFIED=>0MEDIAN=>1PEAK=>2P50=>3P75=>4P99=>5
Google::Cloud::Capacityplanner::V1beta::UsageService::TimeSeries
A collection of data points that describes the time-varying values of a resource. A time series is identified by its ID. Next : 13
Inherits from Protobuf::Message.
Accessors
$msg->location_type()/$msg->location_type($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::TimeSeries::LocationType)Required. The type of location that the time series is summarizing.
$msg->location()/$msg->location($value)Type:
StringOptional. The location of the usage data in time series.
$msg->is_spot()/$msg->is_spot($value)Type:
BoolOptional. The location of the usage data in time series.
$msg->machine_family()/$msg->machine_family($value)Type:
StringThe machine family for the time series values to return. Possible values include "n1" and "n2d".
$msg->disk_type()/$msg->disk_type($value)Type:
StringThe disk type for the time series values to return.
$msg->confidential_mode()/$msg->confidential_mode($value)Type:
BoolOptional. The confidential mode for disk.
$msg->gpu_type()/$msg->gpu_type($value)Type:
StringThe GPU type of the time series.
$msg->tpu_type()/$msg->tpu_type($value)Type:
StringThe TPU type of the time series.
$msg->machine_shape()/$msg->machine_shape($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::MachineShape)The machine shape of the time series.
$msg->cloud_resource_type()/$msg->cloud_resource_type($value)Type:
StringThe resource for the time series values to return. Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", "gce-gpu", "gce-tpu" and "gce-vm".
$msg->points()/$msg->points($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::Point)The data points of this time series. When listing time series, points are returned in chronological order.
$msg->unit()/$msg->unit($value)Type:
StringThe units in which the values are reported.
Enum: TimeSeries::LocationType
LOCATION_TYPE_UNSPECIFIED=>0REGIONAL=>1ZONAL=>2
Google::Cloud::Capacityplanner::V1beta::UsageService::ReservationData
Response entity for reservations data.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringIdentifier. The resource name of the connection in the form of: `projects/{project_id}/locations/{location_id}/reservations/{reservation_id}` or `organizations/{organization_id}/locations/{location_id}/reservations/{reservation_id}` or `folders/{folder_id}/locations/{location_id}/reservations/{reservation_id}`
$msg->time_series()/$msg->time_series($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::TimeSeries)The collection of data points that represent the aggregated reserved value for reservations filtered by the criteria.
$msg->used_reservation_values()/$msg->used_reservation_values($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::TimeSeries)The collection of data points that represent the aggregated used value for reservations filtered by the criteria.
$msg->future_reservations()/$msg->future_reservations($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::FutureReservation::FutureReservation)Future reservations filtered by the criteria.
$msg->allocations()/$msg->allocations($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::Allocation::Allocation)Allocations filtered by the criteria.
Google::Cloud::Capacityplanner::V1beta::UsageService::MachineShape
Machine shape details Next : 13
Inherits from Protobuf::Message.
Accessors
$msg->machine_family()/$msg->machine_family($value)Type:
StringOptional. The VM family.
$msg->machine_type()/$msg->machine_type($value)Type:
StringOptional. The characteristics of the sampled VM expressed as a string.
$msg->machine_shape()/$msg->machine_shape($value)Type:
StringOptional. The customer visible string representing the type of VM.
$msg->cpu_cores()/$msg->cpu_cores($value)Type:
DoubleOptional. Number of CPU cores per VM.
$msg->gpu_type()/$msg->gpu_type($value)Type:
StringOptional. The type of GPU with the VM.
$msg->gpu_compute_type()/$msg->gpu_compute_type($value)Type:
StringOptional. The GPU name recognized by Compute Engine APIs.
$msg->gpu_cores()/$msg->gpu_cores($value)Type:
Int64Optional. The number of GPU cores per VM.
$msg->local_ssd_partitions()/$msg->local_ssd_partitions($value)Type:
Int64Optional. The number of local SSD partitions per VM.
$msg->local_ssd_gb()/$msg->local_ssd_gb($value)Type:
DoubleOptional. Total amount of local SSD storage.
$msg->memory_gb()/$msg->memory_gb($value)Type:
DoubleOptional. Total amount of memory with the VM.
$msg->local_ssd_interface()/$msg->local_ssd_interface($value)Type:
StringOptional. The local SSD interface used such as nvme or scsi
$msg->min_cpu_platform()/$msg->min_cpu_platform($value)Type:
StringOptional. The Min-cpu platform used such as icelake
Google::Cloud::Capacityplanner::V1beta::UsageService::ExportUsageHistoriesRequest
The `ExportUsageHistories` request Next : 12
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. 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}
$msg->is_spot()/$msg->is_spot($value)Type:
BoolOptional. Set true to export usage for spot resources.
$msg->machine_family()/$msg->machine_family($value)Type:
StringOptional. The machine family for the `UsageHistory` values to return. Possible values include "n1", and "n2d". See https://cloud.google.com/compute/docs/machine-types for more examples.
$msg->machine_shape()/$msg->machine_shape($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::MachineShape)Optional. The machine shape for the time series values to export.
$msg->disk_type()/$msg->disk_type($value)Type:
StringOptional. The disk_type for the `UsageHistory` values to return request with persistent-disk resource_type. Possible values include "pd-ssd", "pd-standard", "pd-balanced", and "pd-extreme".
$msg->gpu_type()/$msg->gpu_type($value)Type:
StringOptional. The GPU type for the `UsageHistory` 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 gpu_type will return results matching all GPUs.
$msg->tpu_type()/$msg->tpu_type($value)Type:
StringOptional. The TPU type for the `UsageHistory` values to return. Empty tpu_type will return results matching all TPUs.
$msg->resource_type()/$msg->resource_type($value)Type:
StringRequired. The resource for the `UsageHistory` values to return. Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", "gce-gpu" and "gce-tpu".
$msg->usage_aggregation_method()/$msg->usage_aggregation_method($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::UsageHistory::AggregationMethod)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.
$msg->start_date()/$msg->start_date($value)Type:
Message(Google::Type::Date::Date)Optional. The start date of usage.
$msg->end_date()/$msg->end_date($value)Type:
Message(Google::Type::Date::Date)Optional. The end date of usage.
$msg->output_config()/$msg->output_config($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::OutputConfig)Required. Output configuration indicating where the results will be output to.
Google::Cloud::Capacityplanner::V1beta::UsageService::ExportForecastsRequest
The `ExportForecasts` request Next : 13
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. 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}
$msg->machine_family()/$msg->machine_family($value)Type:
StringOptional. The machine family to use to select the `Forecast` values to return. Possible values include "n1", and "n2d".
$msg->machine_shape()/$msg->machine_shape($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::MachineShape)Optional. The machine shape for the time series values to export.
$msg->disk_type()/$msg->disk_type($value)Type:
StringOptional. The disk_type for the `Forecast` values to return with request persistent-disk resource_type.
$msg->gpu_type()/$msg->gpu_type($value)Type:
StringOptional. The GPU type for the `Forecast` 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 gpu_type will return results matching all GPUs.
$msg->tpu_type()/$msg->tpu_type($value)Type:
StringOptional. The TPU type for the `Forecast` values to return. Empty tpu_type will return results matching all TPUs.
$msg->resource_type()/$msg->resource_type($value)Type:
StringRequired. The resource for the `Forecast` values to return. Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", "gce-gpu" and "gce-tpu".
$msg->prediction_interval()/$msg->prediction_interval($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::Forecast::PredictionInterval)Optional. The prediction interval to use to select the `Forecast` values to return. PREDICTION_INTERVAL_UNSPECIFIED will return results matching all prediction intervals.
$msg->aggregation_method()/$msg->aggregation_method($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::UsageHistory::AggregationMethod)Optional. Aggregation Method of the historical usage for which the forecast is generated.
$msg->start_date()/$msg->start_date($value)Type:
Message(Google::Type::Date::Date)Optional. The start date of forecasts.
$msg->end_date()/$msg->end_date($value)Type:
Message(Google::Type::Date::Date)Optional. The end date of forecasts.
$msg->output_config()/$msg->output_config($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::OutputConfig)Required. Output configuration indicating where the results will be output to.
Google::Cloud::Capacityplanner::V1beta::UsageService::ExportReservationsUsageRequest
The `ExportReservationsUsage` request
Inherits from Protobuf::Message.
Accessors
$msg->machine_family()/$msg->machine_family($value)Type:
StringOptional. The machine family to query reservations and usage by. For example: n1, n2d.
$msg->machine_shape()/$msg->machine_shape($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::MachineShape)Optional. The machine_shape as a filter to select matching reservations and its usage.
$msg->gpu_type()/$msg->gpu_type($value)Type:
StringOptional. The GPU type to query reservations and usage by. For example: NVIDIA T4.
$msg->parent()/$msg->parent($value)Type:
StringRequired. The compute engine resource and location of the reservationsusage. The format is: projects/{project}/locations/{location} or organizations/{organization}/locations/{location} or folders/{folder}/locations/{location}
$msg->location_level()/$msg->location_level($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::TimeSeries::LocationType)Optional. The location level of the reservations usage timeseries.
$msg->cloud_resource_type()/$msg->cloud_resource_type($value)Type:
StringRequired. The resource for the `ReservationsUsage` values to return. Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", and "gce-gpu".
$msg->usage_aggregation_method()/$msg->usage_aggregation_method($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::UsageHistory::AggregationMethod)Required. The method that should be used to convert sampled reservations data to daily usage values.
$msg->share_type()/$msg->share_type($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::ExportReservationsUsageRequest::ShareType)Optional. Type of share settings to filter reservations in response. If unspecified, all types are included.
$msg->start_date()/$msg->start_date($value)Type:
Message(Google::Type::Date::Date)Optional. The start date of reservations usage.
$msg->end_date()/$msg->end_date($value)Type:
Message(Google::Type::Date::Date)Optional. The end date of reservations usage.
$msg->output_config()/$msg->output_config($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::OutputConfig)Required. Output configuration indicating where the results will be output to.
Enum: ExportReservationsUsageRequest::ShareType
SHARE_TYPE_UNSPECIFIED=>0SHARE_TYPE_LOCAL=>1SHARE_TYPE_SPECIFIC_PROJECTS=>2
Google::Cloud::Capacityplanner::V1beta::UsageService::OutputConfig
Output configuration for export destination.
Inherits from Protobuf::Message.
Accessors
$msg->gcs_destination()/$msg->gcs_destination($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::GcsDestination)Destination on Cloud Storage.
$msg->bigquery_destination()/$msg->bigquery_destination($value)Type:
Message(Google::Cloud::Capacityplanner::V1beta::UsageService::BigQueryDestination)Destination on BigQuery.
Google::Cloud::Capacityplanner::V1beta::UsageService::GcsDestination
A Cloud Storage location.
Inherits from Protobuf::Message.
Accessors
$msg->uri()/$msg->uri($value)Type:
StringOptional. The path to the file in Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails.
$msg->bucket()/$msg->bucket($value)Type:
StringRequired. The bucket name to which the export will be stored.
$msg->object()/$msg->object($value)Type:
StringRequired. The object name to which the export will be stored.
$msg->force()/$msg->force($value)Type:
BoolOptional. Flag to indicate overwrite in case file already exists.
Google::Cloud::Capacityplanner::V1beta::UsageService::BigQueryDestination
A BigQuery destination for exporting assets to.
Inherits from Protobuf::Message.
Accessors
$msg->dataset()/$msg->dataset($value)Type:
StringRequired. The BigQuery dataset in format "projects/{projectId}/datasets/{datasetId}", to which the snapshot result should be exported. If this dataset does not exist, the export call returns an INVALID_ARGUMENT error.
$msg->table()/$msg->table($value)Type:
StringRequired. The BigQuery table to which the snapshot result should be written.
$msg->partition_key()/$msg->partition_key($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::BigQueryDestination::PartitionKey)Optional. The partition key for BigQuery partitioned table.
$msg->write_disposition()/$msg->write_disposition($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::BigQueryDestination::WriteDisposition)Optional. Specifies the action that occurs if the destination table or partition already exists.
$msg->create_disposition()/$msg->create_disposition($value)Type:
Enum(Google::Cloud::Capacityplanner::V1beta::BigQueryDestination::CreateDisposition)Optional. Specifies the action that occurs if the destination table does not exist
$msg->gcs_location()/$msg->gcs_location($value)Type:
StringOptional. Specifies the Cloud Storage location. Users can choose to provide a location for Cloud Storage bucket to store the exported data. (as it is possible that some locations are restricted via org policy for that project) Temporary Cloud Storage bucket creation is an interim step for BigQuery upload. If no value is provided, the default location used will be 'US'.
Enum: BigQueryDestination::PartitionKey
PARTITION_KEY_UNSPECIFIED=>0REQUEST_TIME=>1
Enum: BigQueryDestination::WriteDisposition
WRITE_DISPOSITION_UNSPECIFIED=>0WRITE_APPEND=>1WRITE_TRUNCATE=>2WRITE_EMPTY=>3
Enum: BigQueryDestination::CreateDisposition
CREATE_DISPOSITION_UNSPECIFIED=>0CREATE_IF_NEEDED=>1CREATE_NEVER=>2
Google::Cloud::Capacityplanner::V1beta::UsageService::OperationMetadata
Represents the metadata of a long-running operation.
Inherits from Protobuf::Message.
Accessors
$msg->create_time()/$msg->create_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The time the operation was created.
$msg->end_time()/$msg->end_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The time the operation finished running.
Google::Cloud::Capacityplanner::V1beta::UsageService::ExportUsageHistoriesResponse
A response message for [UsageService.ExportUsageHistories].
Inherits from Protobuf::Message.
Accessors
$msg->response()/$msg->response($value)Type:
StringThe response message for the usage history export. In case of bigquery, it will also contain job id.
Google::Cloud::Capacityplanner::V1beta::UsageService::ExportForecastsResponse
A response message for [UsageService.ExportForecasts].
Inherits from Protobuf::Message.
Accessors
$msg->response()/$msg->response($value)Type:
StringThe response message for the forecast export. In case of bigquery, it will also contain job id.
Google::Cloud::Capacityplanner::V1beta::UsageService::ExportReservationsUsageResponse
A response message for [UsageService.ExportReservationsUsage].
Inherits from Protobuf::Message.
Accessors
$msg->response()/$msg->response($value)Type:
StringThe response message for the reservations usage export. In case of bigquery, it will also contain job id.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Capacityplanner::V1beta::UsageService::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.