Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class ExecuteSqlPayload.
The request payload used to execute SQL statements.
Generated from protobuf message google.cloud.sql.v1.ExecuteSqlPayload
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. |
↳ 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 |
↳ row_limit |
int|string
Optional. The maximum number of rows returned per SQL statement. |
↳ partial_result_mode |
int
Optional. Controls how the API should respond when the SQL execution result is incomplete due to the size limit or another error. The default mode is to throw an error. |
↳ application |
string
Optional. Specifies the name of the application that is making the request. This field is used for telemetry. Only alphanumeric characters, dashes, and underscores are allowed. The maximum length is 32 characters. |
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.
| Returns | |
|---|---|
| Type | Description |
string |
|
setDatabase
Optional. Name of the database on which the statement will be executed.
| 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}.
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}.
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 |
|
getPartialResultMode
Optional. Controls how the API should respond when the SQL execution result is incomplete due to the size limit or another error. The default mode is to throw an error.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type PartialResultMode. |
setPartialResultMode
Optional. Controls how the API should respond when the SQL execution result is incomplete due to the size limit or another error. The default mode is to throw an error.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type PartialResultMode. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getApplication
Optional. Specifies the name of the application that is making the request.
This field is used for telemetry. Only alphanumeric characters, dashes, and underscores are allowed. The maximum length is 32 characters.
| Returns | |
|---|---|
| Type | Description |
string |
|
setApplication
Optional. Specifies the name of the application that is making the request.
This field is used for telemetry. Only alphanumeric characters, dashes, and underscores are allowed. The maximum length is 32 characters.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getUserPassword
| Returns | |
|---|---|
| Type | Description |
string |
|