MCP Tools Reference: cloud-sql

工具:get_instance

取得 Cloud SQL 執行個體的詳細資料。

以下範例示範如何使用 curl 叫用 get_instance MCP 工具。

Curl 要求
                  
curl --location 'https://sqladmin.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "get_instance",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

輸入內容的結構定義

執行個體取得要求。

SqlInstancesGetRequest

JSON 表示法
{
  "instance": string,
  "project": string
}
欄位
instance

string

這是必要旗標,資料庫執行個體 ID。這不包括專案 ID。

project

string

這是必要旗標,包含執行個體的專案 ID。

輸出內容的結構定義

Cloud SQL 執行個體資源。

DatabaseInstance

JSON 表示法
{
  "kind": string,
  "state": enum (SqlInstanceState),
  "databaseVersion": enum (SqlDatabaseVersion),
  "settings": {
    object (Settings)
  },
  "etag": string,
  "failoverReplica": {
    object (SqlFailoverReplica)
  },
  "masterInstanceName": string,
  "replicaNames": [
    string
  ],
  "maxDiskSize": string,
  "currentDiskSize": string,
  "ipAddresses": [
    {
      object (IpMapping)
    }
  ],
  "serverCaCert": {
    object (SslCert)
  },
  "instanceType": enum (SqlInstanceType),
  "project": string,
  "ipv6Address": string,
  "serviceAccountEmailAddress": string,
  "onPremisesConfiguration": {
    object (OnPremisesConfiguration)
  },
  "replicaConfiguration": {
    object (ReplicaConfiguration)
  },
  "backendType": enum (SqlBackendType),
  "selfLink": string,
  "suspensionReason": [
    enum (SqlSuspensionReason)
  ],
  "connectionName": string,
  "name": string,
  "region": string,
  "gceZone": string,
  "secondaryGceZone": string,
  "diskEncryptionConfiguration": {
    object (DiskEncryptionConfiguration)
  },
  "diskEncryptionStatus": {
    object (DiskEncryptionStatus)
  },
  "rootPassword": string,
  "scheduledMaintenance": {
    object (SqlScheduledMaintenance)
  },
  "satisfiesPzs": boolean,
  "databaseInstalledVersion": string,
  "createTime": string,
  "availableMaintenanceVersions": [
    string
  ],
  "maintenanceVersion": string,
  "upgradableDatabaseVersions": [
    {
      object (AvailableDatabaseVersion)
    }
  ],
  "replicationCluster": {
    object (ReplicationCluster)
  },
  "satisfiesPzi": boolean,
  "tags": {
    string: string,
    ...
  },
  "nodes": [
    {
      object (PoolNodeConfig)
    }
  ],
  "dnsNames": [
    {
      object (DnsNameMapping)
    }
  ],

  // Union field _out_of_disk_report can be only one of the following:
  "outOfDiskReport": {
    object (SqlOutOfDiskReport)
  }
  // End of list of possible types for union field _out_of_disk_report.

  // Union field _sql_network_architecture can be only one of the following:
  "sqlNetworkArchitecture": enum (SqlNetworkArchitecture)
  // End of list of possible types for union field _sql_network_architecture.

  // Union field _psc_service_attachment_link can be only one of the following:
  "pscServiceAttachmentLink": string
  // End of list of possible types for union field _psc_service_attachment_link.

  // Union field _dns_name can be only one of the following:
  "dnsName": string
  // End of list of possible types for union field _dns_name.

  // Union field _primary_dns_name can be only one of the following:
  "primaryDnsName": string
  // End of list of possible types for union field _primary_dns_name.

  // Union field _write_endpoint can be only one of the following:
  "writeEndpoint": string
  // End of list of possible types for union field _write_endpoint.

  // Union field _gemini_config can be only one of the following:
  "geminiConfig": {
    object (GeminiInstanceConfig)
  }
  // End of list of possible types for union field _gemini_config.

  // Union field _switch_transaction_logs_to_cloud_storage_enabled can be only
  // one of the following:
  "switchTransactionLogsToCloudStorageEnabled": boolean
  // End of list of possible types for union field
  // _switch_transaction_logs_to_cloud_storage_enabled.

  // Union field _include_replicas_for_major_version_upgrade can be only one of
  // the following:
  "includeReplicasForMajorVersionUpgrade": boolean
  // End of list of possible types for union field
  // _include_replicas_for_major_version_upgrade.

  // Union field _node_count can be only one of the following:
  "nodeCount": integer
  // End of list of possible types for union field _node_count.
}
欄位
kind

string

這個值一律為 sql#instance

state

enum (SqlInstanceState)

Cloud SQL 執行個體目前的服務狀態。

databaseVersion

enum (SqlDatabaseVersion)

資料庫引擎類型和版本。執行個體建立後,databaseVersion 欄位即無法變更。

settings

object (Settings)

使用者設定。

etag

string

這個欄位已淘汰,將從日後的 API 版本中移除。請改用 settings.settingsVersion 欄位。

failoverReplica

object (SqlFailoverReplica)

容錯移轉副本的名稱和狀態。

masterInstanceName

string

在複製設定中做為主要執行個體的執行個體名稱。

replicaNames[]

string

執行個體的副本。

maxDiskSize
(deprecated)

string (Int64Value format)

執行個體的磁碟大小上限 (以位元組為單位)。

currentDiskSize
(deprecated)

string (Int64Value format)

執行個體目前的磁碟用量 (以位元組為單位)。這項屬性已淘汰。請改用 Cloud Monitoring API 中的「cloudsql.googleapis.com/database/disk/bytes_used」指標。詳情請參閱這項公告

ipAddresses[]

object (IpMapping)

指派給執行個體的 IP 位址。

serverCaCert

object (SslCert)

安全資料傳輸層 (SSL) 設定。

instanceType

enum (SqlInstanceType)

執行個體類型。

project

string

含有 Cloud SQL 執行個體的專案 ID。Google 應用程式網域會加上前置字元 (如適用)。

ipv6Address
(deprecated)

string

指派給執行個體的 IPv6 位址。(已淘汰) 這項屬性僅適用於第一代執行個體。

serviceAccountEmailAddress

string

指派給執行個體的服務帳戶電子郵件地址。\這個屬性為唯讀。

onPremisesConfiguration

object (OnPremisesConfiguration)

內部部署執行個體專用設定。

replicaConfiguration

object (ReplicaConfiguration)

容錯移轉備用資源和唯讀備用資源專用設定。

backendType

enum (SqlBackendType)

後端類型。SECOND_GEN:Cloud SQL 資料庫執行個體。EXTERNAL:非由 Google 管理的資料庫伺服器。

這個屬性為唯讀,請使用 settings 物件中的 tier 屬性判斷資料庫類型。

selfLink

string

這項資源的 URI。

suspensionReason[]

enum (SqlSuspensionReason)

如果執行個體狀態為「已暫停」,則為暫停原因。

connectionName

string

連線字串中使用的 Cloud SQL 執行個體連線名稱。

name

string

Cloud SQL 執行個體的名稱。這不包括專案 ID。

region

string

Cloud SQL 執行個體所在的地理區域。

可以是 Cloud SQL 運作的區域

例如 asia-east1europe-west1us-central1。預設值為 us-central1

gceZone

string

執行個體目前提供服務的 Compute Engine 地區。如果執行個體已容錯移轉至次要區域,這個值可能與建立執行個體時指定的區域不同。警告:變更這項設定可能會重新啟動執行個體。

secondaryGceZone

string

區域執行個體目前提供服務的 Compute Engine 區域。如果執行個體已容錯移轉至次要/容錯移轉區域,這個值可能與建立執行個體時指定的區域不同。

diskEncryptionConfiguration

object (DiskEncryptionConfiguration)

執行個體專屬的磁碟加密設定。

diskEncryptionStatus

object (DiskEncryptionStatus)

執行個體的磁碟加密狀態。

rootPassword

string

初始根密碼。只能在建立時使用。您必須先設定根密碼,才能連線至 PostgreSQL 執行個體。

scheduledMaintenance

object (SqlScheduledMaintenance)

這個執行個體即將進行的排定維護作業開始時間。

satisfiesPzs

boolean

這個狀態會指出執行個體是否符合 PZS。

此狀態保留供日後使用。

databaseInstalledVersion

string

僅供輸出。儲存執行個體上執行的目前資料庫版本,包括子版本,例如 MYSQL_8_0_18

createTime

