public sealed class Database : IMessage<Database>, IEquatable<Database>, IDeepCloneable<Database>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Security Command Center v1 API class Database.
Represents database access information, such as queries. A database may be a
sub-resource of an instance (as in the case of Cloud SQL instances or Cloud
Spanner instances), or the database instance itself. Some database resources
might not have the full resource
name populated because these
resource types, such as Cloud SQL databases, are not yet supported by Cloud
Asset Inventory. In these cases only the display name is provided.
Some database resources may not have the full resource
name populated because
these resource types are not yet supported by Cloud Asset Inventory (e.g.
Cloud SQL databases). In these cases only the display name will be
provided.
The full resource name of
the database that the user connected to, if it is supported by Cloud Asset
Inventory.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version available for the Google Cloud Security Center v1 API class Database is 3.24.0, with numerous previous versions, including those from the 3.x and 2.x series.\u003c/p\u003e\n"],["\u003cp\u003eThe Database class represents database access information, including queries, and may be a sub-resource of an instance like Cloud SQL or Cloud Spanner.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides properties to retrieve details such as the display name, grantees, full resource name, SQL query, username, and version of the database.\u003c/p\u003e\n"],["\u003cp\u003eSome database resources may not have the full resource name populated if they are not yet supported by Cloud Asset Inventory, in which case only the display name is available.\u003c/p\u003e\n"],["\u003cp\u003eThe database class \u003ccode\u003eDatabase\u003c/code\u003e implements multiple interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, indicating its capacity for serialization, comparison, deep cloning, and buffered messaging.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Security Command Center v1 API - Class Database (3.24.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.24.0 (latest)](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/latest/Google.Cloud.SecurityCenter.V1.Database)\n- [3.23.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.23.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.22.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.22.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.21.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.21.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.20.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.20.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.19.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.19.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.18.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.18.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.17.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.17.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.16.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.16.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.15.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.15.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.14.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.13.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.12.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.11.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.10.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.9.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.8.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.7.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.6.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.5.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.4.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.3.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.2.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.1.0/Google.Cloud.SecurityCenter.V1.Database)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/3.0.0/Google.Cloud.SecurityCenter.V1.Database)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/2.13.0/Google.Cloud.SecurityCenter.V1.Database)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/2.12.0/Google.Cloud.SecurityCenter.V1.Database)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/2.11.0/Google.Cloud.SecurityCenter.V1.Database)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/2.10.0/Google.Cloud.SecurityCenter.V1.Database)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/2.9.0/Google.Cloud.SecurityCenter.V1.Database)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/2.8.0/Google.Cloud.SecurityCenter.V1.Database)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/2.7.0/Google.Cloud.SecurityCenter.V1.Database)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/2.6.0/Google.Cloud.SecurityCenter.V1.Database)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/2.5.0/Google.Cloud.SecurityCenter.V1.Database)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/2.4.0/Google.Cloud.SecurityCenter.V1.Database)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/2.3.0/Google.Cloud.SecurityCenter.V1.Database)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/2.2.0/Google.Cloud.SecurityCenter.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 Security Command Center v1 API class Database.\n\nRepresents database access information, such as queries. A database may be a\nsub-resource of an instance (as in the case of Cloud SQL instances or Cloud\nSpanner instances), or the database instance itself. Some database resources\nmight not have the [full resource\nname](https://google.aip.dev/122#full-resource-names) populated because these\nresource types, such as Cloud SQL databases, are not yet supported by Cloud\nAsset Inventory. In these cases only the display name is provided. \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.SecurityCenter.V1/latest/Google.Cloud.SecurityCenter.V1.Database), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Database](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/latest/Google.Cloud.SecurityCenter.V1.Database), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Database](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/latest/Google.Cloud.SecurityCenter.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.SecurityCenter.V1](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V1/latest/Google.Cloud.SecurityCenter.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.SecurityCenter.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### DisplayName\n\n public string DisplayName { get; set; }\n\nThe human-readable name of the database that the user connected to.\n\n### Grantees\n\n public RepeatedField\u003cstring\u003e Grantees { get; }\n\nThe target usernames, roles, or groups of an SQL privilege grant, which is\nnot an IAM policy change.\n\n### Name\n\n public string Name { get; set; }\n\nSome database resources may not have the [full resource\nname](https://google.aip.dev/122#full-resource-names) populated because\nthese resource types are not yet supported by Cloud Asset Inventory (e.g.\nCloud SQL databases). In these cases only the display name will be\nprovided.\nThe [full resource name](https://google.aip.dev/122#full-resource-names) of\nthe database that the user connected to, if it is supported by Cloud Asset\nInventory.\n\n### Query\n\n public string Query { get; set; }\n\nThe SQL statement that is associated with the database access.\n\n### UserName\n\n public string UserName { get; set; }\n\nThe username used to connect to the database. The username might not be an\nIAM principal and does not have a set format.\n\n### Version\n\n public string Version { get; set; }\n\nThe version of the database, for example, POSTGRES_14.\nSee [the complete\nlist](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion)."]]