class Reservations extends Resource (View source)

The "reservations" collection of methods.

Typical usage is:

 $computeService = new Google\Service\Compute(...);
 $reservations = $computeService->reservations;

Methods

aggregatedList(string $project, array $optParams = [])

Retrieves an aggregated list of reservations. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

delete(string $project, string $zone, string $reservation, array $optParams = [])

Deletes the specified reservation. (reservations.delete)

get(string $project, string $zone, string $reservation, array $optParams = [])

Retrieves information about the specified reservation. (reservations.get)

getIamPolicy(string $project, string $zone, string $resource, array $optParams = [])

Gets the access control policy for a resource. May be empty if no such policy or resource exists. (reservations.getIamPolicy)

insert(string $project, string $zone, Reservation $postBody, array $optParams = [])

Creates a new reservation. For more information, read Reserving zonal resources. (reservations.insert)

listReservations(string $project, string $zone, array $optParams = [])

A list of all the reservations that have been configured for the specified project in specified zone. (reservations.listReservations)

resize(string $project, string $zone, string $reservation, ReservationsResizeRequest $postBody, array $optParams = [])

Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations. (reservations.resize)

setIamPolicy(string $project, string $zone, string $resource, ZoneSetPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. (reservations.setIamPolicy)

testIamPermissions(string $project, string $zone, string $resource, TestPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource.

update(string $project, string $zone, string $reservation, Reservation $postBody, array $optParams = [])

Update share settings of the reservation. (reservations.update)

Details

ReservationAggregatedList aggregatedList(string $project, array $optParams = [])

Retrieves an aggregated list of reservations. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

(reservations.aggregatedList)

Parameters

string $project

Project ID for this request.

array $optParams

Optional parameters.

Return Value

ReservationAggregatedList

Exceptions

Exception

Operation delete(string $project, string $zone, string $reservation, array $optParams = [])

Deletes the specified reservation. (reservations.delete)

Parameters

string $project

Project ID for this request.

string $zone

Name of the zone for this request.

string $reservation

Name of the reservation to delete.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Reservation get(string $project, string $zone, string $reservation, array $optParams = [])

Retrieves information about the specified reservation. (reservations.get)

Parameters

string $project

Project ID for this request.

string $zone

Name of the zone for this request.

string $reservation

Name of the reservation to retrieve.

array $optParams

Optional parameters.

Return Value

Reservation

Exceptions

Exception

Policy getIamPolicy(string $project, string $zone, string $resource, array $optParams = [])

Gets the access control policy for a resource. May be empty if no such policy or resource exists. (reservations.getIamPolicy)

Parameters

string $project

Project ID for this request.

string $zone

The name of the zone for this request.

string $resource

Name or id of the resource for this request.

array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

Operation insert(string $project, string $zone, Reservation $postBody, array $optParams = [])

Creates a new reservation. For more information, read Reserving zonal resources. (reservations.insert)

Parameters

string $project

Project ID for this request.

string $zone

Name of the zone for this request.

Reservation $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

ReservationList listReservations(string $project, string $zone, array $optParams = [])

A list of all the reservations that have been configured for the specified project in specified zone. (reservations.listReservations)

Parameters

string $project

Project ID for this request.

string $zone

Name of the zone for this request.

array $optParams

Optional parameters.

Return Value

ReservationList

Exceptions

Exception

Operation resize(string $project, string $zone, string $reservation, ReservationsResizeRequest $postBody, array $optParams = [])

Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations. (reservations.resize)

Parameters

string $project

Project ID for this request.

string $zone

Name of the zone for this request.

string $reservation

Name of the reservation to update.

ReservationsResizeRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Policy setIamPolicy(string $project, string $zone, string $resource, ZoneSetPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. (reservations.setIamPolicy)

Parameters

string $project

Project ID for this request.

string $zone

The name of the zone for this request.

string $resource

Name or id of the resource for this request.

ZoneSetPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

TestPermissionsResponse testIamPermissions(string $project, string $zone, string $resource, TestPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource.

(reservations.testIamPermissions)

Parameters

string $project

Project ID for this request.

string $zone

The name of the zone for this request.

string $resource

Name or id of the resource for this request.

TestPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestPermissionsResponse

Exceptions

Exception

Operation update(string $project, string $zone, string $reservation, Reservation $postBody, array $optParams = [])

Update share settings of the reservation. (reservations.update)

Parameters

string $project

Project ID for this request.

string $zone

Name of the zone for this request.

string $reservation

Name of the reservation to update.

Reservation $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception