Google Cloud Sql Admin V1 Client - Class SqlUsersUpdateRequest (1.6.0)

Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class SqlUsersUpdateRequest.

Generated from protobuf messagegoogle.cloud.sql.v1.SqlUsersUpdateRequest

Namespace

Google \ Cloud \ Sql \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ hoststring

Optional. Host of the user in the instance.

↳ instancestring

Database instance ID. This does not include the project ID.

↳ namestring

Name of the user in the instance.

↳ projectstring

Project ID of the project that contains the instance.

↳ database_rolesarray

Optional. List of database roles to grant to the user. body.database_roles will be ignored for update request.

↳ bodyUser

getHost

Optional. Host of the user in the instance.

Returns
TypeDescription
string

setHost

Optional. Host of the user in the instance.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getInstance

Database instance ID. This does not include the project ID.

Returns
TypeDescription
string

setInstance

Database instance ID. This does not include the project ID.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getName

Name of the user in the instance.

Returns
TypeDescription
string

setName

Name of the user in the instance.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getProject

Project ID of the project that contains the instance.

Returns
TypeDescription
string

setProject

Project ID of the project that contains the instance.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getDatabaseRoles

Optional. List of database roles to grant to the user. body.database_roleswill be ignored for update request.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setDatabaseRoles

Optional. List of database roles to grant to the user. body.database_roleswill be ignored for update request.

Parameter
NameDescription
varstring[]
Returns
TypeDescription
$this

getBody

Generated from protobuf field.google.cloud.sql.v1.User body = 100;

Returns
TypeDescription
User|null

hasBody

clearBody

setBody

Generated from protobuf field.google.cloud.sql.v1.User body = 100;

Parameter
NameDescription
varUser
Returns
TypeDescription
$this

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-09 UTC.