string (Timestamp format)

僅供輸出。執行個體的建立時間,採用 RFC 3339 格式,例如 2012-11-15T16:19:00.094Z

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

availableMaintenanceVersions[]

string

僅供輸出。列出適用於執行個體的所有維護版本

maintenanceVersion

string

執行個體目前的軟體版本。

upgradableDatabaseVersions[]

object (AvailableDatabaseVersion)

僅供輸出。所有可升級的資料庫版本。

replicationCluster

object (ReplicationCluster)

選用。主要執行個體和災難復原 (DR) 副本配對。災難復原備用資源是您指定的跨區域備用資源,如果主要執行個體發生區域性故障,系統就會容錯移轉至該資源。適用於 MySQL 和 PostgreSQL。

satisfiesPzi

boolean

僅供輸出。這個狀態會指出執行個體是否符合 PZI。

此狀態保留供日後使用。

tags

map (key: string, value: string)

選用。僅限輸入。不可變動。繫結至這個執行個體的標記鍵和標記值。您必須將地圖中的每個項目表示為:"<tag-key-namespaced-name>" : "<tag-value-short-name>"

舉例來說,單一資源可以有下列標記:

  "123/environment": "production",
  "123/costCenter": "marketing",

如要進一步瞭解如何建立及管理標記,請參閱 https://cloud.google.com/resource-manager/docs/tags/tags-overview

包含 "key": value 組合清單的物件,例如 { "name": "wrench", "mass": "1.3kg", "count": "3" }

nodes[]

object (PoolNodeConfig)

僅供輸出。包含讀取集區中每個讀取集區節點相關資訊的項目。

dnsNames[]

object (DnsNameMapping)

僅供輸出。這個執行個體使用的 DNS 名稱清單。

聯集欄位 _out_of_disk_report

_out_of_disk_report 只能是下列其中一項:

outOfDiskReport

object (SqlOutOfDiskReport)

這個欄位代表主動式資料庫健康狀態作業針對 OutOfDisk 問題產生的報告。* 寫入者:* OOD 的主動式資料庫健康狀態工作。* 讀取者:* 主動式資料庫健康狀態工作

聯集欄位 _sql_network_architecture

_sql_network_architecture 只能是下列其中一項:

sqlNetworkArchitecture

enum (SqlNetworkArchitecture)

聯集欄位 _psc_service_attachment_link

_psc_service_attachment_link 只能是下列其中一項:

pscServiceAttachmentLink

string

僅供輸出。PSC 執行個體的服務連結。

聯集欄位 _dns_name

_dns_name 只能是下列其中一項:

dnsName

string

僅供輸出。執行個體的 DNS 名稱。

聯集欄位 _primary_dns_name

_primary_dns_name 只能是下列其中一項:

primaryDnsName
(deprecated)

string

僅供輸出。已淘汰:請改用 write_endpoint。

聯集欄位 _write_endpoint

_write_endpoint 只能是下列其中一項:

writeEndpoint

string

僅供輸出。複寫群組中主要執行個體的 DNS 名稱。

聯集欄位 _gemini_config

_gemini_config 只能是下列其中一項:

geminiConfig

object (GeminiInstanceConfig)

Gemini 執行個體設定。

聯集欄位 _switch_transaction_logs_to_cloud_storage_enabled

_switch_transaction_logs_to_cloud_storage_enabled 只能是下列其中一項:

switchTransactionLogsToCloudStorageEnabled

boolean

僅限輸入。Cloud SQL 是否已啟用,可將時間點復原記錄檔從資料磁碟切換至 Cloud Storage。

聯集欄位 _include_replicas_for_major_version_upgrade

_include_replicas_for_major_version_upgrade 只能是下列其中一項:

includeReplicasForMajorVersionUpgrade

boolean

僅限輸入。判斷啟動主要執行個體的主要版本就地升級時,是否要對副本執行主要版本就地升級。

聯集欄位 _node_count

_node_count 只能是下列其中一項:

nodeCount

integer

讀取集區中的讀取集區節點數量。

設定

JSON 表示法
{
  "settingsVersion": string,
  "authorizedGaeApplications": [
    string
  ],
  "tier": string,
  "kind": string,
  "userLabels": {
    string: string,
    ...
  },
  "availabilityType": enum (SqlAvailabilityType),
  "pricingPlan": enum (SqlPricingPlan),
  "replicationType": enum (SqlReplicationType),
  "storageAutoResizeLimit": string,
  "activationPolicy": enum (SqlActivationPolicy),
  "ipConfiguration": {
    object (IpConfiguration)
  },
  "storageAutoResize": boolean,
  "locationPreference": {
    object (LocationPreference)
  },
  "databaseFlags": [
    {
      object (DatabaseFlags)
    }
  ],
  "dataDiskType": enum (SqlDataDiskType),
  "maintenanceWindow": {
    object (MaintenanceWindow)
  },
  "backupConfiguration": {
    object (BackupConfiguration)
  },
  "databaseReplicationEnabled": boolean,
  "crashSafeReplicationEnabled": boolean,
  "dataDiskSizeGb": string,
  "activeDirectoryConfig": {
    object (SqlActiveDirectoryConfig)
  },
  "collation": string,
  "denyMaintenancePeriods": [
    {
      object (DenyMaintenancePeriod)
    }
  ],
  "insightsConfig": {
    object (InsightsConfig)
  },
  "passwordValidationPolicy": {
    object (PasswordValidationPolicy)
  },
  "sqlServerAuditConfig": {
    object (SqlServerAuditConfig)
  },
  "edition": enum (Edition),
  "connectorEnforcement": enum (ConnectorEnforcement),
  "deletionProtectionEnabled": boolean,
  "timeZone": string,
  "advancedMachineFeatures": {
    object (AdvancedMachineFeatures)
  },
  "dataCacheConfig": {
    object (DataCacheConfig)
  },
  "replicationLagMaxSeconds": integer,
  "enableGoogleMlIntegration": boolean,
  "enableDataplexIntegration": boolean,
  "retainBackupsOnDelete": boolean,
  "entraidConfig": {
    object (SqlServerEntraIdConfig)
  },
  "performanceCaptureConfig": {
    object (PerformanceCaptureConfig)
  },

  // Union field _data_disk_provisioned_iops can be only one of the following:
  "dataDiskProvisionedIops": string
  // End of list of possible types for union field _data_disk_provisioned_iops.

  // Union field _data_disk_provisioned_throughput can be only one of the
  // following:
  "dataDiskProvisionedThroughput": string
  // End of list of possible types for union field
  // _data_disk_provisioned_throughput.

  // Union field _connection_pool_config can be only one of the following:
  "connectionPoolConfig": {
    object (ConnectionPoolConfig)
  }
  // End of list of possible types for union field _connection_pool_config.

  // Union field _final_backup_config can be only one of the following:
  "finalBackupConfig": {
    object (FinalBackupConfig)
  }
  // End of list of possible types for union field _final_backup_config.

  // Union field _read_pool_auto_scale_config can be only one of the following:
  "readPoolAutoScaleConfig": {
    object (ReadPoolAutoScaleConfig)
  }
  // End of list of possible types for union field _read_pool_auto_scale_config.

  // Union field _auto_upgrade_enabled can be only one of the following:
  "autoUpgradeEnabled": boolean
  // End of list of possible types for union field _auto_upgrade_enabled.

  // Union field _data_api_access can be only one of the following:
  "dataApiAccess": enum (DataApiAccess)
  // End of list of possible types for union field _data_api_access.
}
欄位
settingsVersion

string (Int64Value format)

執行個體設定的版本。這是更新方法的必填欄位,可確保系統妥善處理並行更新。更新期間,請使用這個執行個體的最新設定版本值,且不要嘗試更新這個值。

authorizedGaeApplications[]
(deprecated)

string

可存取這個執行個體的 App Engine 應用程式 ID。(已淘汰) 僅適用於第一代執行個體。

tier

string

這個執行個體的層級 (或機器類型),例如 db-custom-1-3840。警告:變更這項設定會重新啟動執行個體。

kind

string

這個值一律為 sql#settings

userLabels

map (key: string, value: string)

使用者提供的標籤,以字典表示,其中每個標籤都是單一鍵/值組合。

包含 "key": value 組合清單的物件,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

availabilityType

enum (SqlAvailabilityType)

供應量類型。可能的值:* ZONAL:執行個體只會從一個區域提供資料。該區域的服務中斷會影響資料存取權。* REGIONAL:執行個體可從區域中的多個可用區提供資料 (高可用性)。/

