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

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

Represents a SQL database on the Cloud SQL instance.

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

Namespace

Google \ Cloud \ Sql \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ kindstring

This is alwayssql#database.

↳ charsetstring

The Cloud SQL charset value.

↳ collationstring

The Cloud SQL collation value.

↳ etagstring

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

↳ namestring

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

↳ instancestring

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

↳ self_linkstring

The URI of this resource.

↳ projectstring

The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.

↳ sqlserver_database_detailsSqlServerDatabaseDetails

getKind

This is alwayssql#database.

Returns
TypeDescription
string

setKind

This is alwayssql#database.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getCharset

The Cloud SQL charset value.

Returns
TypeDescription
string

setCharset

The Cloud SQL charset value.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getCollation

The Cloud SQL collation value.

Returns
TypeDescription
string

setCollation

The Cloud SQL collation value.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getEtag

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

Returns
TypeDescription
string

setEtag

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

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getName

The name of the database in the Cloud SQL instance. This does not includethe project ID or instance name.

Returns
TypeDescription
string

setName

The name of the database in the Cloud SQL instance. This does not includethe project ID or instance name.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getInstance

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

Returns
TypeDescription
string

setInstance

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

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getSelfLink

The URI of this resource.

Returns
TypeDescription
string

setSelfLink

The URI of this resource.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getProject

The project ID of the project containing the Cloud SQL database. The Googleapps domain is prefixed if applicable.

Returns
TypeDescription
string

setProject

The project ID of the project containing the Cloud SQL database. The Googleapps domain is prefixed if applicable.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getSqlserverDatabaseDetails

Generated from protobuf field.google.cloud.sql.v1.SqlServerDatabaseDetails sqlserver_database_details = 9;

Returns
TypeDescription
SqlServerDatabaseDetails|null

hasSqlserverDatabaseDetails

setSqlserverDatabaseDetails

Generated from protobuf field.google.cloud.sql.v1.SqlServerDatabaseDetails sqlserver_database_details = 9;

Parameter
NameDescription
varSqlServerDatabaseDetails
Returns
TypeDescription
$this

getDatabaseDetails

Returns
TypeDescription
string

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.