Reference documentation and code samples for the Google Cloud Security Command Center V1 Client class Database.
Represents database access information, such as queries.
A database may be a sub-resource of an instance (as in the case of CloudSQL instances or Cloud Spanner instances), or the database instance itself. 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. CloudSQL databases). In these cases only the display name will be provided.
Generated from protobuf message google.cloud.securitycenter.v1.Database
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
The full resource name of the database the user connected to, if it is supported by CAI. (https://google.aip.dev/122#full-resource-names) |
↳ display_name |
string
The human readable name of the database the user connected to. |
↳ user_name |
string
The username used to connect to the DB. This may not necessarily be an IAM principal, and has no required format. |
↳ query |
string
The SQL statement associated with the relevant access. |
↳ grantees |
array
The target usernames/roles/groups of a SQL privilege grant (not an IAM policy change). |
getName
The full resource name of the database the user connected to, if it is supported by CAI. (https://google.aip.dev/122#full-resource-names)
Generated from protobuf field string name = 1;
Returns | |
---|---|
Type | Description |
string |
setName
The full resource name of the database the user connected to, if it is supported by CAI. (https://google.aip.dev/122#full-resource-names)
Generated from protobuf field string name = 1;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDisplayName
The human readable name of the database the user connected to.
Generated from protobuf field string display_name = 2;
Returns | |
---|---|
Type | Description |
string |
setDisplayName
The human readable name of the database the user connected to.
Generated from protobuf field string display_name = 2;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getUserName
The username used to connect to the DB. This may not necessarily be an IAM principal, and has no required format.
Generated from protobuf field string user_name = 3;
Returns | |
---|---|
Type | Description |
string |
setUserName
The username used to connect to the DB. This may not necessarily be an IAM principal, and has no required format.
Generated from protobuf field string user_name = 3;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getQuery
The SQL statement associated with the relevant access.
Generated from protobuf field string query = 4;
Returns | |
---|---|
Type | Description |
string |
setQuery
The SQL statement associated with the relevant access.
Generated from protobuf field string query = 4;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getGrantees
The target usernames/roles/groups of a SQL privilege grant (not an IAM policy change).
Generated from protobuf field repeated string grantees = 5;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setGrantees
The target usernames/roles/groups of a SQL privilege grant (not an IAM policy change).
Generated from protobuf field repeated string grantees = 5;
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |