Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class ExecuteSqlReadOnlyPayload.
The request payload used to execute SQL statements in read-only mode.
Generated from protobuf message google.cloud.sql.v1.ExecuteSqlReadOnlyPayload
Namespace
Google \ Cloud \ Sql \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ user |
string
Optional. The name of an existing database user to connect to the database. When |
↳ sql_statement |
string
Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons. |
↳ database |
string
Optional. Name of the database on which the statement will be executed. For Postgres and SQL Server it's required, for MySQL it's optional. |
↳ password_secret_version |
string
Optional. The resource name of the Secret Manager secret holding the password for the user to log into the database. The secret should be created using the regional endpoint (for API) or from the Regional Secrets page (for UI), and stored in the same region as the Cloud SQL instance. The expected resource name format is |
↳ auto_iam_authn |
bool
Optional. When set to true, the API caller identity associated with the request is used for database authentication. The API caller must be an IAM user in the database. |
↳ row_limit |
int|string
Optional. The maximum number of rows returned per SQL statement. |
getUser
Optional. The name of an existing database user to connect to the database.
When auto_iam_authn is set to true, this field is ignored and the API
caller's IAM user is used.
| Returns | |
|---|---|
| Type | Description |
string |
|
setUser
Optional. The name of an existing database user to connect to the database.
When auto_iam_authn is set to true, this field is ignored and the API
caller's IAM user is used.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSqlStatement
Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons.
| Returns | |
|---|---|
| Type | Description |
string |
|
setSqlStatement
Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDatabase
Optional. Name of the database on which the statement will be executed.
For Postgres and SQL Server it's required, for MySQL it's optional.
| Returns | |
|---|---|
| Type | Description |
string |
|
setDatabase
Optional. Name of the database on which the statement will be executed.
For Postgres and SQL Server it's required, for MySQL it's optional.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getPasswordSecretVersion
Optional. The resource name of the Secret Manager secret holding the
password for the user to log into the database. The secret should be
created using the regional endpoint (for API) or from the Regional
Secrets page (for UI), and stored in the same region as the Cloud SQL
instance. The expected resource name format is
projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}.
This field is used together with the user field.
The secret resource name will not be stored.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasPasswordSecretVersion
setPasswordSecretVersion
Optional. The resource name of the Secret Manager secret holding the
password for the user to log into the database. The secret should be
created using the regional endpoint (for API) or from the Regional
Secrets page (for UI), and stored in the same region as the Cloud SQL
instance. The expected resource name format is
projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}.
This field is used together with the user field.
The secret resource name will not be stored.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAutoIamAuthn
Optional. When set to true, the API caller identity associated with the request is used for database authentication. The API caller must be an IAM user in the database.
| Returns | |
|---|---|
| Type | Description |
bool |
|
hasAutoIamAuthn
setAutoIamAuthn
Optional. When set to true, the API caller identity associated with the request is used for database authentication. The API caller must be an IAM user in the database.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getRowLimit
Optional. The maximum number of rows returned per SQL statement.
| Returns | |
|---|---|
| Type | Description |
int|string |
|
setRowLimit
Optional. The maximum number of rows returned per SQL statement.
| Parameter | |
|---|---|
| Name | Description |
var |
int|string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getUserPassword
| Returns | |
|---|---|
| Type | Description |
string |
|