Google_Service_BigQueryReservation_Resource_ProjectsLocationsCapacityCommitments
extends Google_Service_Resource
in package
The "capacityCommitments" collection of methods.
Typical usage is:
$bigqueryreservationService = new Google_Service_BigQueryReservation(...);
$capacityCommitments = $bigqueryreservationService->capacityCommitments;
Table of Contents
- $client : Google_Client
- $methods : array<string|int, mixed>
- $resourceName : string
- $rootUrl : string
- $serviceName : string
- $servicePath : string
- $stackParameters : mixed
- __construct() : mixed
- call() : Google_Http_Request|expectedClass
- TODO: This function needs simplifying.
- create() : Google_Service_BigQueryReservation_CapacityCommitment
- Creates a new capacity commitment resource. (capacityCommitments.create)
- createRequestUri() : string
- Parse/expand request parameters and create a fully qualified request uri.
- delete() : Google_Service_BigQueryReservation_BigqueryreservationEmpty
- Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. (capacityCommitments.delete)
- get() : Google_Service_BigQueryReservation_CapacityCommitment
- Returns information about the capacity commitment. (capacityCommitments.get)
- listProjectsLocationsCapacityCommitments() : Google_Service_BigQueryReservation_ListCapacityCommitmentsResponse
- Lists all the capacity commitments for the admin project.
- merge() : Google_Service_BigQueryReservation_CapacityCommitment
- Merges capacity commitments of the same plan into a single commitment. The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments. Attempting to merge capacity commitments of different plan will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. (capacityCommitments.merge)
- patch() : Google_Service_BigQueryReservation_CapacityCommitment
- Updates an existing capacity commitment. Only `plan` and `renewal_plan` fields can be updated. Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
- split() : Google_Service_BigQueryReservation_SplitCapacityCommitmentResponse
- Splits capacity commitment to two commitments of the same plan and `commitment_end_time`. A common use case is to enable downgrading commitments. For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000.
- convertToArrayAndStripNulls() : mixed
Properties
$client
private
Google_Client
$client
$methods
private
array<string|int, mixed>
$methods
$resourceName
private
string
$resourceName
$rootUrl
private
string
$rootUrl
$serviceName
private
string
$serviceName
$servicePath
private
string
$servicePath
$stackParameters
private
mixed
$stackParameters
= array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))
Methods
__construct()
public
__construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
- $service : mixed
- $serviceName : mixed
- $resourceName : mixed
- $resource : mixed
Return values
mixed —call()
TODO: This function needs simplifying.
public
call( $name, $arguments[, $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
Tags
Return values
Google_Http_Request|expectedClass —create()
Creates a new capacity commitment resource. (capacityCommitments.create)
public
create(string $parent, Google_Service_BigQueryReservation_CapacityCommitment $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_BigQueryReservation_CapacityCommitment
Parameters
- $parent : string
-
Required. Resource name of the parent reservation. E.g.,
projects/myproject/locations/US - $postBody : Google_Service_BigQueryReservation_CapacityCommitment
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_BigQueryReservation_CapacityCommitment —createRequestUri()
Parse/expand request parameters and create a fully qualified request uri.
public
createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
- $restPath : string
- $params : array<string|int, mixed>
Tags
Return values
string —$requestUrl
delete()
Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. (capacityCommitments.delete)
public
delete(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_BigQueryReservation_BigqueryreservationEmpty
Parameters
- $name : string
-
Required. Resource name of the capacity commitment to delete. E.g.,
projects/myproject/locations/US/capacityCommitments/123 - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_BigQueryReservation_BigqueryreservationEmpty —get()
Returns information about the capacity commitment. (capacityCommitments.get)
public
get(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_BigQueryReservation_CapacityCommitment
Parameters
- $name : string
-
Required. Resource name of the capacity commitment to retrieve. E.g.,
projects/myproject/locations/US/capacityCommitments/123 - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_BigQueryReservation_CapacityCommitment —listProjectsLocationsCapacityCommitments()
Lists all the capacity commitments for the admin project.
public
listProjectsLocationsCapacityCommitments(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_BigQueryReservation_ListCapacityCommitmentsResponse
(capacityCommitments.listProjectsLocationsCapacityCommitments)
Parameters
- $parent : string
-
Required. Resource name of the parent reservation. E.g.,
projects/myproject/locations/US - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_BigQueryReservation_ListCapacityCommitmentsResponse —merge()
Merges capacity commitments of the same plan into a single commitment. The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments. Attempting to merge capacity commitments of different plan will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. (capacityCommitments.merge)
public
merge(string $parent, Google_Service_BigQueryReservation_MergeCapacityCommitmentsRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_BigQueryReservation_CapacityCommitment
Parameters
- $parent : string
-
Parent resource that identifies admin project and location e.g.,
projects/myproject/locations/us - $postBody : Google_Service_BigQueryReservation_MergeCapacityCommitmentsRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_BigQueryReservation_CapacityCommitment —patch()
Updates an existing capacity commitment. Only `plan` and `renewal_plan` fields can be updated. Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
public
patch(string $name, Google_Service_BigQueryReservation_CapacityCommitment $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_BigQueryReservation_CapacityCommitment
(capacityCommitments.patch)
Parameters
- $name : string
-
Output only. The resource name of the capacity commitment, e.g.,
projects/myproject/locations/US/capacityCommitments/123 - $postBody : Google_Service_BigQueryReservation_CapacityCommitment
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_BigQueryReservation_CapacityCommitment —split()
Splits capacity commitment to two commitments of the same plan and `commitment_end_time`. A common use case is to enable downgrading commitments. For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000.
public
split(string $name, Google_Service_BigQueryReservation_SplitCapacityCommitmentRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_BigQueryReservation_SplitCapacityCommitmentResponse
Then, you would change the plan of the first one to FLEX and then delete
it. (capacityCommitments.split)
Parameters
- $name : string
-
Required. The resource name e.g.,:
projects/myproject/locations/US/capacityCommitments/123 - $postBody : Google_Service_BigQueryReservation_SplitCapacityCommitmentRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_BigQueryReservation_SplitCapacityCommitmentResponse —convertToArrayAndStripNulls()
protected
convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
- $o : mixed