詳情請參閱「高可用性設定總覽」。

pricingPlan

enum (SqlPricingPlan)

這個執行個體的價格方案。可以是 PER_USEPACKAGE。第二代執行個體僅支援 PER_USE

replicationType
(deprecated)

enum (SqlReplicationType)

這個執行個體使用的複製類型。可以是 ASYNCHRONOUSSYNCHRONOUS。(已淘汰) 這項屬性僅適用於第一代執行個體。

storageAutoResizeLimit

string (Int64Value format)

儲存空間容量自動增加的上限。預設值為 0,表示沒有限制。

activationPolicy

enum (SqlActivationPolicy)

啟用政策會指定執行個體的啟用時間,且僅適用於執行個體狀態為 RUNNABLE 時。有效值:* ALWAYS:執行個體處於開啟狀態,即使沒有連線要求,也會維持開啟狀態。* NEVER:執行個體已關閉,即使收到連線要求也不會啟動。

ipConfiguration

object (IpConfiguration)

IP 管理設定。您可以藉此啟用或停用執行個體 IP,並管理哪些外部網路可以連線至執行個體。第二代執行個體無法停用 IPv4 位址。

storageAutoResize

boolean

設定自動增加儲存空間大小。預設值為 true。

locationPreference

object (LocationPreference)

位置偏好設定。這樣一來,執行個體就能盡可能靠近 App Engine 應用程式或 Compute Engine 區域,進而提升效能。App Engine 共置功能僅適用於第一代執行個體。

databaseFlags[]

object (DatabaseFlags)

啟動時傳遞至執行個體的資料庫旗標。

dataDiskType

enum (SqlDataDiskType)

資料磁碟類型:PD_SSD (預設) 或 PD_HDD。不適用於第一代執行個體。

maintenanceWindow

object (MaintenanceWindow)

這個執行個體的維護期間。這項設定會指定執行個體可重新啟動的時間,以進行維護作業。

backupConfiguration

object (BackupConfiguration)

執行個體的每日備份設定。

databaseReplicationEnabled

boolean

唯讀備用資源執行個體專用設定。指出是否已啟用複製功能。警告:變更這項設定會重新啟動執行個體。

crashSafeReplicationEnabled
(deprecated)

boolean

唯讀備用資源執行個體專用設定。指出是否已啟用資料庫旗標,確保複製作業不會因當機而中斷。這項屬性僅適用於第一代執行個體。

dataDiskSizeGb

string (Int64Value format)

資料磁碟大小 (以 GB 為單位)。資料磁碟大小下限為 10 GB。

activeDirectoryConfig

object (SqlActiveDirectoryConfig)

Active Directory 設定,僅適用於 SQL Server 適用的 Cloud SQL。

collation

string

伺服器執行個體定序的名稱。

denyMaintenancePeriods[]

object (DenyMaintenancePeriod)

拒絕維護期

insightsConfig

object (InsightsConfig)

深入分析設定,目前僅適用於 Postgres。

passwordValidationPolicy

object (PasswordValidationPolicy)

執行個體的本機使用者密碼驗證政策。

sqlServerAuditConfig

object (SqlServerAuditConfig)

SQL Server 專屬稽核設定。

edition

enum (Edition)

選用。執行個體的版本。

connectorEnforcement

enum (ConnectorEnforcement)

指定連線是否必須使用 Cloud SQL 連接器。選項值包括:NOT_REQUIRED (可連線至 Cloud SQL 執行個體,不需使用 Cloud SQL 連接器) 和 REQUIRED (只允許使用 Cloud SQL 連接器的連線)。

請注意,使用 REQUIRED 會停用所有現有的授權網路。如未在建立新執行個體時指定這個欄位,系統會使用 NOT_REQUIRED。修補或更新現有執行個體時,如果未指定這個欄位,執行個體中的欄位就不會變更。

deletionProtectionEnabled

boolean

設定防護功能,避免執行個體遭意外刪除。

timeZone

string

伺服器時區,僅適用於 SQL Server 適用的 Cloud SQL。

advancedMachineFeatures

object (AdvancedMachineFeatures)

指定執行個體的高階機器設定,僅適用於 SQL Server。

dataCacheConfig

object (DataCacheConfig)

資料快取設定。

replicationLagMaxSeconds

integer

選用。在特定複製延遲後重新建立副本的設定值

enableGoogleMlIntegration

boolean

選用。如果將此參數設為 true,Cloud SQL 執行個體就能連線至 Vertex AI,將即時預測和深入分析要求傳遞給 AI。預設值為 false。這項異動只會影響 MySQL 適用的 Cloud SQL 和 PostgreSQL 適用的 Cloud SQL 執行個體。

enableDataplexIntegration

boolean

選用。根據預設,Cloud SQL 執行個體會停用 Dataplex 的結構定義擷取功能。如果將這個參數設為 true,系統會啟用 Cloud SQL 執行個體的 Dataplex 結構定義擷取功能。

retainBackupsOnDelete

boolean

選用。如果這個參數設為 true,即使執行個體已刪除,Cloud SQL 仍會保留執行個體的備份。ON_DEMAND 備份會保留到客戶刪除備份或專案為止。AUTOMATED 備份會按照備份保留設定保留。

entraidConfig

object (SqlServerEntraIdConfig)

選用。SQL Server 執行個體的 Microsoft Entra ID 設定。

performanceCaptureConfig

object (PerformanceCaptureConfig)

選用。效能擷取設定,可在高負載情況下提供診斷指標。

聯集欄位 _data_disk_provisioned_iops

_data_disk_provisioned_iops 只能是下列其中一項:

dataDiskProvisionedIops

string (int64 format)

選用。資料磁碟每秒佈建的 I/O 作業數。這個欄位僅適用於 hyperdisk-balanced 磁碟類型。

聯集欄位 _data_disk_provisioned_throughput

_data_disk_provisioned_throughput 只能是下列其中一項:

dataDiskProvisionedThroughput

string (int64 format)

選用。資料磁碟的佈建處理量,以每秒 MiB 為單位。這個欄位僅適用於 hyperdisk-balanced 磁碟類型。

聯集欄位 _connection_pool_config

_connection_pool_config 只能是下列其中一項:

connectionPoolConfig

object (ConnectionPoolConfig)

選用。執行個體的代管連線集區設定。

聯集欄位 _final_backup_config

_final_backup_config 只能是下列其中一項:

finalBackupConfig

object (FinalBackupConfig)

選用。執行個體的最終備份設定。

聯集欄位 _read_pool_auto_scale_config

_read_pool_auto_scale_config 只能是下列其中一項:

readPoolAutoScaleConfig

object (ReadPoolAutoScaleConfig)

選用。執行個體的讀取集區自動調度資源設定。

聯集欄位 _auto_upgrade_enabled

_auto_upgrade_enabled 只能是下列其中一項:

autoUpgradeEnabled

boolean

選用。MySQL 適用的 Cloud SQL 自動升級設定。如果將此參數設為 true,系統會啟用 MySQL 8.0 子版本的自動升級功能。MySQL 版本必須為 8.0.35 以上。

聯集欄位 _data_api_access

_data_api_access 只能是下列其中一項:

dataApiAccess

enum (DataApiAccess)

這個參數可控管是否允許使用 ExecuteSql API 連線至執行個體。預設為不允許。

Int64Value

JSON 表示法
{
  "value": string
}
欄位
value

string (int64 format)

int64 值。

UserLabelsEntry

JSON 表示法
{
  "key": string,
  "value": string
}
欄位
key

string

value

string

IpConfiguration

JSON 表示法
{
  "ipv4Enabled": boolean,
  "privateNetwork": string,
  "requireSsl": boolean,
  "authorizedNetworks": [
    {
      object (AclEntry)
    }
  ],
  "allocatedIpRange": string,
  "enablePrivatePathForGoogleCloudServices": boolean,
  "sslMode": enum (SslMode),
  "customSubjectAlternativeNames": [
    string
  ],

  // Union field _psc_config can be only one of the following:
  "pscConfig": {
    object (PscConfig)
  }
  // End of list of possible types for union field _psc_config.

  // Union field _server_ca_mode can be only one of the following:
  "serverCaMode": enum (CaMode)
  // End of list of possible types for union field _server_ca_mode.

  // Union field _server_ca_pool can be only one of the following:
  "serverCaPool": string
  // End of list of possible types for union field _server_ca_pool.

  // Union field _server_certificate_rotation_mode can be only one of the
  // following:
  "serverCertificateRotationMode": enum (ServerCertificateRotationMode)
  // End of list of possible types for union field
  // _server_certificate_rotation_mode.
}
欄位
ipv4Enabled

