Reference documentation and code samples for the Compute V1 Client class ManagedInstance.
A Managed Instance resource.
Generated from protobuf messagegoogle.cloud.compute.v1.ManagedInstance
Namespace
Google \ Cloud \ Compute \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ current_action
string
[Output Only] The current action that the managed instance group has scheduled for the instance. Possible values: - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance. - CREATING The managed instance group is creating this instance. If the group fails to create this instance, it will try again until it is successful. - CREATING_WITHOUT_RETRIES The managed instance group is attempting to create this instance only once. If the group fails to create this instance, it does not try again and the group's targetSize value is decreased instead. - RECREATING The managed instance group is recreating this instance. - DELETING The managed instance group is permanently deleting this instance. - ABANDONING The managed instance group is abandoning this instance. The instance will be removed from the instance group and from any target pools that are associated with this group. - RESTARTING The managed instance group is restarting the instance. - REFRESHING The managed instance group is applying configuration changes to the instance without stopping it. For example, the group can update the target pool list for an instance without stopping that instance. - VERIFYING The managed instance group has created the instance and it is in the process of being verified. Check the CurrentAction enum for the list of possible values.
↳ id
int|string
[Output only] The unique identifier for this resource. This field is empty when instance does not exist.
↳ instance
string
[Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
[Output Only] Health state of the instance per health-check.
↳ instance_status
string
[Output Only] The status of the instance. This field is empty when the instance does not exist. Check the InstanceStatus enum for the list of possible values.
[Output Only] The current action that the managed instance group has scheduled for the instance. Possible values: - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance. - CREATING The managed instance group is creating this instance. If the group fails to create this instance, it will try again until it is successful. - CREATING_WITHOUT_RETRIES The managed instance group is attempting to create this instance only once. If the group fails to create this instance, it does not try again and the group's targetSize value is decreased instead. - RECREATING The managed instance group is recreating this instance. - DELETING The managed instance group is permanently deleting this instance. - ABANDONING The managed instance group is abandoning this instance. The instance will be removed from the instance group and from any target pools that are associated with this group. - RESTARTING The managed instance group is restarting the instance. - REFRESHING The managed instance group is applying configuration changes to the instance without stopping it. For example, the group can update the target pool list for an instance without stopping that instance. - VERIFYING The managed instance group has created the instance and it is in the process of being verified.
Check the CurrentAction enum for the list of possible values.
Returns
Type
Description
string
hasCurrentAction
clearCurrentAction
setCurrentAction
[Output Only] The current action that the managed instance group has scheduled for the instance. Possible values: - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance. - CREATING The managed instance group is creating this instance. If the group fails to create this instance, it will try again until it is successful. - CREATING_WITHOUT_RETRIES The managed instance group is attempting to create this instance only once. If the group fails to create this instance, it does not try again and the group's targetSize value is decreased instead. - RECREATING The managed instance group is recreating this instance. - DELETING The managed instance group is permanently deleting this instance. - ABANDONING The managed instance group is abandoning this instance. The instance will be removed from the instance group and from any target pools that are associated with this group. - RESTARTING The managed instance group is restarting the instance. - REFRESHING The managed instance group is applying configuration changes to the instance without stopping it. For example, the group can update the target pool list for an instance without stopping that instance. - VERIFYING The managed instance group has created the instance and it is in the process of being verified.
Check the CurrentAction enum for the list of possible values.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getId
[Output only] The unique identifier for this resource. This field is empty when instance does not exist.
Returns
Type
Description
int|string
hasId
clearId
setId
[Output only] The unique identifier for this resource. This field is empty when instance does not exist.
Parameter
Name
Description
var
int|string
Returns
Type
Description
$this
getInstance
[Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
Returns
Type
Description
string
hasInstance
clearInstance
setInstance
[Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getInstanceHealth
[Output Only] Health state of the instance per health-check.
[[["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 ManagedInstance (1.35.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.35.0 (latest)](/php/docs/reference/cloud-compute/latest/V1.ManagedInstance)\n- [1.34.0](/php/docs/reference/cloud-compute/1.34.0/V1.ManagedInstance)\n- [1.33.0](/php/docs/reference/cloud-compute/1.33.0/V1.ManagedInstance)\n- [1.32.0](/php/docs/reference/cloud-compute/1.32.0/V1.ManagedInstance)\n- [1.31.0](/php/docs/reference/cloud-compute/1.31.0/V1.ManagedInstance)\n- [1.30.0](/php/docs/reference/cloud-compute/1.30.0/V1.ManagedInstance)\n- [1.29.0](/php/docs/reference/cloud-compute/1.29.0/V1.ManagedInstance)\n- [1.28.0](/php/docs/reference/cloud-compute/1.28.0/V1.ManagedInstance)\n- [1.27.0](/php/docs/reference/cloud-compute/1.27.0/V1.ManagedInstance)\n- [1.26.0](/php/docs/reference/cloud-compute/1.26.0/V1.ManagedInstance)\n- [1.25.0](/php/docs/reference/cloud-compute/1.25.0/V1.ManagedInstance)\n- [1.24.0](/php/docs/reference/cloud-compute/1.24.0/V1.ManagedInstance)\n- [1.23.0](/php/docs/reference/cloud-compute/1.23.0/V1.ManagedInstance)\n- [1.22.1](/php/docs/reference/cloud-compute/1.22.1/V1.ManagedInstance)\n- [1.21.0](/php/docs/reference/cloud-compute/1.21.0/V1.ManagedInstance)\n- [1.20.0](/php/docs/reference/cloud-compute/1.20.0/V1.ManagedInstance)\n- [1.19.0](/php/docs/reference/cloud-compute/1.19.0/V1.ManagedInstance)\n- [1.18.1](/php/docs/reference/cloud-compute/1.18.1/V1.ManagedInstance)\n- [1.17.0](/php/docs/reference/cloud-compute/1.17.0/V1.ManagedInstance)\n- [1.16.2](/php/docs/reference/cloud-compute/1.16.2/V1.ManagedInstance)\n- [1.14.0](/php/docs/reference/cloud-compute/1.14.0/V1.ManagedInstance)\n- [1.13.0](/php/docs/reference/cloud-compute/1.13.0/V1.ManagedInstance)\n- [1.12.1](/php/docs/reference/cloud-compute/1.12.1/V1.ManagedInstance)\n- [1.11.1](/php/docs/reference/cloud-compute/1.11.1/V1.ManagedInstance)\n- [1.10.1](/php/docs/reference/cloud-compute/1.10.1/V1.ManagedInstance)\n- [1.9.1](/php/docs/reference/cloud-compute/1.9.1/V1.ManagedInstance)\n- [1.8.3](/php/docs/reference/cloud-compute/1.8.3/V1.ManagedInstance)\n- [1.7.1](/php/docs/reference/cloud-compute/1.7.1/V1.ManagedInstance)\n- [1.6.1](/php/docs/reference/cloud-compute/1.6.1/V1.ManagedInstance)\n- [1.5.0](/php/docs/reference/cloud-compute/1.5.0/V1.ManagedInstance) \nReference documentation and code samples for the Compute V1 Client class ManagedInstance.\n\nA Managed Instance resource.\n\nGenerated from protobuf message `google.cloud.compute.v1.ManagedInstance`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Compute \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getCurrentAction\n\n\\[Output Only\\] The current action that the managed instance group has scheduled for the instance. Possible values: - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance. - CREATING The managed instance group is creating this instance. If the group fails to create this instance, it will try again until it is successful. - CREATING_WITHOUT_RETRIES The managed instance group is attempting to create this instance only once. If the group fails to create this instance, it does not try again and the group's targetSize value is decreased instead. - RECREATING The managed instance group is recreating this instance. - DELETING The managed instance group is permanently deleting this instance. - ABANDONING The managed instance group is abandoning this instance. The instance will be removed from the instance group and from any target pools that are associated with this group. - RESTARTING The managed instance group is restarting the instance. - REFRESHING The managed instance group is applying configuration changes to the instance without stopping it. For example, the group can update the target pool list for an instance without stopping that instance. - VERIFYING The managed instance group has created the instance and it is in the process of being verified.\n\nCheck the CurrentAction enum for the list of possible values.\n\n### hasCurrentAction\n\n### clearCurrentAction\n\n### setCurrentAction\n\n\\[Output Only\\] The current action that the managed instance group has scheduled for the instance. Possible values: - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance. - CREATING The managed instance group is creating this instance. If the group fails to create this instance, it will try again until it is successful. - CREATING_WITHOUT_RETRIES The managed instance group is attempting to create this instance only once. If the group fails to create this instance, it does not try again and the group's targetSize value is decreased instead. - RECREATING The managed instance group is recreating this instance. - DELETING The managed instance group is permanently deleting this instance. - ABANDONING The managed instance group is abandoning this instance. The instance will be removed from the instance group and from any target pools that are associated with this group. - RESTARTING The managed instance group is restarting the instance. - REFRESHING The managed instance group is applying configuration changes to the instance without stopping it. For example, the group can update the target pool list for an instance without stopping that instance. - VERIFYING The managed instance group has created the instance and it is in the process of being verified.\n\nCheck the CurrentAction enum for the list of possible values.\n\n### getId\n\n\\[Output only\\] The unique identifier for this resource. This field is empty when instance does not exist.\n\n### hasId\n\n### clearId\n\n### setId\n\n\\[Output only\\] The unique identifier for this resource. This field is empty when instance does not exist.\n\n### getInstance\n\n\\[Output Only\\] The URL of the instance. The URL can exist even if the instance has not yet been created.\n\n### hasInstance\n\n### clearInstance\n\n### setInstance\n\n\\[Output Only\\] The URL of the instance. The URL can exist even if the instance has not yet been created.\n\n### getInstanceHealth\n\n\\[Output Only\\] Health state of the instance per health-check.\n\n### setInstanceHealth\n\n\\[Output Only\\] Health state of the instance per health-check.\n\n### getInstanceStatus\n\n\\[Output Only\\] The status of the instance. This field is empty when the instance does not exist.\n\nCheck the InstanceStatus enum for the list of possible values.\n\n### hasInstanceStatus\n\n### clearInstanceStatus\n\n### setInstanceStatus\n\n\\[Output Only\\] The status of the instance. This field is empty when the instance does not exist.\n\nCheck the InstanceStatus enum for the list of possible values.\n\n### getLastAttempt\n\n\\[Output Only\\] Information about the last attempt to create or delete the instance.\n\n### hasLastAttempt\n\n### clearLastAttempt\n\n### setLastAttempt\n\n\\[Output Only\\] Information about the last attempt to create or delete the instance.\n\n### getName\n\n\\[Output Only\\] The name of the instance. The name always exists even if the instance has not yet been created.\n\n### hasName\n\n### clearName\n\n### setName\n\n\\[Output Only\\] The name of the instance. The name always exists even if the instance has not yet been created.\n\n### getPreservedStateFromConfig\n\n\\[Output Only\\] Preserved state applied from per-instance config for this instance.\n\n### hasPreservedStateFromConfig\n\n### clearPreservedStateFromConfig\n\n### setPreservedStateFromConfig\n\n\\[Output Only\\] Preserved state applied from per-instance config for this instance.\n\n### getPreservedStateFromPolicy\n\n\\[Output Only\\] Preserved state generated based on stateful policy for this instance.\n\n### hasPreservedStateFromPolicy\n\n### clearPreservedStateFromPolicy\n\n### setPreservedStateFromPolicy\n\n\\[Output Only\\] Preserved state generated based on stateful policy for this instance.\n\n### getPropertiesFromFlexibilityPolicy\n\n\\[Output Only\\] Instance properties selected for this instance resulting from InstanceFlexibilityPolicy.\n\n### hasPropertiesFromFlexibilityPolicy\n\n### clearPropertiesFromFlexibilityPolicy\n\n### setPropertiesFromFlexibilityPolicy\n\n\\[Output Only\\] Instance properties selected for this instance resulting from InstanceFlexibilityPolicy.\n\n### getVersion\n\n\\[Output Only\\] Intended version of this instance.\n\n### hasVersion\n\n### clearVersion\n\n### setVersion\n\n\\[Output Only\\] Intended version of this instance."]]