Reference documentation and code samples for the Compute V1 Client class SourceInstanceProperties.
DEPRECATED: Please use compute#instanceProperties instead. New properties will not be added to this field.
Generated from protobuf messagegoogle.cloud.compute.v1.SourceInstanceProperties
Namespace
Google \ Cloud \ Compute \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ can_ip_forward
bool
Enables instances created based on this machine image to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.
↳ deletion_protection
bool
Whether the instance created from this machine image should be protected against deletion.
↳ description
string
An optional text description for the instances that are created from this machine image.
A list of guest accelerator cards' type and count to use for instances created from this machine image.
↳ key_revocation_action_type
string
KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. Check the KeyRevocationActionType enum for the list of possible values.
The metadata key/value pairs to assign to instances that are created from this machine image. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.
↳ min_cpu_platform
string
Minimum cpu/platform to be used by instances created from this machine image. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform.
A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this machine image. Use metadata queries to obtain the access tokens for these instances.
A list of tags to apply to the instances that are created from this machine image. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.
getCanIpForward
Enables instances created based on this machine image to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.
Returns
Type
Description
bool
hasCanIpForward
clearCanIpForward
setCanIpForward
Enables instances created based on this machine image to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getDeletionProtection
Whether the instance created from this machine image should be protected against deletion.
Returns
Type
Description
bool
hasDeletionProtection
clearDeletionProtection
setDeletionProtection
Whether the instance created from this machine image should be protected against deletion.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getDescription
An optional text description for the instances that are created from this machine image.
Returns
Type
Description
string
hasDescription
clearDescription
setDescription
An optional text description for the instances that are created from this machine image.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDisks
An array of disks that are associated with the instances that are created from this machine image.
The machine type to use for instances that are created from this machine image.
Returns
Type
Description
string
hasMachineType
clearMachineType
setMachineType
The machine type to use for instances that are created from this machine image.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getMetadata
The metadata key/value pairs to assign to instances that are created from this machine image. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.
The metadata key/value pairs to assign to instances that are created from this machine image. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.
Minimum cpu/platform to be used by instances created from this machine image. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform.
Returns
Type
Description
string
hasMinCpuPlatform
clearMinCpuPlatform
setMinCpuPlatform
Minimum cpu/platform to be used by instances created from this machine image. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getNetworkInterfaces
An array of network access configurations for this interface.
A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this machine image. Use metadata queries to obtain the access tokens for these instances.
A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this machine image. Use metadata queries to obtain the access tokens for these instances.
A list of tags to apply to the instances that are created from this machine image. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.
A list of tags to apply to the instances that are created from this machine image. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Compute V1 Client - Class SourceInstanceProperties (1.35.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.35.0 (latest)](/php/docs/reference/cloud-compute/latest/V1.SourceInstanceProperties)\n- [1.34.0](/php/docs/reference/cloud-compute/1.34.0/V1.SourceInstanceProperties)\n- [1.33.0](/php/docs/reference/cloud-compute/1.33.0/V1.SourceInstanceProperties)\n- [1.32.0](/php/docs/reference/cloud-compute/1.32.0/V1.SourceInstanceProperties)\n- [1.31.0](/php/docs/reference/cloud-compute/1.31.0/V1.SourceInstanceProperties)\n- [1.30.0](/php/docs/reference/cloud-compute/1.30.0/V1.SourceInstanceProperties)\n- [1.29.0](/php/docs/reference/cloud-compute/1.29.0/V1.SourceInstanceProperties)\n- [1.28.0](/php/docs/reference/cloud-compute/1.28.0/V1.SourceInstanceProperties)\n- [1.27.0](/php/docs/reference/cloud-compute/1.27.0/V1.SourceInstanceProperties)\n- [1.26.0](/php/docs/reference/cloud-compute/1.26.0/V1.SourceInstanceProperties)\n- [1.25.0](/php/docs/reference/cloud-compute/1.25.0/V1.SourceInstanceProperties)\n- [1.24.0](/php/docs/reference/cloud-compute/1.24.0/V1.SourceInstanceProperties)\n- [1.23.0](/php/docs/reference/cloud-compute/1.23.0/V1.SourceInstanceProperties)\n- [1.22.1](/php/docs/reference/cloud-compute/1.22.1/V1.SourceInstanceProperties)\n- [1.21.0](/php/docs/reference/cloud-compute/1.21.0/V1.SourceInstanceProperties)\n- [1.20.0](/php/docs/reference/cloud-compute/1.20.0/V1.SourceInstanceProperties)\n- [1.19.0](/php/docs/reference/cloud-compute/1.19.0/V1.SourceInstanceProperties)\n- [1.18.1](/php/docs/reference/cloud-compute/1.18.1/V1.SourceInstanceProperties)\n- [1.17.0](/php/docs/reference/cloud-compute/1.17.0/V1.SourceInstanceProperties)\n- [1.16.2](/php/docs/reference/cloud-compute/1.16.2/V1.SourceInstanceProperties)\n- [1.14.0](/php/docs/reference/cloud-compute/1.14.0/V1.SourceInstanceProperties)\n- [1.13.0](/php/docs/reference/cloud-compute/1.13.0/V1.SourceInstanceProperties)\n- [1.12.1](/php/docs/reference/cloud-compute/1.12.1/V1.SourceInstanceProperties)\n- [1.11.1](/php/docs/reference/cloud-compute/1.11.1/V1.SourceInstanceProperties)\n- [1.10.1](/php/docs/reference/cloud-compute/1.10.1/V1.SourceInstanceProperties)\n- [1.9.1](/php/docs/reference/cloud-compute/1.9.1/V1.SourceInstanceProperties)\n- [1.8.3](/php/docs/reference/cloud-compute/1.8.3/V1.SourceInstanceProperties)\n- [1.7.1](/php/docs/reference/cloud-compute/1.7.1/V1.SourceInstanceProperties)\n- [1.6.1](/php/docs/reference/cloud-compute/1.6.1/V1.SourceInstanceProperties)\n- [1.5.0](/php/docs/reference/cloud-compute/1.5.0/V1.SourceInstanceProperties) \nReference documentation and code samples for the Compute V1 Client class SourceInstanceProperties.\n\nDEPRECATED: Please use compute#instanceProperties instead. New properties will not be added to this field.\n\nGenerated from protobuf message `google.cloud.compute.v1.SourceInstanceProperties`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Compute \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getCanIpForward\n\nEnables instances created based on this machine image to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.\n\n### hasCanIpForward\n\n### clearCanIpForward\n\n### setCanIpForward\n\nEnables instances created based on this machine image to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.\n\n### getDeletionProtection\n\nWhether the instance created from this machine image should be protected against deletion.\n\n### hasDeletionProtection\n\n### clearDeletionProtection\n\n### setDeletionProtection\n\nWhether the instance created from this machine image should be protected against deletion.\n\n### getDescription\n\nAn optional text description for the instances that are created from this machine image.\n\n### hasDescription\n\n### clearDescription\n\n### setDescription\n\nAn optional text description for the instances that are created from this machine image.\n\n### getDisks\n\nAn array of disks that are associated with the instances that are created from this machine image.\n\n### setDisks\n\nAn array of disks that are associated with the instances that are created from this machine image.\n\n### getGuestAccelerators\n\nA list of guest accelerator cards' type and count to use for instances created from this machine image.\n\n### setGuestAccelerators\n\nA list of guest accelerator cards' type and count to use for instances created from this machine image.\n\n### getKeyRevocationActionType\n\nKeyRevocationActionType of the instance. Supported options are \"STOP\" and \"NONE\". The default value is \"NONE\" if it is not specified.\n\nCheck the KeyRevocationActionType enum for the list of possible values.\n\n### hasKeyRevocationActionType\n\n### clearKeyRevocationActionType\n\n### setKeyRevocationActionType\n\nKeyRevocationActionType of the instance. Supported options are \"STOP\" and \"NONE\". The default value is \"NONE\" if it is not specified.\n\nCheck the KeyRevocationActionType enum for the list of possible values.\n\n### getLabels\n\nLabels to apply to instances that are created from this machine image.\n\n### setLabels\n\nLabels to apply to instances that are created from this machine image.\n\n### getMachineType\n\nThe machine type to use for instances that are created from this machine image.\n\n### hasMachineType\n\n### clearMachineType\n\n### setMachineType\n\nThe machine type to use for instances that are created from this machine image.\n\n### getMetadata\n\nThe metadata key/value pairs to assign to instances that are created from this machine image. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.\n\n### hasMetadata\n\n### clearMetadata\n\n### setMetadata\n\nThe metadata key/value pairs to assign to instances that are created from this machine image. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.\n\n### getMinCpuPlatform\n\nMinimum cpu/platform to be used by instances created from this machine image. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: \"Intel Haswell\" or minCpuPlatform: \"Intel Sandy Bridge\". For more information, read Specifying a Minimum CPU Platform.\n\n### hasMinCpuPlatform\n\n### clearMinCpuPlatform\n\n### setMinCpuPlatform\n\nMinimum cpu/platform to be used by instances created from this machine image. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: \"Intel Haswell\" or minCpuPlatform: \"Intel Sandy Bridge\". For more information, read Specifying a Minimum CPU Platform.\n\n### getNetworkInterfaces\n\nAn array of network access configurations for this interface.\n\n### setNetworkInterfaces\n\nAn array of network access configurations for this interface.\n\n### getScheduling\n\nSpecifies the scheduling options for the instances that are created from this machine image.\n\n### hasScheduling\n\n### clearScheduling\n\n### setScheduling\n\nSpecifies the scheduling options for the instances that are created from this machine image.\n\n### getServiceAccounts\n\nA list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this machine image. Use metadata queries to obtain the access tokens for these instances.\n\n### setServiceAccounts\n\nA list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this machine image. Use metadata queries to obtain the access tokens for these instances.\n\n### getTags\n\nA list of tags to apply to the instances that are created from this machine image. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.\n\n### hasTags\n\n### clearTags\n\n### setTags\n\nA list of tags to apply to the instances that are created from this machine image. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035."]]