# Compute Engine v1 API - Class ManagedInstance (3.28.0)

3.28.0 (latest) 3.27.0 3.26.0 3.25.0 3.24.0 3.23.0 3.22.0 3.21.0 3.20.0 3.19.0 3.18.0 3.17.0 3.16.0 3.15.0 3.14.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 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.0 2.0.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public sealed class ManagedInstance : IMessage<ManagedInstance>, IEquatable<ManagedInstance>, IDeepCloneable<ManagedInstance>, IBufferMessage, IMessage

Reference documentation and code samples for the Compute Engine v1 API class ManagedInstance.

A Managed Instance resource.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ManagedInstance

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ManagedInstance](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ManagedInstance), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ManagedInstance](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ManagedInstance), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ManagedInstance](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ManagedInstance), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Compute.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1)

## Assembly

Google.Cloud.Compute.V1.dll

## Constructors

### ManagedInstance()

    public ManagedInstance()

### ManagedInstance(ManagedInstance)

    public ManagedInstance(ManagedInstance other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ManagedInstance` |

## Properties

### CurrentAction

    public string CurrentAction { get; set; }

Output only. \[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'stargetSize 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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### HasCurrentAction

    public bool HasCurrentAction { get; }

Gets whether the "current_action" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasId

    public bool HasId { get; }

Gets whether the "id" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasInstance

    public bool HasInstance { get; }

Gets whether the "instance" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasInstanceStatus

    public bool HasInstanceStatus { get; }

Gets whether the "instance_status" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasName

    public bool HasName { get; }

Gets whether the "name" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Id

    public ulong Id { get; set; }

Output only. \[Output only\] The unique identifier for this resource. This field is empty
when instance does not exist.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.uint64` |   |

### Instance

    public string Instance { get; set; }

Output only. \[Output Only\] The URL of the instance. The URL can exist even if the
instance has not yet been created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### InstanceHealth

    public RepeatedField<ManagedInstanceInstanceHealth> InstanceHealth { get; }

Output only. \[Output Only\] Health state of the instance per health-check.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ManagedInstanceInstanceHealth` |   |

### InstanceStatus

    public string InstanceStatus { get; set; }

Output only. \[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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### LastAttempt

    public ManagedInstanceLastAttempt LastAttempt { get; set; }

Output only. \[Output Only\] Information about the last attempt to create or delete
the instance.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ManagedInstanceLastAttempt` |   |

### Name

    public string Name { get; set; }

Output only. \[Output Only\] The name of the instance. The name always exists even if the
instance has not yet been created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### PreservedStateFromConfig

    public PreservedState PreservedStateFromConfig { get; set; }

Output only. \[Output Only\] Preserved state applied from per-instance config
for this instance.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.PreservedState` |   |

### PreservedStateFromPolicy

    public PreservedState PreservedStateFromPolicy { get; set; }

Output only. \[Output Only\] Preserved state generated based on stateful policy
for this instance.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.PreservedState` |   |

### PropertiesFromFlexibilityPolicy

    public ManagedInstancePropertiesFromFlexibilityPolicy PropertiesFromFlexibilityPolicy { get; set; }

Output only. \[Output Only\] Instance properties selected for this instance resulting from
InstanceFlexibilityPolicy.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ManagedInstancePropertiesFromFlexibilityPolicy` |   |

### Version

    public ManagedInstanceVersion Version { get; set; }

Output only. \[Output Only\] Intended version of this instance.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ManagedInstanceVersion` |   |