models.py•84.4 kB
# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T02:57:45+00:00
from __future__ import annotations
from enum import Enum
from typing import Dict, List, Optional
from pydantic import BaseModel, Field
class AclEntry(BaseModel):
expirationTime: Optional[str] = Field(
None,
description='The time when this access control entry expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.',
)
kind: Optional[str] = Field(None, description='This is always `sql#aclEntry`.')
name: Optional[str] = Field(
None, description='Optional. A label to identify this entry.'
)
value: Optional[str] = Field(
None, description='The allowlisted value for the access control list.'
)
class AdvancedMachineFeatures(BaseModel):
threadsPerCore: Optional[int] = Field(
None, description='The number of threads per physical core.'
)
class Code(Enum):
SQL_API_WARNING_CODE_UNSPECIFIED = 'SQL_API_WARNING_CODE_UNSPECIFIED'
REGION_UNREACHABLE = 'REGION_UNREACHABLE'
MAX_RESULTS_EXCEEDS_LIMIT = 'MAX_RESULTS_EXCEEDS_LIMIT'
class ApiWarning(BaseModel):
code: Optional[Code] = Field(
None, description='Code to uniquely identify the warning type.'
)
message: Optional[str] = Field(None, description='The warning message.')
region: Optional[str] = Field(
None, description='The region name for REGION_UNREACHABLE warning.'
)
class BackupContext(BaseModel):
backupId: Optional[str] = Field(None, description='The identifier of the backup.')
kind: Optional[str] = Field(None, description='This is always `sql#backupContext`.')
class RetentionUnit(Enum):
RETENTION_UNIT_UNSPECIFIED = 'RETENTION_UNIT_UNSPECIFIED'
COUNT = 'COUNT'
class BackupRetentionSettings(BaseModel):
retainedBackups: Optional[int] = Field(
None,
description="Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.",
)
retentionUnit: Optional[RetentionUnit] = Field(
None, description="The unit that 'retained_backups' represents."
)
class BackupKind(Enum):
SQL_BACKUP_KIND_UNSPECIFIED = 'SQL_BACKUP_KIND_UNSPECIFIED'
SNAPSHOT = 'SNAPSHOT'
PHYSICAL = 'PHYSICAL'
class Status(Enum):
SQL_BACKUP_RUN_STATUS_UNSPECIFIED = 'SQL_BACKUP_RUN_STATUS_UNSPECIFIED'
ENQUEUED = 'ENQUEUED'
OVERDUE = 'OVERDUE'
RUNNING = 'RUNNING'
FAILED = 'FAILED'
SUCCESSFUL = 'SUCCESSFUL'
SKIPPED = 'SKIPPED'
DELETION_PENDING = 'DELETION_PENDING'
DELETION_FAILED = 'DELETION_FAILED'
DELETED = 'DELETED'
class Type(Enum):
SQL_BACKUP_RUN_TYPE_UNSPECIFIED = 'SQL_BACKUP_RUN_TYPE_UNSPECIFIED'
AUTOMATED = 'AUTOMATED'
ON_DEMAND = 'ON_DEMAND'
class BinLogCoordinates(BaseModel):
binLogFileName: Optional[str] = Field(
None, description='Name of the binary log file for a Cloud SQL instance.'
)
binLogPosition: Optional[str] = Field(
None, description='Position (offset) within the binary log file.'
)
kind: Optional[str] = Field(
None, description='This is always `sql#binLogCoordinates`.'
)
class CloneContext(BaseModel):
allocatedIpRange: Optional[str] = Field(
None,
description='The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. Reserved for future use.',
)
binLogCoordinates: Optional[BinLogCoordinates] = Field(
None,
description='Binary log coordinates, if specified, identify the position up to which the source instance is cloned. If not specified, the source instance is cloned up to the most recent binary log coordinates.',
)
databaseNames: Optional[List[str]] = Field(
None,
description='(SQL Server only) Clone only the specified databases from the source instance. Clone all databases if empty.',
)
destinationInstanceName: Optional[str] = Field(
None, description='Name of the Cloud SQL instance to be created as a clone.'
)
kind: Optional[str] = Field(None, description='This is always `sql#cloneContext`.')
pitrTimestampMs: Optional[str] = Field(None, description='Reserved for future use.')
pointInTime: Optional[str] = Field(
None,
description='Timestamp, if specified, identifies the time to which the source instance is cloned.',
)
class BackendType(Enum):
SQL_BACKEND_TYPE_UNSPECIFIED = 'SQL_BACKEND_TYPE_UNSPECIFIED'
FIRST_GEN = 'FIRST_GEN'
SECOND_GEN = 'SECOND_GEN'
EXTERNAL = 'EXTERNAL'
class DatabaseVersion(Enum):
SQL_DATABASE_VERSION_UNSPECIFIED = 'SQL_DATABASE_VERSION_UNSPECIFIED'
MYSQL_5_1 = 'MYSQL_5_1'
MYSQL_5_5 = 'MYSQL_5_5'
MYSQL_5_6 = 'MYSQL_5_6'
MYSQL_5_7 = 'MYSQL_5_7'
SQLSERVER_2017_STANDARD = 'SQLSERVER_2017_STANDARD'
SQLSERVER_2017_ENTERPRISE = 'SQLSERVER_2017_ENTERPRISE'
SQLSERVER_2017_EXPRESS = 'SQLSERVER_2017_EXPRESS'
SQLSERVER_2017_WEB = 'SQLSERVER_2017_WEB'
POSTGRES_9_6 = 'POSTGRES_9_6'
POSTGRES_10 = 'POSTGRES_10'
POSTGRES_11 = 'POSTGRES_11'
POSTGRES_12 = 'POSTGRES_12'
POSTGRES_13 = 'POSTGRES_13'
POSTGRES_14 = 'POSTGRES_14'
MYSQL_8_0 = 'MYSQL_8_0'
MYSQL_8_0_18 = 'MYSQL_8_0_18'
MYSQL_8_0_26 = 'MYSQL_8_0_26'
MYSQL_8_0_27 = 'MYSQL_8_0_27'
MYSQL_8_0_28 = 'MYSQL_8_0_28'
MYSQL_8_0_29 = 'MYSQL_8_0_29'
MYSQL_8_0_30 = 'MYSQL_8_0_30'
MYSQL_8_0_31 = 'MYSQL_8_0_31'
MYSQL_8_0_32 = 'MYSQL_8_0_32'
MYSQL_8_0_33 = 'MYSQL_8_0_33'
MYSQL_8_0_34 = 'MYSQL_8_0_34'
MYSQL_8_0_35 = 'MYSQL_8_0_35'
MYSQL_8_0_36 = 'MYSQL_8_0_36'
SQLSERVER_2019_STANDARD = 'SQLSERVER_2019_STANDARD'
SQLSERVER_2019_ENTERPRISE = 'SQLSERVER_2019_ENTERPRISE'
SQLSERVER_2019_EXPRESS = 'SQLSERVER_2019_EXPRESS'
SQLSERVER_2019_WEB = 'SQLSERVER_2019_WEB'
class DatabaseFlags(BaseModel):
name: Optional[str] = Field(
None,
description='The name of the flag. These flags are passed at instance startup, so include both server options and system variables. Flags are specified with underscores, not hyphens. For more information, see [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) in the Cloud SQL documentation.',
)
value: Optional[str] = Field(
None,
description="The value of the flag. Boolean flags are set to `on` for true and `off` for false. This field must be omitted if the flag doesn't take a value.",
)
class FailoverReplica(BaseModel):
available: Optional[bool] = Field(
None,
description='The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.',
)
name: Optional[str] = Field(
None,
description="The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID.",
)
class InstanceType(Enum):
SQL_INSTANCE_TYPE_UNSPECIFIED = 'SQL_INSTANCE_TYPE_UNSPECIFIED'
CLOUD_SQL_INSTANCE = 'CLOUD_SQL_INSTANCE'
ON_PREMISES_INSTANCE = 'ON_PREMISES_INSTANCE'
READ_REPLICA_INSTANCE = 'READ_REPLICA_INSTANCE'
class State(Enum):
SQL_INSTANCE_STATE_UNSPECIFIED = 'SQL_INSTANCE_STATE_UNSPECIFIED'
RUNNABLE = 'RUNNABLE'
SUSPENDED = 'SUSPENDED'
PENDING_DELETE = 'PENDING_DELETE'
PENDING_CREATE = 'PENDING_CREATE'
MAINTENANCE = 'MAINTENANCE'
FAILED = 'FAILED'
ONLINE_MAINTENANCE = 'ONLINE_MAINTENANCE'
class SuspensionReasonEnum(Enum):
SQL_SUSPENSION_REASON_UNSPECIFIED = 'SQL_SUSPENSION_REASON_UNSPECIFIED'
BILLING_ISSUE = 'BILLING_ISSUE'
LEGAL_ISSUE = 'LEGAL_ISSUE'
OPERATIONAL_ISSUE = 'OPERATIONAL_ISSUE'
KMS_KEY_ISSUE = 'KMS_KEY_ISSUE'
class DemoteMasterMySqlReplicaConfiguration(BaseModel):
caCertificate: Optional[str] = Field(
None, description="PEM representation of the trusted CA's x509 certificate."
)
clientCertificate: Optional[str] = Field(
None, description="PEM representation of the replica's x509 certificate."
)
clientKey: Optional[str] = Field(
None,
description="PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. The format of the replica's private key can be either PKCS #1 or PKCS #8.",
)
kind: Optional[str] = Field(
None, description='This is always `sql#demoteMasterMysqlReplicaConfiguration`.'
)
password: Optional[str] = Field(
None, description='The password for the replication connection.'
)
username: Optional[str] = Field(
None, description='The username for the replication connection.'
)
class DenyMaintenancePeriod(BaseModel):
endDate: Optional[str] = Field(
None,
description='"deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01',
)
startDate: Optional[str] = Field(
None,
description='"deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01',
)
time: Optional[str] = Field(
None,
description='Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00',
)
class DiskEncryptionConfiguration(BaseModel):
kind: Optional[str] = Field(
None, description='This is always `sql#diskEncryptionConfiguration`.'
)
kmsKeyName: Optional[str] = Field(
None, description='Resource name of KMS key for disk encryption'
)
class DiskEncryptionStatus(BaseModel):
kind: Optional[str] = Field(
None, description='This is always `sql#diskEncryptionStatus`.'
)
kmsKeyVersionName: Optional[str] = Field(
None,
description='KMS key version used to encrypt the Cloud SQL instance resource',
)
class BakExportOptions(BaseModel):
stripeCount: Optional[int] = Field(
None,
description='Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.',
)
striped: Optional[bool] = Field(
None, description='Whether or not the export should be striped.'
)
class CsvExportOptions(BaseModel):
escapeCharacter: Optional[str] = Field(
None,
description='Specifies the character that should appear before a data character that needs to be escaped.',
)
fieldsTerminatedBy: Optional[str] = Field(
None,
description='Specifies the character that separates columns within each row (line) of the file.',
)
linesTerminatedBy: Optional[str] = Field(
None,
description='This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.',
)
quoteCharacter: Optional[str] = Field(
None,
description='Specifies the quoting character to be used when a data value is quoted.',
)
selectQuery: Optional[str] = Field(
None, description='The select query used to extract the data.'
)
class FileType(Enum):
SQL_FILE_TYPE_UNSPECIFIED = 'SQL_FILE_TYPE_UNSPECIFIED'
SQL = 'SQL'
CSV = 'CSV'
BAK = 'BAK'
class MysqlExportOptions(BaseModel):
masterData: Optional[int] = Field(
None,
description='Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.',
)
class SqlExportOptions(BaseModel):
mysqlExportOptions: Optional[MysqlExportOptions] = Field(
None, description='Options for exporting from MySQL.'
)
schemaOnly: Optional[bool] = Field(None, description='Export only schemas.')
tables: Optional[List[str]] = Field(
None,
description='Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.',
)
class ExportContext(BaseModel):
bakExportOptions: Optional[BakExportOptions] = Field(
None, description='Options for exporting BAK files (SQL Server-only)'
)
csvExportOptions: Optional[CsvExportOptions] = Field(
None,
description='Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.',
)
databases: Optional[List[str]] = Field(
None,
description='Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` You must specify one database to be exported. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`.',
)
fileType: Optional[FileType] = Field(
None, description='The file type for the specified uri.'
)
kind: Optional[str] = Field(None, description='This is always `sql#exportContext`.')
offload: Optional[bool] = Field(None, description='Option for export offload.')
sqlExportOptions: Optional[SqlExportOptions] = Field(
None, description='Options for exporting data as SQL statements.'
)
uri: Optional[str] = Field(
None,
description='The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.',
)
class FailoverContext(BaseModel):
kind: Optional[str] = Field(
None, description='This is always `sql#failoverContext`.'
)
settingsVersion: Optional[str] = Field(
None,
description="The current settings version of this instance. Request will be rejected if this version doesn't match the current settings version.",
)
class AppliesToEnum(Enum):
SQL_DATABASE_VERSION_UNSPECIFIED = 'SQL_DATABASE_VERSION_UNSPECIFIED'
MYSQL_5_1 = 'MYSQL_5_1'
MYSQL_5_5 = 'MYSQL_5_5'
MYSQL_5_6 = 'MYSQL_5_6'
MYSQL_5_7 = 'MYSQL_5_7'
SQLSERVER_2017_STANDARD = 'SQLSERVER_2017_STANDARD'
SQLSERVER_2017_ENTERPRISE = 'SQLSERVER_2017_ENTERPRISE'
SQLSERVER_2017_EXPRESS = 'SQLSERVER_2017_EXPRESS'
SQLSERVER_2017_WEB = 'SQLSERVER_2017_WEB'
POSTGRES_9_6 = 'POSTGRES_9_6'
POSTGRES_10 = 'POSTGRES_10'
POSTGRES_11 = 'POSTGRES_11'
POSTGRES_12 = 'POSTGRES_12'
POSTGRES_13 = 'POSTGRES_13'
POSTGRES_14 = 'POSTGRES_14'
MYSQL_8_0 = 'MYSQL_8_0'
MYSQL_8_0_18 = 'MYSQL_8_0_18'
MYSQL_8_0_26 = 'MYSQL_8_0_26'
MYSQL_8_0_27 = 'MYSQL_8_0_27'
MYSQL_8_0_28 = 'MYSQL_8_0_28'
MYSQL_8_0_29 = 'MYSQL_8_0_29'
MYSQL_8_0_30 = 'MYSQL_8_0_30'
MYSQL_8_0_31 = 'MYSQL_8_0_31'
MYSQL_8_0_32 = 'MYSQL_8_0_32'
MYSQL_8_0_33 = 'MYSQL_8_0_33'
MYSQL_8_0_34 = 'MYSQL_8_0_34'
MYSQL_8_0_35 = 'MYSQL_8_0_35'
MYSQL_8_0_36 = 'MYSQL_8_0_36'
SQLSERVER_2019_STANDARD = 'SQLSERVER_2019_STANDARD'
SQLSERVER_2019_ENTERPRISE = 'SQLSERVER_2019_ENTERPRISE'
SQLSERVER_2019_EXPRESS = 'SQLSERVER_2019_EXPRESS'
SQLSERVER_2019_WEB = 'SQLSERVER_2019_WEB'
class Type1(Enum):
SQL_FLAG_TYPE_UNSPECIFIED = 'SQL_FLAG_TYPE_UNSPECIFIED'
BOOLEAN = 'BOOLEAN'
STRING = 'STRING'
INTEGER = 'INTEGER'
NONE = 'NONE'
MYSQL_TIMEZONE_OFFSET = 'MYSQL_TIMEZONE_OFFSET'
FLOAT = 'FLOAT'
REPEATED_STRING = 'REPEATED_STRING'
class Flag(BaseModel):
allowedIntValues: Optional[List[str]] = Field(
None,
description='Use this field if only certain integers are accepted. Can be combined with min_value and max_value to add additional values.',
)
allowedStringValues: Optional[List[str]] = Field(
None,
description='For `STRING` flags, a list of strings that the value can be set to.',
)
appliesTo: Optional[List[AppliesToEnum]] = Field(
None,
description='The database version this flag applies to. Can be MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or `SQLSERVER_2019_WEB`. See [the complete list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).',
)
inBeta: Optional[bool] = Field(
None, description='Whether or not the flag is considered in beta.'
)
kind: Optional[str] = Field(None, description='This is always `sql#flag`.')
maxValue: Optional[str] = Field(
None, description='For `INTEGER` flags, the maximum allowed value.'
)
minValue: Optional[str] = Field(
None, description='For `INTEGER` flags, the minimum allowed value.'
)
name: Optional[str] = Field(
None,
description='This is the name of the flag. Flag names always use underscores, not hyphens, for example: `max_allowed_packet`',
)
requiresRestart: Optional[bool] = Field(
None,
description='Indicates whether changing this flag will trigger a database restart. Only applicable to Second Generation instances.',
)
type: Optional[Type1] = Field(
None,
description='The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, `INTEGER` or `NONE`. `NONE` is used for flags that do not take a value, such as `skip_grant_tables`.',
)
class FlagsListResponse(BaseModel):
items: Optional[List[Flag]] = Field(None, description='List of flags.')
kind: Optional[str] = Field(None, description='This is always `sql#flagsList`.')
class GenerateEphemeralCertRequest(BaseModel):
access_token: Optional[str] = Field(
None, description='Optional. Access token to include in the signed certificate.'
)
public_key: Optional[str] = Field(
None, description='PEM encoded public key to include in the signed certificate.'
)
readTime: Optional[str] = Field(
None,
description='Optional. Optional snapshot read timestamp to trade freshness for performance.',
)
validDuration: Optional[str] = Field(
None, description='Optional. If set, it will contain the cert valid duration.'
)
class EncryptionOptions(BaseModel):
certPath: Optional[str] = Field(
None,
description='Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.',
)
pvkPassword: Optional[str] = Field(
None, description='Password that encrypts the private key'
)
pvkPath: Optional[str] = Field(
None,
description='Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.',
)
class BakImportOptions(BaseModel):
encryptionOptions: Optional[EncryptionOptions] = None
striped: Optional[bool] = Field(
None,
description='Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.',
)
class CsvImportOptions(BaseModel):
columns: Optional[List[str]] = Field(
None,
description='The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.',
)
escapeCharacter: Optional[str] = Field(
None,
description='Specifies the character that should appear before a data character that needs to be escaped.',
)
fieldsTerminatedBy: Optional[str] = Field(
None,
description='Specifies the character that separates columns within each row (line) of the file.',
)
linesTerminatedBy: Optional[str] = Field(
None,
description='This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.',
)
quoteCharacter: Optional[str] = Field(
None,
description='Specifies the quoting character to be used when a data value is quoted.',
)
table: Optional[str] = Field(
None, description='The table to which CSV data is imported.'
)
class ImportContext(BaseModel):
bakImportOptions: Optional[BakImportOptions] = Field(
None, description='Import parameters specific to SQL Server .BAK files'
)
csvImportOptions: Optional[CsvImportOptions] = Field(
None, description='Options for importing data as CSV.'
)
database: Optional[str] = Field(
None,
description='The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If `fileType` is `CSV`, one database must be specified.',
)
fileType: Optional[FileType] = Field(
None,
description='The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.',
)
importUser: Optional[str] = Field(
None,
description='The PostgreSQL user for this import operation. PostgreSQL instances only.',
)
kind: Optional[str] = Field(None, description='This is always `sql#importContext`.')
uri: Optional[str] = Field(
None,
description='Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.',
)
class InsightsConfig(BaseModel):
queryInsightsEnabled: Optional[bool] = Field(
None, description='Whether Query Insights feature is enabled.'
)
queryPlansPerMinute: Optional[int] = Field(
None,
description='Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.',
)
queryStringLength: Optional[int] = Field(
None,
description='Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value. Changing query length will restart the database.',
)
recordApplicationTags: Optional[bool] = Field(
None,
description='Whether Query Insights will record application tags from query when enabled.',
)
recordClientAddress: Optional[bool] = Field(
None,
description='Whether Query Insights will record client address when enabled.',
)
class InstanceReference(BaseModel):
name: Optional[str] = Field(
None,
description='The name of the Cloud SQL instance being referenced. This does not include the project ID.',
)
project: Optional[str] = Field(
None,
description='The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.',
)
region: Optional[str] = Field(
None, description='The region of the Cloud SQL instance being referenced.'
)
class InstancesCloneRequest(BaseModel):
cloneContext: Optional[CloneContext] = Field(
None, description='Contains details about the clone operation.'
)
class InstancesExportRequest(BaseModel):
exportContext: Optional[ExportContext] = Field(
None, description='Contains details about the export operation.'
)
class InstancesFailoverRequest(BaseModel):
failoverContext: Optional[FailoverContext] = Field(
None, description='Failover Context.'
)
class InstancesImportRequest(BaseModel):
importContext: Optional[ImportContext] = Field(
None, description='Contains details about the import operation.'
)
class IpConfiguration(BaseModel):
allocatedIpRange: Optional[str] = Field(
None,
description='The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.`',
)
authorizedNetworks: Optional[List[AclEntry]] = Field(
None,
description="The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`).",
)
enablePrivatePathForGoogleCloudServices: Optional[bool] = Field(
None,
description='Controls connectivity to private IP instances from Google services, such as BigQuery.',
)
ipv4Enabled: Optional[bool] = Field(
None, description='Whether the instance is assigned a public IP address or not.'
)
privateNetwork: Optional[str] = Field(
None,
description='The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, `/projects/myProject/global/networks/default`. This setting can be updated, but it cannot be removed after it is set.',
)
requireSsl: Optional[bool] = Field(
None, description='Whether SSL connections over IP are enforced or not.'
)
class Type2(Enum):
SQL_IP_ADDRESS_TYPE_UNSPECIFIED = 'SQL_IP_ADDRESS_TYPE_UNSPECIFIED'
PRIMARY = 'PRIMARY'
OUTGOING = 'OUTGOING'
PRIVATE = 'PRIVATE'
MIGRATED_1ST_GEN = 'MIGRATED_1ST_GEN'
class IpMapping(BaseModel):
ipAddress: Optional[str] = Field(None, description='The IP address assigned.')
timeToRetire: Optional[str] = Field(
None,
description='The due time for this IP to be retired in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. This field is only available when the IP is scheduled to be retired.',
)
type: Optional[Type2] = Field(
None,
description='The type of this IP address. A `PRIMARY` address is a public address that can accept incoming connections. A `PRIVATE` address is a private address that can accept incoming connections. An `OUTGOING` address is the source address of connections originating from the instance, if supported.',
)
class LocationPreference(BaseModel):
followGaeApplication: Optional[str] = Field(
None,
description='The App Engine application to follow, it must be in the same region as the Cloud SQL instance. WARNING: Changing this might restart the instance.',
)
kind: Optional[str] = Field(
None, description='This is always `sql#locationPreference`.'
)
secondaryZone: Optional[str] = Field(
None,
description='The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.).',
)
zone: Optional[str] = Field(
None,
description='The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). WARNING: Changing this might restart the instance.',
)
class UpdateTrack(Enum):
SQL_UPDATE_TRACK_UNSPECIFIED = 'SQL_UPDATE_TRACK_UNSPECIFIED'
canary = 'canary'
stable = 'stable'
class MaintenanceWindow(BaseModel):
day: Optional[int] = Field(
None, description='day of week (1-7), starting on Monday.'
)
hour: Optional[int] = Field(None, description='hour of day - 0 to 23.')
kind: Optional[str] = Field(
None, description='This is always `sql#maintenanceWindow`.'
)
updateTrack: Optional[UpdateTrack] = Field(
None,
description='Maintenance timing setting: `canary` (Earlier) or `stable` (Later). [Learn more](https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen).',
)
class MySqlReplicaConfiguration(BaseModel):
caCertificate: Optional[str] = Field(
None, description="PEM representation of the trusted CA's x509 certificate."
)
clientCertificate: Optional[str] = Field(
None, description="PEM representation of the replica's x509 certificate."
)
clientKey: Optional[str] = Field(
None,
description="PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate.",
)
connectRetryInterval: Optional[int] = Field(
None,
description="Seconds to wait between connect retries. MySQL's default is 60 seconds.",
)
dumpFilePath: Optional[str] = Field(
None,
description='Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.',
)
kind: Optional[str] = Field(
None, description='This is always `sql#mysqlReplicaConfiguration`.'
)
masterHeartbeatPeriod: Optional[str] = Field(
None, description='Interval in milliseconds between replication heartbeats.'
)
password: Optional[str] = Field(
None, description='The password for the replication connection.'
)
sslCipher: Optional[str] = Field(
None, description='A list of permissible ciphers to use for SSL encryption.'
)
username: Optional[str] = Field(
None, description='The username for the replication connection.'
)
verifyServerCertificate: Optional[bool] = Field(
None,
description="Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake.",
)
class OnPremisesConfiguration(BaseModel):
caCertificate: Optional[str] = Field(
None, description="PEM representation of the trusted CA's x509 certificate."
)
clientCertificate: Optional[str] = Field(
None, description="PEM representation of the replica's x509 certificate."
)
clientKey: Optional[str] = Field(
None,
description="PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate.",
)
dumpFilePath: Optional[str] = Field(
None, description='The dump file to create the Cloud SQL replica.'
)
hostPort: Optional[str] = Field(
None,
description='The host and port of the on-premises instance in host:port format',
)
kind: Optional[str] = Field(
None, description='This is always `sql#onPremisesConfiguration`.'
)
password: Optional[str] = Field(
None, description='The password for connecting to on-premises instance.'
)
sourceInstance: Optional[InstanceReference] = Field(
None,
description='The reference to Cloud SQL instance if the source is Cloud SQL.',
)
username: Optional[str] = Field(
None, description='The username for connecting to on-premises instance.'
)
class OperationType(Enum):
SQL_OPERATION_TYPE_UNSPECIFIED = 'SQL_OPERATION_TYPE_UNSPECIFIED'
IMPORT = 'IMPORT'
EXPORT = 'EXPORT'
CREATE = 'CREATE'
UPDATE = 'UPDATE'
DELETE = 'DELETE'
RESTART = 'RESTART'
BACKUP = 'BACKUP'
SNAPSHOT = 'SNAPSHOT'
BACKUP_VOLUME = 'BACKUP_VOLUME'
DELETE_VOLUME = 'DELETE_VOLUME'
RESTORE_VOLUME = 'RESTORE_VOLUME'
INJECT_USER = 'INJECT_USER'
CLONE = 'CLONE'
STOP_REPLICA = 'STOP_REPLICA'
START_REPLICA = 'START_REPLICA'
PROMOTE_REPLICA = 'PROMOTE_REPLICA'
CREATE_REPLICA = 'CREATE_REPLICA'
CREATE_USER = 'CREATE_USER'
DELETE_USER = 'DELETE_USER'
UPDATE_USER = 'UPDATE_USER'
CREATE_DATABASE = 'CREATE_DATABASE'
DELETE_DATABASE = 'DELETE_DATABASE'
UPDATE_DATABASE = 'UPDATE_DATABASE'
FAILOVER = 'FAILOVER'
DELETE_BACKUP = 'DELETE_BACKUP'
RECREATE_REPLICA = 'RECREATE_REPLICA'
TRUNCATE_LOG = 'TRUNCATE_LOG'
DEMOTE_MASTER = 'DEMOTE_MASTER'
MAINTENANCE = 'MAINTENANCE'
ENABLE_PRIVATE_IP = 'ENABLE_PRIVATE_IP'
DEFER_MAINTENANCE = 'DEFER_MAINTENANCE'
CREATE_CLONE = 'CREATE_CLONE'
RESCHEDULE_MAINTENANCE = 'RESCHEDULE_MAINTENANCE'
START_EXTERNAL_SYNC = 'START_EXTERNAL_SYNC'
LOG_CLEANUP = 'LOG_CLEANUP'
AUTO_RESTART = 'AUTO_RESTART'
REENCRYPT = 'REENCRYPT'
class Status1(Enum):
SQL_OPERATION_STATUS_UNSPECIFIED = 'SQL_OPERATION_STATUS_UNSPECIFIED'
PENDING = 'PENDING'
RUNNING = 'RUNNING'
DONE = 'DONE'
class OperationError(BaseModel):
code: Optional[str] = Field(
None, description='Identifies the specific error that occurred.'
)
kind: Optional[str] = Field(
None, description='This is always `sql#operationError`.'
)
message: Optional[str] = Field(
None, description='Additional information about the error encountered.'
)
class OperationErrors(BaseModel):
errors: Optional[List[OperationError]] = Field(
None,
description='The list of errors encountered while processing this operation.',
)
kind: Optional[str] = Field(
None, description='This is always `sql#operationErrors`.'
)
class OperationMetadata(BaseModel):
apiVersion: Optional[str] = Field(
None, description='Output only. API version used to start the operation.'
)
cancelRequested: Optional[bool] = Field(
None,
description='Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.',
)
createTime: Optional[str] = Field(
None, description='Output only. The time the operation was created.'
)
endTime: Optional[str] = Field(
None, description='Output only. The time the operation finished running.'
)
statusDetail: Optional[str] = Field(
None, description='Output only. Human-readable status of the operation, if any.'
)
target: Optional[str] = Field(
None,
description='Output only. Server-defined resource path for the target of the operation.',
)
verb: Optional[str] = Field(
None, description='Output only. Name of the verb executed by the operation.'
)
class PasswordStatus(BaseModel):
locked: Optional[bool] = Field(
None, description='If true, user does not have login privileges.'
)
passwordExpirationTime: Optional[str] = Field(
None, description='The expiration time of the current password.'
)
class Complexity(Enum):
COMPLEXITY_UNSPECIFIED = 'COMPLEXITY_UNSPECIFIED'
COMPLEXITY_DEFAULT = 'COMPLEXITY_DEFAULT'
class PasswordValidationPolicy(BaseModel):
complexity: Optional[Complexity] = Field(
None, description='The complexity of the password.'
)
disallowUsernameSubstring: Optional[bool] = Field(
None, description='Disallow username as a part of the password.'
)
enablePasswordPolicy: Optional[bool] = Field(
None, description='Whether the password policy is enabled or not.'
)
minLength: Optional[int] = Field(
None, description='Minimum number of characters allowed.'
)
passwordChangeInterval: Optional[str] = Field(
None,
description='Minimum interval after which the password can be changed. This flag is only supported for PostgreSQL.',
)
reuseInterval: Optional[int] = Field(
None, description='Number of previous passwords that cannot be reused.'
)
class PerformDiskShrinkContext(BaseModel):
targetSizeGb: Optional[str] = Field(
None, description='The target disk shrink size in GigaBytes.'
)
class ReplicaConfiguration(BaseModel):
failoverTarget: Optional[bool] = Field(
None,
description='Specifies if the replica is the failover target. If the field is set to `true`, the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.',
)
kind: Optional[str] = Field(
None, description='This is always `sql#replicaConfiguration`.'
)
mysqlReplicaConfiguration: Optional[MySqlReplicaConfiguration] = Field(
None,
description='MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named `master.info` in the data directory.',
)
class RescheduleType(Enum):
RESCHEDULE_TYPE_UNSPECIFIED = 'RESCHEDULE_TYPE_UNSPECIFIED'
IMMEDIATE = 'IMMEDIATE'
NEXT_AVAILABLE_WINDOW = 'NEXT_AVAILABLE_WINDOW'
SPECIFIC_TIME = 'SPECIFIC_TIME'
class Reschedule(BaseModel):
rescheduleType: Optional[RescheduleType] = Field(
None, description='Required. The type of the reschedule.'
)
scheduleTime: Optional[str] = Field(
None,
description='Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.',
)
class RestoreBackupContext(BaseModel):
backupRunId: Optional[str] = Field(
None, description='The ID of the backup run to restore from.'
)
instanceId: Optional[str] = Field(
None, description='The ID of the instance that the backup was taken from.'
)
kind: Optional[str] = Field(
None, description='This is always `sql#restoreBackupContext`.'
)
project: Optional[str] = Field(
None, description='The full project ID of the source instance.'
)
class RotateServerCaContext(BaseModel):
kind: Optional[str] = Field(
None, description='This is always `sql#rotateServerCaContext`.'
)
nextVersion: Optional[str] = Field(
None,
description='The fingerprint of the next version to be rotated to. If left unspecified, will be rotated to the most recently added server CA version.',
)
class ActivationPolicy(Enum):
SQL_ACTIVATION_POLICY_UNSPECIFIED = 'SQL_ACTIVATION_POLICY_UNSPECIFIED'
ALWAYS = 'ALWAYS'
NEVER = 'NEVER'
ON_DEMAND = 'ON_DEMAND'
class AvailabilityType(Enum):
SQL_AVAILABILITY_TYPE_UNSPECIFIED = 'SQL_AVAILABILITY_TYPE_UNSPECIFIED'
ZONAL = 'ZONAL'
REGIONAL = 'REGIONAL'
class ConnectorEnforcement(Enum):
CONNECTOR_ENFORCEMENT_UNSPECIFIED = 'CONNECTOR_ENFORCEMENT_UNSPECIFIED'
NOT_REQUIRED = 'NOT_REQUIRED'
REQUIRED = 'REQUIRED'
class DataDiskType(Enum):
SQL_DATA_DISK_TYPE_UNSPECIFIED = 'SQL_DATA_DISK_TYPE_UNSPECIFIED'
PD_SSD = 'PD_SSD'
PD_HDD = 'PD_HDD'
OBSOLETE_LOCAL_SSD = 'OBSOLETE_LOCAL_SSD'
class PricingPlan(Enum):
SQL_PRICING_PLAN_UNSPECIFIED = 'SQL_PRICING_PLAN_UNSPECIFIED'
PACKAGE = 'PACKAGE'
PER_USE = 'PER_USE'
class ReplicationType(Enum):
SQL_REPLICATION_TYPE_UNSPECIFIED = 'SQL_REPLICATION_TYPE_UNSPECIFIED'
SYNCHRONOUS = 'SYNCHRONOUS'
ASYNCHRONOUS = 'ASYNCHRONOUS'
class SqlActiveDirectoryConfig(BaseModel):
domain: Optional[str] = Field(
None, description='The name of the domain (e.g., mydomain.com).'
)
kind: Optional[str] = Field(
None, description='This is always sql#activeDirectoryConfig.'
)
class Type3(Enum):
SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED = (
'SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED'
)
CONNECTION_FAILURE = 'CONNECTION_FAILURE'
BINLOG_NOT_ENABLED = 'BINLOG_NOT_ENABLED'
INCOMPATIBLE_DATABASE_VERSION = 'INCOMPATIBLE_DATABASE_VERSION'
REPLICA_ALREADY_SETUP = 'REPLICA_ALREADY_SETUP'
INSUFFICIENT_PRIVILEGE = 'INSUFFICIENT_PRIVILEGE'
UNSUPPORTED_MIGRATION_TYPE = 'UNSUPPORTED_MIGRATION_TYPE'
NO_PGLOGICAL_INSTALLED = 'NO_PGLOGICAL_INSTALLED'
PGLOGICAL_NODE_ALREADY_EXISTS = 'PGLOGICAL_NODE_ALREADY_EXISTS'
INVALID_WAL_LEVEL = 'INVALID_WAL_LEVEL'
INVALID_SHARED_PRELOAD_LIBRARY = 'INVALID_SHARED_PRELOAD_LIBRARY'
INSUFFICIENT_MAX_REPLICATION_SLOTS = 'INSUFFICIENT_MAX_REPLICATION_SLOTS'
INSUFFICIENT_MAX_WAL_SENDERS = 'INSUFFICIENT_MAX_WAL_SENDERS'
INSUFFICIENT_MAX_WORKER_PROCESSES = 'INSUFFICIENT_MAX_WORKER_PROCESSES'
UNSUPPORTED_EXTENSIONS = 'UNSUPPORTED_EXTENSIONS'
INVALID_RDS_LOGICAL_REPLICATION = 'INVALID_RDS_LOGICAL_REPLICATION'
INVALID_LOGGING_SETUP = 'INVALID_LOGGING_SETUP'
INVALID_DB_PARAM = 'INVALID_DB_PARAM'
UNSUPPORTED_GTID_MODE = 'UNSUPPORTED_GTID_MODE'
SQLSERVER_AGENT_NOT_RUNNING = 'SQLSERVER_AGENT_NOT_RUNNING'
UNSUPPORTED_TABLE_DEFINITION = 'UNSUPPORTED_TABLE_DEFINITION'
UNSUPPORTED_DEFINER = 'UNSUPPORTED_DEFINER'
SQLSERVER_SERVERNAME_MISMATCH = 'SQLSERVER_SERVERNAME_MISMATCH'
PRIMARY_ALREADY_SETUP = 'PRIMARY_ALREADY_SETUP'
UNSUPPORTED_BINLOG_FORMAT = 'UNSUPPORTED_BINLOG_FORMAT'
BINLOG_RETENTION_SETTING = 'BINLOG_RETENTION_SETTING'
UNSUPPORTED_STORAGE_ENGINE = 'UNSUPPORTED_STORAGE_ENGINE'
LIMITED_SUPPORT_TABLES = 'LIMITED_SUPPORT_TABLES'
EXISTING_DATA_IN_REPLICA = 'EXISTING_DATA_IN_REPLICA'
class SqlExternalSyncSettingError(BaseModel):
detail: Optional[str] = Field(
None, description='Additional information about the error encountered.'
)
kind: Optional[str] = Field(
None,
description='Can be `sql#externalSyncSettingError` or `sql#externalSyncSettingWarning`.',
)
type: Optional[Type3] = Field(
None, description='Identifies the specific error that occurred.'
)
class SqlInstancesGetDiskShrinkConfigResponse(BaseModel):
kind: Optional[str] = Field(
None, description='This is always `sql#getDiskShrinkConfig`.'
)
minimalTargetSizeGb: Optional[str] = Field(
None, description='The minimum size to which a disk can be shrunk in GigaBytes.'
)
class SqlInstancesRescheduleMaintenanceRequestBody(BaseModel):
reschedule: Optional[Reschedule] = Field(
None, description='Required. The type of the reschedule the user wants.'
)
class SqlInstancesResetReplicaSizeRequest(BaseModel):
pass
class SyncMode(Enum):
EXTERNAL_SYNC_MODE_UNSPECIFIED = 'EXTERNAL_SYNC_MODE_UNSPECIFIED'
ONLINE = 'ONLINE'
OFFLINE = 'OFFLINE'
class SqlInstancesVerifyExternalSyncSettingsResponse(BaseModel):
errors: Optional[List[SqlExternalSyncSettingError]] = Field(
None, description='List of migration violations.'
)
kind: Optional[str] = Field(
None, description='This is always `sql#migrationSettingErrorList`.'
)
warnings: Optional[List[SqlExternalSyncSettingError]] = Field(
None, description='List of migration warnings.'
)
class SqlOutOfDiskState(Enum):
SQL_OUT_OF_DISK_STATE_UNSPECIFIED = 'SQL_OUT_OF_DISK_STATE_UNSPECIFIED'
NORMAL = 'NORMAL'
SOFT_SHUTDOWN = 'SOFT_SHUTDOWN'
class SqlOutOfDiskReport(BaseModel):
sqlMinRecommendedIncreaseSizeGb: Optional[int] = Field(
None,
description='The minimum recommended increase size in GigaBytes This field is consumed by the frontend * Writers: * the proactive database wellness job for OOD. * Readers:',
)
sqlOutOfDiskState: Optional[SqlOutOfDiskState] = Field(
None,
description='This field represents the state generated by the proactive database wellness job for OutOfDisk issues. * Writers: * the proactive database wellness job for OOD. * Readers: * the proactive database wellness job',
)
class SqlScheduledMaintenance(BaseModel):
canDefer: Optional[bool] = None
canReschedule: Optional[bool] = Field(
None, description='If the scheduled maintenance can be rescheduled.'
)
scheduleDeadlineTime: Optional[str] = Field(
None,
description='Maintenance cannot be rescheduled to start beyond this deadline.',
)
startTime: Optional[str] = Field(
None,
description='The start time of any upcoming scheduled maintenance for this instance.',
)
class SqlServerAuditConfig(BaseModel):
bucket: Optional[str] = Field(
None, description='The name of the destination bucket (e.g., gs://mybucket).'
)
kind: Optional[str] = Field(
None, description='This is always sql#sqlServerAuditConfig'
)
retentionInterval: Optional[str] = Field(
None, description='How long to keep generated audit files.'
)
uploadInterval: Optional[str] = Field(
None, description='How often to upload generated audit files.'
)
class SqlServerDatabaseDetails(BaseModel):
compatibilityLevel: Optional[int] = Field(
None,
description='The version of SQL Server with which the database is to be made compatible',
)
recoveryModel: Optional[str] = Field(
None, description='The recovery model of a SQL Server database'
)
class SqlServerUserDetails(BaseModel):
disabled: Optional[bool] = Field(None, description='If the user has been disabled')
serverRoles: Optional[List[str]] = Field(
None, description='The server roles for this user'
)
class SslCert(BaseModel):
cert: Optional[str] = Field(None, description='PEM representation.')
certSerialNumber: Optional[str] = Field(
None, description='Serial number, as extracted from the certificate.'
)
commonName: Optional[str] = Field(
None, description='User supplied name. Constrained to [a-zA-Z.-_ ]+.'
)
createTime: Optional[str] = Field(
None,
description='The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`',
)
expirationTime: Optional[str] = Field(
None,
description='The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.',
)
instance: Optional[str] = Field(None, description='Name of the database instance.')
kind: Optional[str] = Field(None, description='This is always `sql#sslCert`.')
selfLink: Optional[str] = Field(None, description='The URI of this resource.')
sha1Fingerprint: Optional[str] = Field(None, description='Sha1 Fingerprint.')
class SslCertDetail(BaseModel):
certInfo: Optional[SslCert] = Field(
None, description='The public information about the cert.'
)
certPrivateKey: Optional[str] = Field(
None,
description='The private key for the client cert, in pem format. Keep private in order to protect your security.',
)
class SslCertsCreateEphemeralRequest(BaseModel):
access_token: Optional[str] = Field(
None, description='Access token to include in the signed certificate.'
)
public_key: Optional[str] = Field(
None, description='PEM encoded public key to include in the signed certificate.'
)
class SslCertsInsertRequest(BaseModel):
commonName: Optional[str] = Field(
None,
description='User supplied name. Must be a distinct name from the other certificates for this instance.',
)
class SslCertsListResponse(BaseModel):
items: Optional[List[SslCert]] = Field(
None, description='List of client certificates for the instance.'
)
kind: Optional[str] = Field(None, description='This is always `sql#sslCertsList`.')
class SyncFlags(BaseModel):
name: Optional[str] = Field(None, description='The name of the flag.')
value: Optional[str] = Field(
None,
description="The value of the flag. This field must be omitted if the flag doesn't take a value.",
)
class Tier(BaseModel):
DiskQuota: Optional[str] = Field(
None, description='The maximum disk size of this tier in bytes.'
)
RAM: Optional[str] = Field(
None, description='The maximum RAM usage of this tier in bytes.'
)
kind: Optional[str] = Field(None, description='This is always `sql#tier`.')
region: Optional[List[str]] = Field(
None, description='The applicable regions for this tier.'
)
tier: Optional[str] = Field(
None,
description='An identifier for the machine type, for example, `db-custom-1-3840`. For related information, see [Pricing](/sql/pricing).',
)
class TiersListResponse(BaseModel):
items: Optional[List[Tier]] = Field(None, description='List of tiers.')
kind: Optional[str] = Field(None, description='This is always `sql#tiersList`.')
class TruncateLogContext(BaseModel):
kind: Optional[str] = Field(
None, description='This is always `sql#truncateLogContext`.'
)
logType: Optional[str] = Field(
None,
description='The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and `MYSQL_SLOW_TABLE`.',
)
class DualPasswordType(Enum):
DUAL_PASSWORD_TYPE_UNSPECIFIED = 'DUAL_PASSWORD_TYPE_UNSPECIFIED'
NO_MODIFY_DUAL_PASSWORD = 'NO_MODIFY_DUAL_PASSWORD'
NO_DUAL_PASSWORD = 'NO_DUAL_PASSWORD'
DUAL_PASSWORD = 'DUAL_PASSWORD'
class Type4(Enum):
BUILT_IN = 'BUILT_IN'
CLOUD_IAM_USER = 'CLOUD_IAM_USER'
CLOUD_IAM_SERVICE_ACCOUNT = 'CLOUD_IAM_SERVICE_ACCOUNT'
class UserPasswordValidationPolicy(BaseModel):
allowedFailedAttempts: Optional[int] = Field(
None,
description='Number of failed login attempts allowed before user get locked.',
)
enableFailedAttemptsCheck: Optional[bool] = Field(
None, description='If true, failed login attempts check will be enabled.'
)
enablePasswordVerification: Optional[bool] = Field(
None,
description='If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.',
)
passwordExpirationDuration: Optional[str] = Field(
None, description='Expiration duration after password is updated.'
)
status: Optional[PasswordStatus] = Field(
None, description='Output only. Read-only password status.'
)
class FieldXgafv(Enum):
field_1 = '1'
field_2 = '2'
class Alt(Enum):
json = 'json'
media = 'media'
proto = 'proto'
class BackupConfiguration(BaseModel):
backupRetentionSettings: Optional[BackupRetentionSettings] = Field(
None, description='Backup retention settings.'
)
binaryLogEnabled: Optional[bool] = Field(
None,
description='(MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.',
)
enabled: Optional[bool] = Field(
None, description='Whether this configuration is enabled.'
)
kind: Optional[str] = Field(
None, description='This is always `sql#backupConfiguration`.'
)
location: Optional[str] = Field(None, description='Location of the backup')
pointInTimeRecoveryEnabled: Optional[bool] = Field(
None, description='(Postgres only) Whether point in time recovery is enabled.'
)
replicationLogArchivingEnabled: Optional[bool] = Field(
None, description='Reserved for future use.'
)
startTime: Optional[str] = Field(
None,
description='Start time for the daily backup configuration in UTC timezone in the 24 hour format - `HH:MM`.',
)
transactionLogRetentionDays: Optional[int] = Field(
None,
description='The number of days of transaction logs we retain for point in time restore, from 1-7.',
)
class BackupRun(BaseModel):
backupKind: Optional[BackupKind] = Field(
None, description='Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.'
)
description: Optional[str] = Field(
None,
description='The description of this run, only applicable to on-demand backups.',
)
diskEncryptionConfiguration: Optional[DiskEncryptionConfiguration] = Field(
None, description='Encryption configuration specific to a backup.'
)
diskEncryptionStatus: Optional[DiskEncryptionStatus] = Field(
None, description='Encryption status specific to a backup.'
)
endTime: Optional[str] = Field(
None,
description='The time the backup operation completed in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.',
)
enqueuedTime: Optional[str] = Field(
None,
description='The time the run was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.',
)
error: Optional[OperationError] = Field(
None,
description='Information about why the backup operation failed. This is only present if the run has the FAILED status.',
)
id: Optional[str] = Field(
None,
description='The identifier for this backup run. Unique only for a specific Cloud SQL instance.',
)
instance: Optional[str] = Field(None, description='Name of the database instance.')
kind: Optional[str] = Field(None, description='This is always `sql#backupRun`.')
location: Optional[str] = Field(None, description='Location of the backups.')
selfLink: Optional[str] = Field(None, description='The URI of this resource.')
startTime: Optional[str] = Field(
None,
description='The time the backup operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.',
)
status: Optional[Status] = Field(None, description='The status of this run.')
timeZone: Optional[str] = Field(
None,
description='Backup time zone to prevent restores to an instance with a different time zone. Now relevant only for SQL Server.',
)
type: Optional[Type] = Field(
None,
description='The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". This field defaults to "ON_DEMAND" and is ignored, when specified for insert requests.',
)
windowStartTime: Optional[str] = Field(
None,
description='The start time of the backup window during which this the backup was attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.',
)
class BackupRunsListResponse(BaseModel):
items: Optional[List[BackupRun]] = Field(
None,
description='A list of backup runs in reverse chronological order of the enqueued time.',
)
kind: Optional[str] = Field(
None, description='This is always `sql#backupRunsList`.'
)
nextPageToken: Optional[str] = Field(
None,
description='The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.',
)
class ConnectSettings(BaseModel):
backendType: Optional[BackendType] = Field(
None,
description='`SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type.',
)
databaseVersion: Optional[DatabaseVersion] = Field(
None,
description='The database engine type and version. The `databaseVersion` field cannot be changed after instance creation. MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. SQL Server instances: `SQLSERVER_2017_STANDARD` (default), `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or `SQLSERVER_2019_WEB`.',
)
ipAddresses: Optional[List[IpMapping]] = Field(
None, description='The assigned IP addresses for the instance.'
)
kind: Optional[str] = Field(
None, description='This is always `sql#connectSettings`.'
)
region: Optional[str] = Field(
None,
description='The cloud region for the instance. For example, `us-central1`, `europe-west1`. The region cannot be changed after instance creation.',
)
serverCaCert: Optional[SslCert] = Field(None, description='SSL configuration.')
class Database(BaseModel):
charset: Optional[str] = Field(None, description='The Cloud SQL charset value.')
collation: Optional[str] = Field(None, description='The Cloud SQL collation value.')
etag: Optional[str] = Field(
None,
description='This field is deprecated and will be removed from a future version of the API.',
)
instance: Optional[str] = Field(
None,
description='The name of the Cloud SQL instance. This does not include the project ID.',
)
kind: Optional[str] = Field(None, description='This is always `sql#database`.')
name: Optional[str] = Field(
None,
description='The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.',
)
project: Optional[str] = Field(
None,
description='The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.',
)
selfLink: Optional[str] = Field(None, description='The URI of this resource.')
sqlserverDatabaseDetails: Optional[SqlServerDatabaseDetails] = None
class DatabasesListResponse(BaseModel):
items: Optional[List[Database]] = Field(
None, description='List of database resources in the instance.'
)
kind: Optional[str] = Field(None, description='This is always `sql#databasesList`.')
class DemoteMasterConfiguration(BaseModel):
kind: Optional[str] = Field(
None, description='This is always `sql#demoteMasterConfiguration`.'
)
mysqlReplicaConfiguration: Optional[DemoteMasterMySqlReplicaConfiguration] = Field(
None,
description='MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named `master.info` in the data directory.',
)
class DemoteMasterContext(BaseModel):
kind: Optional[str] = Field(
None, description='This is always `sql#demoteMasterContext`.'
)
masterInstanceName: Optional[str] = Field(
None,
description='The name of the instance which will act as on-premises primary instance in the replication setup.',
)
replicaConfiguration: Optional[DemoteMasterConfiguration] = Field(
None,
description='Configuration specific to read-replicas replicating from the on-premises primary instance.',
)
skipReplicationSetup: Optional[bool] = Field(
None, description='Flag to skip replication setup on the instance.'
)
verifyGtidConsistency: Optional[bool] = Field(
None,
description='Verify the GTID consistency for demote operation. Default value: `True`. Setting this flag to `false` enables you to bypass the GTID consistency check between on-premises primary instance and Cloud SQL instance during the demotion operation but also exposes you to the risk of future replication failures. Change the value only if you know the reason for the GTID divergence and are confident that doing so will not cause any replication issues.',
)
class GenerateEphemeralCertResponse(BaseModel):
ephemeralCert: Optional[SslCert] = Field(None, description='Generated cert')
class InstancesDemoteMasterRequest(BaseModel):
demoteMasterContext: Optional[DemoteMasterContext] = Field(
None, description='Contains details about the demoteMaster operation.'
)
class InstancesListServerCasResponse(BaseModel):
activeVersion: Optional[str] = None
certs: Optional[List[SslCert]] = Field(
None, description='List of server CA certificates for the instance.'
)
kind: Optional[str] = Field(
None, description='This is always `sql#instancesListServerCas`.'
)
class InstancesRestoreBackupRequest(BaseModel):
restoreBackupContext: Optional[RestoreBackupContext] = Field(
None, description='Parameters required to perform the restore backup operation.'
)
class InstancesRotateServerCaRequest(BaseModel):
rotateServerCaContext: Optional[RotateServerCaContext] = Field(
None, description='Contains details about the rotate server CA operation.'
)
class InstancesTruncateLogRequest(BaseModel):
truncateLogContext: Optional[TruncateLogContext] = Field(
None, description='Contains details about the truncate log operation.'
)
class MySqlSyncConfig(BaseModel):
initialSyncFlags: Optional[List[SyncFlags]] = Field(
None, description='Flags to use for the initial dump.'
)
class Operation(BaseModel):
backupContext: Optional[BackupContext] = Field(
None, description='The context for backup operation, if applicable.'
)
endTime: Optional[str] = Field(
None,
description='The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.',
)
error: Optional[OperationErrors] = Field(
None,
description='If errors occurred during processing of this operation, this field will be populated.',
)
exportContext: Optional[ExportContext] = Field(
None, description='The context for export operation, if applicable.'
)
importContext: Optional[ImportContext] = Field(
None, description='The context for import operation, if applicable.'
)
insertTime: Optional[str] = Field(
None,
description='The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.',
)
kind: Optional[str] = Field(None, description='This is always `sql#operation`.')
name: Optional[str] = Field(
None,
description='An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.',
)
operationType: Optional[OperationType] = Field(
None,
description='The type of the operation. Valid values are: * `CREATE` * `DELETE` * `UPDATE` * `RESTART` * `IMPORT` * `EXPORT` * `BACKUP_VOLUME` * `RESTORE_VOLUME` * `CREATE_USER` * `DELETE_USER` * `CREATE_DATABASE` * `DELETE_DATABASE`',
)
selfLink: Optional[str] = Field(None, description='The URI of this resource.')
startTime: Optional[str] = Field(
None,
description='The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.',
)
status: Optional[Status1] = Field(None, description='The status of an operation.')
targetId: Optional[str] = Field(
None, description='Name of the database instance related to this operation.'
)
targetLink: Optional[str] = None
targetProject: Optional[str] = Field(
None,
description='The project ID of the target instance related to this operation.',
)
user: Optional[str] = Field(
None, description='The email address of the user who initiated this operation.'
)
class OperationsListResponse(BaseModel):
items: Optional[List[Operation]] = Field(
None, description='List of operation resources.'
)
kind: Optional[str] = Field(
None, description='This is always `sql#operationsList`.'
)
nextPageToken: Optional[str] = Field(
None,
description='The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.',
)
class Settings(BaseModel):
activationPolicy: Optional[ActivationPolicy] = Field(
None,
description='The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: * `ALWAYS`: The instance is on, and remains so even in the absence of connection requests. * `NEVER`: The instance is off; it is not activated, even if a connection request arrives.',
)
activeDirectoryConfig: Optional[SqlActiveDirectoryConfig] = Field(
None,
description='Active Directory configuration, relevant only for Cloud SQL for SQL Server.',
)
advancedMachineFeatures: Optional[AdvancedMachineFeatures] = Field(
None,
description='Specifies advance machine configuration for the instance relevant only for SQL Server.',
)
authorizedGaeApplications: Optional[List[str]] = Field(
None,
description='The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.',
)
availabilityType: Optional[AvailabilityType] = Field(
None,
description='Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available)./ For more information, see [Overview of the High Availability Configuration](https://cloud.google.com/sql/docs/mysql/high-availability).',
)
backupConfiguration: Optional[BackupConfiguration] = Field(
None, description='The daily backup configuration for the instance.'
)
collation: Optional[str] = Field(
None, description='The name of server Instance collation.'
)
connectorEnforcement: Optional[ConnectorEnforcement] = Field(
None,
description='Specifies if connections must use Cloud SQL connectors. Option values include the following: `NOT_REQUIRED` (Cloud SQL instances can be connected without Cloud SQL Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL Connectors). Note that using REQUIRED disables all existing authorized networks. If this field is not specified when creating a new instance, NOT_REQUIRED is used. If this field is not specified when patching or updating an existing instance, it is left unchanged in the instance.',
)
crashSafeReplicationEnabled: Optional[bool] = Field(
None,
description='Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.',
)
dataDiskSizeGb: Optional[str] = Field(
None,
description='The size of data disk, in GB. The data disk size minimum is 10GB.',
)
dataDiskType: Optional[DataDiskType] = Field(
None,
description='The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for First Generation instances.',
)
databaseFlags: Optional[List[DatabaseFlags]] = Field(
None, description='The database flags passed to the instance at startup.'
)
databaseReplicationEnabled: Optional[bool] = Field(
None,
description='Configuration specific to read replica instances. Indicates whether replication is enabled or not. WARNING: Changing this restarts the instance.',
)
deletionProtectionEnabled: Optional[bool] = Field(
None,
description='Configuration to protect against accidental instance deletion.',
)
denyMaintenancePeriods: Optional[List[DenyMaintenancePeriod]] = Field(
None, description='Deny maintenance periods'
)
insightsConfig: Optional[InsightsConfig] = Field(
None, description='Insights configuration, for now relevant only for Postgres.'
)
ipConfiguration: Optional[IpConfiguration] = Field(
None,
description='The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.',
)
kind: Optional[str] = Field(None, description='This is always `sql#settings`.')
locationPreference: Optional[LocationPreference] = Field(
None,
description='The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.',
)
maintenanceWindow: Optional[MaintenanceWindow] = Field(
None,
description='The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.',
)
passwordValidationPolicy: Optional[PasswordValidationPolicy] = Field(
None, description='The local user password validation policy of the instance.'
)
pricingPlan: Optional[PricingPlan] = Field(
None,
description='The pricing plan for this instance. This can be either `PER_USE` or `PACKAGE`. Only `PER_USE` is supported for Second Generation instances.',
)
replicationType: Optional[ReplicationType] = Field(
None,
description='The type of replication this instance uses. This can be either `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only applicable to First Generation instances.',
)
settingsVersion: Optional[str] = Field(
None,
description='The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.',
)
sqlServerAuditConfig: Optional[SqlServerAuditConfig] = Field(
None, description='SQL Server specific audit configuration.'
)
storageAutoResize: Optional[bool] = Field(
None,
description='Configuration to increase storage size automatically. The default value is true.',
)
storageAutoResizeLimit: Optional[str] = Field(
None,
description='The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.',
)
tier: Optional[str] = Field(
None,
description='The tier (or machine type) for this instance, for example `db-custom-1-3840`. WARNING: Changing this restarts the instance.',
)
timeZone: Optional[str] = Field(
None, description='Server timezone, relevant only for Cloud SQL for SQL Server.'
)
userLabels: Optional[Dict[str, str]] = Field(
None,
description='User-provided labels, represented as a dictionary where each label is a single key value pair.',
)
class SqlInstancesStartExternalSyncRequest(BaseModel):
mysqlSyncConfig: Optional[MySqlSyncConfig] = Field(
None, description='MySQL-specific settings for start external sync.'
)
skipVerification: Optional[bool] = Field(
None, description='Whether to skip the verification step (VESS).'
)
syncMode: Optional[SyncMode] = Field(None, description='External sync mode.')
class SqlInstancesVerifyExternalSyncSettingsRequest(BaseModel):
mysqlSyncConfig: Optional[MySqlSyncConfig] = Field(
None, description='Optional. MySQL-specific settings for start external sync.'
)
syncMode: Optional[SyncMode] = Field(None, description='External sync mode')
verifyConnectionOnly: Optional[bool] = Field(
None, description='Flag to enable verifying connection only'
)
verifyReplicationOnly: Optional[bool] = Field(
None,
description='Optional. Flag to verify settings required by replication setup only',
)
class SslCertsInsertResponse(BaseModel):
clientCert: Optional[SslCertDetail] = Field(
None, description='The new client certificate and private key.'
)
kind: Optional[str] = Field(
None, description='This is always `sql#sslCertsInsert`.'
)
operation: Optional[Operation] = Field(
None, description='The operation to track the ssl certs insert request.'
)
serverCaCert: Optional[SslCert] = Field(
None,
description="The server Certificate Authority's certificate. If this is missing you can force a new one to be generated by calling resetSslConfig method on instances resource.",
)
class User(BaseModel):
dualPasswordType: Optional[DualPasswordType] = Field(
None, description='Dual password status for the user.'
)
etag: Optional[str] = Field(
None,
description='This field is deprecated and will be removed from a future version of the API.',
)
host: Optional[str] = Field(
None,
description="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: Optional[str] = Field(
None,
description='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.',
)
kind: Optional[str] = Field(None, description='This is always `sql#user`.')
name: Optional[str] = Field(
None,
description='The name of the user in the Cloud SQL instance. Can be omitted for `update` because it is already specified in the URL.',
)
password: Optional[str] = Field(None, description='The password for the user.')
passwordPolicy: Optional[UserPasswordValidationPolicy] = Field(
None, description='User level password validation policy.'
)
project: Optional[str] = Field(
None,
description='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.',
)
sqlserverUserDetails: Optional[SqlServerUserDetails] = None
type: Optional[Type4] = Field(
None,
description="The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type.",
)
class UsersListResponse(BaseModel):
items: Optional[List[User]] = Field(
None, description='List of user resources in the instance.'
)
kind: Optional[str] = Field(None, description='This is always `sql#usersList`.')
nextPageToken: Optional[str] = Field(None, description='Unused.')
class DatabaseInstance(BaseModel):
availableMaintenanceVersions: Optional[List[str]] = Field(
None,
description='Output only. List all maintenance versions applicable on the instance',
)
backendType: Optional[BackendType] = Field(
None,
description='The backend type. `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type.',
)
connectionName: Optional[str] = Field(
None,
description='Connection name of the Cloud SQL instance used in connection strings.',
)
createTime: Optional[str] = Field(
None,
description='Output only. The time when the instance was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.',
)
currentDiskSize: Optional[str] = Field(
None,
description='The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see [this announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) for details.',
)
databaseInstalledVersion: Optional[str] = Field(
None,
description='Output only. Stores the current database version running on the instance including minor version such as `MYSQL_8_0_18`.',
)
databaseVersion: Optional[DatabaseVersion] = Field(
None,
description='The database engine type and version. The `databaseVersion` field cannot be changed after instance creation.',
)
diskEncryptionConfiguration: Optional[DiskEncryptionConfiguration] = Field(
None, description='Disk encryption configuration specific to an instance.'
)
diskEncryptionStatus: Optional[DiskEncryptionStatus] = Field(
None, description='Disk encryption status specific to an instance.'
)
etag: Optional[str] = Field(
None,
description='This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead.',
)
failoverReplica: Optional[FailoverReplica] = Field(
None, description='The name and status of the failover replica.'
)
gceZone: Optional[str] = Field(
None,
description='The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. WARNING: Changing this might restart the instance.',
)
instanceType: Optional[InstanceType] = Field(None, description='The instance type.')
ipAddresses: Optional[List[IpMapping]] = Field(
None, description='The assigned IP addresses for the instance.'
)
ipv6Address: Optional[str] = Field(
None,
description='The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.',
)
kind: Optional[str] = Field(None, description='This is always `sql#instance`.')
maintenanceVersion: Optional[str] = Field(
None, description='The current software version on the instance.'
)
masterInstanceName: Optional[str] = Field(
None,
description='The name of the instance which will act as primary in the replication setup.',
)
maxDiskSize: Optional[str] = Field(
None, description='The maximum disk size of the instance in bytes.'
)
name: Optional[str] = Field(
None,
description='Name of the Cloud SQL instance. This does not include the project ID.',
)
onPremisesConfiguration: Optional[OnPremisesConfiguration] = Field(
None, description='Configuration specific to on-premises instances.'
)
outOfDiskReport: Optional[SqlOutOfDiskReport] = Field(
None,
description='This field represents the report generated by the proactive database wellness job for OutOfDisk issues. * Writers: * the proactive database wellness job for OOD. * Readers: * the proactive database wellness job',
)
project: Optional[str] = Field(
None,
description='The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.',
)
region: Optional[str] = Field(
None,
description='The geographical region. Can be: * `us-central` (`FIRST_GEN` instances only) * `us-central1` (`SECOND_GEN` instances only) * `asia-east1` or `europe-west1`. Defaults to `us-central` or `us-central1` depending on the instance type. The region cannot be changed after instance creation.',
)
replicaConfiguration: Optional[ReplicaConfiguration] = Field(
None,
description='Configuration specific to failover replicas and read replicas.',
)
replicaNames: Optional[List[str]] = Field(
None, description='The replicas of the instance.'
)
rootPassword: Optional[str] = Field(
None,
description='Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances.',
)
satisfiesPzs: Optional[bool] = Field(
None,
description='The status indicating if instance satisfiesPzs. Reserved for future use.',
)
scheduledMaintenance: Optional[SqlScheduledMaintenance] = Field(
None,
description='The start time of any upcoming scheduled maintenance for this instance.',
)
secondaryGceZone: Optional[str] = Field(
None,
description='The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone.',
)
selfLink: Optional[str] = Field(None, description='The URI of this resource.')
serverCaCert: Optional[SslCert] = Field(None, description='SSL configuration.')
serviceAccountEmailAddress: Optional[str] = Field(
None,
description='The service account email address assigned to the instance.\\This property is read-only.',
)
settings: Optional[Settings] = Field(None, description='The user settings.')
state: Optional[State] = Field(
None, description='The current serving state of the Cloud SQL instance.'
)
suspensionReason: Optional[List[SuspensionReasonEnum]] = Field(
None,
description='If the instance state is SUSPENDED, the reason for the suspension.',
)
class InstancesListResponse(BaseModel):
items: Optional[List[DatabaseInstance]] = Field(
None, description='List of database instance resources.'
)
kind: Optional[str] = Field(None, description='This is always `sql#instancesList`.')
nextPageToken: Optional[str] = Field(
None,
description='The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.',
)
warnings: Optional[List[ApiWarning]] = Field(
None, description='List of warnings that occurred while handling the request.'
)