boolean

執行個體是否已獲派公開 IP 位址。

privateNetwork

string

虛擬私有雲網路的資源連結,Cloud SQL 執行個體可透過私人 IP 存取該網路。例如 /projects/myProject/global/networks/default。這項設定可以更新,但設定後無法移除。

requireSsl

boolean

請改用 ssl_mode

是否強制執行透過 IP 的 SSL/TLS 連線。如果設為 false,則允許非 SSL/非 TLS 和 SSL/TLS 連線。如果是 SSL/TLS 連線,系統不會驗證用戶端憑證。如果設為 true,則只允許使用 SSL/TLS 加密且具備有效用戶端憑證的連線。如要強制執行 SSL/TLS,但不強制要求有效用戶端憑證,請使用 ssl_mode 標記,而非 require_ssl 標記。

authorizedNetworks[]

object (AclEntry)

允許使用 IP 連線至執行個體的外部網路清單。以「CIDR」標記法表示,又稱為「斜線」標記法 (例如:157.197.200.0/24)。

allocatedIpRange

string

指派給私人 IP Cloud SQL 執行個體的 IP 範圍名稱。例如「google-managed-services-default」。如果設定此參數,系統會在已分配的範圍內建立執行個體 IP。範圍名稱必須符合 RFC 1035。具體來說,名稱長度必須介於 1 至 63 個字元之間,且符合規則運算式 [a-z]([-a-z0-9]*[a-z0-9])?.

enablePrivatePathForGoogleCloudServices

boolean

控管從 BigQuery 等 Google 服務連線至私人 IP 執行個體的連線。

sslMode

enum (SslMode)

指定在資料庫連線中強制執行 SSL/TLS 的方式。如果必須使用 require_ssl 旗標來確保回溯相容性,則只有下列值組有效:

PostgreSQL 和 MySQL:

  • ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTEDrequire_ssl=false
  • ssl_mode=ENCRYPTED_ONLYrequire_ssl=false
  • ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIREDrequire_ssl=true

SQL Server:

  • ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTEDrequire_ssl=false
  • ssl_mode=ENCRYPTED_ONLYrequire_ssl=true

ssl_mode 的值優先於 require_ssl 的值。

舉例來說,如果是 ssl_mode=ENCRYPTED_ONLYrequire_ssl=false 這兩個配對,ssl_mode=ENCRYPTED_ONLY 表示只接受 SSL 連線,而 require_ssl=false 表示接受非 SSL 和 SSL 連線。在這種情況下,MySQL 和 PostgreSQL 資料庫會遵守 ssl_mode,且只接受 SSL 連線。

customSubjectAlternativeNames[]

string

選用。Cloud SQL 執行個體的自訂主體別名(SAN)。

聯集欄位 _psc_config

_psc_config 只能是下列其中一項:

pscConfig

object (PscConfig)

這個執行個體的 PSC 設定。

聯集欄位 _server_ca_mode

_server_ca_mode 只能是下列其中一項:

serverCaMode

enum (CaMode)

指定伺服器憑證使用的 CA 類型。

聯集欄位 _server_ca_pool

_server_ca_pool 只能是下列其中一項:

serverCaPool

string

選用。執行個體的伺服器 CA 集區資源名稱,其中 CUSTOMER_MANAGED_CAS_CAserver_ca_mode。格式:projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID}

聯集欄位 _server_certificate_rotation_mode

_server_certificate_rotation_mode 只能是下列其中一項:

serverCertificateRotationMode

enum (ServerCertificateRotationMode)

選用。控管自動伺服器憑證輪替功能。這項功能預設為停用。啟用後,伺服器憑證會在失效前最多六個月,於 Cloud SQL 排定的維護作業或自助式維護更新期間自動輪替。只有在 server_ca_mode 為 GOOGLE_MANAGED_CAS_CA 或 CUSTOMER_MANAGED_CAS_CA 時,才能設定這項設定。

BoolValue

JSON 表示法
{
  "value": boolean
}
欄位
value

boolean

布林值。

AclEntry

JSON 表示法
{
  "value": string,
  "expirationTime": string,
  "name": string,
  "kind": string
}
欄位
value

string

存取控制清單的允許值。

expirationTime

string (Timestamp format)

這個存取控制項的到期時間,採用 RFC 3339 格式,例如 2012-11-15T16:19:00.094Z

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

name

string

選用。用於識別這個項目的標籤。

kind

string

這個值一律為 sql#aclEntry

時間戳記

JSON 表示法
{
  "seconds": string,
  "nanos": integer
}
欄位
seconds

string (int64 format)

代表自 Unix 紀元 1970-01-01T00:00:00Z 起算的世界標準時間秒數。必須介於 -62135596800 和 253402300799 之間 (含),對應至 0001-01-01T00:00:00Z 至 9999-12-31T23:59:59Z。

nanos

integer

以奈秒為單位的非負秒數小數。這個欄位是時間長度的奈秒部分,並非秒數的替代值。如果秒數值為負數,且包含小數,奈秒值仍須為非負數,且會向前計時。必須介於 0 至 999,999,999 之間 (含)。

PscConfig

JSON 表示法
{
  "allowedConsumerProjects": [
    string
  ],
  "pscAutoConnections": [
    {
      object (PscAutoConnectionConfig)
    }
  ],
  "networkAttachmentUri": string,

  // Union field _psc_enabled can be only one of the following:
  "pscEnabled": boolean
  // End of list of possible types for union field _psc_enabled.
}
欄位
allowedConsumerProjects[]

string

選用。這裡列出了允許透過 PSC 連線至這個執行個體的用戶專案。這些專案中的任何網路都可以透過 PSC 連線至這個執行個體。

這份清單中的每個消費者專案都可能以專案編號 (數字) 或專案 ID (英數字元) 表示。

pscAutoConnections[]

object (PscAutoConnectionConfig)

選用。可連線至這個 Cloud SQL 執行個體的 Private Service Connect 用戶端點設定清單。

networkAttachmentUri

string

選用。Private Service Connect 啟用的 Cloud SQL 執行個體已獲授權,可透過 PSC 介面連線的消費者網路網路連結。格式:projects/PROJECT/regions/REGION/networkAttachments/ID

聯集欄位 _psc_enabled

_psc_enabled 只能是下列其中一項:

pscEnabled

boolean

這個執行個體是否已啟用 PSC 連線。

PscAutoConnectionConfig

JSON 表示法
{
  "consumerProject": string,
  "consumerNetwork": string,

  // Union field _ip_address can be only one of the following:
  "ipAddress": string
  // End of list of possible types for union field _ip_address.

  // Union field _status can be only one of the following:
  "status": string
  // End of list of possible types for union field _status.

  // Union field _consumer_network_status can be only one of the following:
  "consumerNetworkStatus": string
  // End of list of possible types for union field _consumer_network_status.
}
欄位
consumerProject

string

選用。這是此消費者端點的消費者服務專案 ID。

選用。只有在 consumer_network 是共用虛擬私有雲網路時,才適用這項設定。

consumerNetwork

string

選用。這個消費者端點的消費者網路。這必須是資源路徑,包含主機專案和網路名稱。

例如 projects/project1/global/networks/network1

這個網路的消費者主專案可能與消費者服務專案不同。

聯集欄位 _ip_address

_ip_address 只能是下列其中一項:

ipAddress

string

消費者端點的 IP 位址。

聯集欄位 _status

_status 只能是下列其中一項:

status

string

消費者端點的連線狀態。

聯集欄位 _consumer_network_status

_consumer_network_status 只能是下列其中一項:

consumerNetworkStatus

string

消費者網路的連線政策狀態。

LocationPreference

JSON 表示法
{
  "followGaeApplication": string,
  "zone": string,
  "secondaryZone": string,
  "kind": string
}
欄位
followGaeApplication
(deprecated)

string

後續的 App Engine 應用程式必須與 Cloud SQL 執行個體位於相同地區。警告:變更這項設定可能會重新啟動執行個體。

zone

string

偏好的 Compute Engine 區域 (例如:us-central1-a、us-central1-b 等)。警告:變更這項設定可能會重新啟動執行個體。

