class ProjectsLocationsCapacityCommitments extends Resource (View source)

The "capacityCommitments" collection of methods.

Typical usage is:

 $bigqueryreservationService = new Google\Service\BigQueryReservation(...);
 $capacityCommitments = $bigqueryreservationService->projects_locations_capacityCommitments;

Methods

create(string $parent, CapacityCommitment $postBody, array $optParams = [])

Creates a new capacity commitment resource. (capacityCommitments.create)

delete(string $name, array $optParams = [])

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(string $name, array $optParams = [])

Returns information about the capacity commitment. (capacityCommitments.get)

listProjectsLocationsCapacityCommitments(string $parent, array $optParams = [])

Lists all the capacity commitments for the admin project.

merge(string $parent, MergeCapacityCommitmentsRequest $postBody, array $optParams = [])

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(string $name, CapacityCommitment $postBody, array $optParams = [])

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(string $name, SplitCapacityCommitmentRequest $postBody, array $optParams = [])

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.

Details

CapacityCommitment create(string $parent, CapacityCommitment $postBody, array $optParams = [])

Creates a new capacity commitment resource. (capacityCommitments.create)

Parameters

string $parent

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

CapacityCommitment $postBody
array $optParams

Optional parameters.

Return Value

CapacityCommitment

Exceptions

Exception

BigqueryreservationEmpty delete(string $name, array $optParams = [])

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)

Parameters

string $name

Required. Resource name of the capacity commitment to delete. E.g., projects/myproject/locations/US/capacityCommitments/123

array $optParams

Optional parameters.

Return Value

BigqueryreservationEmpty

Exceptions

Exception

CapacityCommitment get(string $name, array $optParams = [])

Returns information about the capacity commitment. (capacityCommitments.get)

Parameters

string $name

Required. Resource name of the capacity commitment to retrieve. E.g., projects/myproject/locations/US/capacityCommitments/123

array $optParams

Optional parameters.

Return Value

CapacityCommitment

Exceptions

Exception

ListCapacityCommitmentsResponse listProjectsLocationsCapacityCommitments(string $parent, array $optParams = [])

Lists all the capacity commitments for the admin project.

(capacityCommitments.listProjectsLocationsCapacityCommitments)

Parameters

string $parent

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

array $optParams

Optional parameters.

Return Value

ListCapacityCommitmentsResponse

Exceptions

Exception

CapacityCommitment merge(string $parent, MergeCapacityCommitmentsRequest $postBody, array $optParams = [])

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)

Parameters

string $parent

Parent resource that identifies admin project and location e.g., projects/myproject/locations/us

MergeCapacityCommitmentsRequest $postBody
array $optParams

Optional parameters.

Return Value

CapacityCommitment

Exceptions

Exception

CapacityCommitment patch(string $name, CapacityCommitment $postBody, array $optParams = [])

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.

(capacityCommitments.patch)

Parameters

string $name

Output only. The resource name of the capacity commitment, e.g., projects/myproject/locations/US/capacityCommitments/123 The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.

CapacityCommitment $postBody
array $optParams

Optional parameters.

Return Value

CapacityCommitment

Exceptions

Exception

SplitCapacityCommitmentResponse split(string $name, SplitCapacityCommitmentRequest $postBody, array $optParams = [])

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.

Then, you delete the first one after the commitment end time passes. (capacityCommitments.split)

Parameters

string $name

Required. The resource name e.g.,: projects/myproject/locations/US/capacityCommitments/123

SplitCapacityCommitmentRequest $postBody
array $optParams

Optional parameters.

Return Value

SplitCapacityCommitmentResponse

Exceptions

Exception