PATCH
/
v1
/
instances
/
{instance}
/
databases
/
{database}
{
  "name": "<string>",
  "state": "STATE_UNSPECIFIED",
  "successfulSyncTime": "2023-11-07T05:31:56Z",
  "project": "<string>",
  "schemaVersion": "<string>",
  "environment": "<string>",
  "effectiveEnvironment": "<string>",
  "labels": {},
  "instanceResource": {
    "title": "<string>",
    "engine": "ENGINE_UNSPECIFIED",
    "engineVersion": "<string>",
    "dataSources": [
      {
        "id": "<string>",
        "type": "DATA_SOURCE_UNSPECIFIED",
        "username": "<string>",
        "password": "<string>",
        "obfuscatedPassword": "<string>",
        "useSsl": true,
        "sslCa": "<string>",
        "obfuscatedSslCa": "<string>",
        "sslCert": "<string>",
        "obfuscatedSslCert": "<string>",
        "sslKey": "<string>",
        "obfuscatedSslKey": "<string>",
        "verifyTlsCertificate": true,
        "host": "<string>",
        "port": "<string>",
        "database": "<string>",
        "srv": true,
        "authenticationDatabase": "<string>",
        "replicaSet": "<string>",
        "sid": "<string>",
        "serviceName": "<string>",
        "sshHost": "<string>",
        "sshPort": "<string>",
        "sshUser": "<string>",
        "sshPassword": "<string>",
        "obfuscatedSshPassword": "<string>",
        "sshPrivateKey": "<string>",
        "obfuscatedSshPrivateKey": "<string>",
        "authenticationPrivateKey": "<string>",
        "obfuscatedAuthenticationPrivateKey": "<string>",
        "externalSecret": {
          "secretType": "SAECRET_TYPE_UNSPECIFIED",
          "url": "<string>",
          "authType": "AUTH_TYPE_UNSPECIFIED",
          "appRole": {
            "type": "SECRET_TYPE_UNSPECIFIED",
            "mountPath": "<string>"
          },
          "token": "<string>",
          "engineName": "<string>",
          "secretName": "<string>",
          "passwordKeyName": "<string>"
        },
        "authenticationType": "AUTHENTICATION_UNSPECIFIED",
        "azureCredential": {
          "tenantId": "<string>",
          "clientId": "<string>"
        },
        "awsCredential": {},
        "gcpCredential": {},
        "saslConfig": {
          "krbConfig": {
            "primary": "<string>",
            "instance": "<string>",
            "realm": "<string>",
            "keytab": "<string>",
            "kdcHost": "<string>",
            "kdcPort": "<string>",
            "kdcTransportProtocol": "<string>"
          }
        },
        "additionalAddresses": [
          {
            "host": "<string>",
            "port": "<string>"
          }
        ],
        "directConnection": true,
        "region": "<string>",
        "warehouseId": "<string>",
        "masterName": "<string>",
        "masterUsername": "<string>",
        "masterPassword": "<string>",
        "obfuscatedMasterPassword": "<string>",
        "redisType": "REDIS_TYPE_UNSPECIFIED",
        "cluster": "<string>",
        "extraConnectionParameters": {}
      }
    ],
    "activation": true,
    "name": "<string>",
    "environment": "<string>"
  },
  "backupAvailable": true,
  "drifted": true
}

Path Parameters

instance
string
required

The instance id.

database
string
required

The database id.

Query Parameters

updateMask
string<field-mask>

The list of fields to update.

allowMissing
boolean

If set to true, and the database is not found, a new database will be created. In this situation, update_mask is ignored.

Body

application/json
name
string

The name of the database. Format: instances/{instance}/databases/{database} {database} is the database name in the instance.

project
string

The project for a database. Format: projects/{project}

environment
string

The environment resource. Format: environments/prod where prod is the environment resource ID.

labels
object

Labels will be used for deployment and policy control.

Response

OK

name
string

The name of the database. Format: instances/{instance}/databases/{database} {database} is the database name in the instance.

state
enum<string>

The existence of a database.

Available options:
STATE_UNSPECIFIED,
ACTIVE,
DELETED
successfulSyncTime
string<date-time>

The latest synchronization time.

project
string

The project for a database. Format: projects/{project}

schemaVersion
string

The version of database schema.

environment
string

The environment resource. Format: environments/prod where prod is the environment resource ID.

effectiveEnvironment
string

The effective environment based on environment tag above and environment tag on the instance. Inheritance follows https://cloud.google.com/resource-manager/docs/tags/tags-overview.

labels
object

Labels will be used for deployment and policy control.

instanceResource
object

The instance resource.

backupAvailable
boolean

The database is available for DML prior backup.

drifted
boolean

The schema is drifted from the source of truth.