Google.Cloud.Spanner.Common.V1.DatabaseName-typed view over the Name resource name property.
Property Value
Type
Description
Google.Cloud.Spanner.Common.V1.DatabaseName
DefaultLeader
public string DefaultLeader { get; set; }
Output only. The read-write region which contains the database's leader
replicas.
This is the same as the value of default_leader
database option set using DatabaseAdmin.CreateDatabase or
DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
public Timestamp EarliestVersionTime { get; set; }
Output only. Earliest timestamp at which older versions of the data can be
read. This value is continuously updated by Cloud Spanner and becomes stale
the moment it is queried. If you are using this value to recover data, make
sure to account for the time from the moment when the value is queried to
the moment when you initiate the recovery.
Whether drop protection is enabled for this database. Defaults to false,
if not set. For more details, please see how to prevent accidental
database
deletion.
public EncryptionConfig EncryptionConfig { get; set; }
Output only. For databases that are using customer managed encryption, this
field contains the encryption configuration for the database.
For databases that are using Google default or other types of encryption,
this field is empty.
public RepeatedField<EncryptionInfo> EncryptionInfo { get; }
Output only. For databases that are using customer managed encryption, this
field contains the encryption information for the database, such as
all Cloud KMS key versions that are in use. The encryption_status' field
inside of eachEncryptionInfo` is not populated.
For databases that are using Google default or other types of encryption,
this field is empty.
This field is propagated lazily from the backend. There might be a delay
from when a key version is being used and when it appears in this field.
Required. The name of the database. Values are of the form
projects/<project>/instances/<instance>/databases/<database>,
where <database> is as specified in the CREATE DATABASE
statement. This name can be passed to other API methods to
identify the database.
public string VersionRetentionPeriod { get; set; }
Output only. The period in which Cloud Spanner retains all versions of data
for the database. This is the same as the value of version_retention_period
database option set using
[UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
Defaults to 1 hour, if not set.
[[["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."],[[["\u003cp\u003eThe latest version available for the Google Cloud Spanner Database Administration v1 API is 5.0.0-beta05, and various other versions, including beta and stable releases, are also documented.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDatabase\u003c/code\u003e class represents a Cloud Spanner database and is used within the Google Cloud Spanner Database Administration v1 API, with implementations of \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\u003eKey properties of a \u003ccode\u003eDatabase\u003c/code\u003e include \u003ccode\u003eCreateTime\u003c/code\u003e, \u003ccode\u003eDatabaseDialect\u003c/code\u003e, \u003ccode\u003eDatabaseName\u003c/code\u003e, \u003ccode\u003eDefaultLeader\u003c/code\u003e, \u003ccode\u003eEarliestVersionTime\u003c/code\u003e, \u003ccode\u003eEnableDropProtection\u003c/code\u003e, \u003ccode\u003eEncryptionConfig\u003c/code\u003e, \u003ccode\u003eEncryptionInfo\u003c/code\u003e, \u003ccode\u003eName\u003c/code\u003e, \u003ccode\u003eReconciling\u003c/code\u003e, \u003ccode\u003eRestoreInfo\u003c/code\u003e, \u003ccode\u003eState\u003c/code\u003e, and \u003ccode\u003eVersionRetentionPeriod\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe database can be constructed using a default constructor or by providing another \u003ccode\u003eDatabase\u003c/code\u003e instance as a parameter, allowing for cloning and modification of configurations.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation provides details about the data types and descriptions of each property, providing detailed information of a Database object's attributes and functionalities.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Spanner Database Administration v1 API - Class Database (5.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [5.1.0 (latest)](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [5.0.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/5.0.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/4.6.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/4.5.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/4.4.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/4.3.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/4.2.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/4.1.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/4.0.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [3.15.1](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/3.15.1/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/3.14.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/3.13.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/3.12.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/3.11.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/3.10.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/3.9.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/3.8.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/3.7.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/3.6.0/Google.Cloud.Spanner.Admin.Database.V1.Database)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/3.5.0/Google.Cloud.Spanner.Admin.Database.V1.Database) \n\n public sealed class Database : IMessage\u003cDatabase\u003e, IEquatable\u003cDatabase\u003e, IDeepCloneable\u003cDatabase\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Spanner Database Administration v1 API class Database.\n\nA Cloud Spanner database. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Database \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Database](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.Database), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Database](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.Database), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Database](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.Database), [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.Database.V1](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Spanner.Admin.Database.V1.dll\n\nConstructors\n------------\n\n### Database()\n\n public Database()\n\n### Database(Database)\n\n public Database(Database other)\n\nProperties\n----------\n\n### CreateTime\n\n public Timestamp CreateTime { get; set; }\n\nOutput only. If exists, the time at which the database creation started.\n\n### DatabaseDialect\n\n public DatabaseDialect DatabaseDialect { get; set; }\n\nOutput only. The dialect of the Cloud Spanner Database.\n\n### DatabaseName\n\n public DatabaseName DatabaseName { get; set; }\n\nGoogle.Cloud.Spanner.Common.V1.DatabaseName-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.Spanner.Admin.Database.V1/latest/Google.Cloud.Spanner.Admin.Database.V1.Database#Google_Cloud_Spanner_Admin_Database_V1_Database_Name) resource name property.\n\n### DefaultLeader\n\n public string DefaultLeader { get; set; }\n\nOutput only. The read-write region which contains the database's leader\nreplicas.\n\nThis is the same as the value of default_leader\ndatabase option set using DatabaseAdmin.CreateDatabase or\nDatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.\n\n### EarliestVersionTime\n\n public Timestamp EarliestVersionTime { get; set; }\n\nOutput only. Earliest timestamp at which older versions of the data can be\nread. This value is continuously updated by Cloud Spanner and becomes stale\nthe moment it is queried. If you are using this value to recover data, make\nsure to account for the time from the moment when the value is queried to\nthe moment when you initiate the recovery.\n\n### EnableDropProtection\n\n public bool EnableDropProtection { get; set; }\n\nWhether drop protection is enabled for this database. Defaults to false,\nif not set. For more details, please see how to [prevent accidental\ndatabase\ndeletion](https://cloud.google.com/spanner/docs/prevent-database-deletion).\n\n### EncryptionConfig\n\n public EncryptionConfig EncryptionConfig { get; set; }\n\nOutput only. For databases that are using customer managed encryption, this\nfield contains the encryption configuration for the database.\nFor databases that are using Google default or other types of encryption,\nthis field is empty.\n\n### EncryptionInfo\n\n public RepeatedField\u003cEncryptionInfo\u003e EncryptionInfo { get; }\n\nOutput only. For databases that are using customer managed encryption, this\nfield contains the encryption information for the database, such as\nall Cloud KMS key versions that are in use. The `encryption_status' field\ninside of each`EncryptionInfo\\` is not populated.\n\nFor databases that are using Google default or other types of encryption,\nthis field is empty.\n\nThis field is propagated lazily from the backend. There might be a delay\nfrom when a key version is being used and when it appears in this field.\n\n### Name\n\n public string Name { get; set; }\n\nRequired. The name of the database. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e`,\nwhere `\u003cdatabase\u003e` is as specified in the `CREATE DATABASE`\nstatement. This name can be passed to other API methods to\nidentify the database.\n\n### Reconciling\n\n public bool Reconciling { get; set; }\n\nOutput only. If true, the database is being updated. If false, there are no\nongoing update operations for the database.\n\n### RestoreInfo\n\n public RestoreInfo RestoreInfo { get; set; }\n\nOutput only. Applicable only for restored databases. Contains information\nabout the restore source.\n\n### State\n\n public Database.Types.State State { get; set; }\n\nOutput only. The current database state.\n\n### VersionRetentionPeriod\n\n public string VersionRetentionPeriod { get; set; }\n\nOutput only. The period in which Cloud Spanner retains all versions of data\nfor the database. This is the same as the value of version_retention_period\ndatabase option set using\n\\[UpdateDatabaseDdl\\]\\[google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl\\].\nDefaults to 1 hour, if not set."]]