# Class Database (1.45.0)

1.45.0 (latest) 1.44.0 1.43.0 1.42.0 1.41.0 1.40.0 1.39.0 1.38.0 1.37.0 1.36.0 1.35.1 1.33.1 1.32.1 1.31.0 1.30.1 1.29.0 1.28.0 1.27.0 1.26.1 1.25.0 1.24.1 1.23.2 1.22.0 1.21.0 1.20.0 1.19.1 1.18.2 1.17.0 1.16.2 1.15.0 1.14.0 1.13.0 1.12.0 1.11.1 1.10.0 1.9.0 1.8.0 1.7.0 1.6.0 1.5.2 1.4.0 1.3.1 1.2.0 1.1.0 1.0.0 0.7.3 0.6.0 0.5.0 0.4.0 0.3.0

    Database(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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 <https://google.aip.dev/122#full-resource-names>`__ 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.

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `name` | `str` Some database resources may not have the \`full resource name |
| `display_name` | `str` The human-readable name of the database that the user connected to. |
| `user_name` | `str` The username used to connect to the database. The username might not be an IAM principal and does not have a set format. |
| `query` | `str` The SQL statement that is associated with the database access. |
| `grantees` | `MutableSequence[str]` The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change. |
| `version` | `str` The version of the database, for example, POSTGRES_14. See \`the complete list |