secondaryZone

string

次要/容錯移轉的偏好 Compute Engine 區域 (例如:us-central1-a、us-central1-b 等)。如要停用這個欄位,請將其設為「no_secondary_zone」。

kind

string

這個值一律為 sql#locationPreference

DatabaseFlags

JSON 表示法
{
  "name": string,
  "value": string
}
欄位
name

string

旗標的名稱。這些標記會在執行個體啟動時傳遞,因此請同時加入伺服器選項和系統變數。旗標以底線指定,而非連字號。詳情請參閱 Cloud SQL 說明文件中的「設定資料庫旗標」。

value

string

旗標的值。布林值旗標會設為 on (true) 和 off (false)。如果標記沒有值,則必須省略這個欄位。

MaintenanceWindow

JSON 表示法
{
  "hour": integer,
  "day": integer,
  "updateTrack": enum (SqlUpdateTrack),
  "kind": string
}
欄位
hour

integer

時段 - 0 到 23。以世界標準時間時區指定。

day

integer

星期幾 - MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY。以世界標準時間時區指定。輸出結果會以整數形式傳回,範圍為 1 到 7,其中 1 等於星期一。

updateTrack

enum (SqlUpdateTrack)

維護時間設定:canarystableweek5。詳情請參閱「Cloud SQL 執行個體維護作業」。

kind

string

這個值一律為 sql#maintenanceWindow

Int32Value

JSON 表示法
{
  "value": integer
}
欄位
value

integer

int32 值。

BackupConfiguration

JSON 表示法
{
  "startTime": string,
  "enabled": boolean,
  "kind": string,
  "binaryLogEnabled": boolean,
  "replicationLogArchivingEnabled": boolean,
  "location": string,
  "pointInTimeRecoveryEnabled": boolean,
  "backupRetentionSettings": {
    object (BackupRetentionSettings)
  },
  "transactionLogRetentionDays": integer,

  // Union field _transactional_log_storage_state can be only one of the
  // following:
  "transactionalLogStorageState": enum (TransactionalLogStorageState)
  // End of list of possible types for union field
  // _transactional_log_storage_state.

  // Union field _backup_tier can be only one of the following:
  "backupTier": enum (BackupTier)
  // End of list of possible types for union field _backup_tier.
}
欄位
startTime

string

每日備份設定的開始時間,時區為世界標準時間,格式為 24 小時制 - HH:MM

enabled

boolean

這項設定是否已啟用。

kind

string

這個值一律為 sql#backupConfiguration

binaryLogEnabled

boolean

(僅限 MySQL) 是否啟用二進位記錄檔。如果停用備份設定,也必須停用二進位記錄檔。

replicationLogArchivingEnabled

boolean

保留欄位,供日後使用。

location

string

備份位置

pointInTimeRecoveryEnabled

boolean

是否啟用時間點復原功能。

backupRetentionSettings

object (BackupRetentionSettings)

備份保留設定。

transactionLogRetentionDays

integer

我們保留交易記錄的天數,用於時間點還原,範圍為 1 到 7 天。

聯集欄位 _transactional_log_storage_state

_transactional_log_storage_state 只能是下列其中一項:

transactionalLogStorageState

enum (TransactionalLogStorageState)

僅供輸出。這個值包含交易記錄的儲存位置,用於對資料庫執行時間點復原 (PITR)。

聯集欄位 _backup_tier

_backup_tier 只能是下列其中一項:

backupTier

enum (BackupTier)

僅供輸出。管理執行個體備份的備份層級。

BackupRetentionSettings

JSON 表示法
{
  "retentionUnit": enum (RetentionUnit),
  "retainedBackups": integer
}
欄位
retentionUnit

enum (RetentionUnit)

「retained_backups」代表的單位。

retainedBackups

integer

系統會根據 retention_unit 的值,判斷是否需要刪除備份。如果 retention_unit 為「COUNT」,系統會保留這麼多備份。

SqlActiveDirectoryConfig

JSON 表示法
{
  "kind": string,
  "domain": string,
  "mode": enum (ActiveDirectoryMode),
  "dnsServers": [
    string
  ],
  "adminCredentialSecretName": string,
  "organizationalUnit": string
}
欄位
kind

string

這項設定一律為 sql#activeDirectoryConfig。

domain

string

網域名稱 (例如 mydomain.com)。

mode

enum (ActiveDirectoryMode)

選用。Active Directory 設定模式。

dnsServers[]

string

選用。用於啟動 Active Directory 的網域控制器 IPv4 位址。

adminCredentialSecretName

string

選用。儲存管理員憑證的 Secret Manager 金鑰。(例如 projects/{project}/secrets/{secret})。

organizationalUnit

string

選用。機構單位的辨別名稱。這是機構單位的完整階層路徑。

DenyMaintenancePeriod

JSON 表示法
{
  "startDate": string,
  "endDate": string,
  "time": string
}
欄位
startDate

string

「拒絕維護期」開始日期。如果開始日期的年份為空白,結束日期的年份也必須為空白。也就是說,拒絕維護期每年都會重複。日期格式為 yyyy-mm-dd,2020-11-01,或 mm-dd,即 11-01

endDate

string

「拒絕維護期」結束日期。如果結束日期的年份為空白,開始日期的年份也必須為空白。也就是說,免維護間隔每年都會重複。日期格式為 yyyy-mm-dd,2020-11-01,或 mm-dd,即 11-01

time

string

世界標準時間,表示「拒絕維護期」的開始時間 (start_date) 和結束時間 (end_date)。時間格式為 HH:mm:SS,也就是00:00:00

InsightsConfig

JSON 表示法
{
  "queryInsightsEnabled": boolean,
  "recordClientAddress": boolean,
  "recordApplicationTags": boolean,
  "queryStringLength": integer,
  "queryPlansPerMinute": integer,
  "enhancedQueryInsightsEnabled": boolean
}
欄位
queryInsightsEnabled

boolean

查詢洞察功能是否已啟用。

recordClientAddress

boolean

啟用後,查詢洞察是否會記錄用戶端位址。

recordApplicationTags

boolean

啟用後,查詢洞察是否會記錄查詢中的應用程式標記。

queryStringLength

integer

以位元組為單位的查詢長度上限。預設值為 1024 個位元組。範圍:256 到 4500 個位元組。如果查詢長度大於這個欄位值,系統會將查詢截斷為這個值。如未設定,查詢長度將採用預設值。變更查詢長度會重新啟動資料庫。

queryPlansPerMinute

integer

Insights 每分鐘擷取的查詢執行計畫數量 (所有查詢加總)。預設值為 5。

enhancedQueryInsightsEnabled

boolean

選用。是否已啟用強化版查詢洞察功能。

PasswordValidationPolicy

JSON 表示法
{
  "minLength": integer,
  "complexity": enum (Complexity),
  "reuseInterval": integer,
  "disallowUsernameSubstring": boolean,
  "passwordChangeInterval": string,
  "enablePasswordPolicy": boolean,
  "disallowCompromisedCredentials": boolean
}
欄位
minLength

integer

允許的字元數下限。

complexity

enum (Complexity)

密碼複雜度。

reuseInterval

integer

無法重複使用的過期密碼數量。

disallowUsernameSubstring

boolean

禁止在密碼中加入使用者名稱。

passwordChangeInterval

string (Duration format)

變更密碼的最短間隔。這個旗標僅適用於 PostgreSQL。

時間長度以秒為單位,最多可有 9 個小數位數,並應以「s」結尾,例如:"3.5s"

enablePasswordPolicy

boolean

是否啟用密碼政策。啟用後,密碼必須符合複雜度規定。請務必啟用這項政策,以防未經授權的存取活動。停用這項政策後,使用者就能設定低強度密碼。

disallowCompromisedCredentials
(deprecated)

boolean

這個欄位已淘汰,將在日後的 API 版本中移除。

時間長度

JSON 表示法
{
  "seconds": string,
  "nanos": integer
}
欄位
seconds

string (int64 format)

時間範圍的簽署秒數。必須介於 -315,576,000,000 至 +315,576,000,000 之間 (含這兩個值)。注意:這些界限是根據以下計算得出:60 秒/分鐘 * 60 分鐘/小時 * 24 小時/天 * 365.25 天/年 * 10000 年

nanos

integer

時間跨度的小數部分 (以奈秒為單位),可為正數或負數。如果時間長度不到一秒,系統會以 0 seconds 欄位和正數或負數 nanos 欄位表示。如果時間長度為一秒以上,nanos 欄位的非零值必須與 seconds 欄位相同。值必須介於 -999,999,999 到 +999,999,999 之間 (含)。

SqlServerAuditConfig

JSON 表示法
{
  "kind": string,
  "bucket": string,
  "retentionInterval": string,
  "uploadInterval": string
}
欄位
kind

string

這項屬性一律為 sql#sqlServerAuditConfig

bucket

string

目標 bucket 的名稱 (例如 gs://mybucket)。

retentionInterval

string (Duration format)

保留產生的稽核檔案多久。

時間長度以秒為單位,最多可有 9 個小數位數,並應以「s」結尾,例如:"3.5s"

uploadInterval

string (Duration format)

上傳產生的稽核檔案的頻率。

時間長度以秒為單位,最多可有 9 個小數位數,並應以「s」結尾,例如:"3.5s"

AdvancedMachineFeatures

JSON 表示法
{
  "threadsPerCore": integer
}
欄位
threadsPerCore

integer

每個實體核心的執行緒數量。

DataCacheConfig

JSON 表示法
{
  "dataCacheEnabled": boolean
}
欄位
dataCacheEnabled

boolean

執行個體是否已啟用資料快取。

ConnectionPoolConfig

JSON 表示法
{
  "flags": [
    {
      object (ConnectionPoolFlags)
    }
  ],

  // Union field _connection_pooling_enabled can be only one of the following:
  "connectionPoolingEnabled": boolean
  // End of list of possible types for union field _connection_pooling_enabled.

  // Union field _pooler_count can be only one of the following:
  "poolerCount": integer
  // End of list of possible types for union field _pooler_count.
}
欄位
flags[]

object (ConnectionPoolFlags)

選用。連線集區設定旗標清單。

聯集欄位 _connection_pooling_enabled

_connection_pooling_enabled 只能是下列其中一項:

connectionPoolingEnabled

boolean

是否啟用代管連線集區。

聯集欄位 _pooler_count

_pooler_count 只能是下列其中一項:

poolerCount

integer

僅供輸出。連線集區數量。

ConnectionPoolFlags

JSON 表示法
{
  "name": string,
  "value": string
}
欄位
name

string

這是必要旗標,旗標名稱。

value

string

這是必要旗標,旗標的值。布林值旗標會設為 on (true) 和 off (false)。如果標記沒有值,則必須省略這個欄位。

FinalBackupConfig

JSON 表示法
{

  // Union field _enabled can be only one of the following:
  "enabled": boolean
  // End of list of possible types for union field _enabled.

  // Union field _retention_days can be only one of the following:
  "retentionDays": integer
  // End of list of possible types for union field _retention_days.
}
欄位

聯集欄位 _enabled

_enabled 只能是下列其中一項:

enabled

boolean

執行個體是否已啟用最終備份。

聯集欄位 _retention_days

_retention_days 只能是下列其中一項:

retentionDays

integer

執行個體刪除後,最終備份的保留天數。最終備份會在 (執行個體刪除時間 + 保留天數) 時清除。

ReadPoolAutoScaleConfig

JSON 表示法
{
  "targetMetrics": [
    {
      object (TargetMetric)
    }
  ],

  // Union field _enabled can be only one of the following:
  "enabled": boolean
  // End of list of possible types for union field _enabled.

  // Union field _min_node_count can be only one of the following:
  "minNodeCount": integer
  // End of list of possible types for union field _min_node_count.

  // Union field _max_node_count can be only one of the following:
  "maxNodeCount": integer
  // End of list of possible types for union field _max_node_count.

  // Union field _disable_scale_in can be only one of the following:
  "disableScaleIn": boolean
  // End of list of possible types for union field _disable_scale_in.

  // Union field _scale_in_cooldown_seconds can be only one of the following:
  "scaleInCooldownSeconds": integer
  // End of list of possible types for union field _scale_in_cooldown_seconds.

  // Union field _scale_out_cooldown_seconds can be only one of the following:
  "scaleOutCooldownSeconds": integer
  // End of list of possible types for union field _scale_out_cooldown_seconds.
}
欄位
targetMetrics[]

object (TargetMetric)

選用。唯讀集區自動調度資源的目標指標。

聯集欄位 _enabled

_enabled 只能是下列其中一項:

enabled

boolean

指出是否已啟用讀取集區自動調度資源。

聯集欄位 _min_node_count

_min_node_count 只能是下列其中一項:

minNodeCount

integer

要維護的讀取集區節點數量下限。

聯集欄位 _max_node_count

_max_node_count 只能是下列其中一項:

maxNodeCount

integer

要維護的讀取集區節點數量上限。

聯集欄位 _disable_scale_in

_disable_scale_in 只能是下列其中一項:

disableScaleIn

boolean

指出讀取集區自動調度資源是否支援縮減作業 (移除節點)。

聯集欄位 _scale_in_cooldown_seconds

_scale_in_cooldown_seconds 只能是下列其中一項:

scaleInCooldownSeconds

integer

縮減作業的冷卻期。

聯集欄位 _scale_out_cooldown_seconds

_scale_out_cooldown_seconds 只能是下列其中一項:

scaleOutCooldownSeconds

integer

向外擴充作業的冷卻期。

TargetMetric

JSON 表示法
{

  // Union field _metric can be only one of the following:
  "metric": string
  // End of list of possible types for union field _metric.

  // Union field _target_value can be only one of the following:
  "targetValue": number
  // End of list of possible types for union field _target_value.
}
欄位

聯集欄位 _metric

_metric 只能是下列其中一項:

metric

string

用於自動調度資源的指標名稱。

聯集欄位 _target_value

_target_value 只能是下列其中一項:

targetValue

number

指標的目標值。

SqlServerEntraIdConfig

JSON 表示法
{
  "kind": string,
  "tenantId": string,
  "applicationId": string
}
欄位
kind

string

僅供輸出。這項屬性一律為 sql#sqlServerEntraIdConfig

tenantId

string

選用。Entra ID 設定的租戶 ID。

applicationId

string

選用。Entra ID 設定的應用程式 ID。

PerformanceCaptureConfig

JSON 表示法
{

  // Union field _enabled can be only one of the following:
  "enabled": boolean
  // End of list of possible types for union field _enabled.

  // Union field _probing_interval_seconds can be only one of the following:
  "probingIntervalSeconds": integer
  // End of list of possible types for union field _probing_interval_seconds.

  // Union field _probe_threshold can be only one of the following:
  "probeThreshold": integer
  // End of list of possible types for union field _probe_threshold.

  // Union field _running_threads_threshold can be only one of the following:
  "runningThreadsThreshold": integer
  // End of list of possible types for union field _running_threads_threshold.

  // Union field _seconds_behind_source_threshold can be only one of the
  // following:
  "secondsBehindSourceThreshold": integer
  // End of list of possible types for union field
  // _seconds_behind_source_threshold.

  // Union field _transaction_duration_threshold can be only one of the
  // following:
  "transactionDurationThreshold": integer
  // End of list of possible types for union field
  // _transaction_duration_threshold.
}
欄位

聯集欄位 _enabled

_enabled 只能是下列其中一項:

enabled

boolean

選用。啟用或停用「動作擷取」功能。

聯集欄位 _probing_interval_seconds

_probing_interval_seconds 只能是下列其中一項:

probingIntervalSeconds

integer

選用。任意兩項探測作業之間的時間間隔 (以秒為單位)。

聯集欄位 _probe_threshold

_probe_threshold 只能是下列其中一項:

probeThreshold

integer

選用。連續讀取值超過門檻的次數下限,達到這個次數就會觸發執行個體狀態擷取作業。

聯集欄位 _running_threads_threshold

_running_threads_threshold 只能是下列其中一項:

runningThreadsThreshold

integer

選用。觸發主要伺服器擷取的執行中伺服器執行緒數量下限。

聯集欄位 _seconds_behind_source_threshold

_seconds_behind_source_threshold 只能是下列其中一項:

secondsBehindSourceThreshold

integer

選用。副本必須落後主要副本至少幾秒,才會觸發副本擷取作業。

聯集欄位 _transaction_duration_threshold

_transaction_duration_threshold 只能是下列其中一項:

transactionDurationThreshold

integer

選用。交易必須開啟的時間長度 (以秒為單位),之後監控程式才會開始記錄交易。

SqlFailoverReplica

JSON 表示法
{
  "name": string,
  "available": boolean
}
欄位
name

string

容錯移轉副本的名稱。如果在建立執行個體時指定,系統會為執行個體建立容錯移轉備用資源。名稱不含專案 ID。

available

boolean

容錯移轉備用資源的可用性狀態。如果狀態為 false,表示容錯移轉備用資源未同步。只有在狀態為 true 時,主要執行個體才能容錯移轉至容錯移轉備用資源。

IpMapping

JSON 表示法
{
  "type": enum (SqlIpAddressType),
  "ipAddress": string,
  "timeToRetire": string
}
欄位
type

enum (SqlIpAddressType)

這個 IP 位址的類型。PRIMARY 位址是可接受連入連線的公開位址。PRIVATE 位址是可接受連入連線的私人位址。如果支援,OUTGOING 位址就是從執行個體發起的連線來源位址。

ipAddress

string

獲派的 IP 位址。

timeToRetire

string (Timestamp format)

這個 IP 的停用期限,採用 RFC 3339 格式,例如 2012-11-15T16:19:00.094Z。只有在 IP 預計停用時,這個欄位才會顯示。

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

SslCert

JSON 表示法
{
  "kind": string,
  "certSerialNumber": string,
  "cert": string,
  "createTime": string,
  "commonName": string,
  "expirationTime": string,
  "sha1Fingerprint": string,
  "instance": string,
  "selfLink": string
}
欄位
kind

string

這個值一律為 sql#sslCert

certSerialNumber

string

從憑證擷取的序號。

cert

string

PEM 表示法。

createTime

string (Timestamp format)

憑證建立時間,採用 RFC 3339 格式,例如 2012-11-15T16:19:00.094Z

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

commonName

string

使用者提供的名稱。限制為 [a-zA-Z.-_ ]+。

expirationTime

string (Timestamp format)

憑證到期時間,採用 RFC 3339 格式,例如 2012-11-15T16:19:00.094Z

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

sha1Fingerprint

string

Sha1 指紋。

instance

string

資料庫執行個體名稱。

selfLink

string

這項資源的 URI。

OnPremisesConfiguration

JSON 表示法
{
  "hostPort": string,
  "kind": string,
  "username": string,
  "password": string,
  "caCertificate": string,
  "clientCertificate": string,
  "clientKey": string,
  "dumpFilePath": string,
  "sourceInstance": {
    object (InstanceReference)
  },
  "selectedObjects": [
    {
      object (SelectedObjects)
    }
  ],
  "sslOption": enum (SslOption)
}
欄位
hostPort

string

地端執行個體的主機和通訊埠,格式為 host:port

kind

string

這個值一律為 sql#onPremisesConfiguration

username

string

用於連線至地端執行個體的使用者名稱。

password

string

連線至地端執行個體的密碼。

caCertificate

string

信任的 CA x509 憑證的 PEM 表示法。

clientCertificate

string

備用資源的 x509 憑證,採用 PEM 格式。

clientKey

string

副本私密金鑰的 PEM 表示法。對應的公開金鑰會編碼至用戶端憑證中。

dumpFilePath

string

用於建立 Cloud SQL 備用資源的傾印檔案。

sourceInstance

object (InstanceReference)

如果來源是 Cloud SQL,則為 Cloud SQL 執行個體的參照。

selectedObjects[]

object (SelectedObjects)

選用。使用者從外部來源執行個體選取要複製的物件清單。

sslOption

enum (SslOption)

選用。備用資源連線至地端來源時的 SSL 選項。

InstanceReference

JSON 表示法
{
  "name": string,
  "region": string,
  "project": string
}
欄位
name

string

所參照的 Cloud SQL 執行個體名稱。這個值不含專案 ID。

region

string

所參照 Cloud SQL 執行個體所在的區域。

project

string

所參照 Cloud SQL 執行個體的專案 ID。預設值與執行個體參照的專案 ID 相同。

SelectedObjects

JSON 表示法
{
  "database": string
}
欄位
database

string

這是必要旗標,要移轉的資料庫名稱。

ReplicaConfiguration

JSON 表示法
{
  "kind": string,
  "mysqlReplicaConfiguration": {
    object (MySqlReplicaConfiguration)
  },
  "failoverTarget": boolean,
  "cascadableReplica": boolean
}
欄位
kind

string

這個值一律為 sql#replicaConfiguration

mysqlReplicaConfiguration

object (MySqlReplicaConfiguration)

從地端部署的 MySQL 主要執行個體複製時,需要進行 MySQL 專屬設定。使用者名稱、密碼、憑證和金鑰等複寫設定資訊不會儲存在執行個體中繼資料。設定資訊僅用於設定複寫連線,並由 MySQL 儲存在資料目錄中名為 master.info 的檔案。

failoverTarget

boolean

指定備用資源是否為容錯移轉目標。如果將該欄位設為 true,副本就會指定為容錯移轉副本。如果主要執行個體發生故障,備用執行個體就會升級為新的主要執行個體。只能指定一個備用資源做為容錯移轉目標,且備用資源必須與主要執行個體位於不同區域。

cascadableReplica

boolean

選用。指定 SQL Server 副本是否為可串聯副本。可串聯式備用資源是 SQL Server 跨區域備用資源,支援其下的備用資源。

MySqlReplicaConfiguration

JSON 表示法
{
  "dumpFilePath": string,
  "username": string,
  "password": string,
  "connectRetryInterval": integer,
  "masterHeartbeatPeriod": string,
  "caCertificate": string,
  "clientCertificate": string,
  "clientKey": string,
  "sslCipher": string,
  "verifyServerCertificate": boolean,
  "kind": string
}
欄位
dumpFilePath

string

Google Cloud Storage 中 SQL 傾印檔案的路徑,系統會從該檔案建立副本執行個體。URI 的格式為 gs://bucketName/fileName。系統也支援壓縮的 gzip 檔案 (.gz)。傾印檔包含複製作業的起始 binlog 座標。使用 mysqldump 時,將 --master-data 設為 1 即可完成這項操作。

username

string

複製連線的使用者名稱。

password

string

複製連線的密碼。

connectRetryInterval

integer

每次重試連線之間的等待時間 (以秒為單位)。MySQL 的預設值為 60 秒。

masterHeartbeatPeriod

string (Int64Value format)

複製心跳之間的時間間隔 (以毫秒為單位)。

caCertificate

string

信任的 CA x509 憑證的 PEM 表示法。

clientCertificate

string

備用資源的 x509 憑證,採用 PEM 格式。

clientKey

string

副本私密金鑰的 PEM 表示法。對應的公開金鑰會編碼至用戶端憑證中。

sslCipher

string

可供 SSL 加密使用的允許密碼清單。

verifyServerCertificate

boolean

是否要在 SSL 交握期間檢查主要執行個體傳送的憑證中,共用名稱的值。

kind

string

這個值一律為 sql#mysqlReplicaConfiguration

DiskEncryptionConfiguration

JSON 表示法
{
  "kmsKeyName": string,
  "kind": string
}
欄位
kmsKeyName

string

用於磁碟加密的 KMS 金鑰資源名稱

kind

string

這個值一律為 sql#diskEncryptionConfiguration

DiskEncryptionStatus

JSON 表示法
{
  "kmsKeyVersionName": string,
  "kind": string
}
欄位
kmsKeyVersionName

string

用來加密 Cloud SQL 執行個體資源的 KMS 金鑰版本

kind

string

這個值一律為 sql#diskEncryptionStatus

SqlScheduledMaintenance

JSON 表示法
{
  "startTime": string,
  "canDefer": boolean,
  "canReschedule": boolean,

  // Union field _schedule_deadline_time can be only one of the following:
  "scheduleDeadlineTime": string
  // End of list of possible types for union field _schedule_deadline_time.
}
欄位
startTime

string (Timestamp format)

這個執行個體即將進行的排定維護作業開始時間。

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

canDefer
(deprecated)

boolean

canReschedule

boolean

排定的維護作業是否可以重新安排時間。

聯集欄位 _schedule_deadline_time

_schedule_deadline_time 只能是下列其中一項:

scheduleDeadlineTime

string (Timestamp format)

維護作業無法延期,必須在這個期限前開始。

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

SqlOutOfDiskReport

JSON 表示法
{

  // Union field _sql_out_of_disk_state can be only one of the following:
  "sqlOutOfDiskState": enum (SqlOutOfDiskState)
  // End of list of possible types for union field _sql_out_of_disk_state.

  // Union field _sql_min_recommended_increase_size_gb can be only one of the
  // following:
  "sqlMinRecommendedIncreaseSizeGb": integer
  // End of list of possible types for union field
  // _sql_min_recommended_increase_size_gb.
}
欄位

聯集欄位 _sql_out_of_disk_state

_sql_out_of_disk_state 只能是下列其中一項:

sqlOutOfDiskState

enum (SqlOutOfDiskState)

這個欄位代表主動式資料庫健康狀態工作針對 OutOfDisk 問題產生的狀態。* 寫入者:* OOD 的主動式資料庫健康狀態工作。* 讀取者:* 主動式資料庫健康狀態工作

聯集欄位 _sql_min_recommended_increase_size_gb

_sql_min_recommended_increase_size_gb 只能是下列其中一項:

sqlMinRecommendedIncreaseSizeGb

integer

建議增加的最小大小 (以 GB 為單位)。前端會使用這個欄位 * 寫入器: * OOD 的主動式資料庫健康狀態工作。* 讀者:

AvailableDatabaseVersion

JSON 表示法
{

  // Union field _major_version can be only one of the following:
  "majorVersion": string
  // End of list of possible types for union field _major_version.

  // Union field _name can be only one of the following:
  "name": string
  // End of list of possible types for union field _name.

  // Union field _display_name can be only one of the following:
  "displayName": string
  // End of list of possible types for union field _display_name.
}
欄位

聯集欄位 _major_version

_major_version 只能是下列其中一項:

majorVersion

string

版本的主要版本名稱。

聯集欄位 _name

_name 只能是下列其中一項:

name

string

資料庫版本名稱。如果是 MySQL 8.0,這個字串會提供資料庫的主要和次要版本。

聯集欄位 _display_name

_display_name 只能是下列其中一項:

displayName

string

資料庫版本的顯示名稱。

ReplicationCluster

JSON 表示法
{
  "psaWriteEndpoint": string,
  "failoverDrReplicaName": string,
  "drReplica": boolean
}
欄位
psaWriteEndpoint

string

僅供輸出。如果已設定,這個欄位表示這個執行個體有指向叢集主要執行個體的私人服務存取權 (PSA) DNS 端點。如果這個執行個體是主要執行個體,DNS 端點會指向這個執行個體。切換或副本容錯移轉作業完成後,這個 DNS 端點會指向升級的例項。這是唯讀欄位,會以資訊形式傳回給使用者。即使獨立執行個體尚未有災難復原備用資源,或災難復原備用資源已遭刪除,這個欄位仍可存在。

failoverDrReplicaName

string

選用。如果執行個體是主要執行個體,這個欄位會識別災難復原 (DR) 副本。DR 副本是 Enterprise Plus 版執行個體的選用設定。如果執行個體是唯讀備用資源,則不會設定這個欄位。將這個欄位設為副本名稱,即可為主要執行個體指定 DR 副本。移除備用資源名稱,即可取消指派為 DR 備用資源。

drReplica

boolean

僅供輸出。唯讀欄位,指出備用資源是否為 DR 備用資源。如果執行個體是主要執行個體,則不會設定這個欄位。

GeminiInstanceConfig

JSON 表示法
{

  // Union field _entitled can be only one of the following:
  "entitled": boolean
  // End of list of possible types for union field _entitled.

  // Union field _google_vacuum_mgmt_enabled can be only one of the following:
  "googleVacuumMgmtEnabled": boolean
  // End of list of possible types for union field _google_vacuum_mgmt_enabled.

  // Union field _oom_session_cancel_enabled can be only one of the following:
  "oomSessionCancelEnabled": boolean
  // End of list of possible types for union field _oom_session_cancel_enabled.

  // Union field _active_query_enabled can be only one of the following:
  "activeQueryEnabled": boolean
  // End of list of possible types for union field _active_query_enabled.

  // Union field _index_advisor_enabled can be only one of the following:
  "indexAdvisorEnabled": boolean
  // End of list of possible types for union field _index_advisor_enabled.

  // Union field _flag_recommender_enabled can be only one of the following:
  "flagRecommenderEnabled": boolean
  // End of list of possible types for union field _flag_recommender_enabled.
}
欄位

聯集欄位 _entitled

_entitled 只能是下列其中一項:

entitled

boolean

僅供輸出。是否啟用 Gemini。

聯集欄位 _google_vacuum_mgmt_enabled

_google_vacuum_mgmt_enabled 只能是下列其中一項:

googleVacuumMgmtEnabled

boolean

僅供輸出。是否啟用吸塵器管理功能。

聯集欄位 _oom_session_cancel_enabled

_oom_session_cancel_enabled 只能是下列其中一項:

oomSessionCancelEnabled

boolean

僅供輸出。是否啟用取消記憶體不足 (OOM) 工作階段。

聯集欄位 _active_query_enabled

_active_query_enabled 只能是下列其中一項:

activeQueryEnabled

boolean

僅供輸出。是否啟用執行中查詢。

聯集欄位 _index_advisor_enabled

_index_advisor_enabled 只能是下列其中一項:

indexAdvisorEnabled

boolean

僅供輸出。索引建議工具是否已啟用。

聯集欄位 _flag_recommender_enabled

_flag_recommender_enabled 只能是下列其中一項:

flagRecommenderEnabled

boolean

僅供輸出。是否啟用旗標建議工具。

TagsEntry

JSON 表示法
{
  "key": string,
  "value": string
}
欄位
key

string

value

string

PoolNodeConfig

JSON 表示法
{
  "ipAddresses": [
    {
      object (IpMapping)
    }
  ],
  "dnsNames": [
    {
      object (DnsNameMapping)
    }
  ],
  "pscAutoConnections": [
    {
      object (PscAutoConnectionConfig)
    }
  ],

  // Union field _name can be only one of the following:
  "name": string
  // End of list of possible types for union field _name.

  // Union field _gce_zone can be only one of the following:
  "gceZone": string
  // End of list of possible types for union field _gce_zone.

  // Union field _dns_name can be only one of the following:
  "dnsName": string
  // End of list of possible types for union field _dns_name.

  // Union field _state can be only one of the following:
  "state": enum (SqlInstanceState)
  // End of list of possible types for union field _state.

  // Union field _psc_service_attachment_link can be only one of the following:
  "pscServiceAttachmentLink": string
  // End of list of possible types for union field _psc_service_attachment_link.
}
欄位
ipAddresses[]

object (IpMapping)

僅供輸出。包含可用於連線至讀取集區節點的 IP 位址。

dnsNames[]

object (DnsNameMapping)

僅供輸出。這個讀取集區節點使用的 DNS 名稱清單。

pscAutoConnections[]

object (PscAutoConnectionConfig)

僅供輸出。系統會自動設定 Private Service Connect (PSC) 消費者端點,並列出相關設定,可用於連線至這個讀取集區節點。

聯集欄位 _name

_name 只能是下列其中一項:

name

string

僅供輸出。讀取集區節點的名稱,用於擷取指標和記錄。

聯集欄位 _gce_zone

_gce_zone 只能是下列其中一項:

gceZone

string

僅供輸出。讀取集區節點的區域。

聯集欄位 _dns_name

_dns_name 只能是下列其中一項:

dnsName

string

僅供輸出。讀取集區節點的 DNS 名稱。

聯集欄位 _state

_state 只能是下列其中一項:

state

enum (SqlInstanceState)

僅供輸出。讀取集區節點的目前狀態。

聯集欄位 _psc_service_attachment_link

_psc_service_attachment_link 只能是下列其中一項:

pscServiceAttachmentLink

string

僅供輸出。讀取集區節點的 Private Service Connect (PSC) 服務連結。

DnsNameMapping

JSON 表示法
{
  "name": string,
  "connectionType": enum (ConnectionType),
  "dnsScope": enum (DnsScope),
  "recordManager": enum (RecordManager)
}
欄位
name

string

僅供輸出。DNS 名稱。

connectionType

enum (ConnectionType)

僅供輸出。DNS 名稱的連線類型。

dnsScope

enum (DnsScope)

僅供輸出。DNS 名稱適用的範圍。

recordManager

enum (RecordManager)

僅供輸出。這項 DNS 記錄的管理員。

工具註解

破壞性提示:❌ | 等冪提示:❌ | 唯讀提示:✅ | 開放世界提示:❌