Google Cloud Sql Admin V1beta4 Client - Class User (0.5.0)

Reference documentation and code samples for the Google Cloud Sql Admin V1beta4 Client class User.

A Cloud SQL user resource.

Generated from protobuf message google.cloud.sql.v1beta4.User

Namespace

Google \ Cloud \ Sql \ V1beta4

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ kind string

This is always sql#user.

↳ password string

The password for the user.

↳ etag string

This field is deprecated and will be removed from a future version of the API.

↳ name string

The name of the user in the Cloud SQL instance. Can be omitted for update because it is already specified in the URL.

↳ host string

Optional. The host from which the user can connect. For insert operations, host defaults to an empty string. For update operations, host is specified as part of the request URL. The host name cannot be updated after insertion. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional.

↳ instance string

The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for update because it is already specified on the URL.

↳ project string

The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for update because it is already specified on the URL.

↳ type int

The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type.

↳ sqlserver_user_details Google\Cloud\Sql\V1beta4\SqlServerUserDetails
↳ password_policy Google\Cloud\Sql\V1beta4\UserPasswordValidationPolicy

User level password validation policy.

↳ dual_password_type int

Dual password status for the user.

getKind

This is always sql#user.

Returns
TypeDescription
string

setKind

This is always sql#user.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getPassword

The password for the user.

Returns
TypeDescription
string

setPassword

The password for the user.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getEtag

This field is deprecated and will be removed from a future version of the API.

Returns
TypeDescription
string

setEtag

This field is deprecated and will be removed from a future version of the API.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getName

The name of the user in the Cloud SQL instance. Can be omitted for update because it is already specified in the URL.

Returns
TypeDescription
string

setName

The name of the user in the Cloud SQL instance. Can be omitted for update because it is already specified in the URL.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getHost

Optional. The host from which the user can connect. For insert operations, host defaults to an empty string. For update operations, host is specified as part of the request URL. The host name cannot be updated after insertion. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional.

Returns
TypeDescription
string

setHost

Optional. The host from which the user can connect. For insert operations, host defaults to an empty string. For update operations, host is specified as part of the request URL. The host name cannot be updated after insertion. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getInstance

The name of the Cloud SQL instance. This does not include the project ID.

Can be omitted for update because it is already specified on the URL.

Returns
TypeDescription
string

setInstance

The name of the Cloud SQL instance. This does not include the project ID.

Can be omitted for update because it is already specified on the URL.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getProject

The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for update because it is already specified on the URL.

Returns
TypeDescription
string

setProject

The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for update because it is already specified on the URL.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getType

The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type.

Returns
TypeDescription
int

setType

The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getSqlserverUserDetails

Generated from protobuf field .google.cloud.sql.v1beta4.SqlServerUserDetails sqlserver_user_details = 9;

Returns
TypeDescription
Google\Cloud\Sql\V1beta4\SqlServerUserDetails|null

hasSqlserverUserDetails

setSqlserverUserDetails

Generated from protobuf field .google.cloud.sql.v1beta4.SqlServerUserDetails sqlserver_user_details = 9;

Parameter
NameDescription
var Google\Cloud\Sql\V1beta4\SqlServerUserDetails
Returns
TypeDescription
$this

getPasswordPolicy

User level password validation policy.

Returns
TypeDescription
Google\Cloud\Sql\V1beta4\UserPasswordValidationPolicy|null

hasPasswordPolicy

clearPasswordPolicy

setPasswordPolicy

User level password validation policy.

Parameter
NameDescription
var Google\Cloud\Sql\V1beta4\UserPasswordValidationPolicy
Returns
TypeDescription
$this

getDualPasswordType

Dual password status for the user.

Returns
TypeDescription
int

hasDualPasswordType

clearDualPasswordType

setDualPasswordType

Dual password status for the user.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getUserDetails

Returns
TypeDescription
string