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.
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].
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.
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.
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.
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.
[[["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-08-28 UTC."],[[["\u003cp\u003eThe latest version available for the \u003ccode\u003eInstancePartition\u003c/code\u003e class is \u003ccode\u003e5.0.0-beta05\u003c/code\u003e, with multiple previous versions ranging from \u003ccode\u003e3.5.0\u003c/code\u003e to \u003ccode\u003e5.0.0-beta04\u003c/code\u003e also documented.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eInstancePartition\u003c/code\u003e is an isolated set of Cloud Spanner resources where databases can define placements, inheriting from \u003ccode\u003eobject\u003c/code\u003e and implementing interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis class includes properties for managing configurations, names, display names, etags, node counts, processing units, referencing backups, referencing databases, and state, providing comprehensive control over instance partition settings.\u003c/p\u003e\n"],["\u003cp\u003eThe class \u003ccode\u003eInstancePartition\u003c/code\u003e has constructors such as \u003ccode\u003eInstancePartition()\u003c/code\u003e and \u003ccode\u003eInstancePartition(InstancePartition other)\u003c/code\u003e to create new instances, and also offers properties such as \u003ccode\u003eConfig\u003c/code\u003e, \u003ccode\u003eDisplayName\u003c/code\u003e, and \u003ccode\u003eNodeCount\u003c/code\u003e to access or configure the details of the instance.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eInstancePartition\u003c/code\u003e class provides an \u003ccode\u003eEtag\u003c/code\u003e property for optimistic concurrency control, allowing systems to avoid race conditions when updating instance partitions by using the provided etag in read-modify-write cycles.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Spanner Instance Administration v1 API - Class InstancePartition (5.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [5.1.0 (latest)](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [5.0.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/5.0.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/4.6.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/4.5.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/4.4.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/4.3.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/4.2.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/4.1.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/4.0.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [3.15.1](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/3.15.1/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/3.14.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/3.13.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/3.12.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/3.11.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/3.10.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/3.9.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/3.8.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/3.7.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/3.6.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/3.5.0/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartition) \n\n public sealed class InstancePartition : IMessage\u003cInstancePartition\u003e, IEquatable\u003cInstancePartition\u003e, IDeepCloneable\u003cInstancePartition\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Spanner Instance Administration v1 API class InstancePartition.\n\nAn isolated set of Cloud Spanner resources that databases can define\nplacements on. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e InstancePartition \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[InstancePartition](/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](/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](/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) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Spanner.Admin.Instance.V1](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Spanner.Admin.Instance.V1.dll\n\nConstructors\n------------\n\n### InstancePartition()\n\n public InstancePartition()\n\n### InstancePartition(InstancePartition)\n\n public InstancePartition(InstancePartition other)\n\nProperties\n----------\n\n### ComputeCapacityCase\n\n public InstancePartition.ComputeCapacityOneofCase ComputeCapacityCase { get; }\n\n### Config\n\n public string Config { get; set; }\n\nRequired. The name of the instance partition's configuration. Values are of\nthe form `projects/\u003cproject\u003e/instanceConfigs/\u003cconfiguration\u003e`. See also\n\\[InstanceConfig\\]\\[google.spanner.admin.instance.v1.InstanceConfig\\] and\n\\[ListInstanceConfigs\\]\\[google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs\\].\n\n### ConfigAsInstanceConfigName\n\n public InstanceConfigName ConfigAsInstanceConfigName { get; set; }\n\n[InstanceConfigName](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstanceConfigName)-typed view over the [Config](/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.\n\n### CreateTime\n\n public Timestamp CreateTime { get; set; }\n\nOutput only. The time at which the instance partition was created.\n\n### DisplayName\n\n public string DisplayName { get; set; }\n\nRequired. The descriptive name for this instance partition as it appears in\nUIs. Must be unique per project and between 4 and 30 characters in length.\n\n### Etag\n\n public string Etag { get; set; }\n\nUsed for optimistic concurrency control as a way\nto help prevent simultaneous updates of a instance partition from\noverwriting each other. It is strongly suggested that systems make use of\nthe etag in the read-modify-write cycle to perform instance partition\nupdates in order to avoid race conditions: An etag is returned in the\nresponse which contains instance partitions, and systems are expected to\nput that etag in the request to update instance partitions to ensure that\ntheir change will be applied to the same version of the instance partition.\nIf no etag is provided in the call to update instance partition, then the\nexisting instance partition is overwritten blindly.\n\n### HasNodeCount\n\n public bool HasNodeCount { get; }\n\nGets whether the \"node_count\" field is set\n\n### HasProcessingUnits\n\n public bool HasProcessingUnits { get; }\n\nGets whether the \"processing_units\" field is set\n\n### InstancePartitionName\n\n public InstancePartitionName InstancePartitionName { get; set; }\n\n[InstancePartitionName](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Instance.V1/latest/Google.Cloud.Spanner.Admin.Instance.V1.InstancePartitionName)-typed view over the [Name](/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.\n\n### Name\n\n public string Name { get; set; }\n\nRequired. A unique identifier for the instance partition. Values are of the\nform\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.\nThe final segment of the name must be between 2 and 64 characters in\nlength. An instance partition's name cannot be changed after the instance\npartition is created.\n\n### NodeCount\n\n public int NodeCount { get; set; }\n\nThe number of nodes allocated to this instance partition.\n\nUsers can set the `node_count` field to specify the target number of\nnodes allocated to the instance partition.\n\nThis may be zero in API responses for instance partitions that are not\nyet in state `READY`.\n\n### ProcessingUnits\n\n public int ProcessingUnits { get; set; }\n\nThe number of processing units allocated to this instance partition.\n\nUsers can set the `processing_units` field to specify the target number\nof processing units allocated to the instance partition.\n\nThis might be zero in API responses for instance partitions that are not\nyet in the `READY` state.\n\n### ReferencingBackups\n\n [Obsolete]\n public RepeatedField\u003cstring\u003e ReferencingBackups { get; }\n\nOutput only. Deprecated: This field is not populated.\nOutput only. The names of the backups that reference this instance\npartition. Referencing backups should share the parent instance. The\nexistence of any referencing backup prevents the instance partition from\nbeing deleted.\n\n### ReferencingDatabases\n\n public RepeatedField\u003cstring\u003e ReferencingDatabases { get; }\n\nOutput only. The names of the databases that reference this\ninstance partition. Referencing databases should share the parent instance.\nThe existence of any referencing database prevents the instance partition\nfrom being deleted.\n\n### State\n\n public InstancePartition.Types.State State { get; set; }\n\nOutput only. The current instance partition state.\n\n### UpdateTime\n\n public Timestamp UpdateTime { get; set; }\n\nOutput only. The time at which the instance partition was most recently\nupdated."]]