class ProjectsLocationsVolumesSnapshots extends Resource (View source)

The "snapshots" collection of methods.

Typical usage is:

 $baremetalsolutionService = new Google\Service\Baremetalsolution(...);
 $snapshots = $baremetalsolutionService->projects_locations_volumes_snapshots;

Methods

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

Takes a snapshot of a boot volume. Returns INVALID_ARGUMENT if called for a non-boot volume. (snapshots.create)

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

Deletes a volume snapshot. Returns INVALID_ARGUMENT if called for a non-boot volume. (snapshots.delete)

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

Returns the specified snapshot resource. Returns INVALID_ARGUMENT if called for a non-boot volume. (snapshots.get)

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

Retrieves the list of snapshots for the specified volume. Returns a response with an empty list of snapshots if called for a non-boot volume.

restoreVolumeSnapshot(string $volumeSnapshot, RestoreVolumeSnapshotRequest $postBody, array $optParams = [])

Uses the specified snapshot to restore its parent volume. Returns INVALID_ARGUMENT if called for a non-boot volume.

Details

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

Takes a snapshot of a boot volume. Returns INVALID_ARGUMENT if called for a non-boot volume. (snapshots.create)

Parameters

string $parent

Required. The volume to snapshot.

VolumeSnapshot $postBody
array $optParams

Optional parameters.

Return Value

VolumeSnapshot

Exceptions

Exception

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

Deletes a volume snapshot. Returns INVALID_ARGUMENT if called for a non-boot volume. (snapshots.delete)

Parameters

string $name

Required. The name of the snapshot to delete.

array $optParams

Optional parameters.

Return Value

BaremetalsolutionEmpty

Exceptions

Exception

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

Returns the specified snapshot resource. Returns INVALID_ARGUMENT if called for a non-boot volume. (snapshots.get)

Parameters

string $name

Required. The name of the snapshot.

array $optParams

Optional parameters.

Return Value

VolumeSnapshot

Exceptions

Exception

ListVolumeSnapshotsResponse listProjectsLocationsVolumesSnapshots(string $parent, array $optParams = [])

Retrieves the list of snapshots for the specified volume. Returns a response with an empty list of snapshots if called for a non-boot volume.

(snapshots.listProjectsLocationsVolumesSnapshots)

Parameters

string $parent

Required. Parent value for ListVolumesRequest.

array $optParams

Optional parameters.

Return Value

ListVolumeSnapshotsResponse

Exceptions

Exception

Operation restoreVolumeSnapshot(string $volumeSnapshot, RestoreVolumeSnapshotRequest $postBody, array $optParams = [])

Uses the specified snapshot to restore its parent volume. Returns INVALID_ARGUMENT if called for a non-boot volume.

(snapshots.restoreVolumeSnapshot)

Parameters

string $volumeSnapshot

Required. Name of the snapshot which will be used to restore its parent volume.

RestoreVolumeSnapshotRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception