# Compute V1 Client - Class InstantSnapshot (2.10.0)

2.10.0 (latest) 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.0.0 1.36.0 1.35.0 1.34.0 1.33.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 1.24.0 1.23.0 1.22.1 1.21.0 1.20.0 1.19.0 1.18.1 1.17.0 1.16.2 1.14.0 1.13.0 1.12.1 1.11.1 1.10.1 1.9.1 1.8.3 1.7.1 1.6.1 1.5.0 Reference documentation and code samples for the Compute V1 Client class InstantSnapshot.

Represents a InstantSnapshot resource.

You can use instant snapshots to create disk rollback points quickly..

Generated from protobuf message `google.cloud.compute.v1.InstantSnapshot`

## Namespace

Google \\ Cloud \\ Compute \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ architecture` | `string` Output only. \[Output Only\] The architecture of the instant snapshot. Valid values are ARM64 or X86_64. Check the Architecture enum for the list of possible values. |
| `↳ creation_timestamp` | `string` Output only. \[Output Only\] Creation timestamp inRFC3339 text format. |
| `↳ description` | `string` An optional description of this resource. Provide this property when you create the resource. |
| `↳ disk_size_gb` | `int|string` Output only. \[Output Only\] Size of the source disk, specified in GB. |
| `↳ id` | `int|string` Output only. \[Output Only\] The unique identifier for the resource. This identifier is defined by the server. |
| `↳ kind` | `string` Output only. \[Output Only\] Type of the resource. Alwayscompute#instantSnapshot for InstantSnapshot resources. |
| `↳ label_fingerprint` | `string` A fingerprint for the labels being applied to this InstantSnapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a InstantSnapshot. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Labels to apply to this InstantSnapshot. These can be later modified by the setLabels method. Label values may be empty. |
| `↳ name` | `string` Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| `↳ params` | `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.InstantSnapshotParams` Input only. Additional params passed with the request, but not persisted as part of resource payload. |
| `↳ region` | `string` Output only. \[Output Only\] URL of the region where the instant snapshot resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. |
| `↳ resource_status` | `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.InstantSnapshotResourceStatus` Output only. \[Output Only\] Status information for the instant snapshot resource. |
| `↳ satisfies_pzi` | `bool` Output only. Reserved for future use. |
| `↳ satisfies_pzs` | `bool` Output only. \[Output Only\] Reserved for future use. |
| `↳ self_link` | `string` Output only. \[Output Only\] Server-defined URL for the resource. |
| `↳ self_link_with_id` | `string` Output only. \[Output Only\] Server-defined URL for this resource's resource id. |
| `↳ source_disk` | `string` URL of the source disk used to create this instant snapshot. Note that the source disk must be in the same zone/region as the instant snapshot to be created. This can be a full or valid partial URL. For example, the following are valid values: - <https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk> - <https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk> - projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - zones/zone/disks/disk - regions/region/disks/disk |
| `↳ source_disk_id` | `string` Output only. \[Output Only\] The ID value of the disk used to create this InstantSnapshot. This value may be used to determine whether the InstantSnapshot was taken from the current or a previous instance of a given disk name. |
| `↳ source_instant_snapshot_group` | `string` Output only. \[Output Only\] URL of the source instant snapshot this instant snapshot is part of. Note that the source instant snapshot group must be in the same zone/region as the instant snapshot to be created. This can be a full or valid partial URL. |
| `↳ source_instant_snapshot_group_id` | `string` Output only. \[Output Only\] The ID value of the source instant snapshot group this InstantSnapshot is part of. This value may be used to determine whether the InstantSnapshot was created as part of an InstantSnapshotGroup creation. |
| `↳ status` | `string` Output only. \[Output Only\] The status of the instantSnapshot. This can beCREATING, DELETING, FAILED, orREADY. Check the Status enum for the list of possible values. |
| `↳ zone` | `string` Output only. \[Output Only\] URL of the zone where the instant snapshot resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. |

### getArchitecture

Output only. \[Output Only\] The architecture of the instant snapshot. Valid values are
ARM64 or X86_64.

Check the Architecture enum for the list of possible values.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasArchitecture

### clearArchitecture

### setArchitecture

Output only. \[Output Only\] The architecture of the instant snapshot. Valid values are
ARM64 or X86_64.

Check the Architecture enum for the list of possible values.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreationTimestamp

Output only. \[Output Only\] Creation timestamp inRFC3339
text format.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasCreationTimestamp

### clearCreationTimestamp

### setCreationTimestamp

Output only. \[Output Only\] Creation timestamp inRFC3339
text format.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDescription

An optional description of this resource. Provide this property when you
create the resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasDescription

### clearDescription

### setDescription

An optional description of this resource. Provide this property when you
create the resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDiskSizeGb

Output only. \[Output Only\] Size of the source disk, specified in GB.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### hasDiskSizeGb

### clearDiskSizeGb

### setDiskSizeGb

Output only. \[Output Only\] Size of the source disk, specified in GB.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getId

Output only. \[Output Only\] The unique identifier for the resource. This identifier is
defined by the server.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### hasId

### clearId

### setId

Output only. \[Output Only\] The unique identifier for the resource. This identifier is
defined by the server.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getKind

Output only. \[Output Only\] Type of the resource. Alwayscompute#instantSnapshot for InstantSnapshot resources.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasKind

### clearKind

### setKind

Output only. \[Output Only\] Type of the resource. Alwayscompute#instantSnapshot for InstantSnapshot resources.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLabelFingerprint

A fingerprint for the labels being applied to this InstantSnapshot, which
is essentially a hash of the labels set used for optimistic locking. The
fingerprint is initially generated by Compute Engine and changes after
every request to modify or update labels. You must always provide an
up-to-date fingerprint hash in order to update or change labels,
otherwise the request will fail with error412 conditionNotMet.

To see the latest fingerprint, make a get() request to
retrieve a InstantSnapshot.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasLabelFingerprint

### clearLabelFingerprint

### setLabelFingerprint

A fingerprint for the labels being applied to this InstantSnapshot, which
is essentially a hash of the labels set used for optimistic locking. The
fingerprint is initially generated by Compute Engine and changes after
every request to modify or update labels. You must always provide an
up-to-date fingerprint hash in order to update or change labels,
otherwise the request will fail with error412 conditionNotMet.

To see the latest fingerprint, make a get() request to
retrieve a InstantSnapshot.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLabels

Labels to apply to this InstantSnapshot. These can be later modified by
the setLabels method.

Label values may be empty.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setLabels

Labels to apply to this InstantSnapshot. These can be later modified by
the setLabels method.

Label values may be empty.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getName

Name of the resource; provided by the client when the resource is created.

The name must be 1-63 characters long, and comply withRFC1035.
Specifically, the name must be 1-63 characters long and match the regular
expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
character must be a lowercase letter, and all following characters must be
a dash, lowercase letter, or digit, except the last character, which cannot
be a dash.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasName

### clearName

### setName

Name of the resource; provided by the client when the resource is created.

The name must be 1-63 characters long, and comply withRFC1035.
Specifically, the name must be 1-63 characters long and match the regular
expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
character must be a lowercase letter, and all following characters must be
a dash, lowercase letter, or digit, except the last character, which cannot
be a dash.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getParams

Input only. Additional params passed with the request, but not persisted
as part of resource payload.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.InstantSnapshotParams|null` |   |

### hasParams

### clearParams

### setParams

Input only. Additional params passed with the request, but not persisted
as part of resource payload.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.InstantSnapshotParams` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRegion

Output only. \[Output Only\] URL of the region where the instant snapshot resides.

You must specify this field as part of the HTTP request URL. It is
not settable as a field in the request body.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasRegion

### clearRegion

### setRegion

Output only. \[Output Only\] URL of the region where the instant snapshot resides.

You must specify this field as part of the HTTP request URL. It is
not settable as a field in the request body.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getResourceStatus

Output only. \[Output Only\] Status information for the instant snapshot resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.InstantSnapshotResourceStatus|null` |   |

### hasResourceStatus

### clearResourceStatus

### setResourceStatus

Output only. \[Output Only\] Status information for the instant snapshot resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.InstantSnapshotResourceStatus` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSatisfiesPzi

Output only. Reserved for future use.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasSatisfiesPzi

### clearSatisfiesPzi

### setSatisfiesPzi

Output only. Reserved for future use.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSatisfiesPzs

Output only. \[Output Only\] Reserved for future use.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasSatisfiesPzs

### clearSatisfiesPzs

### setSatisfiesPzs

Output only. \[Output Only\] Reserved for future use.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSelfLink

Output only. \[Output Only\] Server-defined URL for the resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasSelfLink

### clearSelfLink

### setSelfLink

Output only. \[Output Only\] Server-defined URL for the resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSelfLinkWithId

Output only. \[Output Only\] Server-defined URL for this resource's resource id.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasSelfLinkWithId

### clearSelfLinkWithId

### setSelfLinkWithId

Output only. \[Output Only\] Server-defined URL for this resource's resource id.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSourceDisk

URL of the source disk used to create this instant snapshot.

Note that the source disk must be in the same zone/region as the
instant snapshot to be created. This can be a full or valid partial URL.
For example, the following are valid values:
-
<https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk>
-
<https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk>
-
projects/project/zones/zone/disks/disk
-
projects/project/regions/region/disks/disk
-
zones/zone/disks/disk
-
regions/region/disks/disk

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasSourceDisk

### clearSourceDisk

### setSourceDisk

URL of the source disk used to create this instant snapshot.

Note that the source disk must be in the same zone/region as the
instant snapshot to be created. This can be a full or valid partial URL.
For example, the following are valid values:
-
<https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk>
-
<https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk>
-
projects/project/zones/zone/disks/disk
-
projects/project/regions/region/disks/disk
-
zones/zone/disks/disk
-
regions/region/disks/disk

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSourceDiskId

Output only. \[Output Only\] The ID value of the disk used to create this InstantSnapshot.

This value may be used to determine whether the InstantSnapshot
was taken from the current or a previous instance of a given disk name.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasSourceDiskId

### clearSourceDiskId

### setSourceDiskId

Output only. \[Output Only\] The ID value of the disk used to create this InstantSnapshot.

This value may be used to determine whether the InstantSnapshot
was taken from the current or a previous instance of a given disk name.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSourceInstantSnapshotGroup

Output only. \[Output Only\] URL of the source instant snapshot this instant snapshot is
part of. Note that the source instant snapshot group must be in the same
zone/region as the instant snapshot to be created. This can be a full or
valid partial URL.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasSourceInstantSnapshotGroup

### clearSourceInstantSnapshotGroup

### setSourceInstantSnapshotGroup

Output only. \[Output Only\] URL of the source instant snapshot this instant snapshot is
part of. Note that the source instant snapshot group must be in the same
zone/region as the instant snapshot to be created. This can be a full or
valid partial URL.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSourceInstantSnapshotGroupId

Output only. \[Output Only\] The ID value of the source instant snapshot group this
InstantSnapshot is part of. This value may be used to determine whether the
InstantSnapshot was created as part of an InstantSnapshotGroup creation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasSourceInstantSnapshotGroupId

### clearSourceInstantSnapshotGroupId

### setSourceInstantSnapshotGroupId

Output only. \[Output Only\] The ID value of the source instant snapshot group this
InstantSnapshot is part of. This value may be used to determine whether the
InstantSnapshot was created as part of an InstantSnapshotGroup creation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getStatus

Output only. \[Output Only\] The status of the instantSnapshot. This can beCREATING, DELETING, FAILED, orREADY.

Check the Status enum for the list of possible values.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasStatus

### clearStatus

### setStatus

Output only. \[Output Only\] The status of the instantSnapshot. This can beCREATING, DELETING, FAILED, orREADY.

Check the Status enum for the list of possible values.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getZone

Output only. \[Output Only\] URL of the zone where the instant snapshot resides.

You must specify this field as part of the HTTP request URL. It is
not settable as a field in the request body.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasZone

### clearZone

### setZone

Output only. \[Output Only\] URL of the zone where the instant snapshot resides.

You must specify this field as part of the HTTP request URL. It is
not settable as a field in the request body.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |