1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011 |
- // LINT: LEGACY_NAMES
- // Copyright 2021 Google LLC
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
- syntax = "proto3";
- package google.cloud.sql.v1beta4;
- import "google/api/field_behavior.proto";
- import "google/protobuf/timestamp.proto";
- import "google/protobuf/wrappers.proto";
- option go_package = "google.golang.org/genproto/googleapis/cloud/sql/v1beta4;sql";
- option java_multiple_files = true;
- option java_outer_classname = "CloudSqlResourcesProto";
- option java_package = "com.google.cloud.sql.v1beta4";
- // NOTE: No sensitive PII logging is allowed. If you are adding a field/enum
- // value that is sensitive PII, add corresponding datapol annotation to
- // it. For more information, see
- // https://g3doc.corp.google.com/storage/speckle/g3doc/purple_team/data_pol_annotations.md?cl=head
- // An entry for an Access Control list.
- message AclEntry {
- // The allowlisted value for the access control list.
- string value = 1;
- // The time when this access control entry expires in <a
- // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example
- // <b>2012-11-15T16:19:00.094Z</b>.
- google.protobuf.Timestamp expiration_time = 2;
- // Optional. A label to identify this entry.
- string name = 3 [(google.api.field_behavior) = OPTIONAL];
- // This is always <b>sql#aclEntry</b>.
- string kind = 4;
- }
- // An Admin API warning message.
- message ApiWarning {
- enum SqlApiWarningCode {
- // An unknown or unset warning type from Cloud SQL API.
- SQL_API_WARNING_CODE_UNSPECIFIED = 0;
- // Warning when one or more regions are not reachable. The returned result
- // set may be incomplete.
- REGION_UNREACHABLE = 1;
- }
- // Code to uniquely identify the warning type.
- SqlApiWarningCode code = 1;
- // The warning message.
- string message = 2;
- // The region name for REGION_UNREACHABLE warning.
- string region = 3;
- }
- // We currently only support backup retention by specifying the number
- // of backups we will retain.
- message BackupRetentionSettings {
- // The units that retained_backups specifies, we only support COUNT.
- enum RetentionUnit {
- // Backup retention unit is unspecified, will be treated as COUNT.
- RETENTION_UNIT_UNSPECIFIED = 0;
- // Retention will be by count, eg. "retain the most recent 7 backups".
- COUNT = 1;
- }
- // The unit that 'retained_backups' represents.
- RetentionUnit retention_unit = 1;
- // 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.
- google.protobuf.Int32Value retained_backups = 2;
- }
- // Database instance backup configuration.
- message BackupConfiguration {
- // Start time for the daily backup configuration in UTC timezone in the 24
- // hour format - <b>HH:MM</b>.
- string start_time = 1;
- // Whether this configuration is enabled.
- google.protobuf.BoolValue enabled = 2;
- // This is always <b>sql#backupConfiguration</b>.
- string kind = 3;
- // (MySQL only) Whether binary log is enabled. If backup configuration is
- // disabled, binarylog must be disabled as well.
- google.protobuf.BoolValue binary_log_enabled = 4;
- // Reserved for future use.
- google.protobuf.BoolValue replication_log_archiving_enabled = 5;
- // Location of the backup
- string location = 6;
- // Reserved for future use.
- google.protobuf.BoolValue point_in_time_recovery_enabled = 7;
- // The number of days of transaction logs we retain for point in time
- // restore, from 1-7.
- google.protobuf.Int32Value transaction_log_retention_days = 9;
- // Backup retention settings.
- BackupRetentionSettings backup_retention_settings = 10;
- }
- // A BackupRun resource.
- message BackupRun {
- // This is always <b>sql#backupRun</b>.
- string kind = 1;
- // The status of this run.
- SqlBackupRunStatus status = 2;
- // The time the run was enqueued in UTC timezone in <a
- // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example
- // <b>2012-11-15T16:19:00.094Z</b>.
- google.protobuf.Timestamp enqueued_time = 3;
- // The identifier for this backup run. Unique only for a specific Cloud SQL
- // instance.
- int64 id = 4;
- // The time the backup operation actually started in UTC timezone in <a
- // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example
- // <b>2012-11-15T16:19:00.094Z</b>.
- google.protobuf.Timestamp start_time = 5;
- // The time the backup operation completed in UTC timezone in <a
- // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example
- // <b>2012-11-15T16:19:00.094Z</b>.
- google.protobuf.Timestamp end_time = 6;
- // Information about why the backup operation failed. This is only present if
- // the run has the FAILED status.
- OperationError error = 7;
- // The type of this run; can be either "AUTOMATED" or "ON_DEMAND". This field
- // defaults to "ON_DEMAND" and is ignored, when specified for insert requests.
- SqlBackupRunType type = 8;
- // The description of this run, only applicable to on-demand backups.
- string description = 9;
- // The start time of the backup window during which this the backup was
- // attempted in <a href="https://tools.ietf.org/html/rfc3339">RFC 3339</a>
- // format, for example <b>2012-11-15T16:19:00.094Z</b>.
- google.protobuf.Timestamp window_start_time = 10;
- // Name of the database instance.
- string instance = 11;
- // The URI of this resource.
- string self_link = 12;
- // Location of the backups.
- string location = 13;
- // Encryption configuration specific to a backup.
- // Applies only to Second Generation instances.
- DiskEncryptionConfiguration disk_encryption_configuration = 16;
- // Encryption status specific to a backup.
- // Applies only to Second Generation instances.
- DiskEncryptionStatus disk_encryption_status = 17;
- // Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
- SqlBackupKind backup_kind = 19;
- }
- // Backup run list results.
- message BackupRunsListResponse {
- // This is always <b>sql#backupRunsList</b>.
- string kind = 1;
- // A list of backup runs in reverse chronological order of the enqueued time.
- repeated BackupRun items = 2;
- // The continuation token, used to page through large result sets. Provide
- // this value in a subsequent request to return the next page of results.
- string next_page_token = 3;
- }
- // Binary log coordinates.
- message BinLogCoordinates {
- // Name of the binary log file for a Cloud SQL instance.
- string bin_log_file_name = 1;
- // Position (offset) within the binary log file.
- int64 bin_log_position = 2;
- // This is always <b>sql#binLogCoordinates</b>.
- string kind = 3;
- }
- // Backup context.
- message BackupContext {
- // The identifier of the backup.
- int64 backup_id = 1;
- // This is always <b>sql#backupContext</b>.
- string kind = 2;
- }
- // Database instance clone context.
- message CloneContext {
- // This is always <b>sql#cloneContext</b>.
- string kind = 1;
- // Reserved for future use.
- int64 pitr_timestamp_ms = 2;
- // Name of the Cloud SQL instance to be created as a clone.
- string destination_instance_name = 3;
- // 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.
- BinLogCoordinates bin_log_coordinates = 4;
- // Reserved for future use.
- google.protobuf.Timestamp point_in_time = 5;
- }
- // Represents a SQL database on the Cloud SQL instance.
- message Database {
- // This is always <b>sql#database</b>.
- string kind = 1;
- // The Cloud SQL charset value.
- string charset = 2;
- // The Cloud SQL collation value.
- string collation = 3;
- // This field is deprecated and will be removed from a future version of the
- // API.
- string etag = 4;
- // The name of the database in the Cloud SQL instance. This does not include
- // the project ID or instance name.
- string name = 5;
- // The name of the Cloud SQL instance. This does not include the project ID.
- string instance = 6;
- // The URI of this resource.
- string self_link = 7;
- // The project ID of the project containing the Cloud SQL database. The Google
- // apps domain is prefixed if applicable.
- string project = 8;
- oneof database_details {
- SqlServerDatabaseDetails sqlserver_database_details = 9;
- }
- }
- // Represents a Sql Server database on the Cloud SQL instance.
- message SqlServerDatabaseDetails {
- // The version of SQL Server with which the database is to be made compatible
- int32 compatibility_level = 1;
- // The recovery model of a SQL Server database
- string recovery_model = 2;
- }
- // Database flags for Cloud SQL instances.
- message DatabaseFlags {
- // The name of the flag. These flags are passed at instance startup, so
- // include both server options and system variables for MySQL. Flags are
- // specified with underscores, not hyphens. For more information, see <a
- // href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud
- // SQL documentation.
- string name = 1;
- // The value of the flag. Booleans are set to <b>on</b> for true
- // and <b>off</b> for false. This field must be omitted if the flag
- // doesn't take a value.
- string value = 2;
- }
- // A Cloud SQL instance resource.
- message DatabaseInstance {
- message SqlFailoverReplica {
- // 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. This property is applicable only to
- // Second Generation instances.
- string name = 1;
- // 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.
- google.protobuf.BoolValue available = 2;
- }
- // Any scheduled maintenancce for this instance.
- message SqlScheduledMaintenance {
- // The start time of any upcoming scheduled maintenance for this instance.
- google.protobuf.Timestamp start_time = 1;
- bool can_defer = 2 [deprecated = true];
- // If the scheduled maintenance can be rescheduled.
- bool can_reschedule = 3;
- }
- // This message wraps up the information written by out-of-disk detection job.
- message SqlOutOfDiskReport {
- // This enum lists all possible states regarding out-of-disk issues.
- enum SqlOutOfDiskState {
- // Unspecified state
- SQL_OUT_OF_DISK_STATE_UNSPECIFIED = 0;
- // The instance has plenty space on data disk
- NORMAL = 1;
- // Data disk is almost used up. It is shutdown to prevent data
- // corruption.
- SOFT_SHUTDOWN = 2;
- }
- // 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
- optional SqlOutOfDiskState sql_out_of_disk_state = 1;
- // The minimum recommended increase size in GigaBytes
- // This field is consumed by the frontend
- // Writers:
- // -- the proactive database wellness job for OOD.
- optional int32 sql_min_recommended_increase_size_gb = 2;
- }
- // The current serving state of the database instance.
- enum SqlInstanceState {
- // The state of the instance is unknown.
- SQL_INSTANCE_STATE_UNSPECIFIED = 0;
- // The instance is running, or has been stopped by owner.
- RUNNABLE = 1;
- // The instance is not available, for example due to problems with billing.
- SUSPENDED = 2;
- // The instance is being deleted.
- PENDING_DELETE = 3;
- // The instance is being created.
- PENDING_CREATE = 4;
- // The instance is down for maintenance.
- MAINTENANCE = 5;
- // The creation of the instance failed or a fatal error occurred during
- // maintenance.
- FAILED = 6;
- }
- // This is always <b>sql#instance</b>.
- string kind = 1;
- // The current serving state of the Cloud SQL instance. This can be one of the
- // following. <br><b>SQL_INSTANCE_STATE_UNSPECIFIED</b>: The state of the
- // instance is unknown. <br><b>RUNNABLE</b>: The instance is running, or has
- // been stopped by owner.
- // <br><b>SUSPENDED</b>: The instance is not available, for example due to
- // problems with billing.
- // <br><b>PENDING_DELETE</b>: The instance is being deleted.
- // <br><b>PENDING_CREATE</b>: The instance is being created.
- // <br><b>MAINTENANCE</b>: The instance is down for maintenance.
- // <br><b>FAILED</b>: The instance creation failed.
- SqlInstanceState state = 2;
- // The database engine type and version. The <b>databaseVersion</b>
- // field cannot be changed after instance creation.
- // <br>MySQL instances: <b>MYSQL_8_0</b>, <b>MYSQL_5_7</b> (default),
- // or <b>MYSQL_5_6</b>.
- // <br>PostgreSQL instances: <b>POSTGRES_9_6</b>, <b>POSTGRES_10</b>,
- // <b>POSTGRES_11</b>, <b>POSTGRES_12</b>, or <b>POSTGRES_13</b> (default).
- // <br>SQL Server instances: <b>SQLSERVER_2017_STANDARD</b> (default),
- // <b>SQLSERVER_2017_ENTERPRISE</b>, <b>SQLSERVER_2017_EXPRESS</b>, or
- // <b>SQLSERVER_2017_WEB</b>.
- SqlDatabaseVersion database_version = 3;
- // The user settings.
- Settings settings = 4;
- // This field is deprecated and will be removed from a future version of the
- // API. Use the <b>settings.settingsVersion</b> field instead.
- string etag = 5;
- // The name and status of the failover replica. This property is applicable
- // only to Second Generation instances.
- SqlFailoverReplica failover_replica = 6;
- // The name of the instance which will act as primary in the replication
- // setup.
- string master_instance_name = 7;
- // The replicas of the instance.
- repeated string replica_names = 8;
- // The maximum disk size of the instance in bytes.
- google.protobuf.Int64Value max_disk_size = 9 [deprecated = true];
- // 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 <a
- // href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this
- // announcement</a> for details.
- google.protobuf.Int64Value current_disk_size = 10 [deprecated = true];
- // The assigned IP addresses for the instance.
- repeated IpMapping ip_addresses = 11;
- // SSL configuration.
- SslCert server_ca_cert = 12;
- // The instance type. This can be one of the following.
- // <br><b>CLOUD_SQL_INSTANCE</b>: A Cloud SQL instance that is not replicating
- // from a primary instance. <br><b>ON_PREMISES_INSTANCE</b>: An instance
- // running on the customer's premises. <br><b>READ_REPLICA_INSTANCE</b>: A
- // Cloud SQL instance configured as a read-replica.
- SqlInstanceType instance_type = 13;
- // The project ID of the project containing the Cloud SQL instance. The Google
- // apps domain is prefixed if applicable.
- string project = 14;
- // The IPv6 address assigned to the instance.
- // (Deprecated) This property was applicable only
- // to First Generation instances.
- string ipv6_address = 15 [deprecated = true];
- // The service account email address assigned to the instance. <br>This
- // property is read-only.
- string service_account_email_address = 16;
- // Configuration specific to on-premises instances.
- OnPremisesConfiguration on_premises_configuration = 17;
- // Configuration specific to failover replicas and read replicas.
- ReplicaConfiguration replica_configuration = 18;
- // <br><b>SECOND_GEN</b>: Cloud SQL database instance.
- // <br><b>EXTERNAL</b>: A database server that is not
- // managed by Google. <br>This property is read-only; use the
- // <b>tier</b> property in the <b>settings</b> object to determine
- // the database type.
- SqlBackendType backend_type = 19;
- // The URI of this resource.
- string self_link = 20;
- // If the instance state is SUSPENDED, the reason for the suspension.
- repeated SqlSuspensionReason suspension_reason = 21;
- // Connection name of the Cloud SQL instance used in connection strings.
- string connection_name = 22;
- // Name of the Cloud SQL instance. This does not include the project ID.
- string name = 23;
- // The geographical region. Can be
- // <br><b>us-central</b> (<b>FIRST_GEN</b> instances only)
- // <br><b>us-central1</b> (<b>SECOND_GEN</b> instances only)
- // <br><b>asia-east1</b> or <b>europe-west1</b>.
- // <br>Defaults to <b>us-central</b> or
- // <b>us-central1</b> depending on the instance type.
- // The region cannot be changed after instance creation.
- string region = 24;
- // 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.
- string gce_zone = 25;
- // 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.
- // Reserved for future use.
- string secondary_gce_zone = 34;
- // Disk encryption configuration specific to an instance.
- // Applies only to Second Generation instances.
- DiskEncryptionConfiguration disk_encryption_configuration = 26;
- // Disk encryption status specific to an instance.
- // Applies only to Second Generation instances.
- DiskEncryptionStatus disk_encryption_status = 27;
- // Initial root password. Use only on creation.
- string root_password = 29;
- // The start time of any upcoming scheduled maintenance for this instance.
- SqlScheduledMaintenance scheduled_maintenance = 30;
- // The status indicating if instance satisfiesPzs.
- // Reserved for future use.
- google.protobuf.BoolValue satisfies_pzs = 35;
- // 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
- optional SqlOutOfDiskReport out_of_disk_report = 38;
- }
- // Database list response.
- message DatabasesListResponse {
- // This is always <b>sql#databasesList</b>.
- string kind = 1;
- // List of database resources in the instance.
- repeated Database items = 2;
- }
- // Read-replica configuration for connecting to the on-premises primary
- // instance.
- message DemoteMasterConfiguration {
- // This is always <b>sql#demoteMasterConfiguration</b>.
- string kind = 1;
- // 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
- // <b>master.info</b> in the data directory.
- DemoteMasterMySqlReplicaConfiguration mysql_replica_configuration = 2;
- }
- // Database instance demote primary instance context.
- message DemoteMasterContext {
- // This is always <b>sql#demoteMasterContext</b>.
- string kind = 1;
- // Verify GTID consistency for demote operation. Default value:
- // <b>True</b>. Second Generation instances only. Setting this flag to
- // false enables you to bypass 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.
- google.protobuf.BoolValue verify_gtid_consistency = 2;
- // The name of the instance which will act as on-premises primary instance
- // in the replication setup.
- string master_instance_name = 3;
- // Configuration specific to read-replicas replicating from the on-premises
- // primary instance.
- DemoteMasterConfiguration replica_configuration = 4;
- }
- // Read-replica configuration specific to MySQL databases.
- message DemoteMasterMySqlReplicaConfiguration {
- // This is always <b>sql#demoteMasterMysqlReplicaConfiguration</b>.
- string kind = 1;
- // The username for the replication connection.
- string username = 2;
- // The password for the replication connection.
- string password = 3;
- // 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.
- string client_key = 4;
- // PEM representation of the replica's x509 certificate.
- string client_certificate = 5;
- // PEM representation of the trusted CA's x509 certificate.
- string ca_certificate = 6;
- }
- // Database instance export context.
- message ExportContext {
- message SqlCsvExportOptions {
- // The select query used to extract the data.
- string select_query = 1;
- }
- message SqlExportOptions {
- // Options for exporting from MySQL.
- message MysqlExportOptions {
- // Option to include SQL statement required to set up replication.
- // <br>If set to <b>1</b>, the dump file includes
- // a CHANGE MASTER TO statement with the binary log coordinates,
- // and --set-gtid-purged is set to ON.
- // <br>If set to <b>2</b>, the CHANGE MASTER TO statement is written as
- // a SQL comment and has no effect.
- // <br>If set to any value other than <b>1</b>, --set-gtid-purged is set
- // to OFF.
- google.protobuf.Int32Value master_data = 1;
- }
- // 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.
- repeated string tables = 1;
- // Export only schemas.
- google.protobuf.BoolValue schema_only = 2;
- MysqlExportOptions mysql_export_options = 3;
- }
- // The path to the file in Google Cloud Storage where the export will be
- // stored. The URI is in the form <b>gs://bucketName/fileName</b>. If the file
- // already exists, the request succeeds, but the operation fails.
- // <br>If <b>fileType</b> is <b>SQL</b> and the filename ends with .gz,
- // the contents are compressed.
- string uri = 1;
- // Databases to be exported. <br /> <b>MySQL instances:</b> If
- // <b>fileType</b> is <b>SQL</b> and no database is specified, all
- // databases are exported, except for the <b>mysql</b> system database.
- // If <b>fileType</b> is <b>CSV</b>, you can specify one database,
- // either by using this property or by using the
- // <b>csvExportOptions.selectQuery</b> property, which takes precedence
- // over this property. <br /> <b>PostgreSQL instances:</b> You must specify
- // one database to be exported. If <b>fileType</b> is <b>CSV</b>,
- // this database must match the one specified in the
- // <b>csvExportOptions.selectQuery</b> property. <br /> <b>SQL Server
- // instances:</b> You must specify one database to be exported, and the
- // <b>fileType</b> must be <b>BAK</b>.
- repeated string databases = 2;
- // This is always <b>sql#exportContext</b>.
- string kind = 3;
- // Options for exporting data as SQL statements.
- SqlExportOptions sql_export_options = 4;
- // Options for exporting data as CSV. <b>MySQL</b> and <b>PostgreSQL</b>
- // instances only.
- SqlCsvExportOptions csv_export_options = 5;
- // The file type for the specified uri. <br><b>SQL</b>: The file
- // contains SQL statements. <br><b>CSV</b>: The file contains CSV data.
- // <br><b>BAK</b>: The file contains backup data for a SQL Server instance.
- SqlFileType file_type = 6;
- // Option for export offload.
- google.protobuf.BoolValue offload = 8;
- }
- // Database instance failover context.
- message FailoverContext {
- // The current settings version of this instance. Request will be rejected if
- // this version doesn't match the current settings version.
- int64 settings_version = 1;
- // This is always <b>sql#failoverContext</b>.
- string kind = 2;
- }
- // A flag resource.
- message Flag {
- // This is the name of the flag. Flag names always use underscores, not
- // hyphens, for example: <b>max_allowed_packet</b>
- string name = 1;
- // The type of the flag. Flags are typed to being <b>BOOLEAN</b>,
- // <b>STRING</b>, <b>INTEGER</b> or <b>NONE</b>.
- // <b>NONE</b> is used for flags which do not take a value, such as
- // <b>skip_grant_tables</b>.
- SqlFlagType type = 2;
- // The database version this flag applies to. Can be <b>MYSQL_8_0</b>,
- // <b>MYSQL_5_6</b>, or <b>MYSQL_5_7</b>.
- repeated SqlDatabaseVersion applies_to = 3;
- // For <b>STRING</b> flags, a list of strings that the value can be set
- // to.
- repeated string allowed_string_values = 4;
- // For <b>INTEGER</b> flags, the minimum allowed value.
- google.protobuf.Int64Value min_value = 5;
- // For <b>INTEGER</b> flags, the maximum allowed value.
- google.protobuf.Int64Value max_value = 6;
- // Indicates whether changing this flag will trigger a database restart. Only
- // applicable to Second Generation instances.
- google.protobuf.BoolValue requires_restart = 7;
- // This is always <b>sql#flag</b>.
- string kind = 8;
- // Whether or not the flag is considered in beta.
- google.protobuf.BoolValue in_beta = 9;
- // Use this field if only certain integers are accepted. Can be combined
- // with min_value and max_value to add additional values.
- repeated int64 allowed_int_values = 10;
- }
- // Flags list response.
- message FlagsListResponse {
- // This is always <b>sql#flagsList</b>.
- string kind = 1;
- // List of flags.
- repeated Flag items = 2;
- }
- // Database instance import context.
- message ImportContext {
- message SqlCsvImportOptions {
- // The table to which CSV data is imported.
- string table = 1;
- // The columns to which CSV data is imported. If not specified, all columns
- // of the database table are loaded with CSV data.
- repeated string columns = 2;
- }
- message SqlBakImportOptions {
- message EncryptionOptions {
- // Path to the Certificate (.cer) in Cloud Storage, in the form
- // <b>gs://bucketName/fileName</b>. The instance must have
- // write permissions to the bucket and read access to the file.
- string cert_path = 1;
- // Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
- // form <b>gs://bucketName/fileName</b>. The instance must have
- // write permissions to the bucket and read access to the file.
- string pvk_path = 2;
- // Password that encrypts the private key
- string pvk_password = 3;
- }
- EncryptionOptions encryption_options = 1;
- }
- // Path to the import file in Cloud Storage, in the form
- // <b>gs://bucketName/fileName</b>. Compressed gzip files (.gz) are supported
- // when <b>fileType</b> is <b>SQL</b>. The instance must have
- // write permissions to the bucket and read access to the file.
- string uri = 1;
- // The target database for the import. If <b>fileType</b> is
- // <b>SQL</b>, 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 <b>fileType</b> is <b>CSV</b>, one database
- // must be specified.
- string database = 2;
- // This is always <b>sql#importContext</b>.
- string kind = 3;
- // The file type for the specified uri. <br><b>SQL</b>: The file
- // contains SQL statements. <br><b>CSV</b>: The file contains CSV data.
- SqlFileType file_type = 4;
- // Options for importing data as CSV.
- SqlCsvImportOptions csv_import_options = 5;
- // The PostgreSQL user for this import operation. PostgreSQL instances only.
- string import_user = 6;
- // Import parameters specific to SQL Server .BAK files
- SqlBakImportOptions bak_import_options = 7;
- }
- enum SqlFileType {
- // Unknown file type.
- SQL_FILE_TYPE_UNSPECIFIED = 0;
- // File containing SQL statements.
- SQL = 1;
- // File in CSV format.
- CSV = 2;
- BAK = 4;
- }
- // Database instance clone request.
- message InstancesCloneRequest {
- // Contains details about the clone operation.
- CloneContext clone_context = 1;
- }
- // Database demote primary instance request.
- message InstancesDemoteMasterRequest {
- // Contains details about the demoteMaster operation.
- DemoteMasterContext demote_master_context = 1;
- }
- // Database instance export request.
- message InstancesExportRequest {
- // Contains details about the export operation.
- ExportContext export_context = 1;
- }
- // Instance failover request.
- message InstancesFailoverRequest {
- // Failover Context.
- FailoverContext failover_context = 1;
- }
- // Database instance import request.
- message InstancesImportRequest {
- // Contains details about the import operation.
- ImportContext import_context = 1;
- }
- // Database instances list response.
- message InstancesListResponse {
- // This is always <b>sql#instancesList</b>.
- string kind = 1;
- // List of warnings that occurred while handling the request.
- repeated ApiWarning warnings = 2;
- // List of database instance resources.
- repeated DatabaseInstance items = 3;
- // The continuation token, used to page through large result sets. Provide
- // this value in a subsequent request to return the next page of results.
- string next_page_token = 4;
- }
- // Instances ListServerCas response.
- message InstancesListServerCasResponse {
- // List of server CA certificates for the instance.
- repeated SslCert certs = 1;
- string active_version = 2;
- // This is always <b>sql#instancesListServerCas</b>.
- string kind = 3;
- }
- // Database instance restore backup request.
- message InstancesRestoreBackupRequest {
- // Parameters required to perform the restore backup operation.
- RestoreBackupContext restore_backup_context = 1;
- }
- // Rotate Server CA request.
- message InstancesRotateServerCaRequest {
- // Contains details about the rotate server CA operation.
- RotateServerCaContext rotate_server_ca_context = 1;
- }
- // Instance truncate log request.
- message InstancesTruncateLogRequest {
- // Contains details about the truncate log operation.
- TruncateLogContext truncate_log_context = 1;
- }
- // Instance verify external sync settings response.
- message SqlInstancesVerifyExternalSyncSettingsResponse {
- // This is always <b>sql#migrationSettingErrorList</b>.
- string kind = 1;
- // List of migration violations.
- repeated SqlExternalSyncSettingError errors = 2;
- // List of migration warnings.
- repeated SqlExternalSyncSettingError warnings = 3;
- }
- // External primary instance migration setting error/warning.
- message SqlExternalSyncSettingError {
- enum SqlExternalSyncSettingErrorType {
- SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED = 0;
- CONNECTION_FAILURE = 1;
- BINLOG_NOT_ENABLED = 2;
- INCOMPATIBLE_DATABASE_VERSION = 3;
- REPLICA_ALREADY_SETUP = 4;
- INSUFFICIENT_PRIVILEGE = 5;
- // Unsupported migration type.
- UNSUPPORTED_MIGRATION_TYPE = 6;
- // No pglogical extension installed on databases, applicable for postgres.
- NO_PGLOGICAL_INSTALLED = 7;
- // pglogical node already exists on databases, applicable for postgres.
- PGLOGICAL_NODE_ALREADY_EXISTS = 8;
- // The value of parameter wal_level is not set to logical.
- INVALID_WAL_LEVEL = 9;
- // The value of parameter shared_preload_libraries does not include
- // pglogical.
- INVALID_SHARED_PRELOAD_LIBRARY = 10;
- // The value of parameter max_replication_slots is not sufficient.
- INSUFFICIENT_MAX_REPLICATION_SLOTS = 11;
- // The value of parameter max_wal_senders is not sufficient.
- INSUFFICIENT_MAX_WAL_SENDERS = 12;
- // The value of parameter max_worker_processes is not sufficient.
- INSUFFICIENT_MAX_WORKER_PROCESSES = 13;
- // Extensions installed are either not supported or having unsupported
- // versions
- UNSUPPORTED_EXTENSIONS = 14;
- // The value of parameter rds.logical_replication is not set to 1.
- INVALID_RDS_LOGICAL_REPLICATION = 15;
- // The primary instance logging setup doesn't allow EM sync.
- INVALID_LOGGING_SETUP = 16;
- // The primary instance database parameter setup doesn't allow EM sync.
- INVALID_DB_PARAM = 17;
- // The gtid_mode is not supported, applicable for MySQL.
- UNSUPPORTED_GTID_MODE = 18;
- // SQL Server Agent is not running.
- SQLSERVER_AGENT_NOT_RUNNING = 19;
- // The table definition is not support due to missing primary key or replica
- // identity, applicable for postgres.
- UNSUPPORTED_TABLE_DEFINITION = 20;
- // The customer has a definer that will break EM setup.
- UNSUPPORTED_DEFINER = 21;
- }
- // Can be <b>sql#externalSyncSettingError</b> or
- // <b>sql#externalSyncSettingWarning</b>.
- string kind = 1;
- // Identifies the specific error that occurred.
- SqlExternalSyncSettingErrorType type = 2;
- // Additional information about the error encountered.
- string detail = 3;
- }
- // IP Management configuration.
- message IpConfiguration {
- // Whether the instance is assigned a public IP address or not.
- google.protobuf.BoolValue ipv4_enabled = 1;
- // The resource link for the VPC network from which the Cloud SQL instance is
- // accessible for private IP. For example,
- // <b>/projects/myProject/global/networks/default</b>. This setting can
- // be updated, but it cannot be removed after it is set.
- string private_network = 2;
- // Whether SSL connections over IP are enforced or not.
- google.protobuf.BoolValue require_ssl = 3;
- // 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: <b>192.168.100.0/24</b>).
- repeated AclEntry authorized_networks = 4;
- }
- // Database instance IP Mapping.
- message IpMapping {
- // The type of this IP address. A <b>PRIMARY</b> address is a public
- // address that can accept incoming connections. A <b>PRIVATE</b>
- // address is a private address that can accept incoming connections. An
- // <b>OUTGOING</b> address is the source address of connections
- // originating from the instance, if supported.
- SqlIpAddressType type = 1;
- // The IP address assigned.
- string ip_address = 2;
- // The due time for this IP to be retired in <a
- // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example
- // <b>2012-11-15T16:19:00.094Z</b>. This field is only available when
- // the IP is scheduled to be retired.
- google.protobuf.Timestamp time_to_retire = 3;
- }
- // Preferred location. This specifies where a Cloud SQL instance
- // is located, either in a specific Compute Engine zone, or
- // co-located with an App Engine application. Note that if the preferred
- // location is not available, the instance will be located as close as possible
- // within the region. Only one location may be specified.
- message LocationPreference {
- // The App Engine application to follow, it must be in the same region as the
- // Cloud SQL instance.
- string follow_gae_application = 1 [deprecated = true];
- // The preferred Compute Engine zone (for example: us-central1-a,
- // us-central1-b, etc.).
- string zone = 2;
- // The preferred Compute Engine zone for the secondary/failover
- // (for example: us-central1-a, us-central1-b, etc.).
- // Reserved for future use.
- string secondary_zone = 4;
- // This is always <b>sql#locationPreference</b>.
- string kind = 3;
- }
- // Maintenance window. This specifies when a Cloud SQL instance
- // is restarted for system maintenance purposes.
- message MaintenanceWindow {
- // hour of day - 0 to 23.
- google.protobuf.Int32Value hour = 1;
- // day of week (1-7), starting on Monday.
- google.protobuf.Int32Value day = 2;
- // Maintenance timing setting: <b>canary</b> (Earlier) or
- // <b>stable</b> (Later). <br /><a
- // href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen">
- // Learn more</a>.
- SqlUpdateTrack update_track = 3;
- // This is always <b>sql#maintenanceWindow</b>.
- string kind = 4;
- }
- // Deny Maintenance Periods. This specifies a date range during when all CSA
- // rollout will be denied.
- message DenyMaintenancePeriod {
- // "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
- string start_date = 1;
- // "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
- // 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
- string end_date = 2;
- // 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
- string time = 3;
- }
- // Insights configuration. This specifies when Cloud SQL Insights feature is
- // enabled and optional configuration.
- message InsightsConfig {
- // Whether Query Insights feature is enabled.
- bool query_insights_enabled = 1;
- // Whether Query Insights will record client address when enabled.
- bool record_client_address = 2;
- // Whether Query Insights will record application tags from query when
- // enabled.
- bool record_application_tags = 3;
- // 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.
- google.protobuf.Int32Value query_string_length = 4;
- // Number of query plans generated by Insights per minute. Default is 5.
- // Changing this will restart the database.
- google.protobuf.Int32Value query_plans_per_minute = 5;
- }
- // Read-replica configuration specific to MySQL databases.
- message MySqlReplicaConfiguration {
- // 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.
- string dump_file_path = 1;
- // The username for the replication connection.
- string username = 2;
- // The password for the replication connection.
- string password = 3;
- // Seconds to wait between connect retries. MySQL's default is 60 seconds.
- google.protobuf.Int32Value connect_retry_interval = 4;
- // Interval in milliseconds between replication heartbeats.
- google.protobuf.Int64Value master_heartbeat_period = 5;
- // PEM representation of the trusted CA's x509 certificate.
- string ca_certificate = 6;
- // PEM representation of the replica's x509 certificate.
- string client_certificate = 7;
- // PEM representation of the replica's private key. The corresponsing public
- // key is encoded in the client's certificate.
- string client_key = 8;
- // A list of permissible ciphers to use for SSL encryption.
- string ssl_cipher = 9;
- // Whether or not to check the primary instance's Common Name value in the
- // certificate that it sends during the SSL handshake.
- google.protobuf.BoolValue verify_server_certificate = 10;
- // This is always <b>sql#mysqlReplicaConfiguration</b>.
- string kind = 11;
- }
- // On-premises instance configuration.
- message OnPremisesConfiguration {
- // The host and port of the on-premises instance in host:port format
- string host_port = 1;
- // This is always <b>sql#onPremisesConfiguration</b>.
- string kind = 2;
- // The username for connecting to on-premises instance.
- string username = 3;
- // The password for connecting to on-premises instance.
- string password = 4;
- // PEM representation of the trusted CA's x509 certificate.
- string ca_certificate = 5;
- // PEM representation of the replica's x509 certificate.
- string client_certificate = 6;
- // PEM representation of the replica's private key. The corresponsing public
- // key is encoded in the client's certificate.
- string client_key = 7;
- // The dump file to create the Cloud SQL replica.
- string dump_file_path = 8;
- }
- // Disk encryption configuration for an instance.
- message DiskEncryptionConfiguration {
- // Resource name of KMS key for disk encryption
- string kms_key_name = 1;
- // This is always <b>sql#diskEncryptionConfiguration</b>.
- string kind = 2;
- }
- // Disk encryption status for an instance.
- message DiskEncryptionStatus {
- // KMS key version used to encrypt the Cloud SQL instance resource
- string kms_key_version_name = 1;
- // This is always <b>sql#diskEncryptionStatus</b>.
- string kind = 2;
- }
- // An Operation resource. For successful operations that return an
- // Operation resource, only the fields relevant to the operation are populated
- // in the resource.
- message Operation {
- // The type of Cloud SQL operation.
- enum SqlOperationType {
- // Unknown operation type.
- SQL_OPERATION_TYPE_UNSPECIFIED = 0;
- // Imports data into a Cloud SQL instance.
- IMPORT = 1;
- // Exports data from a Cloud SQL instance to a Cloud Storage
- // bucket.
- EXPORT = 2;
- // Creates a new Cloud SQL instance.
- CREATE = 3;
- // Updates the settings of a Cloud SQL instance.
- UPDATE = 4;
- // Deletes a Cloud SQL instance.
- DELETE = 5;
- // Restarts the Cloud SQL instance.
- RESTART = 6;
- BACKUP = 7 [deprecated = true];
- SNAPSHOT = 8 [deprecated = true];
- // Performs instance backup.
- BACKUP_VOLUME = 9;
- // Deletes an instance backup.
- DELETE_VOLUME = 10;
- // Restores an instance backup.
- RESTORE_VOLUME = 11;
- // Injects a privileged user in mysql for MOB instances.
- INJECT_USER = 12;
- // Clones a Cloud SQL instance.
- CLONE = 14;
- // Stops replication on a Cloud SQL read replica instance.
- STOP_REPLICA = 15;
- // Starts replication on a Cloud SQL read replica instance.
- START_REPLICA = 16;
- // Promotes a Cloud SQL replica instance.
- PROMOTE_REPLICA = 17;
- // Creates a Cloud SQL replica instance.
- CREATE_REPLICA = 18;
- // Creates a new user in a Cloud SQL instance.
- CREATE_USER = 19;
- // Deletes a user from a Cloud SQL instance.
- DELETE_USER = 20;
- // Updates an existing user in a Cloud SQL instance.
- UPDATE_USER = 21;
- // Creates a database in the Cloud SQL instance.
- CREATE_DATABASE = 22;
- // Deletes a database in the Cloud SQL instance.
- DELETE_DATABASE = 23;
- // Updates a database in the Cloud SQL instance.
- UPDATE_DATABASE = 24;
- // Performs failover of an HA-enabled Cloud SQL
- // failover replica.
- FAILOVER = 25;
- // Deletes the backup taken by a backup run.
- DELETE_BACKUP = 26;
- RECREATE_REPLICA = 27;
- // Truncates a general or slow log table in MySQL.
- TRUNCATE_LOG = 28;
- // Demotes the stand-alone instance to be a Cloud SQL
- // read replica for an external database server.
- DEMOTE_MASTER = 29;
- // Indicates that the instance is currently in maintenance. Maintenance
- // typically causes the instance to be unavailable for 1-3 minutes.
- MAINTENANCE = 30;
- // This field is deprecated, and will be removed in future version of API.
- ENABLE_PRIVATE_IP = 31 [deprecated = true];
- DEFER_MAINTENANCE = 32 [deprecated = true];
- // Creates clone instance.
- CREATE_CLONE = 33 [deprecated = true];
- // Reschedule maintenance to another time.
- RESCHEDULE_MAINTENANCE = 34;
- // Starts external sync of a Cloud SQL EM replica to an external primary
- // instance.
- START_EXTERNAL_SYNC = 35;
- }
- // The status of an operation.
- enum SqlOperationStatus {
- // The state of the operation is unknown.
- SQL_OPERATION_STATUS_UNSPECIFIED = 0;
- // The operation has been queued, but has not started yet.
- PENDING = 1;
- // The operation is running.
- RUNNING = 2;
- // The operation completed.
- DONE = 3;
- }
- // This is always <b>sql#operation</b>.
- string kind = 1;
- string target_link = 2;
- // The status of an operation. Valid values are:
- // <br><b>PENDING</b>
- // <br><b>RUNNING</b>
- // <br><b>DONE</b>
- // <br><b>SQL_OPERATION_STATUS_UNSPECIFIED</b>
- SqlOperationStatus status = 3;
- // The email address of the user who initiated this operation.
- string user = 4;
- // The time this operation was enqueued in UTC timezone in <a
- // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example
- // <b>2012-11-15T16:19:00.094Z</b>.
- google.protobuf.Timestamp insert_time = 5;
- // The time this operation actually started in UTC timezone in <a
- // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example
- // <b>2012-11-15T16:19:00.094Z</b>.
- google.protobuf.Timestamp start_time = 6;
- // The time this operation finished in UTC timezone in <a
- // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example
- // <b>2012-11-15T16:19:00.094Z</b>.
- google.protobuf.Timestamp end_time = 7;
- // If errors occurred during processing of this operation, this field will be
- // populated.
- OperationErrors error = 8;
- // The type of the operation. Valid values are:
- // <br><b>CREATE</b>
- // <br><b>DELETE</b>
- // <br><b>UPDATE</b>
- // <br><b>RESTART</b>
- // <br><b>IMPORT</b>
- // <br><b>EXPORT</b>
- // <br><b>BACKUP_VOLUME</b>
- // <br><b>RESTORE_VOLUME</b>
- // <br><b>CREATE_USER</b>
- // <br><b>DELETE_USER</b>
- // <br><b>CREATE_DATABASE</b>
- // <br><b>DELETE_DATABASE</b>
- SqlOperationType operation_type = 9;
- // The context for import operation, if applicable.
- ImportContext import_context = 10;
- // The context for export operation, if applicable.
- ExportContext export_context = 11;
- // The context for backup operation, if applicable.
- BackupContext backup_context = 17;
- // An identifier that uniquely identifies the operation. You can use this
- // identifier to retrieve the Operations resource that has information about
- // the operation.
- string name = 12;
- // Name of the database instance related to this operation.
- string target_id = 13;
- // The URI of this resource.
- string self_link = 14;
- // The project ID of the target instance related to this operation.
- string target_project = 15;
- }
- // Database instance operation error.
- message OperationError {
- // This is always <b>sql#operationError</b>.
- string kind = 1;
- // Identifies the specific error that occurred.
- string code = 2;
- // Additional information about the error encountered.
- string message = 3;
- }
- // Database instance operation errors list wrapper.
- message OperationErrors {
- // This is always <b>sql#operationErrors</b>.
- string kind = 1;
- // The list of errors encountered while processing this operation.
- repeated OperationError errors = 2;
- }
- // Database instance list operations response.
- message OperationsListResponse {
- // This is always <b>sql#operationsList</b>.
- string kind = 1;
- // List of operation resources.
- repeated Operation items = 2;
- // The continuation token, used to page through large result sets. Provide
- // this value in a subsequent request to return the next page of results.
- string next_page_token = 3;
- }
- // Read-replica configuration for connecting to the primary instance.
- message ReplicaConfiguration {
- // This is always <b>sql#replicaConfiguration</b>.
- string kind = 1;
- // 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
- // <b>master.info</b> in the data directory.
- MySqlReplicaConfiguration mysql_replica_configuration = 2;
- // Specifies if the replica is the failover target. If the field is set to
- // <b>true</b> 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. <p>Only one replica can be specified as failover
- // target, and the replica has to be in different zone with the primary
- // instance.
- google.protobuf.BoolValue failover_target = 3;
- }
- // Database instance restore from backup context.
- // Backup context contains source instance id and project id.
- message RestoreBackupContext {
- // This is always <b>sql#restoreBackupContext</b>.
- string kind = 1;
- // The ID of the backup run to restore from.
- int64 backup_run_id = 2;
- // The ID of the instance that the backup was taken from.
- string instance_id = 3;
- // The full project ID of the source instance.
- string project = 4;
- }
- // Instance rotate server CA context.
- message RotateServerCaContext {
- // This is always <b>sql#rotateServerCaContext</b>.
- string kind = 1;
- // The fingerprint of the next version to be rotated to. If left unspecified,
- // will be rotated to the most recently added server CA version.
- string next_version = 2;
- }
- // Database instance settings.
- message Settings {
- // Specifies when the instance is activated.
- enum SqlActivationPolicy {
- // Unknown activation plan.
- SQL_ACTIVATION_POLICY_UNSPECIFIED = 0;
- // The instance is always up and running.
- ALWAYS = 1;
- // The instance never starts.
- NEVER = 2;
- // The instance starts upon receiving requests.
- ON_DEMAND = 3 [deprecated = true];
- }
- // 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.
- google.protobuf.Int64Value settings_version = 1;
- // The App Engine app IDs that can access this instance.
- // (Deprecated) Applied to First Generation instances only.
- repeated string authorized_gae_applications = 2 [deprecated = true];
- // The tier (or machine type) for this instance, for example
- // <b>db-custom-1-3840</b>.
- string tier = 3;
- // This is always <b>sql#settings</b>.
- string kind = 4;
- // User-provided labels, represented as a dictionary where each label is a
- // single key value pair.
- map<string, string> user_labels = 5;
- // Availability type. Potential values:
- // <br><b>ZONAL</b>: The instance serves data from only one zone.
- // Outages in that zone affect data accessibility.
- // <br><b>REGIONAL</b>: The instance can serve data from more than one zone
- // in a region
- // (it is highly available). <br>For more information, see
- // <a href="/sql/docs/postgres/high-availability">
- // Overview of the High Availability Configuration</a>.
- SqlAvailabilityType availability_type = 6;
- // The pricing plan for this instance. This can be either <b>PER_USE</b>
- // or <b>PACKAGE</b>. Only <b>PER_USE</b> is supported for Second
- // Generation instances.
- SqlPricingPlan pricing_plan = 7;
- // The type of replication this instance uses. This can be either
- // <b>ASYNCHRONOUS</b> or <b>SYNCHRONOUS</b>.
- // (Deprecated_ This property was only applicable to
- // First Generation instances.
- SqlReplicationType replication_type = 8 [deprecated = true];
- // The maximum size to which storage capacity can be automatically increased.
- // The default value is 0, which specifies that there is no limit.
- google.protobuf.Int64Value storage_auto_resize_limit = 9;
- // The activation policy specifies when the instance is activated; it is
- // applicable only when the instance state is RUNNABLE. Valid values:
- // <br><b>ALWAYS</b>: The instance is on, and remains so even in
- // the absence of connection requests.
- // <br><b>NEVER</b>: The instance is off; it is not activated, even if a
- // connection request arrives.
- SqlActivationPolicy activation_policy = 10;
- // 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.
- IpConfiguration ip_configuration = 11;
- // Configuration to increase storage size automatically. The default value is
- // true.
- google.protobuf.BoolValue storage_auto_resize = 12;
- // 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.
- LocationPreference location_preference = 13;
- // The database flags passed to the instance at startup.
- repeated DatabaseFlags database_flags = 14;
- // The type of data disk: PD_SSD (default) or
- // PD_HDD. Not used for First Generation instances.
- SqlDataDiskType data_disk_type = 15;
- // The maintenance window for this instance. This specifies when the instance
- // can be restarted for maintenance purposes.
- MaintenanceWindow maintenance_window = 16;
- // The daily backup configuration for the instance.
- BackupConfiguration backup_configuration = 17;
- // Configuration specific to read replica instances. Indicates whether
- // replication is enabled or not.
- google.protobuf.BoolValue database_replication_enabled = 18;
- // 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.
- google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true];
- // The size of data disk, in GB. The data disk size minimum is 10GB.
- google.protobuf.Int64Value data_disk_size_gb = 20;
- // Active Directory configuration, relevant only for Cloud SQL for SQL Server.
- SqlActiveDirectoryConfig active_directory_config = 22;
- // The name of server Instance collation.
- string collation = 23;
- // Deny maintenance periods
- repeated DenyMaintenancePeriod deny_maintenance_periods = 24;
- // Insights configuration, for now relevant only for Postgres.
- InsightsConfig insights_config = 25;
- }
- // SslCerts Resource
- message SslCert {
- // This is always <b>sql#sslCert</b>.
- string kind = 1;
- // Serial number, as extracted from the certificate.
- string cert_serial_number = 2;
- // PEM representation.
- string cert = 3;
- // The time when the certificate was created in <a
- // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example
- // <b>2012-11-15T16:19:00.094Z</b>
- google.protobuf.Timestamp create_time = 4;
- // User supplied name. Constrained to [a-zA-Z.-_ ]+.
- string common_name = 5;
- // The time when the certificate expires in <a
- // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example
- // <b>2012-11-15T16:19:00.094Z</b>.
- google.protobuf.Timestamp expiration_time = 6;
- // Sha1 Fingerprint.
- string sha1_fingerprint = 7;
- // Name of the database instance.
- string instance = 8;
- // The URI of this resource.
- string self_link = 9;
- }
- // SslCertDetail.
- message SslCertDetail {
- // The public information about the cert.
- SslCert cert_info = 1;
- // The private key for the client cert, in pem format. Keep private in order
- // to protect your security.
- string cert_private_key = 2;
- }
- // SslCerts create ephemeral certificate request.
- message SslCertsCreateEphemeralRequest {
- // PEM encoded public key to include in the signed certificate.
- string public_key = 1;
- // Access token to include in the signed certificate.
- string access_token = 2;
- }
- // SslCerts insert request.
- message SslCertsInsertRequest {
- // User supplied name. Must be a distinct name from the other certificates
- // for this instance.
- string common_name = 1;
- }
- // Reschedule options for maintenance windows.
- message SqlInstancesRescheduleMaintenanceRequestBody {
- message Reschedule {
- // Required. The type of the reschedule.
- RescheduleType reschedule_type = 1;
- // Optional. Timestamp when the maintenance shall be rescheduled to if
- // reschedule_type=SPECIFIC_TIME, in <a
- // href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
- // example <b>2012-11-15T16:19:00.094Z</b>.
- google.protobuf.Timestamp schedule_time = 2 [(google.api.field_behavior) = OPTIONAL];
- }
- enum RescheduleType {
- RESCHEDULE_TYPE_UNSPECIFIED = 0;
- // If the user wants to schedule the maintenance to happen now.
- IMMEDIATE = 1;
- // If the user wants to use the existing maintenance policy to find the
- // next available window.
- NEXT_AVAILABLE_WINDOW = 2;
- // If the user wants to reschedule the maintenance to a specific time.
- SPECIFIC_TIME = 3;
- }
- // Required. The type of the reschedule the user wants.
- Reschedule reschedule = 3;
- }
- // SslCert insert response.
- message SslCertsInsertResponse {
- // This is always <b>sql#sslCertsInsert</b>.
- string kind = 1;
- // The operation to track the ssl certs insert request.
- Operation operation = 2;
- // 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.
- SslCert server_ca_cert = 3;
- // The new client certificate and private key.
- SslCertDetail client_cert = 4;
- }
- // SslCerts list response.
- message SslCertsListResponse {
- // This is always <b>sql#sslCertsList</b>.
- string kind = 1;
- // List of client certificates for the instance.
- repeated SslCert items = 2;
- }
- // Database Instance truncate log context.
- message TruncateLogContext {
- // This is always <b>sql#truncateLogContext</b>.
- string kind = 1;
- // The type of log to truncate. Valid values are
- // <b>MYSQL_GENERAL_TABLE</b> and <b>MYSQL_SLOW_TABLE</b>.
- string log_type = 2;
- }
- // Active Directory configuration, relevant only for Cloud SQL for SQL Server.
- message SqlActiveDirectoryConfig {
- // This is always sql#activeDirectoryConfig.
- string kind = 1;
- // The name of the domain (e.g., mydomain.com).
- string domain = 2;
- }
- // The status of a backup run.
- enum SqlBackupRunStatus {
- // The status of the run is unknown.
- SQL_BACKUP_RUN_STATUS_UNSPECIFIED = 0;
- // The backup operation was enqueued.
- ENQUEUED = 1;
- // The backup is overdue across a given backup window. Indicates a
- // problem. Example: Long-running operation in progress during
- // the whole window.
- OVERDUE = 2;
- // The backup is in progress.
- RUNNING = 3;
- // The backup failed.
- FAILED = 4;
- // The backup was successful.
- SUCCESSFUL = 5;
- // The backup was skipped (without problems) for a given backup
- // window. Example: Instance was idle.
- SKIPPED = 6;
- // The backup is about to be deleted.
- DELETION_PENDING = 7;
- // The backup deletion failed.
- DELETION_FAILED = 8;
- // The backup has been deleted.
- DELETED = 9;
- }
- enum SqlBackupRunType {
- // This is an unknown BackupRun type.
- SQL_BACKUP_RUN_TYPE_UNSPECIFIED = 0;
- // The backup schedule automatically triggers a backup.
- AUTOMATED = 1;
- // The user manually triggers a backup.
- ON_DEMAND = 2;
- }
- // Defines the supported backup kinds
- enum SqlBackupKind {
- // This is an unknown BackupKind.
- SQL_BACKUP_KIND_UNSPECIFIED = 0;
- // The snapshot based backups
- SNAPSHOT = 1;
- // Physical backups
- PHYSICAL = 2;
- }
- enum SqlBackendType {
- // This is an unknown backend type for instance.
- SQL_BACKEND_TYPE_UNSPECIFIED = 0;
- // V1 speckle instance.
- FIRST_GEN = 1 [deprecated = true];
- // V2 speckle instance.
- SECOND_GEN = 2;
- // On premises instance.
- EXTERNAL = 3;
- }
- enum SqlIpAddressType {
- // This is an unknown IP address type.
- SQL_IP_ADDRESS_TYPE_UNSPECIFIED = 0;
- // IP address the customer is supposed to connect to. Usually this is the
- // load balancer's IP address
- PRIMARY = 1;
- // Source IP address of the connection a read replica establishes to its
- // external primary instance. This IP address can be allowlisted by the
- // customer in case it has a firewall that filters incoming connection to its
- // on premises primary instance.
- OUTGOING = 2;
- // Private IP used when using private IPs and network peering.
- PRIVATE = 3;
- // V1 IP of a migrated instance. We want the user to
- // decommission this IP as soon as the migration is complete.
- // Note: V1 instances with V1 ip addresses will be counted as PRIMARY.
- MIGRATED_1ST_GEN = 4;
- }
- enum SqlInstanceType {
- // This is an unknown Cloud SQL instance type.
- SQL_INSTANCE_TYPE_UNSPECIFIED = 0;
- // A regular Cloud SQL instance.
- CLOUD_SQL_INSTANCE = 1;
- // An instance running on the customer's premises that is not managed by
- // Cloud SQL.
- ON_PREMISES_INSTANCE = 2;
- // A Cloud SQL instance acting as a read-replica.
- READ_REPLICA_INSTANCE = 3;
- }
- // The database engine type and version.
- enum SqlDatabaseVersion {
- // This is an unknown database version.
- SQL_DATABASE_VERSION_UNSPECIFIED = 0;
- // The database version is MySQL 5.1.
- MYSQL_5_1 = 2 [deprecated = true];
- // The database version is MySQL 5.5.
- MYSQL_5_5 = 3 [deprecated = true];
- // The database version is MySQL 5.6.
- MYSQL_5_6 = 5;
- // The database version is MySQL 5.7.
- MYSQL_5_7 = 6;
- // The database version is PostgreSQL 9.6.
- POSTGRES_9_6 = 9;
- // The database version is PostgreSQL 11.
- POSTGRES_11 = 10;
- // The database version is SQL Server 2017 Standard.
- SQLSERVER_2017_STANDARD = 11;
- // The database version is SQL Server 2017 Enterprise.
- SQLSERVER_2017_ENTERPRISE = 14;
- // The database version is SQL Server 2017 Express.
- SQLSERVER_2017_EXPRESS = 15;
- // The database version is SQL Server 2017 Web.
- SQLSERVER_2017_WEB = 16;
- // The database version is PostgreSQL 10.
- POSTGRES_10 = 18;
- // The database version is PostgreSQL 12.
- POSTGRES_12 = 19;
- // The database version is MySQL 8.
- MYSQL_8_0 = 20;
- // The database version is PostgreSQL 13.
- POSTGRES_13 = 23;
- }
- // The suspension reason of the database instance if the state is SUSPENDED.
- enum SqlSuspensionReason {
- // This is an unknown suspension reason.
- SQL_SUSPENSION_REASON_UNSPECIFIED = 0;
- // The instance is suspended due to billing issues (for example:, GCP account
- // issue)
- BILLING_ISSUE = 2;
- // The instance is suspended due to illegal content (for example:, child
- // pornography, copyrighted material, etc.).
- LEGAL_ISSUE = 3;
- // The instance is causing operational issues (for example:, causing the
- // database to crash).
- OPERATIONAL_ISSUE = 4;
- // The KMS key used by the instance is either revoked or denied access to
- KMS_KEY_ISSUE = 5;
- }
- // The pricing plan for this instance.
- enum SqlPricingPlan {
- // This is an unknown pricing plan for this instance.
- SQL_PRICING_PLAN_UNSPECIFIED = 0;
- // The instance is billed at a monthly flat rate.
- PACKAGE = 1;
- // The instance is billed per usage.
- PER_USE = 2;
- }
- enum SqlReplicationType {
- // This is an unknown replication type for a Cloud SQL instance.
- SQL_REPLICATION_TYPE_UNSPECIFIED = 0;
- // The synchronous replication mode for First Generation instances. It is the
- // default value.
- SYNCHRONOUS = 1;
- // The asynchronous replication mode for First Generation instances. It
- // provides a slight performance gain, but if an outage occurs while this
- // option is set to asynchronous, you can lose up to a few seconds of updates
- // to your data.
- ASYNCHRONOUS = 2;
- }
- // The type of disk that is used for a v2 instance to use.
- enum SqlDataDiskType {
- // This is an unknown data disk type.
- SQL_DATA_DISK_TYPE_UNSPECIFIED = 0;
- // An SSD data disk.
- PD_SSD = 1;
- // An HDD data disk.
- PD_HDD = 2;
- // This field is deprecated and will be removed from a future version of the
- // API.
- OBSOLETE_LOCAL_SSD = 3 [deprecated = true];
- }
- // The availability type of the given Cloud SQL instance.
- enum SqlAvailabilityType {
- // This is an unknown Availability type.
- SQL_AVAILABILITY_TYPE_UNSPECIFIED = 0;
- // Zonal available instance.
- ZONAL = 1;
- // Regional available instance.
- REGIONAL = 2;
- }
- enum SqlUpdateTrack {
- // This is an unknown maintenance timing preference.
- SQL_UPDATE_TRACK_UNSPECIFIED = 0;
- // For instance update that requires a restart, this update track indicates
- // your instance prefer to restart for new version early in maintenance
- // window.
- canary = 1;
- // For instance update that requires a restart, this update track indicates
- // your instance prefer to let Cloud SQL choose the timing of restart (within
- // its Maintenance window, if applicable).
- stable = 2;
- }
- // LINT.IfChange(sql_flag_type)
- enum SqlFlagType {
- // This is an unknown flag type.
- SQL_FLAG_TYPE_UNSPECIFIED = 0;
- // Boolean type flag.
- BOOLEAN = 1;
- // String type flag.
- STRING = 2;
- // Integer type flag.
- INTEGER = 3;
- // Flag type used for a server startup option.
- NONE = 4;
- // Type introduced specially for MySQL TimeZone offset. Accept a string value
- // with the format [-12:59, 13:00].
- MYSQL_TIMEZONE_OFFSET = 5;
- // Float type flag.
- FLOAT = 6;
- // Comma-separated list of the strings in a SqlFlagType enum.
- REPEATED_STRING = 7;
- }
|