# Google Cloud Spanner Instance Administration v1 API - Class InstancePartition (5.13.0-beta07)

5.13.0-beta07 5.13.0-beta06 5.12.0 (latest) 5.11.0 5.10.0 5.9.0 5.8.0 5.7.0 5.6.0 5.5.0 5.4.0 5.3.0 5.2.0 5.1.0 5.0.0 4.6.0 4.5.0 4.4.0 4.3.0 4.2.0 4.1.0 4.0.0 3.15.1 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

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

Reference documentation and code samples for the Google Cloud Spanner Instance Administration v1 API class InstancePartition.

An isolated set of Cloud Spanner resources that databases can define
placements on.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[InstancePartition](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[InstancePartition](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[InstancePartition](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition), [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.Spanner.Admin.Instance.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1)

## Assembly

Google.Cloud.Spanner.Admin.Instance.V1.dll

## Constructors

### InstancePartition()

    public InstancePartition()

### InstancePartition(InstancePartition)

    public InstancePartition(InstancePartition other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition` |

## Properties

### AutoscalingConfig

    public AutoscalingConfig AutoscalingConfig { get; set; }

Optional. The autoscaling configuration. Autoscaling is enabled if this
field is set. When autoscaling is enabled, fields in compute_capacity are
treated as OUTPUT_ONLY fields and reflect the current compute capacity
allocated to the instance partition.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.AutoscalingConfig` |   |

### ComputeCapacityCase

    public InstancePartition.ComputeCapacityOneofCase ComputeCapacityCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartitionhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition.ComputeCapacityOneofCase` |   |

### Config

    public string Config { get; set; }

Required. The name of the instance partition's configuration. Values are of
the form `projects/<project>/instanceConfigs/<configuration>`. See also
\[InstanceConfig\]\[google.spanner.admin.instance.v1.InstanceConfig\] and
\[ListInstanceConfigs\]\[google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs\].

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

### ConfigAsInstanceConfigName

    public InstanceConfigName ConfigAsInstanceConfigName { get; set; }

[InstanceConfigName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstanceConfigName)-typed view over the [Config](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition#Google_Cloud_Spanner_Admin_Instance_V1_InstancePartition_Config) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstanceConfigName` |   |

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. The time at which the instance partition was created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### DisplayName

    public string DisplayName { get; set; }

Required. The descriptive name for this instance partition as it appears in
UIs. Must be unique per project and between 4 and 30 characters in length.

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

### Etag

    public string Etag { get; set; }

Used for optimistic concurrency control as a way
to help prevent simultaneous updates of a instance partition from
overwriting each other. It is strongly suggested that systems make use of
the etag in the read-modify-write cycle to perform instance partition
updates in order to avoid race conditions: An etag is returned in the
response which contains instance partitions, and systems are expected to
put that etag in the request to update instance partitions to ensure that
their change will be applied to the same version of the instance partition.
If no etag is provided in the call to update instance partition, then the
existing instance partition is overwritten blindly.

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

### HasNodeCount

    public bool HasNodeCount { get; }

Gets whether the "node_count" field is set

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

### HasProcessingUnits

    public bool HasProcessingUnits { get; }

Gets whether the "processing_units" field is set

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

### InstancePartitionName

    public InstancePartitionName InstancePartitionName { get; set; }

[InstancePartitionName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartitionName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition#Google_Cloud_Spanner_Admin_Instance_V1_InstancePartition_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartitionName` |   |

### Name

    public string Name { get; set; }

Required. A unique identifier for the instance partition. Values are of the
form
`projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.
The final segment of the name must be between 2 and 64 characters in
length. An instance partition's name cannot be changed after the instance
partition is created.

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

### NodeCount

    public int NodeCount { get; set; }

The number of nodes allocated to this instance partition.

Users can set the `node_count` field to specify the target number of
nodes allocated to the instance partition.

This may be zero in API responses for instance partitions that are not
yet in state `READY`.

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

### ProcessingUnits

    public int ProcessingUnits { get; set; }

The number of processing units allocated to this instance partition.

Users can set the `processing_units` field to specify the target number
of processing units allocated to the instance partition.

This might be zero in API responses for instance partitions that are not
yet in the `READY` state.

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

### ReferencingBackups

    [Obsolete]
    public RepeatedField<string> ReferencingBackups { get; }

Output only. Deprecated: This field is not populated.
Output only. The names of the backups that reference this instance
partition. Referencing backups should share the parent instance. The
existence of any referencing backup prevents the instance partition from
being deleted.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### ReferencingDatabases

    public RepeatedField<string> ReferencingDatabases { get; }

Output only. The names of the databases that reference this
instance partition. Referencing databases should share the parent instance.
The existence of any referencing database prevents the instance partition
from being deleted.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### State

    public InstancePartition.Types.State State { get; set; }

Output only. The current instance partition state.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartitionhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition.Types.State` |   |

### UpdateTime

    public Timestamp UpdateTime { get; set; }

Output only. The time at which the instance partition was most recently
updated.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |