From a4285805698767ce2d3f6266c972b4474a895383 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Fri, 6 Aug 2021 01:31:44 +0000 Subject: [PATCH] feat(sqladmin)!: update the API BREAKING CHANGE: This release has breaking changes. #### sqladmin:v1beta4 The following keys were deleted: - resources.projects.resources.instances.methods.startExternalSync.parameters.skipVerification.description - resources.projects.resources.instances.methods.startExternalSync.parameters.skipVerification.location - resources.projects.resources.instances.methods.startExternalSync.parameters.skipVerification.type - resources.projects.resources.instances.methods.startExternalSync.parameters.syncMode.description - resources.projects.resources.instances.methods.startExternalSync.parameters.syncMode.enum - resources.projects.resources.instances.methods.startExternalSync.parameters.syncMode.enumDescriptions - resources.projects.resources.instances.methods.startExternalSync.parameters.syncMode.location - resources.projects.resources.instances.methods.startExternalSync.parameters.syncMode.type - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.syncMode.description - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.syncMode.enum - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.syncMode.enumDescriptions - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.syncMode.location - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.syncMode.type - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.verifyConnectionOnly.description - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.verifyConnectionOnly.location - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.verifyConnectionOnly.type The following keys were added: - resources.projects.resources.instances.methods.startExternalSync.request.$ref - resources.projects.resources.instances.methods.verifyExternalSyncSettings.request.$ref - schemas.IpConfiguration.properties.allocatedIpRange.description - schemas.IpConfiguration.properties.allocatedIpRange.type - schemas.MySqlSyncConfig.description - schemas.MySqlSyncConfig.id - schemas.MySqlSyncConfig.type - schemas.SqlInstancesStartExternalSyncRequest.id - schemas.SqlInstancesStartExternalSyncRequest.properties.mysqlSyncConfig.$ref - schemas.SqlInstancesStartExternalSyncRequest.properties.mysqlSyncConfig.description - schemas.SqlInstancesStartExternalSyncRequest.properties.skipVerification.description - schemas.SqlInstancesStartExternalSyncRequest.properties.skipVerification.type - schemas.SqlInstancesStartExternalSyncRequest.properties.syncMode.description - schemas.SqlInstancesStartExternalSyncRequest.properties.syncMode.enum - schemas.SqlInstancesStartExternalSyncRequest.properties.syncMode.enumDescriptions - schemas.SqlInstancesStartExternalSyncRequest.properties.syncMode.type - schemas.SqlInstancesStartExternalSyncRequest.type - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.id - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.mysqlSyncConfig.$ref - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.mysqlSyncConfig.description - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.syncMode.description - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.syncMode.enum - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.syncMode.enumDescriptions - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.syncMode.type - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.verifyConnectionOnly.description - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.verifyConnectionOnly.type - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.type The following keys were changed: - resources.backupRuns.methods.delete.parameters.id.description - resources.backupRuns.methods.get.parameters.id.description - resources.backupRuns.methods.insert.description - resources.flags.methods.list.description - resources.instances.methods.failover.description - schemas.BackupRun.properties.diskEncryptionConfiguration.description - schemas.BackupRun.properties.diskEncryptionStatus.description - schemas.DatabaseFlags.properties.name.description - schemas.DatabaseInstance.properties.databaseVersion.description - schemas.DatabaseInstance.properties.diskEncryptionConfiguration.description - schemas.DatabaseInstance.properties.diskEncryptionStatus.description - schemas.DatabaseInstance.properties.failoverReplica.description - schemas.DatabaseInstance.properties.failoverReplica.properties.name.description - schemas.DemoteMasterContext.properties.verifyGtidConsistency.description - schemas.Flag.properties.requiresRestart.description - schemas.InsightsConfig.properties.queryPlansPerMinute.description - schemas.Settings.properties.ipConfiguration.description #### sqladmin:v1 The following keys were deleted: - resources.projects.resources.instances.methods.generateEphemeralCert.description - resources.projects.resources.instances.methods.generateEphemeralCert.flatPath - resources.projects.resources.instances.methods.generateEphemeralCert.httpMethod - resources.projects.resources.instances.methods.generateEphemeralCert.id - resources.projects.resources.instances.methods.generateEphemeralCert.parameterOrder - resources.projects.resources.instances.methods.generateEphemeralCert.parameters.instance.description - resources.projects.resources.instances.methods.generateEphemeralCert.parameters.instance.location - resources.projects.resources.instances.methods.generateEphemeralCert.parameters.instance.required - resources.projects.resources.instances.methods.generateEphemeralCert.parameters.instance.type - resources.projects.resources.instances.methods.generateEphemeralCert.parameters.project.description - resources.projects.resources.instances.methods.generateEphemeralCert.parameters.project.location - resources.projects.resources.instances.methods.generateEphemeralCert.parameters.project.required - resources.projects.resources.instances.methods.generateEphemeralCert.parameters.project.type - resources.projects.resources.instances.methods.generateEphemeralCert.path - resources.projects.resources.instances.methods.generateEphemeralCert.request.$ref - resources.projects.resources.instances.methods.generateEphemeralCert.response.$ref - resources.projects.resources.instances.methods.generateEphemeralCert.scopes - resources.projects.resources.instances.methods.get.description - resources.projects.resources.instances.methods.get.flatPath - resources.projects.resources.instances.methods.get.httpMethod - resources.projects.resources.instances.methods.get.id - resources.projects.resources.instances.methods.get.parameterOrder - resources.projects.resources.instances.methods.get.parameters.instance.description - resources.projects.resources.instances.methods.get.parameters.instance.location - resources.projects.resources.instances.methods.get.parameters.instance.required - resources.projects.resources.instances.methods.get.parameters.instance.type - resources.projects.resources.instances.methods.get.parameters.project.description - resources.projects.resources.instances.methods.get.parameters.project.location - resources.projects.resources.instances.methods.get.parameters.project.required - resources.projects.resources.instances.methods.get.parameters.project.type - resources.projects.resources.instances.methods.get.path - resources.projects.resources.instances.methods.get.response.$ref - resources.projects.resources.instances.methods.get.scopes - resources.projects.resources.instances.methods.getConnectSettings.description - resources.projects.resources.instances.methods.getConnectSettings.flatPath - resources.projects.resources.instances.methods.getConnectSettings.httpMethod - resources.projects.resources.instances.methods.getConnectSettings.id - resources.projects.resources.instances.methods.getConnectSettings.parameterOrder - resources.projects.resources.instances.methods.getConnectSettings.parameters.instance.description - resources.projects.resources.instances.methods.getConnectSettings.parameters.instance.location - resources.projects.resources.instances.methods.getConnectSettings.parameters.instance.required - resources.projects.resources.instances.methods.getConnectSettings.parameters.instance.type - resources.projects.resources.instances.methods.getConnectSettings.parameters.project.description - resources.projects.resources.instances.methods.getConnectSettings.parameters.project.location - resources.projects.resources.instances.methods.getConnectSettings.parameters.project.required - resources.projects.resources.instances.methods.getConnectSettings.parameters.project.type - resources.projects.resources.instances.methods.getConnectSettings.parameters.readTime.description - resources.projects.resources.instances.methods.getConnectSettings.parameters.readTime.format - resources.projects.resources.instances.methods.getConnectSettings.parameters.readTime.location - resources.projects.resources.instances.methods.getConnectSettings.parameters.readTime.type - resources.projects.resources.instances.methods.getConnectSettings.path - resources.projects.resources.instances.methods.getConnectSettings.response.$ref - resources.projects.resources.instances.methods.getConnectSettings.scopes - resources.projects.resources.instances.resources.createEphemeral.methods.create.description - resources.projects.resources.instances.resources.createEphemeral.methods.create.flatPath - resources.projects.resources.instances.resources.createEphemeral.methods.create.httpMethod - resources.projects.resources.instances.resources.createEphemeral.methods.create.id - resources.projects.resources.instances.resources.createEphemeral.methods.create.parameterOrder - resources.projects.resources.instances.resources.createEphemeral.methods.create.parameters.instance.description - resources.projects.resources.instances.resources.createEphemeral.methods.create.parameters.instance.location - resources.projects.resources.instances.resources.createEphemeral.methods.create.parameters.instance.required - resources.projects.resources.instances.resources.createEphemeral.methods.create.parameters.instance.type - resources.projects.resources.instances.resources.createEphemeral.methods.create.parameters.project.description - resources.projects.resources.instances.resources.createEphemeral.methods.create.parameters.project.location - resources.projects.resources.instances.resources.createEphemeral.methods.create.parameters.project.required - resources.projects.resources.instances.resources.createEphemeral.methods.create.parameters.project.type - resources.projects.resources.instances.resources.createEphemeral.methods.create.path - resources.projects.resources.instances.resources.createEphemeral.methods.create.request.$ref - resources.projects.resources.instances.resources.createEphemeral.methods.create.response.$ref - resources.projects.resources.instances.resources.createEphemeral.methods.create.scopes - schemas.DatabaseInstance.properties.encryptedRootPassword.description - schemas.DatabaseInstance.properties.encryptedRootPassword.format - schemas.DatabaseInstance.properties.encryptedRootPassword.type - schemas.DatabaseInstance.properties.failoverReplica.properties.failoverInstance.$ref - schemas.DatabaseInstance.properties.failoverReplica.properties.failoverInstance.description - schemas.DatabaseInstance.properties.installedVersion.description - schemas.DatabaseInstance.properties.installedVersion.enum - schemas.DatabaseInstance.properties.installedVersion.enumDescriptions - schemas.DatabaseInstance.properties.installedVersion.type - schemas.DatabaseInstance.properties.instanceUid.description - schemas.DatabaseInstance.properties.instanceUid.type - schemas.DatabaseInstance.properties.masterInstance.$ref - schemas.DatabaseInstance.properties.masterInstance.description - schemas.DatabaseInstance.properties.replicaInstances.description - schemas.DatabaseInstance.properties.replicaInstances.items.$ref - schemas.DatabaseInstance.properties.replicaInstances.type - schemas.InstanceReference.description - schemas.InstanceReference.id - schemas.InstanceReference.properties.name.description - schemas.InstanceReference.properties.name.type - schemas.InstanceReference.properties.region.description - schemas.InstanceReference.properties.region.type - schemas.InstanceReference.type The following keys were added: - resources.backupRuns.methods.delete.description - resources.backupRuns.methods.delete.flatPath - resources.backupRuns.methods.delete.httpMethod - resources.backupRuns.methods.delete.id - resources.backupRuns.methods.delete.parameterOrder - resources.backupRuns.methods.delete.parameters.id.description - resources.backupRuns.methods.delete.parameters.id.format - resources.backupRuns.methods.delete.parameters.id.location - resources.backupRuns.methods.delete.parameters.id.required - resources.backupRuns.methods.delete.parameters.id.type - resources.backupRuns.methods.delete.parameters.instance.description - resources.backupRuns.methods.delete.parameters.instance.location - resources.backupRuns.methods.delete.parameters.instance.required - resources.backupRuns.methods.delete.parameters.instance.type - resources.backupRuns.methods.delete.parameters.project.description - resources.backupRuns.methods.delete.parameters.project.location - resources.backupRuns.methods.delete.parameters.project.required - resources.backupRuns.methods.delete.parameters.project.type - resources.backupRuns.methods.delete.path - resources.backupRuns.methods.delete.response.$ref - resources.backupRuns.methods.delete.scopes - resources.backupRuns.methods.get.description - resources.backupRuns.methods.get.flatPath - resources.backupRuns.methods.get.httpMethod - resources.backupRuns.methods.get.id - resources.backupRuns.methods.get.parameterOrder - resources.backupRuns.methods.get.parameters.id.description - resources.backupRuns.methods.get.parameters.id.format - resources.backupRuns.methods.get.parameters.id.location - resources.backupRuns.methods.get.parameters.id.required - resources.backupRuns.methods.get.parameters.id.type - resources.backupRuns.methods.get.parameters.instance.description - resources.backupRuns.methods.get.parameters.instance.location - resources.backupRuns.methods.get.parameters.instance.required - resources.backupRuns.methods.get.parameters.instance.type - resources.backupRuns.methods.get.parameters.project.description - resources.backupRuns.methods.get.parameters.project.location - resources.backupRuns.methods.get.parameters.project.required - resources.backupRuns.methods.get.parameters.project.type - resources.backupRuns.methods.get.path - resources.backupRuns.methods.get.response.$ref - resources.backupRuns.methods.get.scopes - resources.backupRuns.methods.insert.description - resources.backupRuns.methods.insert.flatPath - resources.backupRuns.methods.insert.httpMethod - resources.backupRuns.methods.insert.id - resources.backupRuns.methods.insert.parameterOrder - resources.backupRuns.methods.insert.parameters.instance.description - resources.backupRuns.methods.insert.parameters.instance.location - resources.backupRuns.methods.insert.parameters.instance.required - resources.backupRuns.methods.insert.parameters.instance.type - resources.backupRuns.methods.insert.parameters.project.description - resources.backupRuns.methods.insert.parameters.project.location - resources.backupRuns.methods.insert.parameters.project.required - resources.backupRuns.methods.insert.parameters.project.type - resources.backupRuns.methods.insert.path - resources.backupRuns.methods.insert.request.$ref - resources.backupRuns.methods.insert.response.$ref - resources.backupRuns.methods.insert.scopes - resources.backupRuns.methods.list.description - resources.backupRuns.methods.list.flatPath - resources.backupRuns.methods.list.httpMethod - resources.backupRuns.methods.list.id - resources.backupRuns.methods.list.parameterOrder - resources.backupRuns.methods.list.parameters.instance.description - resources.backupRuns.methods.list.parameters.instance.location - resources.backupRuns.methods.list.parameters.instance.required - resources.backupRuns.methods.list.parameters.instance.type - resources.backupRuns.methods.list.parameters.maxResults.description - resources.backupRuns.methods.list.parameters.maxResults.format - resources.backupRuns.methods.list.parameters.maxResults.location - resources.backupRuns.methods.list.parameters.maxResults.type - resources.backupRuns.methods.list.parameters.pageToken.description - resources.backupRuns.methods.list.parameters.pageToken.location - resources.backupRuns.methods.list.parameters.pageToken.type - resources.backupRuns.methods.list.parameters.project.description - resources.backupRuns.methods.list.parameters.project.location - resources.backupRuns.methods.list.parameters.project.required - resources.backupRuns.methods.list.parameters.project.type - resources.backupRuns.methods.list.path - resources.backupRuns.methods.list.response.$ref - resources.backupRuns.methods.list.scopes - resources.connect.methods.generateEphemeralCert.description - resources.connect.methods.generateEphemeralCert.flatPath - resources.connect.methods.generateEphemeralCert.httpMethod - resources.connect.methods.generateEphemeralCert.id - resources.connect.methods.generateEphemeralCert.parameterOrder - resources.connect.methods.generateEphemeralCert.parameters.instance.description - resources.connect.methods.generateEphemeralCert.parameters.instance.location - resources.connect.methods.generateEphemeralCert.parameters.instance.required - resources.connect.methods.generateEphemeralCert.parameters.instance.type - resources.connect.methods.generateEphemeralCert.parameters.project.description - resources.connect.methods.generateEphemeralCert.parameters.project.location - resources.connect.methods.generateEphemeralCert.parameters.project.required - resources.connect.methods.generateEphemeralCert.parameters.project.type - resources.connect.methods.generateEphemeralCert.path - resources.connect.methods.generateEphemeralCert.request.$ref - resources.connect.methods.generateEphemeralCert.response.$ref - resources.connect.methods.generateEphemeralCert.scopes - resources.connect.methods.get.description - resources.connect.methods.get.flatPath - resources.connect.methods.get.httpMethod - resources.connect.methods.get.id - resources.connect.methods.get.parameterOrder - resources.connect.methods.get.parameters.instance.description - resources.connect.methods.get.parameters.instance.location - resources.connect.methods.get.parameters.instance.required - resources.connect.methods.get.parameters.instance.type - resources.connect.methods.get.parameters.project.description - resources.connect.methods.get.parameters.project.location - resources.connect.methods.get.parameters.project.required - resources.connect.methods.get.parameters.project.type - resources.connect.methods.get.parameters.readTime.description - resources.connect.methods.get.parameters.readTime.format - resources.connect.methods.get.parameters.readTime.location - resources.connect.methods.get.parameters.readTime.type - resources.connect.methods.get.path - resources.connect.methods.get.response.$ref - resources.connect.methods.get.scopes - resources.databases.methods.delete.description - resources.databases.methods.delete.flatPath - resources.databases.methods.delete.httpMethod - resources.databases.methods.delete.id - resources.databases.methods.delete.parameterOrder - resources.databases.methods.delete.parameters.database.description - resources.databases.methods.delete.parameters.database.location - resources.databases.methods.delete.parameters.database.required - resources.databases.methods.delete.parameters.database.type - resources.databases.methods.delete.parameters.instance.description - resources.databases.methods.delete.parameters.instance.location - resources.databases.methods.delete.parameters.instance.required - resources.databases.methods.delete.parameters.instance.type - resources.databases.methods.delete.parameters.project.description - resources.databases.methods.delete.parameters.project.location - resources.databases.methods.delete.parameters.project.required - resources.databases.methods.delete.parameters.project.type - resources.databases.methods.delete.path - resources.databases.methods.delete.response.$ref - resources.databases.methods.delete.scopes - resources.databases.methods.get.description - resources.databases.methods.get.flatPath - resources.databases.methods.get.httpMethod - resources.databases.methods.get.id - resources.databases.methods.get.parameterOrder - resources.databases.methods.get.parameters.database.description - resources.databases.methods.get.parameters.database.location - resources.databases.methods.get.parameters.database.required - resources.databases.methods.get.parameters.database.type - resources.databases.methods.get.parameters.instance.description - resources.databases.methods.get.parameters.instance.location - resources.databases.methods.get.parameters.instance.required - resources.databases.methods.get.parameters.instance.type - resources.databases.methods.get.parameters.project.description - resources.databases.methods.get.parameters.project.location - resources.databases.methods.get.parameters.project.required - resources.databases.methods.get.parameters.project.type - resources.databases.methods.get.path - resources.databases.methods.get.response.$ref - resources.databases.methods.get.scopes - resources.databases.methods.insert.description - resources.databases.methods.insert.flatPath - resources.databases.methods.insert.httpMethod - resources.databases.methods.insert.id - resources.databases.methods.insert.parameterOrder - resources.databases.methods.insert.parameters.instance.description - resources.databases.methods.insert.parameters.instance.location - resources.databases.methods.insert.parameters.instance.required - resources.databases.methods.insert.parameters.instance.type - resources.databases.methods.insert.parameters.project.description - resources.databases.methods.insert.parameters.project.location - resources.databases.methods.insert.parameters.project.required - resources.databases.methods.insert.parameters.project.type - resources.databases.methods.insert.path - resources.databases.methods.insert.request.$ref - resources.databases.methods.insert.response.$ref - resources.databases.methods.insert.scopes - resources.databases.methods.list.description - resources.databases.methods.list.flatPath - resources.databases.methods.list.httpMethod - resources.databases.methods.list.id - resources.databases.methods.list.parameterOrder - resources.databases.methods.list.parameters.instance.description - resources.databases.methods.list.parameters.instance.location - resources.databases.methods.list.parameters.instance.required - resources.databases.methods.list.parameters.instance.type - resources.databases.methods.list.parameters.project.description - resources.databases.methods.list.parameters.project.location - resources.databases.methods.list.parameters.project.required - resources.databases.methods.list.parameters.project.type - resources.databases.methods.list.path - resources.databases.methods.list.response.$ref - resources.databases.methods.list.scopes - resources.databases.methods.patch.description - resources.databases.methods.patch.flatPath - resources.databases.methods.patch.httpMethod - resources.databases.methods.patch.id - resources.databases.methods.patch.parameterOrder - resources.databases.methods.patch.parameters.database.description - resources.databases.methods.patch.parameters.database.location - resources.databases.methods.patch.parameters.database.required - resources.databases.methods.patch.parameters.database.type - resources.databases.methods.patch.parameters.instance.description - resources.databases.methods.patch.parameters.instance.location - resources.databases.methods.patch.parameters.instance.required - resources.databases.methods.patch.parameters.instance.type - resources.databases.methods.patch.parameters.project.description - resources.databases.methods.patch.parameters.project.location - resources.databases.methods.patch.parameters.project.required - resources.databases.methods.patch.parameters.project.type - resources.databases.methods.patch.path - resources.databases.methods.patch.request.$ref - resources.databases.methods.patch.response.$ref - resources.databases.methods.patch.scopes - resources.databases.methods.update.description - resources.databases.methods.update.flatPath - resources.databases.methods.update.httpMethod - resources.databases.methods.update.id - resources.databases.methods.update.parameterOrder - resources.databases.methods.update.parameters.database.description - resources.databases.methods.update.parameters.database.location - resources.databases.methods.update.parameters.database.required - resources.databases.methods.update.parameters.database.type - resources.databases.methods.update.parameters.instance.description - resources.databases.methods.update.parameters.instance.location - resources.databases.methods.update.parameters.instance.required - resources.databases.methods.update.parameters.instance.type - resources.databases.methods.update.parameters.project.description - resources.databases.methods.update.parameters.project.location - resources.databases.methods.update.parameters.project.required - resources.databases.methods.update.parameters.project.type - resources.databases.methods.update.path - resources.databases.methods.update.request.$ref - resources.databases.methods.update.response.$ref - resources.databases.methods.update.scopes - resources.flags.methods.list.description - resources.flags.methods.list.flatPath - resources.flags.methods.list.httpMethod - resources.flags.methods.list.id - resources.flags.methods.list.parameterOrder - resources.flags.methods.list.parameters.databaseVersion.description - resources.flags.methods.list.parameters.databaseVersion.location - resources.flags.methods.list.parameters.databaseVersion.type - resources.flags.methods.list.path - resources.flags.methods.list.response.$ref - resources.flags.methods.list.scopes - resources.instances.methods.addServerCa.description - resources.instances.methods.addServerCa.flatPath - resources.instances.methods.addServerCa.httpMethod - resources.instances.methods.addServerCa.id - resources.instances.methods.addServerCa.parameterOrder - resources.instances.methods.addServerCa.parameters.instance.description - resources.instances.methods.addServerCa.parameters.instance.location - resources.instances.methods.addServerCa.parameters.instance.required - resources.instances.methods.addServerCa.parameters.instance.type - resources.instances.methods.addServerCa.parameters.project.description - resources.instances.methods.addServerCa.parameters.project.location - resources.instances.methods.addServerCa.parameters.project.required - resources.instances.methods.addServerCa.parameters.project.type - resources.instances.methods.addServerCa.path - resources.instances.methods.addServerCa.response.$ref - resources.instances.methods.addServerCa.scopes - resources.instances.methods.clone.description - resources.instances.methods.clone.flatPath - resources.instances.methods.clone.httpMethod - resources.instances.methods.clone.id - resources.instances.methods.clone.parameterOrder - resources.instances.methods.clone.parameters.instance.description - resources.instances.methods.clone.parameters.instance.location - resources.instances.methods.clone.parameters.instance.required - resources.instances.methods.clone.parameters.instance.type - resources.instances.methods.clone.parameters.project.description - resources.instances.methods.clone.parameters.project.location - resources.instances.methods.clone.parameters.project.required - resources.instances.methods.clone.parameters.project.type - resources.instances.methods.clone.path - resources.instances.methods.clone.request.$ref - resources.instances.methods.clone.response.$ref - resources.instances.methods.clone.scopes - resources.instances.methods.delete.description - resources.instances.methods.delete.flatPath - resources.instances.methods.delete.httpMethod - resources.instances.methods.delete.id - resources.instances.methods.delete.parameterOrder - resources.instances.methods.delete.parameters.instance.description - resources.instances.methods.delete.parameters.instance.location - resources.instances.methods.delete.parameters.instance.required - resources.instances.methods.delete.parameters.instance.type - resources.instances.methods.delete.parameters.project.description - resources.instances.methods.delete.parameters.project.location - resources.instances.methods.delete.parameters.project.required - resources.instances.methods.delete.parameters.project.type - resources.instances.methods.delete.path - resources.instances.methods.delete.response.$ref - resources.instances.methods.delete.scopes - resources.instances.methods.demoteMaster.description - resources.instances.methods.demoteMaster.flatPath - resources.instances.methods.demoteMaster.httpMethod - resources.instances.methods.demoteMaster.id - resources.instances.methods.demoteMaster.parameterOrder - resources.instances.methods.demoteMaster.parameters.instance.description - resources.instances.methods.demoteMaster.parameters.instance.location - resources.instances.methods.demoteMaster.parameters.instance.required - resources.instances.methods.demoteMaster.parameters.instance.type - resources.instances.methods.demoteMaster.parameters.project.description - resources.instances.methods.demoteMaster.parameters.project.location - resources.instances.methods.demoteMaster.parameters.project.required - resources.instances.methods.demoteMaster.parameters.project.type - resources.instances.methods.demoteMaster.path - resources.instances.methods.demoteMaster.request.$ref - resources.instances.methods.demoteMaster.response.$ref - resources.instances.methods.demoteMaster.scopes - resources.instances.methods.export.description - resources.instances.methods.export.flatPath - resources.instances.methods.export.httpMethod - resources.instances.methods.export.id - resources.instances.methods.export.parameterOrder - resources.instances.methods.export.parameters.instance.description - resources.instances.methods.export.parameters.instance.location - resources.instances.methods.export.parameters.instance.required - resources.instances.methods.export.parameters.instance.type - resources.instances.methods.export.parameters.project.description - resources.instances.methods.export.parameters.project.location - resources.instances.methods.export.parameters.project.required - resources.instances.methods.export.parameters.project.type - resources.instances.methods.export.path - resources.instances.methods.export.request.$ref - resources.instances.methods.export.response.$ref - resources.instances.methods.export.scopes - resources.instances.methods.failover.description - resources.instances.methods.failover.flatPath - resources.instances.methods.failover.httpMethod - resources.instances.methods.failover.id - resources.instances.methods.failover.parameterOrder - resources.instances.methods.failover.parameters.instance.description - resources.instances.methods.failover.parameters.instance.location - resources.instances.methods.failover.parameters.instance.required - resources.instances.methods.failover.parameters.instance.type - resources.instances.methods.failover.parameters.project.description - resources.instances.methods.failover.parameters.project.location - resources.instances.methods.failover.parameters.project.required - resources.instances.methods.failover.parameters.project.type - resources.instances.methods.failover.path - resources.instances.methods.failover.request.$ref - resources.instances.methods.failover.response.$ref - resources.instances.methods.failover.scopes - resources.instances.methods.get.description - resources.instances.methods.get.flatPath - resources.instances.methods.get.httpMethod - resources.instances.methods.get.id - resources.instances.methods.get.parameterOrder - resources.instances.methods.get.parameters.instance.description - resources.instances.methods.get.parameters.instance.location - resources.instances.methods.get.parameters.instance.required - resources.instances.methods.get.parameters.instance.type - resources.instances.methods.get.parameters.project.description - resources.instances.methods.get.parameters.project.location - resources.instances.methods.get.parameters.project.required - resources.instances.methods.get.parameters.project.type - resources.instances.methods.get.path - resources.instances.methods.get.response.$ref - resources.instances.methods.get.scopes - resources.instances.methods.import.description - resources.instances.methods.import.flatPath - resources.instances.methods.import.httpMethod - resources.instances.methods.import.id - resources.instances.methods.import.parameterOrder - resources.instances.methods.import.parameters.instance.description - resources.instances.methods.import.parameters.instance.location - resources.instances.methods.import.parameters.instance.required - resources.instances.methods.import.parameters.instance.type - resources.instances.methods.import.parameters.project.description - resources.instances.methods.import.parameters.project.location - resources.instances.methods.import.parameters.project.required - resources.instances.methods.import.parameters.project.type - resources.instances.methods.import.path - resources.instances.methods.import.request.$ref - resources.instances.methods.import.response.$ref - resources.instances.methods.import.scopes - resources.instances.methods.insert.description - resources.instances.methods.insert.flatPath - resources.instances.methods.insert.httpMethod - resources.instances.methods.insert.id - resources.instances.methods.insert.parameterOrder - resources.instances.methods.insert.parameters.project.description - resources.instances.methods.insert.parameters.project.location - resources.instances.methods.insert.parameters.project.required - resources.instances.methods.insert.parameters.project.type - resources.instances.methods.insert.path - resources.instances.methods.insert.request.$ref - resources.instances.methods.insert.response.$ref - resources.instances.methods.insert.scopes - resources.instances.methods.listServerCas.description - resources.instances.methods.listServerCas.flatPath - resources.instances.methods.listServerCas.httpMethod - resources.instances.methods.listServerCas.id - resources.instances.methods.listServerCas.parameterOrder - resources.instances.methods.listServerCas.parameters.instance.description - resources.instances.methods.listServerCas.parameters.instance.location - resources.instances.methods.listServerCas.parameters.instance.required - resources.instances.methods.listServerCas.parameters.instance.type - resources.instances.methods.listServerCas.parameters.project.description - resources.instances.methods.listServerCas.parameters.project.location - resources.instances.methods.listServerCas.parameters.project.required - resources.instances.methods.listServerCas.parameters.project.type - resources.instances.methods.listServerCas.path - resources.instances.methods.listServerCas.response.$ref - resources.instances.methods.listServerCas.scopes - resources.instances.methods.patch.description - resources.instances.methods.patch.flatPath - resources.instances.methods.patch.httpMethod - resources.instances.methods.patch.id - resources.instances.methods.patch.parameterOrder - resources.instances.methods.patch.parameters.instance.description - resources.instances.methods.patch.parameters.instance.location - resources.instances.methods.patch.parameters.instance.required - resources.instances.methods.patch.parameters.instance.type - resources.instances.methods.patch.parameters.project.description - resources.instances.methods.patch.parameters.project.location - resources.instances.methods.patch.parameters.project.required - resources.instances.methods.patch.parameters.project.type - resources.instances.methods.patch.path - resources.instances.methods.patch.request.$ref - resources.instances.methods.patch.response.$ref - resources.instances.methods.patch.scopes - resources.instances.methods.promoteReplica.description - resources.instances.methods.promoteReplica.flatPath - resources.instances.methods.promoteReplica.httpMethod - resources.instances.methods.promoteReplica.id - resources.instances.methods.promoteReplica.parameterOrder - resources.instances.methods.promoteReplica.parameters.instance.description - resources.instances.methods.promoteReplica.parameters.instance.location - resources.instances.methods.promoteReplica.parameters.instance.required - resources.instances.methods.promoteReplica.parameters.instance.type - resources.instances.methods.promoteReplica.parameters.project.description - resources.instances.methods.promoteReplica.parameters.project.location - resources.instances.methods.promoteReplica.parameters.project.required - resources.instances.methods.promoteReplica.parameters.project.type - resources.instances.methods.promoteReplica.path - resources.instances.methods.promoteReplica.response.$ref - resources.instances.methods.promoteReplica.scopes - resources.instances.methods.resetSslConfig.description - resources.instances.methods.resetSslConfig.flatPath - resources.instances.methods.resetSslConfig.httpMethod - resources.instances.methods.resetSslConfig.id - resources.instances.methods.resetSslConfig.parameterOrder - resources.instances.methods.resetSslConfig.parameters.instance.description - resources.instances.methods.resetSslConfig.parameters.instance.location - resources.instances.methods.resetSslConfig.parameters.instance.required - resources.instances.methods.resetSslConfig.parameters.instance.type - resources.instances.methods.resetSslConfig.parameters.project.description - resources.instances.methods.resetSslConfig.parameters.project.location - resources.instances.methods.resetSslConfig.parameters.project.required - resources.instances.methods.resetSslConfig.parameters.project.type - resources.instances.methods.resetSslConfig.path - resources.instances.methods.resetSslConfig.response.$ref - resources.instances.methods.resetSslConfig.scopes - resources.instances.methods.restart.description - resources.instances.methods.restart.flatPath - resources.instances.methods.restart.httpMethod - resources.instances.methods.restart.id - resources.instances.methods.restart.parameterOrder - resources.instances.methods.restart.parameters.instance.description - resources.instances.methods.restart.parameters.instance.location - resources.instances.methods.restart.parameters.instance.required - resources.instances.methods.restart.parameters.instance.type - resources.instances.methods.restart.parameters.project.description - resources.instances.methods.restart.parameters.project.location - resources.instances.methods.restart.parameters.project.required - resources.instances.methods.restart.parameters.project.type - resources.instances.methods.restart.path - resources.instances.methods.restart.response.$ref - resources.instances.methods.restart.scopes - resources.instances.methods.restoreBackup.description - resources.instances.methods.restoreBackup.flatPath - resources.instances.methods.restoreBackup.httpMethod - resources.instances.methods.restoreBackup.id - resources.instances.methods.restoreBackup.parameterOrder - resources.instances.methods.restoreBackup.parameters.instance.description - resources.instances.methods.restoreBackup.parameters.instance.location - resources.instances.methods.restoreBackup.parameters.instance.required - resources.instances.methods.restoreBackup.parameters.instance.type - resources.instances.methods.restoreBackup.parameters.project.description - resources.instances.methods.restoreBackup.parameters.project.location - resources.instances.methods.restoreBackup.parameters.project.required - resources.instances.methods.restoreBackup.parameters.project.type - resources.instances.methods.restoreBackup.path - resources.instances.methods.restoreBackup.request.$ref - resources.instances.methods.restoreBackup.response.$ref - resources.instances.methods.restoreBackup.scopes - resources.instances.methods.rotateServerCa.description - resources.instances.methods.rotateServerCa.flatPath - resources.instances.methods.rotateServerCa.httpMethod - resources.instances.methods.rotateServerCa.id - resources.instances.methods.rotateServerCa.parameterOrder - resources.instances.methods.rotateServerCa.parameters.instance.description - resources.instances.methods.rotateServerCa.parameters.instance.location - resources.instances.methods.rotateServerCa.parameters.instance.required - resources.instances.methods.rotateServerCa.parameters.instance.type - resources.instances.methods.rotateServerCa.parameters.project.description - resources.instances.methods.rotateServerCa.parameters.project.location - resources.instances.methods.rotateServerCa.parameters.project.required - resources.instances.methods.rotateServerCa.parameters.project.type - resources.instances.methods.rotateServerCa.path - resources.instances.methods.rotateServerCa.request.$ref - resources.instances.methods.rotateServerCa.response.$ref - resources.instances.methods.rotateServerCa.scopes - resources.instances.methods.startReplica.description - resources.instances.methods.startReplica.flatPath - resources.instances.methods.startReplica.httpMethod - resources.instances.methods.startReplica.id - resources.instances.methods.startReplica.parameterOrder - resources.instances.methods.startReplica.parameters.instance.description - resources.instances.methods.startReplica.parameters.instance.location - resources.instances.methods.startReplica.parameters.instance.required - resources.instances.methods.startReplica.parameters.instance.type - resources.instances.methods.startReplica.parameters.project.description - resources.instances.methods.startReplica.parameters.project.location - resources.instances.methods.startReplica.parameters.project.required - resources.instances.methods.startReplica.parameters.project.type - resources.instances.methods.startReplica.path - resources.instances.methods.startReplica.response.$ref - resources.instances.methods.startReplica.scopes - resources.instances.methods.stopReplica.description - resources.instances.methods.stopReplica.flatPath - resources.instances.methods.stopReplica.httpMethod - resources.instances.methods.stopReplica.id - resources.instances.methods.stopReplica.parameterOrder - resources.instances.methods.stopReplica.parameters.instance.description - resources.instances.methods.stopReplica.parameters.instance.location - resources.instances.methods.stopReplica.parameters.instance.required - resources.instances.methods.stopReplica.parameters.instance.type - resources.instances.methods.stopReplica.parameters.project.description - resources.instances.methods.stopReplica.parameters.project.location - resources.instances.methods.stopReplica.parameters.project.required - resources.instances.methods.stopReplica.parameters.project.type - resources.instances.methods.stopReplica.path - resources.instances.methods.stopReplica.response.$ref - resources.instances.methods.stopReplica.scopes - resources.instances.methods.truncateLog.description - resources.instances.methods.truncateLog.flatPath - resources.instances.methods.truncateLog.httpMethod - resources.instances.methods.truncateLog.id - resources.instances.methods.truncateLog.parameterOrder - resources.instances.methods.truncateLog.parameters.instance.description - resources.instances.methods.truncateLog.parameters.instance.location - resources.instances.methods.truncateLog.parameters.instance.required - resources.instances.methods.truncateLog.parameters.instance.type - resources.instances.methods.truncateLog.parameters.project.description - resources.instances.methods.truncateLog.parameters.project.location - resources.instances.methods.truncateLog.parameters.project.required - resources.instances.methods.truncateLog.parameters.project.type - resources.instances.methods.truncateLog.path - resources.instances.methods.truncateLog.request.$ref - resources.instances.methods.truncateLog.response.$ref - resources.instances.methods.truncateLog.scopes - resources.instances.methods.update.description - resources.instances.methods.update.flatPath - resources.instances.methods.update.httpMethod - resources.instances.methods.update.id - resources.instances.methods.update.parameterOrder - resources.instances.methods.update.parameters.instance.description - resources.instances.methods.update.parameters.instance.location - resources.instances.methods.update.parameters.instance.required - resources.instances.methods.update.parameters.instance.type - resources.instances.methods.update.parameters.project.description - resources.instances.methods.update.parameters.project.location - resources.instances.methods.update.parameters.project.required - resources.instances.methods.update.parameters.project.type - resources.instances.methods.update.path - resources.instances.methods.update.request.$ref - resources.instances.methods.update.response.$ref - resources.instances.methods.update.scopes - resources.operations.methods.get.description - resources.operations.methods.get.flatPath - resources.operations.methods.get.httpMethod - resources.operations.methods.get.id - resources.operations.methods.get.parameterOrder - resources.operations.methods.get.parameters.operation.description - resources.operations.methods.get.parameters.operation.location - resources.operations.methods.get.parameters.operation.required - resources.operations.methods.get.parameters.operation.type - resources.operations.methods.get.parameters.project.description - resources.operations.methods.get.parameters.project.location - resources.operations.methods.get.parameters.project.required - resources.operations.methods.get.parameters.project.type - resources.operations.methods.get.path - resources.operations.methods.get.response.$ref - resources.operations.methods.get.scopes - resources.operations.methods.list.description - resources.operations.methods.list.flatPath - resources.operations.methods.list.httpMethod - resources.operations.methods.list.id - resources.operations.methods.list.parameterOrder - resources.operations.methods.list.parameters.instance.description - resources.operations.methods.list.parameters.instance.location - resources.operations.methods.list.parameters.instance.type - resources.operations.methods.list.parameters.maxResults.description - resources.operations.methods.list.parameters.maxResults.format - resources.operations.methods.list.parameters.maxResults.location - resources.operations.methods.list.parameters.maxResults.type - resources.operations.methods.list.parameters.pageToken.description - resources.operations.methods.list.parameters.pageToken.location - resources.operations.methods.list.parameters.pageToken.type - resources.operations.methods.list.parameters.project.description - resources.operations.methods.list.parameters.project.location - resources.operations.methods.list.parameters.project.required - resources.operations.methods.list.parameters.project.type - resources.operations.methods.list.path - resources.operations.methods.list.response.$ref - resources.operations.methods.list.scopes - resources.projects.resources.instances.methods.rescheduleMaintenance.description - resources.projects.resources.instances.methods.rescheduleMaintenance.flatPath - resources.projects.resources.instances.methods.rescheduleMaintenance.httpMethod - resources.projects.resources.instances.methods.rescheduleMaintenance.id - resources.projects.resources.instances.methods.rescheduleMaintenance.parameterOrder - resources.projects.resources.instances.methods.rescheduleMaintenance.parameters.instance.description - resources.projects.resources.instances.methods.rescheduleMaintenance.parameters.instance.location - resources.projects.resources.instances.methods.rescheduleMaintenance.parameters.instance.required - resources.projects.resources.instances.methods.rescheduleMaintenance.parameters.instance.type - resources.projects.resources.instances.methods.rescheduleMaintenance.parameters.project.description - resources.projects.resources.instances.methods.rescheduleMaintenance.parameters.project.location - resources.projects.resources.instances.methods.rescheduleMaintenance.parameters.project.required - resources.projects.resources.instances.methods.rescheduleMaintenance.parameters.project.type - resources.projects.resources.instances.methods.rescheduleMaintenance.path - resources.projects.resources.instances.methods.rescheduleMaintenance.request.$ref - resources.projects.resources.instances.methods.rescheduleMaintenance.response.$ref - resources.projects.resources.instances.methods.rescheduleMaintenance.scopes - resources.projects.resources.instances.methods.startExternalSync.description - resources.projects.resources.instances.methods.startExternalSync.flatPath - resources.projects.resources.instances.methods.startExternalSync.httpMethod - resources.projects.resources.instances.methods.startExternalSync.id - resources.projects.resources.instances.methods.startExternalSync.parameterOrder - resources.projects.resources.instances.methods.startExternalSync.parameters.instance.description - resources.projects.resources.instances.methods.startExternalSync.parameters.instance.location - resources.projects.resources.instances.methods.startExternalSync.parameters.instance.required - resources.projects.resources.instances.methods.startExternalSync.parameters.instance.type - resources.projects.resources.instances.methods.startExternalSync.parameters.project.description - resources.projects.resources.instances.methods.startExternalSync.parameters.project.location - resources.projects.resources.instances.methods.startExternalSync.parameters.project.required - resources.projects.resources.instances.methods.startExternalSync.parameters.project.type - resources.projects.resources.instances.methods.startExternalSync.path - resources.projects.resources.instances.methods.startExternalSync.request.$ref - resources.projects.resources.instances.methods.startExternalSync.response.$ref - resources.projects.resources.instances.methods.startExternalSync.scopes - resources.projects.resources.instances.methods.verifyExternalSyncSettings.description - resources.projects.resources.instances.methods.verifyExternalSyncSettings.flatPath - resources.projects.resources.instances.methods.verifyExternalSyncSettings.httpMethod - resources.projects.resources.instances.methods.verifyExternalSyncSettings.id - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameterOrder - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.instance.description - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.instance.location - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.instance.required - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.instance.type - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.project.description - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.project.location - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.project.required - resources.projects.resources.instances.methods.verifyExternalSyncSettings.parameters.project.type - resources.projects.resources.instances.methods.verifyExternalSyncSettings.path - resources.projects.resources.instances.methods.verifyExternalSyncSettings.request.$ref - resources.projects.resources.instances.methods.verifyExternalSyncSettings.response.$ref - resources.projects.resources.instances.methods.verifyExternalSyncSettings.scopes - resources.sslCerts.methods.createEphemeral.description - resources.sslCerts.methods.createEphemeral.flatPath - resources.sslCerts.methods.createEphemeral.httpMethod - resources.sslCerts.methods.createEphemeral.id - resources.sslCerts.methods.createEphemeral.parameterOrder - resources.sslCerts.methods.createEphemeral.parameters.instance.description - resources.sslCerts.methods.createEphemeral.parameters.instance.location - resources.sslCerts.methods.createEphemeral.parameters.instance.required - resources.sslCerts.methods.createEphemeral.parameters.instance.type - resources.sslCerts.methods.createEphemeral.parameters.project.description - resources.sslCerts.methods.createEphemeral.parameters.project.location - resources.sslCerts.methods.createEphemeral.parameters.project.required - resources.sslCerts.methods.createEphemeral.parameters.project.type - resources.sslCerts.methods.createEphemeral.path - resources.sslCerts.methods.createEphemeral.request.$ref - resources.sslCerts.methods.createEphemeral.response.$ref - resources.sslCerts.methods.createEphemeral.scopes - resources.sslCerts.methods.delete.description - resources.sslCerts.methods.delete.flatPath - resources.sslCerts.methods.delete.httpMethod - resources.sslCerts.methods.delete.id - resources.sslCerts.methods.delete.parameterOrder - resources.sslCerts.methods.delete.parameters.instance.description - resources.sslCerts.methods.delete.parameters.instance.location - resources.sslCerts.methods.delete.parameters.instance.required - resources.sslCerts.methods.delete.parameters.instance.type - resources.sslCerts.methods.delete.parameters.project.description - resources.sslCerts.methods.delete.parameters.project.location - resources.sslCerts.methods.delete.parameters.project.required - resources.sslCerts.methods.delete.parameters.project.type - resources.sslCerts.methods.delete.parameters.sha1Fingerprint.description - resources.sslCerts.methods.delete.parameters.sha1Fingerprint.location - resources.sslCerts.methods.delete.parameters.sha1Fingerprint.required - resources.sslCerts.methods.delete.parameters.sha1Fingerprint.type - resources.sslCerts.methods.delete.path - resources.sslCerts.methods.delete.response.$ref - resources.sslCerts.methods.delete.scopes - resources.sslCerts.methods.get.description - resources.sslCerts.methods.get.flatPath - resources.sslCerts.methods.get.httpMethod - resources.sslCerts.methods.get.id - resources.sslCerts.methods.get.parameterOrder - resources.sslCerts.methods.get.parameters.instance.description - resources.sslCerts.methods.get.parameters.instance.location - resources.sslCerts.methods.get.parameters.instance.required - resources.sslCerts.methods.get.parameters.instance.type - resources.sslCerts.methods.get.parameters.project.description - resources.sslCerts.methods.get.parameters.project.location - resources.sslCerts.methods.get.parameters.project.required - resources.sslCerts.methods.get.parameters.project.type - resources.sslCerts.methods.get.parameters.sha1Fingerprint.description - resources.sslCerts.methods.get.parameters.sha1Fingerprint.location - resources.sslCerts.methods.get.parameters.sha1Fingerprint.required - resources.sslCerts.methods.get.parameters.sha1Fingerprint.type - resources.sslCerts.methods.get.path - resources.sslCerts.methods.get.response.$ref - resources.sslCerts.methods.get.scopes - resources.sslCerts.methods.insert.description - resources.sslCerts.methods.insert.flatPath - resources.sslCerts.methods.insert.httpMethod - resources.sslCerts.methods.insert.id - resources.sslCerts.methods.insert.parameterOrder - resources.sslCerts.methods.insert.parameters.instance.description - resources.sslCerts.methods.insert.parameters.instance.location - resources.sslCerts.methods.insert.parameters.instance.required - resources.sslCerts.methods.insert.parameters.instance.type - resources.sslCerts.methods.insert.parameters.project.description - resources.sslCerts.methods.insert.parameters.project.location - resources.sslCerts.methods.insert.parameters.project.required - resources.sslCerts.methods.insert.parameters.project.type - resources.sslCerts.methods.insert.path - resources.sslCerts.methods.insert.request.$ref - resources.sslCerts.methods.insert.response.$ref - resources.sslCerts.methods.insert.scopes - resources.sslCerts.methods.list.description - resources.sslCerts.methods.list.flatPath - resources.sslCerts.methods.list.httpMethod - resources.sslCerts.methods.list.id - resources.sslCerts.methods.list.parameterOrder - resources.sslCerts.methods.list.parameters.instance.description - resources.sslCerts.methods.list.parameters.instance.location - resources.sslCerts.methods.list.parameters.instance.required - resources.sslCerts.methods.list.parameters.instance.type - resources.sslCerts.methods.list.parameters.project.description - resources.sslCerts.methods.list.parameters.project.location - resources.sslCerts.methods.list.parameters.project.required - resources.sslCerts.methods.list.parameters.project.type - resources.sslCerts.methods.list.path - resources.sslCerts.methods.list.response.$ref - resources.sslCerts.methods.list.scopes - resources.tiers.methods.list.description - resources.tiers.methods.list.flatPath - resources.tiers.methods.list.httpMethod - resources.tiers.methods.list.id - resources.tiers.methods.list.parameterOrder - resources.tiers.methods.list.parameters.project.description - resources.tiers.methods.list.parameters.project.location - resources.tiers.methods.list.parameters.project.required - resources.tiers.methods.list.parameters.project.type - resources.tiers.methods.list.path - resources.tiers.methods.list.response.$ref - resources.tiers.methods.list.scopes - resources.users.methods.delete.description - resources.users.methods.delete.flatPath - resources.users.methods.delete.httpMethod - resources.users.methods.delete.id - resources.users.methods.delete.parameterOrder - resources.users.methods.delete.parameters.host.description - resources.users.methods.delete.parameters.host.location - resources.users.methods.delete.parameters.host.type - resources.users.methods.delete.parameters.instance.description - resources.users.methods.delete.parameters.instance.location - resources.users.methods.delete.parameters.instance.required - resources.users.methods.delete.parameters.instance.type - resources.users.methods.delete.parameters.name.description - resources.users.methods.delete.parameters.name.location - resources.users.methods.delete.parameters.name.type - resources.users.methods.delete.parameters.project.description - resources.users.methods.delete.parameters.project.location - resources.users.methods.delete.parameters.project.required - resources.users.methods.delete.parameters.project.type - resources.users.methods.delete.path - resources.users.methods.delete.response.$ref - resources.users.methods.delete.scopes - resources.users.methods.insert.description - resources.users.methods.insert.flatPath - resources.users.methods.insert.httpMethod - resources.users.methods.insert.id - resources.users.methods.insert.parameterOrder - resources.users.methods.insert.parameters.instance.description - resources.users.methods.insert.parameters.instance.location - resources.users.methods.insert.parameters.instance.required - resources.users.methods.insert.parameters.instance.type - resources.users.methods.insert.parameters.project.description - resources.users.methods.insert.parameters.project.location - resources.users.methods.insert.parameters.project.required - resources.users.methods.insert.parameters.project.type - resources.users.methods.insert.path - resources.users.methods.insert.request.$ref - resources.users.methods.insert.response.$ref - resources.users.methods.insert.scopes - resources.users.methods.list.description - resources.users.methods.list.flatPath - resources.users.methods.list.httpMethod - resources.users.methods.list.id - resources.users.methods.list.parameterOrder - resources.users.methods.list.parameters.instance.description - resources.users.methods.list.parameters.instance.location - resources.users.methods.list.parameters.instance.required - resources.users.methods.list.parameters.instance.type - resources.users.methods.list.parameters.project.description - resources.users.methods.list.parameters.project.location - resources.users.methods.list.parameters.project.required - resources.users.methods.list.parameters.project.type - resources.users.methods.list.path - resources.users.methods.list.response.$ref - resources.users.methods.list.scopes - resources.users.methods.update.description - resources.users.methods.update.flatPath - resources.users.methods.update.httpMethod - resources.users.methods.update.id - resources.users.methods.update.parameterOrder - resources.users.methods.update.parameters.host.description - resources.users.methods.update.parameters.host.location - resources.users.methods.update.parameters.host.type - resources.users.methods.update.parameters.instance.description - resources.users.methods.update.parameters.instance.location - resources.users.methods.update.parameters.instance.required - resources.users.methods.update.parameters.instance.type - resources.users.methods.update.parameters.name.description - resources.users.methods.update.parameters.name.location - resources.users.methods.update.parameters.name.type - resources.users.methods.update.parameters.project.description - resources.users.methods.update.parameters.project.location - resources.users.methods.update.parameters.project.required - resources.users.methods.update.parameters.project.type - resources.users.methods.update.path - resources.users.methods.update.request.$ref - resources.users.methods.update.response.$ref - resources.users.methods.update.scopes - schemas.BackupContext.description - schemas.BackupContext.id - schemas.BackupContext.properties.backupId.description - schemas.BackupContext.properties.backupId.format - schemas.BackupContext.properties.backupId.type - schemas.BackupContext.properties.kind.description - schemas.BackupContext.properties.kind.type - schemas.BackupContext.type - schemas.BackupRun.description - schemas.BackupRun.id - schemas.BackupRun.properties.backupKind.description - schemas.BackupRun.properties.backupKind.enum - schemas.BackupRun.properties.backupKind.enumDescriptions - schemas.BackupRun.properties.backupKind.type - schemas.BackupRun.properties.description.description - schemas.BackupRun.properties.description.type - schemas.BackupRun.properties.diskEncryptionConfiguration.$ref - schemas.BackupRun.properties.diskEncryptionConfiguration.description - schemas.BackupRun.properties.diskEncryptionStatus.$ref - schemas.BackupRun.properties.diskEncryptionStatus.description - schemas.BackupRun.properties.endTime.description - schemas.BackupRun.properties.endTime.format - schemas.BackupRun.properties.endTime.type - schemas.BackupRun.properties.enqueuedTime.description - schemas.BackupRun.properties.enqueuedTime.format - schemas.BackupRun.properties.enqueuedTime.type - schemas.BackupRun.properties.error.$ref - schemas.BackupRun.properties.error.description - schemas.BackupRun.properties.id.description - schemas.BackupRun.properties.id.format - schemas.BackupRun.properties.id.type - schemas.BackupRun.properties.instance.description - schemas.BackupRun.properties.instance.type - schemas.BackupRun.properties.kind.description - schemas.BackupRun.properties.kind.type - schemas.BackupRun.properties.location.description - schemas.BackupRun.properties.location.type - schemas.BackupRun.properties.selfLink.description - schemas.BackupRun.properties.selfLink.type - schemas.BackupRun.properties.startTime.description - schemas.BackupRun.properties.startTime.format - schemas.BackupRun.properties.startTime.type - schemas.BackupRun.properties.status.description - schemas.BackupRun.properties.status.enum - schemas.BackupRun.properties.status.enumDescriptions - schemas.BackupRun.properties.status.type - schemas.BackupRun.properties.type.description - schemas.BackupRun.properties.type.enum - schemas.BackupRun.properties.type.enumDescriptions - schemas.BackupRun.properties.type.type - schemas.BackupRun.properties.windowStartTime.description - schemas.BackupRun.properties.windowStartTime.format - schemas.BackupRun.properties.windowStartTime.type - schemas.BackupRun.type - schemas.BackupRunsListResponse.description - schemas.BackupRunsListResponse.id - schemas.BackupRunsListResponse.properties.items.description - schemas.BackupRunsListResponse.properties.items.items.$ref - schemas.BackupRunsListResponse.properties.items.type - schemas.BackupRunsListResponse.properties.kind.description - schemas.BackupRunsListResponse.properties.kind.type - schemas.BackupRunsListResponse.properties.nextPageToken.description - schemas.BackupRunsListResponse.properties.nextPageToken.type - schemas.BackupRunsListResponse.type - schemas.BinLogCoordinates.description - schemas.BinLogCoordinates.id - schemas.BinLogCoordinates.properties.binLogFileName.description - schemas.BinLogCoordinates.properties.binLogFileName.type - schemas.BinLogCoordinates.properties.binLogPosition.description - schemas.BinLogCoordinates.properties.binLogPosition.format - schemas.BinLogCoordinates.properties.binLogPosition.type - schemas.BinLogCoordinates.properties.kind.description - schemas.BinLogCoordinates.properties.kind.type - schemas.BinLogCoordinates.type - schemas.CloneContext.description - schemas.CloneContext.id - schemas.CloneContext.properties.binLogCoordinates.$ref - schemas.CloneContext.properties.binLogCoordinates.description - schemas.CloneContext.properties.destinationInstanceName.description - schemas.CloneContext.properties.destinationInstanceName.type - schemas.CloneContext.properties.kind.description - schemas.CloneContext.properties.kind.type - schemas.CloneContext.properties.pitrTimestampMs.description - schemas.CloneContext.properties.pitrTimestampMs.format - schemas.CloneContext.properties.pitrTimestampMs.type - schemas.CloneContext.properties.pointInTime.description - schemas.CloneContext.properties.pointInTime.format - schemas.CloneContext.properties.pointInTime.type - schemas.CloneContext.type - schemas.Database.description - schemas.Database.id - schemas.Database.properties.charset.description - schemas.Database.properties.charset.type - schemas.Database.properties.collation.description - schemas.Database.properties.collation.type - schemas.Database.properties.etag.description - schemas.Database.properties.etag.type - schemas.Database.properties.instance.description - schemas.Database.properties.instance.type - schemas.Database.properties.kind.description - schemas.Database.properties.kind.type - schemas.Database.properties.name.description - schemas.Database.properties.name.type - schemas.Database.properties.project.description - schemas.Database.properties.project.type - schemas.Database.properties.selfLink.description - schemas.Database.properties.selfLink.type - schemas.Database.properties.sqlserverDatabaseDetails.$ref - schemas.Database.type - schemas.DatabasesListResponse.description - schemas.DatabasesListResponse.id - schemas.DatabasesListResponse.properties.items.description - schemas.DatabasesListResponse.properties.items.items.$ref - schemas.DatabasesListResponse.properties.items.type - schemas.DatabasesListResponse.properties.kind.description - schemas.DatabasesListResponse.properties.kind.type - schemas.DatabasesListResponse.type - schemas.DemoteMasterConfiguration.description - schemas.DemoteMasterConfiguration.id - schemas.DemoteMasterConfiguration.properties.kind.description - schemas.DemoteMasterConfiguration.properties.kind.type - schemas.DemoteMasterConfiguration.properties.mysqlReplicaConfiguration.$ref - schemas.DemoteMasterConfiguration.properties.mysqlReplicaConfiguration.description - schemas.DemoteMasterConfiguration.type - schemas.DemoteMasterContext.description - schemas.DemoteMasterContext.id - schemas.DemoteMasterContext.properties.kind.description - schemas.DemoteMasterContext.properties.kind.type - schemas.DemoteMasterContext.properties.masterInstanceName.description - schemas.DemoteMasterContext.properties.masterInstanceName.type - schemas.DemoteMasterContext.properties.replicaConfiguration.$ref - schemas.DemoteMasterContext.properties.replicaConfiguration.description - schemas.DemoteMasterContext.properties.verifyGtidConsistency.description - schemas.DemoteMasterContext.properties.verifyGtidConsistency.type - schemas.DemoteMasterContext.type - schemas.DemoteMasterMySqlReplicaConfiguration.description - schemas.DemoteMasterMySqlReplicaConfiguration.id - schemas.DemoteMasterMySqlReplicaConfiguration.properties.caCertificate.description - schemas.DemoteMasterMySqlReplicaConfiguration.properties.caCertificate.type - schemas.DemoteMasterMySqlReplicaConfiguration.properties.clientCertificate.description - schemas.DemoteMasterMySqlReplicaConfiguration.properties.clientCertificate.type - schemas.DemoteMasterMySqlReplicaConfiguration.properties.clientKey.description - schemas.DemoteMasterMySqlReplicaConfiguration.properties.clientKey.type - schemas.DemoteMasterMySqlReplicaConfiguration.properties.kind.description - schemas.DemoteMasterMySqlReplicaConfiguration.properties.kind.type - schemas.DemoteMasterMySqlReplicaConfiguration.properties.password.description - schemas.DemoteMasterMySqlReplicaConfiguration.properties.password.type - schemas.DemoteMasterMySqlReplicaConfiguration.properties.username.description - schemas.DemoteMasterMySqlReplicaConfiguration.properties.username.type - schemas.DemoteMasterMySqlReplicaConfiguration.type - schemas.ExportContext.description - schemas.ExportContext.id - schemas.ExportContext.properties.csvExportOptions.description - schemas.ExportContext.properties.csvExportOptions.properties.selectQuery.description - schemas.ExportContext.properties.csvExportOptions.properties.selectQuery.type - schemas.ExportContext.properties.csvExportOptions.type - schemas.ExportContext.properties.databases.description - schemas.ExportContext.properties.databases.items.type - schemas.ExportContext.properties.databases.type - schemas.ExportContext.properties.fileType.description - schemas.ExportContext.properties.fileType.enum - schemas.ExportContext.properties.fileType.enumDescriptions - schemas.ExportContext.properties.fileType.type - schemas.ExportContext.properties.kind.description - schemas.ExportContext.properties.kind.type - schemas.ExportContext.properties.offload.description - schemas.ExportContext.properties.offload.type - schemas.ExportContext.properties.sqlExportOptions.description - schemas.ExportContext.properties.sqlExportOptions.properties.mysqlExportOptions.description - schemas.ExportContext.properties.sqlExportOptions.properties.mysqlExportOptions.properties.masterData.description - schemas.ExportContext.properties.sqlExportOptions.properties.mysqlExportOptions.properties.masterData.format - schemas.ExportContext.properties.sqlExportOptions.properties.mysqlExportOptions.properties.masterData.type - schemas.ExportContext.properties.sqlExportOptions.properties.mysqlExportOptions.type - schemas.ExportContext.properties.sqlExportOptions.properties.schemaOnly.description - schemas.ExportContext.properties.sqlExportOptions.properties.schemaOnly.type - schemas.ExportContext.properties.sqlExportOptions.properties.tables.description - schemas.ExportContext.properties.sqlExportOptions.properties.tables.items.type - schemas.ExportContext.properties.sqlExportOptions.properties.tables.type - schemas.ExportContext.properties.sqlExportOptions.type - schemas.ExportContext.properties.uri.description - schemas.ExportContext.properties.uri.type - schemas.ExportContext.type - schemas.FailoverContext.description - schemas.FailoverContext.id - schemas.FailoverContext.properties.kind.description - schemas.FailoverContext.properties.kind.type - schemas.FailoverContext.properties.settingsVersion.description - schemas.FailoverContext.properties.settingsVersion.format - schemas.FailoverContext.properties.settingsVersion.type - schemas.FailoverContext.type - schemas.Flag.description - schemas.Flag.id - schemas.Flag.properties.allowedIntValues.description - schemas.Flag.properties.allowedIntValues.items.format - schemas.Flag.properties.allowedIntValues.items.type - schemas.Flag.properties.allowedIntValues.type - schemas.Flag.properties.allowedStringValues.description - schemas.Flag.properties.allowedStringValues.items.type - schemas.Flag.properties.allowedStringValues.type - schemas.Flag.properties.appliesTo.description - schemas.Flag.properties.appliesTo.items.enum - schemas.Flag.properties.appliesTo.items.enumDescriptions - schemas.Flag.properties.appliesTo.items.type - schemas.Flag.properties.appliesTo.type - schemas.Flag.properties.inBeta.description - schemas.Flag.properties.inBeta.type - schemas.Flag.properties.kind.description - schemas.Flag.properties.kind.type - schemas.Flag.properties.maxValue.description - schemas.Flag.properties.maxValue.format - schemas.Flag.properties.maxValue.type - schemas.Flag.properties.minValue.description - schemas.Flag.properties.minValue.format - schemas.Flag.properties.minValue.type - schemas.Flag.properties.name.description - schemas.Flag.properties.name.type - schemas.Flag.properties.requiresRestart.description - schemas.Flag.properties.requiresRestart.type - schemas.Flag.properties.type.description - schemas.Flag.properties.type.enum - schemas.Flag.properties.type.enumDescriptions - schemas.Flag.properties.type.type - schemas.Flag.type - schemas.FlagsListResponse.description - schemas.FlagsListResponse.id - schemas.FlagsListResponse.properties.items.description - schemas.FlagsListResponse.properties.items.items.$ref - schemas.FlagsListResponse.properties.items.type - schemas.FlagsListResponse.properties.kind.description - schemas.FlagsListResponse.properties.kind.type - schemas.FlagsListResponse.type - schemas.ImportContext.description - schemas.ImportContext.id - schemas.ImportContext.properties.bakImportOptions.description - schemas.ImportContext.properties.bakImportOptions.properties.encryptionOptions.properties.certPath.description - schemas.ImportContext.properties.bakImportOptions.properties.encryptionOptions.properties.certPath.type - schemas.ImportContext.properties.bakImportOptions.properties.encryptionOptions.properties.pvkPassword.description - schemas.ImportContext.properties.bakImportOptions.properties.encryptionOptions.properties.pvkPassword.type - schemas.ImportContext.properties.bakImportOptions.properties.encryptionOptions.properties.pvkPath.description - schemas.ImportContext.properties.bakImportOptions.properties.encryptionOptions.properties.pvkPath.type - schemas.ImportContext.properties.bakImportOptions.properties.encryptionOptions.type - schemas.ImportContext.properties.bakImportOptions.type - schemas.ImportContext.properties.csvImportOptions.description - schemas.ImportContext.properties.csvImportOptions.properties.columns.description - schemas.ImportContext.properties.csvImportOptions.properties.columns.items.type - schemas.ImportContext.properties.csvImportOptions.properties.columns.type - schemas.ImportContext.properties.csvImportOptions.properties.table.description - schemas.ImportContext.properties.csvImportOptions.properties.table.type - schemas.ImportContext.properties.csvImportOptions.type - schemas.ImportContext.properties.database.description - schemas.ImportContext.properties.database.type - schemas.ImportContext.properties.fileType.description - schemas.ImportContext.properties.fileType.enum - schemas.ImportContext.properties.fileType.enumDescriptions - schemas.ImportContext.properties.fileType.type - schemas.ImportContext.properties.importUser.description - schemas.ImportContext.properties.importUser.type - schemas.ImportContext.properties.kind.description - schemas.ImportContext.properties.kind.type - schemas.ImportContext.properties.uri.description - schemas.ImportContext.properties.uri.type - schemas.ImportContext.type - schemas.InstancesCloneRequest.description - schemas.InstancesCloneRequest.id - schemas.InstancesCloneRequest.properties.cloneContext.$ref - schemas.InstancesCloneRequest.properties.cloneContext.description - schemas.InstancesCloneRequest.type - schemas.InstancesDemoteMasterRequest.description - schemas.InstancesDemoteMasterRequest.id - schemas.InstancesDemoteMasterRequest.properties.demoteMasterContext.$ref - schemas.InstancesDemoteMasterRequest.properties.demoteMasterContext.description - schemas.InstancesDemoteMasterRequest.type - schemas.InstancesExportRequest.description - schemas.InstancesExportRequest.id - schemas.InstancesExportRequest.properties.exportContext.$ref - schemas.InstancesExportRequest.properties.exportContext.description - schemas.InstancesExportRequest.type - schemas.InstancesFailoverRequest.description - schemas.InstancesFailoverRequest.id - schemas.InstancesFailoverRequest.properties.failoverContext.$ref - schemas.InstancesFailoverRequest.properties.failoverContext.description - schemas.InstancesFailoverRequest.type - schemas.InstancesImportRequest.description - schemas.InstancesImportRequest.id - schemas.InstancesImportRequest.properties.importContext.$ref - schemas.InstancesImportRequest.properties.importContext.description - schemas.InstancesImportRequest.type - schemas.InstancesListServerCasResponse.description - schemas.InstancesListServerCasResponse.id - schemas.InstancesListServerCasResponse.properties.activeVersion.type - schemas.InstancesListServerCasResponse.properties.certs.description - schemas.InstancesListServerCasResponse.properties.certs.items.$ref - schemas.InstancesListServerCasResponse.properties.certs.type - schemas.InstancesListServerCasResponse.properties.kind.description - schemas.InstancesListServerCasResponse.properties.kind.type - schemas.InstancesListServerCasResponse.type - schemas.InstancesRestoreBackupRequest.description - schemas.InstancesRestoreBackupRequest.id - schemas.InstancesRestoreBackupRequest.properties.restoreBackupContext.$ref - schemas.InstancesRestoreBackupRequest.properties.restoreBackupContext.description - schemas.InstancesRestoreBackupRequest.type - schemas.InstancesRotateServerCaRequest.description - schemas.InstancesRotateServerCaRequest.id - schemas.InstancesRotateServerCaRequest.properties.rotateServerCaContext.$ref - schemas.InstancesRotateServerCaRequest.properties.rotateServerCaContext.description - schemas.InstancesRotateServerCaRequest.type - schemas.InstancesTruncateLogRequest.description - schemas.InstancesTruncateLogRequest.id - schemas.InstancesTruncateLogRequest.properties.truncateLogContext.$ref - schemas.InstancesTruncateLogRequest.properties.truncateLogContext.description - schemas.InstancesTruncateLogRequest.type - schemas.IpConfiguration.properties.allocatedIpRange.description - schemas.IpConfiguration.properties.allocatedIpRange.type - schemas.LocationPreference.properties.followGaeApplication.description - schemas.LocationPreference.properties.followGaeApplication.type - schemas.MySqlSyncConfig.description - schemas.MySqlSyncConfig.id - schemas.MySqlSyncConfig.type - schemas.Operation.description - schemas.Operation.id - schemas.Operation.properties.backupContext.$ref - schemas.Operation.properties.backupContext.description - schemas.Operation.properties.endTime.description - schemas.Operation.properties.endTime.format - schemas.Operation.properties.endTime.type - schemas.Operation.properties.error.$ref - schemas.Operation.properties.error.description - schemas.Operation.properties.exportContext.$ref - schemas.Operation.properties.exportContext.description - schemas.Operation.properties.importContext.$ref - schemas.Operation.properties.importContext.description - schemas.Operation.properties.insertTime.description - schemas.Operation.properties.insertTime.format - schemas.Operation.properties.insertTime.type - schemas.Operation.properties.kind.description - schemas.Operation.properties.kind.type - schemas.Operation.properties.name.description - schemas.Operation.properties.name.type - schemas.Operation.properties.operationType.description - schemas.Operation.properties.operationType.enum - schemas.Operation.properties.operationType.enumDescriptions - schemas.Operation.properties.operationType.type - schemas.Operation.properties.selfLink.description - schemas.Operation.properties.selfLink.type - schemas.Operation.properties.startTime.description - schemas.Operation.properties.startTime.format - schemas.Operation.properties.startTime.type - schemas.Operation.properties.status.description - schemas.Operation.properties.status.enum - schemas.Operation.properties.status.enumDescriptions - schemas.Operation.properties.status.type - schemas.Operation.properties.targetId.description - schemas.Operation.properties.targetId.type - schemas.Operation.properties.targetLink.type - schemas.Operation.properties.targetProject.description - schemas.Operation.properties.targetProject.type - schemas.Operation.properties.user.description - schemas.Operation.properties.user.type - schemas.Operation.type - schemas.OperationError.description - schemas.OperationError.id - schemas.OperationError.properties.code.description - schemas.OperationError.properties.code.type - schemas.OperationError.properties.kind.description - schemas.OperationError.properties.kind.type - schemas.OperationError.properties.message.description - schemas.OperationError.properties.message.type - schemas.OperationError.type - schemas.OperationErrors.description - schemas.OperationErrors.id - schemas.OperationErrors.properties.errors.description - schemas.OperationErrors.properties.errors.items.$ref - schemas.OperationErrors.properties.errors.type - schemas.OperationErrors.properties.kind.description - schemas.OperationErrors.properties.kind.type - schemas.OperationErrors.type - schemas.OperationsListResponse.description - schemas.OperationsListResponse.id - schemas.OperationsListResponse.properties.items.description - schemas.OperationsListResponse.properties.items.items.$ref - schemas.OperationsListResponse.properties.items.type - schemas.OperationsListResponse.properties.kind.description - schemas.OperationsListResponse.properties.kind.type - schemas.OperationsListResponse.properties.nextPageToken.description - schemas.OperationsListResponse.properties.nextPageToken.type - schemas.OperationsListResponse.type - schemas.Reschedule.id - schemas.Reschedule.properties.rescheduleType.description - schemas.Reschedule.properties.rescheduleType.enum - schemas.Reschedule.properties.rescheduleType.enumDescriptions - schemas.Reschedule.properties.rescheduleType.type - schemas.Reschedule.properties.scheduleTime.description - schemas.Reschedule.properties.scheduleTime.format - schemas.Reschedule.properties.scheduleTime.type - schemas.Reschedule.type - schemas.RestoreBackupContext.description - schemas.RestoreBackupContext.id - schemas.RestoreBackupContext.properties.backupRunId.description - schemas.RestoreBackupContext.properties.backupRunId.format - schemas.RestoreBackupContext.properties.backupRunId.type - schemas.RestoreBackupContext.properties.instanceId.description - schemas.RestoreBackupContext.properties.instanceId.type - schemas.RestoreBackupContext.properties.kind.description - schemas.RestoreBackupContext.properties.kind.type - schemas.RestoreBackupContext.properties.project.description - schemas.RestoreBackupContext.properties.project.type - schemas.RestoreBackupContext.type - schemas.RotateServerCaContext.description - schemas.RotateServerCaContext.id - schemas.RotateServerCaContext.properties.kind.description - schemas.RotateServerCaContext.properties.kind.type - schemas.RotateServerCaContext.properties.nextVersion.description - schemas.RotateServerCaContext.properties.nextVersion.type - schemas.RotateServerCaContext.type - schemas.Settings.properties.authorizedGaeApplications.description - schemas.Settings.properties.authorizedGaeApplications.items.type - schemas.Settings.properties.authorizedGaeApplications.type - schemas.SqlExternalSyncSettingError.description - schemas.SqlExternalSyncSettingError.id - schemas.SqlExternalSyncSettingError.properties.detail.description - schemas.SqlExternalSyncSettingError.properties.detail.type - schemas.SqlExternalSyncSettingError.properties.kind.description - schemas.SqlExternalSyncSettingError.properties.kind.type - schemas.SqlExternalSyncSettingError.properties.type.description - schemas.SqlExternalSyncSettingError.properties.type.enum - schemas.SqlExternalSyncSettingError.properties.type.enumDescriptions - schemas.SqlExternalSyncSettingError.properties.type.type - schemas.SqlExternalSyncSettingError.type - schemas.SqlInstancesRescheduleMaintenanceRequestBody.description - schemas.SqlInstancesRescheduleMaintenanceRequestBody.id - schemas.SqlInstancesRescheduleMaintenanceRequestBody.properties.reschedule.$ref - schemas.SqlInstancesRescheduleMaintenanceRequestBody.properties.reschedule.description - schemas.SqlInstancesRescheduleMaintenanceRequestBody.type - schemas.SqlInstancesStartExternalSyncRequest.description - schemas.SqlInstancesStartExternalSyncRequest.id - schemas.SqlInstancesStartExternalSyncRequest.properties.mysqlSyncConfig.$ref - schemas.SqlInstancesStartExternalSyncRequest.properties.mysqlSyncConfig.description - schemas.SqlInstancesStartExternalSyncRequest.properties.skipVerification.description - schemas.SqlInstancesStartExternalSyncRequest.properties.skipVerification.type - schemas.SqlInstancesStartExternalSyncRequest.properties.syncMode.description - schemas.SqlInstancesStartExternalSyncRequest.properties.syncMode.enum - schemas.SqlInstancesStartExternalSyncRequest.properties.syncMode.enumDescriptions - schemas.SqlInstancesStartExternalSyncRequest.properties.syncMode.type - schemas.SqlInstancesStartExternalSyncRequest.type - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.description - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.id - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.mysqlSyncConfig.$ref - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.mysqlSyncConfig.description - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.syncMode.description - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.syncMode.enum - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.syncMode.enumDescriptions - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.syncMode.type - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.verifyConnectionOnly.description - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.properties.verifyConnectionOnly.type - schemas.SqlInstancesVerifyExternalSyncSettingsRequest.type - schemas.SqlInstancesVerifyExternalSyncSettingsResponse.description - schemas.SqlInstancesVerifyExternalSyncSettingsResponse.id - schemas.SqlInstancesVerifyExternalSyncSettingsResponse.properties.errors.description - schemas.SqlInstancesVerifyExternalSyncSettingsResponse.properties.errors.items.$ref - schemas.SqlInstancesVerifyExternalSyncSettingsResponse.properties.errors.type - schemas.SqlInstancesVerifyExternalSyncSettingsResponse.properties.kind.description - schemas.SqlInstancesVerifyExternalSyncSettingsResponse.properties.kind.type - schemas.SqlInstancesVerifyExternalSyncSettingsResponse.properties.warnings.description - schemas.SqlInstancesVerifyExternalSyncSettingsResponse.properties.warnings.items.$ref - schemas.SqlInstancesVerifyExternalSyncSettingsResponse.properties.warnings.type - schemas.SqlInstancesVerifyExternalSyncSettingsResponse.type - schemas.SqlServerDatabaseDetails.description - schemas.SqlServerDatabaseDetails.id - schemas.SqlServerDatabaseDetails.properties.compatibilityLevel.description - schemas.SqlServerDatabaseDetails.properties.compatibilityLevel.format - schemas.SqlServerDatabaseDetails.properties.compatibilityLevel.type - schemas.SqlServerDatabaseDetails.properties.recoveryModel.description - schemas.SqlServerDatabaseDetails.properties.recoveryModel.type - schemas.SqlServerDatabaseDetails.type - schemas.SqlServerUserDetails.description - schemas.SqlServerUserDetails.id - schemas.SqlServerUserDetails.properties.disabled.description - schemas.SqlServerUserDetails.properties.disabled.type - schemas.SqlServerUserDetails.properties.serverRoles.description - schemas.SqlServerUserDetails.properties.serverRoles.items.type - schemas.SqlServerUserDetails.properties.serverRoles.type - schemas.SqlServerUserDetails.type - schemas.SslCert.properties.selfLink.description - schemas.SslCert.properties.selfLink.type - schemas.SslCertDetail.description - schemas.SslCertDetail.id - schemas.SslCertDetail.properties.certInfo.$ref - schemas.SslCertDetail.properties.certInfo.description - schemas.SslCertDetail.properties.certPrivateKey.description - schemas.SslCertDetail.properties.certPrivateKey.type - schemas.SslCertDetail.type - schemas.SslCertsInsertRequest.description - schemas.SslCertsInsertRequest.id - schemas.SslCertsInsertRequest.properties.commonName.description - schemas.SslCertsInsertRequest.properties.commonName.type - schemas.SslCertsInsertRequest.type - schemas.SslCertsInsertResponse.description - schemas.SslCertsInsertResponse.id - schemas.SslCertsInsertResponse.properties.clientCert.$ref - schemas.SslCertsInsertResponse.properties.clientCert.description - schemas.SslCertsInsertResponse.properties.kind.description - schemas.SslCertsInsertResponse.properties.kind.type - schemas.SslCertsInsertResponse.properties.operation.$ref - schemas.SslCertsInsertResponse.properties.operation.description - schemas.SslCertsInsertResponse.properties.serverCaCert.$ref - schemas.SslCertsInsertResponse.properties.serverCaCert.description - schemas.SslCertsInsertResponse.type - schemas.SslCertsListResponse.description - schemas.SslCertsListResponse.id - schemas.SslCertsListResponse.properties.items.description - schemas.SslCertsListResponse.properties.items.items.$ref - schemas.SslCertsListResponse.properties.items.type - schemas.SslCertsListResponse.properties.kind.description - schemas.SslCertsListResponse.properties.kind.type - schemas.SslCertsListResponse.type - schemas.Tier.description - schemas.Tier.id - schemas.Tier.properties.DiskQuota.description - schemas.Tier.properties.DiskQuota.format - schemas.Tier.properties.DiskQuota.type - schemas.Tier.properties.RAM.description - schemas.Tier.properties.RAM.format - schemas.Tier.properties.RAM.type - schemas.Tier.properties.kind.description - schemas.Tier.properties.kind.type - schemas.Tier.properties.region.description - schemas.Tier.properties.region.items.type - schemas.Tier.properties.region.type - schemas.Tier.properties.tier.description - schemas.Tier.properties.tier.type - schemas.Tier.type - schemas.TiersListResponse.description - schemas.TiersListResponse.id - schemas.TiersListResponse.properties.items.description - schemas.TiersListResponse.properties.items.items.$ref - schemas.TiersListResponse.properties.items.type - schemas.TiersListResponse.properties.kind.description - schemas.TiersListResponse.properties.kind.type - schemas.TiersListResponse.type - schemas.TruncateLogContext.description - schemas.TruncateLogContext.id - schemas.TruncateLogContext.properties.kind.description - schemas.TruncateLogContext.properties.kind.type - schemas.TruncateLogContext.properties.logType.description - schemas.TruncateLogContext.properties.logType.type - schemas.TruncateLogContext.type - schemas.User.description - schemas.User.id - schemas.User.properties.etag.description - schemas.User.properties.etag.type - schemas.User.properties.host.description - schemas.User.properties.host.type - schemas.User.properties.instance.description - schemas.User.properties.instance.type - schemas.User.properties.kind.description - schemas.User.properties.kind.type - schemas.User.properties.name.description - schemas.User.properties.name.type - schemas.User.properties.password.description - schemas.User.properties.password.type - schemas.User.properties.project.description - schemas.User.properties.project.type - schemas.User.properties.sqlserverUserDetails.$ref - schemas.User.properties.type.description - schemas.User.properties.type.enum - schemas.User.properties.type.enumDescriptions - schemas.User.properties.type.type - schemas.User.type - schemas.UsersListResponse.description - schemas.UsersListResponse.id - schemas.UsersListResponse.properties.items.description - schemas.UsersListResponse.properties.items.items.$ref - schemas.UsersListResponse.properties.items.type - schemas.UsersListResponse.properties.kind.description - schemas.UsersListResponse.properties.kind.type - schemas.UsersListResponse.properties.nextPageToken.description - schemas.UsersListResponse.properties.nextPageToken.type - schemas.UsersListResponse.type The following keys were changed: - resources.instances.methods.list.id - schemas.DatabaseFlags.properties.name.description - schemas.DatabaseInstance.properties.databaseVersion.description - schemas.DatabaseInstance.properties.diskEncryptionConfiguration.description - schemas.DatabaseInstance.properties.diskEncryptionStatus.description - schemas.DatabaseInstance.properties.failoverReplica.description - schemas.DatabaseInstance.properties.failoverReplica.properties.name.description - schemas.InsightsConfig.properties.queryPlansPerMinute.description - schemas.MaintenanceWindow.properties.updateTrack.description - schemas.Settings.properties.availabilityType.description --- discovery/sqladmin-v1.json | 3539 +++++++++++- discovery/sqladmin-v1beta4.json | 148 +- src/apis/sqladmin/v1.ts | 9393 +++++++++++++++++++++++++++++-- src/apis/sqladmin/v1beta4.ts | 118 +- 4 files changed, 12274 insertions(+), 924 deletions(-) diff --git a/discovery/sqladmin-v1.json b/discovery/sqladmin-v1.json index 3efd399d396..85f22d7dd73 100644 --- a/discovery/sqladmin-v1.json +++ b/discovery/sqladmin-v1.json @@ -108,43 +108,1766 @@ }, "protocol": "rest", "resources": { + "backupRuns": { + "methods": { + "delete": { + "description": "Deletes the backup taken by a backup run.", + "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns/{id}", + "httpMethod": "DELETE", + "id": "sql.backupRuns.delete", + "parameterOrder": [ + "project", + "instance", + "id" + ], + "parameters": { + "id": { + "description": "The ID of the backup run to delete. To find a backup run ID, use the list method.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/backupRuns/{id}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "get": { + "description": "Retrieves a resource containing information about a backup run.", + "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns/{id}", + "httpMethod": "GET", + "id": "sql.backupRuns.get", + "parameterOrder": [ + "project", + "instance", + "id" + ], + "parameters": { + "id": { + "description": "The ID of this backup run.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/backupRuns/{id}", + "response": { + "$ref": "BackupRun" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "insert": { + "description": "Creates a new backup run on demand.", + "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns", + "httpMethod": "POST", + "id": "sql.backupRuns.insert", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/backupRuns", + "request": { + "$ref": "BackupRun" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "list": { + "description": "Lists all backup runs associated with the project or a given instance and configuration in the reverse chronological order of the backup initiation time.", + "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns", + "httpMethod": "GET", + "id": "sql.backupRuns.list", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID, or \"-\" for all instances. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "description": "Maximum number of backup runs per response.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A previously-returned page token representing part of the larger set of results to view.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/backupRuns", + "response": { + "$ref": "BackupRunsListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + } + } + }, + "connect": { + "methods": { + "generateEphemeralCert": { + "description": "Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.", + "flatPath": "v1/projects/{project}/instances/{instance}:generateEphemeralCert", + "httpMethod": "POST", + "id": "sql.connect.generateEphemeral", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}:generateEphemeralCert", + "request": { + "$ref": "GenerateEphemeralCertRequest" + }, + "response": { + "$ref": "GenerateEphemeralCertResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "get": { + "description": "Retrieves connect settings about a Cloud SQL instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/connectSettings", + "httpMethod": "GET", + "id": "sql.connect.get", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + }, + "readTime": { + "description": "Optional. Optional snapshot read timestamp to trade freshness for performance.", + "format": "google-datetime", + "location": "query", + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/connectSettings", + "response": { + "$ref": "ConnectSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + } + } + }, + "databases": { + "methods": { + "delete": { + "description": "Deletes a database from a Cloud SQL instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}", + "httpMethod": "DELETE", + "id": "sql.databases.delete", + "parameterOrder": [ + "project", + "instance", + "database" + ], + "parameters": { + "database": { + "description": "Name of the database to be deleted in the instance.", + "location": "path", + "required": true, + "type": "string" + }, + "instance": { + "description": "Database instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/databases/{database}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "get": { + "description": "Retrieves a resource containing information about a database inside a Cloud SQL instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}", + "httpMethod": "GET", + "id": "sql.databases.get", + "parameterOrder": [ + "project", + "instance", + "database" + ], + "parameters": { + "database": { + "description": "Name of the database in the instance.", + "location": "path", + "required": true, + "type": "string" + }, + "instance": { + "description": "Database instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/databases/{database}", + "response": { + "$ref": "Database" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "insert": { + "description": "Inserts a resource containing information about a database inside a Cloud SQL instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/databases", + "httpMethod": "POST", + "id": "sql.databases.insert", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Database instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/databases", + "request": { + "$ref": "Database" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "list": { + "description": "Lists databases in the specified Cloud SQL instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/databases", + "httpMethod": "GET", + "id": "sql.databases.list", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/databases", + "response": { + "$ref": "DatabasesListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "patch": { + "description": "Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.", + "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}", + "httpMethod": "PATCH", + "id": "sql.databases.patch", + "parameterOrder": [ + "project", + "instance", + "database" + ], + "parameters": { + "database": { + "description": "Name of the database to be updated in the instance.", + "location": "path", + "required": true, + "type": "string" + }, + "instance": { + "description": "Database instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/databases/{database}", + "request": { + "$ref": "Database" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "update": { + "description": "Updates a resource containing information about a database inside a Cloud SQL instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}", + "httpMethod": "PUT", + "id": "sql.databases.update", + "parameterOrder": [ + "project", + "instance", + "database" + ], + "parameters": { + "database": { + "description": "Name of the database to be updated in the instance.", + "location": "path", + "required": true, + "type": "string" + }, + "instance": { + "description": "Database instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/databases/{database}", + "request": { + "$ref": "Database" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + } + } + }, + "flags": { + "methods": { + "list": { + "description": "Lists all available database flags for Cloud SQL instances.", + "flatPath": "v1/flags", + "httpMethod": "GET", + "id": "sql.flags.list", + "parameterOrder": [], + "parameters": { + "databaseVersion": { + "description": "Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions.", + "location": "query", + "type": "string" + } + }, + "path": "v1/flags", + "response": { + "$ref": "FlagsListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + } + } + }, "instances": { "methods": { + "addServerCa": { + "description": "Adds a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.", + "flatPath": "v1/projects/{project}/instances/{instance}/addServerCa", + "httpMethod": "POST", + "id": "sql.instances.addServerCa", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/addServerCa", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "clone": { + "description": "Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.", + "flatPath": "v1/projects/{project}/instances/{instance}/clone", + "httpMethod": "POST", + "id": "sql.instances.clone", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the source as well as the clone Cloud SQL instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/clone", + "request": { + "$ref": "InstancesCloneRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "delete": { + "description": "Deletes a Cloud SQL instance.", + "flatPath": "v1/projects/{project}/instances/{instance}", + "httpMethod": "DELETE", + "id": "sql.instances.delete", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance to be deleted.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "demoteMaster": { + "description": "Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.", + "flatPath": "v1/projects/{project}/instances/{instance}/demoteMaster", + "httpMethod": "POST", + "id": "sql.instances.demoteMaster", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/demoteMaster", + "request": { + "$ref": "InstancesDemoteMasterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "export": { + "description": "Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.", + "flatPath": "v1/projects/{project}/instances/{instance}/export", + "httpMethod": "POST", + "id": "sql.instances.export", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance to be exported.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/export", + "request": { + "$ref": "InstancesExportRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "failover": { + "description": "Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the Overview of high availability page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/failover", + "httpMethod": "POST", + "id": "sql.instances.failover", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "ID of the project that contains the read replica.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/failover", + "request": { + "$ref": "InstancesFailoverRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "get": { + "description": "Retrieves a resource containing information about a Cloud SQL instance.", + "flatPath": "v1/projects/{project}/instances/{instance}", + "httpMethod": "GET", + "id": "sql.instances.get", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Database instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}", + "response": { + "$ref": "DatabaseInstance" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "import": { + "description": "Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.", + "flatPath": "v1/projects/{project}/instances/{instance}/import", + "httpMethod": "POST", + "id": "sql.instances.import", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/import", + "request": { + "$ref": "InstancesImportRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "insert": { + "description": "Creates a new Cloud SQL instance.", + "flatPath": "v1/projects/{project}/instances", + "httpMethod": "POST", + "id": "sql.instances.insert", + "parameterOrder": [ + "project" + ], + "parameters": { + "project": { + "description": "Project ID of the project to which the newly created Cloud SQL instances should belong.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances", + "request": { + "$ref": "DatabaseInstance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "list": { + "description": "Lists instances under a given project.", + "flatPath": "v1/projects/{project}/instances", + "httpMethod": "GET", + "id": "sql.instances.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly.", + "location": "query", + "type": "string" + }, + "maxResults": { + "description": "The maximum number of results to return per response.", + "format": "uint32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A previously-returned page token representing part of the larger set of results to view.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID of the project for which to list Cloud SQL instances.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances", + "response": { + "$ref": "InstancesListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "listServerCas": { + "description": "Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.", + "flatPath": "v1/projects/{project}/instances/{instance}/listServerCas", + "httpMethod": "GET", + "id": "sql.instances.listServerCas", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/listServerCas", + "response": { + "$ref": "InstancesListServerCasResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "patch": { + "description": "Updates settings of a Cloud SQL instance. This method supports patch semantics.", + "flatPath": "v1/projects/{project}/instances/{instance}", + "httpMethod": "PATCH", + "id": "sql.instances.patch", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}", + "request": { + "$ref": "DatabaseInstance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "promoteReplica": { + "description": "Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.", + "flatPath": "v1/projects/{project}/instances/{instance}/promoteReplica", + "httpMethod": "POST", + "id": "sql.instances.promoteReplica", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL read replica instance name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "ID of the project that contains the read replica.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/promoteReplica", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "resetSslConfig": { + "description": "Deletes all client certificates and generates a new server SSL certificate for the instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/resetSslConfig", + "httpMethod": "POST", + "id": "sql.instances.resetSslConfig", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/resetSslConfig", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "restart": { + "description": "Restarts a Cloud SQL instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/restart", + "httpMethod": "POST", + "id": "sql.instances.restart", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance to be restarted.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/restart", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "restoreBackup": { + "description": "Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.", + "flatPath": "v1/projects/{project}/instances/{instance}/restoreBackup", + "httpMethod": "POST", + "id": "sql.instances.restoreBackup", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/restoreBackup", + "request": { + "$ref": "InstancesRestoreBackupRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "rotateServerCa": { + "description": "Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.", + "flatPath": "v1/projects/{project}/instances/{instance}/rotateServerCa", + "httpMethod": "POST", + "id": "sql.instances.rotateServerCa", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/rotateServerCa", + "request": { + "$ref": "InstancesRotateServerCaRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "startReplica": { + "description": "Starts the replication in the read replica instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/startReplica", + "httpMethod": "POST", + "id": "sql.instances.startReplica", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL read replica instance name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "ID of the project that contains the read replica.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/startReplica", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "stopReplica": { + "description": "Stops the replication in the read replica instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/stopReplica", + "httpMethod": "POST", + "id": "sql.instances.stopReplica", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL read replica instance name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "ID of the project that contains the read replica.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/stopReplica", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "truncateLog": { + "description": "Truncate MySQL general and slow query log tables MySQL only.", + "flatPath": "v1/projects/{project}/instances/{instance}/truncateLog", + "httpMethod": "POST", + "id": "sql.instances.truncateLog", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the Cloud SQL project.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/truncateLog", + "request": { + "$ref": "InstancesTruncateLogRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "update": { + "description": "Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.", + "flatPath": "v1/projects/{project}/instances/{instance}", + "httpMethod": "PUT", + "id": "sql.instances.update", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}", + "request": { + "$ref": "DatabaseInstance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + } + } + }, + "operations": { + "methods": { + "get": { + "description": "Retrieves an instance operation that has been performed on an instance.", + "flatPath": "v1/projects/{project}/operations/{operation}", + "httpMethod": "GET", + "id": "sql.operations.get", + "parameterOrder": [ + "project", + "operation" + ], + "parameters": { + "operation": { + "description": "Instance operation ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/operations/{operation}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "list": { + "description": "Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.", + "flatPath": "v1/projects/{project}/operations", + "httpMethod": "GET", + "id": "sql.operations.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "query", + "type": "string" + }, + "maxResults": { + "description": "Maximum number of operations per response.", + "format": "uint32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A previously-returned page token representing part of the larger set of results to view.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/operations", + "response": { + "$ref": "OperationsListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + } + } + }, + "projects": { + "resources": { + "instances": { + "methods": { + "rescheduleMaintenance": { + "description": "Reschedules the maintenance on the given instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/rescheduleMaintenance", + "httpMethod": "POST", + "id": "sql.projects.instances.rescheduleMaintenance", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/rescheduleMaintenance", + "request": { + "$ref": "SqlInstancesRescheduleMaintenanceRequestBody" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "startExternalSync": { + "description": "Start External primary instance migration.", + "flatPath": "v1/projects/{project}/instances/{instance}/startExternalSync", + "httpMethod": "POST", + "id": "sql.projects.instances.startExternalSync", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/startExternalSync", + "request": { + "$ref": "SqlInstancesStartExternalSyncRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "verifyExternalSyncSettings": { + "description": "Verify External primary instance external sync settings.", + "flatPath": "v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings", + "httpMethod": "POST", + "id": "sql.projects.instances.verifyExternalSyncSettings", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings", + "request": { + "$ref": "SqlInstancesVerifyExternalSyncSettingsRequest" + }, + "response": { + "$ref": "SqlInstancesVerifyExternalSyncSettingsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + } + } + } + } + }, + "sslCerts": { + "methods": { + "createEphemeral": { + "description": "Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.", + "flatPath": "v1/projects/{project}/instances/{instance}/createEphemeral", + "httpMethod": "POST", + "id": "sql.sslCerts.createEphemeral", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the Cloud SQL project.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/createEphemeral", + "request": { + "$ref": "SslCertsCreateEphemeralRequest" + }, + "response": { + "$ref": "SslCert" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "delete": { + "description": "Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted.", + "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", + "httpMethod": "DELETE", + "id": "sql.sslCerts.delete", + "parameterOrder": [ + "project", + "instance", + "sha1Fingerprint" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + }, + "sha1Fingerprint": { + "description": "Sha1 FingerPrint.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "get": { + "description": "Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creation.", + "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", + "httpMethod": "GET", + "id": "sql.sslCerts.get", + "parameterOrder": [ + "project", + "instance", + "sha1Fingerprint" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + }, + "sha1Fingerprint": { + "description": "Sha1 FingerPrint.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", + "response": { + "$ref": "SslCert" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "insert": { + "description": "Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted.", + "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts", + "httpMethod": "POST", + "id": "sql.sslCerts.insert", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/sslCerts", + "request": { + "$ref": "SslCertsInsertRequest" + }, + "response": { + "$ref": "SslCertsInsertResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "list": { + "description": "Lists all of the current SSL certificates for the instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts", + "httpMethod": "GET", + "id": "sql.sslCerts.list", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Cloud SQL instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/sslCerts", + "response": { + "$ref": "SslCertsListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + } + } + }, + "tiers": { + "methods": { + "list": { + "description": "Lists all available machine types (tiers) for Cloud SQL, for example, db-custom-1-3840. For more information, see https://cloud.google.com/sql/pricing.", + "flatPath": "v1/projects/{project}/tiers", + "httpMethod": "GET", + "id": "sql.tiers.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "project": { + "description": "Project ID of the project for which to list tiers.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/tiers", + "response": { + "$ref": "TiersListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + } + } + }, + "users": { + "methods": { + "delete": { + "description": "Deletes a user from a Cloud SQL instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/users", + "httpMethod": "DELETE", + "id": "sql.users.delete", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "host": { + "description": "Host of the user in the instance.", + "location": "query", + "type": "string" + }, + "instance": { + "description": "Database instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "name": { + "description": "Name of the user in the instance.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/users", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "insert": { + "description": "Creates a new user in a Cloud SQL instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/users", + "httpMethod": "POST", + "id": "sql.users.insert", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "instance": { + "description": "Database instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/users", + "request": { + "$ref": "User" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, "list": { - "description": "Lists instances under a given project.", - "flatPath": "v1/projects/{project}/instances", + "description": "Lists users in the specified Cloud SQL instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/users", "httpMethod": "GET", - "id": "sqladmin.instances.list", + "id": "sql.users.list", "parameterOrder": [ - "project" + "project", + "instance" ], "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly.", - "location": "query", + "instance": { + "description": "Database instance ID. This does not include the project ID.", + "location": "path", + "required": true, "type": "string" }, - "maxResults": { - "description": "The maximum number of results to return per response.", - "format": "uint32", + "project": { + "description": "Project ID of the project that contains the instance.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{project}/instances/{instance}/users", + "response": { + "$ref": "UsersListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] + }, + "update": { + "description": "Updates an existing user in a Cloud SQL instance.", + "flatPath": "v1/projects/{project}/instances/{instance}/users", + "httpMethod": "PUT", + "id": "sql.users.update", + "parameterOrder": [ + "project", + "instance" + ], + "parameters": { + "host": { + "description": "Optional. Host of the user in the instance.", "location": "query", - "type": "integer" + "type": "string" }, - "pageToken": { - "description": "A previously-returned page token representing part of the larger set of results to view.", + "instance": { + "description": "Database instance ID. This does not include the project ID.", + "location": "path", + "required": true, + "type": "string" + }, + "name": { + "description": "Name of the user in the instance.", "location": "query", "type": "string" }, "project": { - "description": "Project ID of the project for which to list Cloud SQL instances.", + "description": "Project ID of the project that contains the instance.", "location": "path", "required": true, "type": "string" } }, - "path": "v1/projects/{project}/instances", + "path": "v1/projects/{project}/instances/{instance}/users", + "request": { + "$ref": "User" + }, "response": { - "$ref": "InstancesListResponse" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -152,163 +1875,9 @@ ] } } - }, - "projects": { - "resources": { - "instances": { - "methods": { - "generateEphemeralCert": { - "description": "Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.", - "flatPath": "v1/projects/{project}/instances/{instance}:generateEphemeralCert", - "httpMethod": "POST", - "id": "sqladmin.projects.instances.generateEphemeralCert", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}:generateEphemeralCert", - "request": { - "$ref": "GenerateEphemeralCertRequest" - }, - "response": { - "$ref": "GenerateEphemeralCertResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "get": { - "description": "Retrieves a resource containing information about a Cloud SQL instance.", - "flatPath": "v1/projects/{project}/instances/{instance}", - "httpMethod": "GET", - "id": "sqladmin.projects.instances.get", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Database instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}", - "response": { - "$ref": "DatabaseInstance" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - }, - "getConnectSettings": { - "description": "Retrieves connect settings about a Cloud SQL instance.", - "flatPath": "v1/projects/{project}/instances/{instance}/connectSettings", - "httpMethod": "GET", - "id": "sqladmin.projects.instances.getConnectSettings", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the project that contains the instance.", - "location": "path", - "required": true, - "type": "string" - }, - "readTime": { - "description": "Optional. Optional snapshot read timestamp to trade freshness for performance.", - "format": "google-datetime", - "location": "query", - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/connectSettings", - "response": { - "$ref": "ConnectSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - }, - "resources": { - "createEphemeral": { - "methods": { - "create": { - "description": "Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.", - "flatPath": "v1/projects/{project}/instances/{instance}/createEphemeral", - "httpMethod": "POST", - "id": "sqladmin.projects.instances.createEphemeral.create", - "parameterOrder": [ - "project", - "instance" - ], - "parameters": { - "instance": { - "description": "Cloud SQL instance ID. This does not include the project ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID of the Cloud SQL project.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{project}/instances/{instance}/createEphemeral", - "request": { - "$ref": "SslCertsCreateEphemeralRequest" - }, - "response": { - "$ref": "SslCert" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/sqlservice.admin" - ] - } - } - } - } - } - } } }, - "revision": "20210627", + "revision": "20210727", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -406,6 +1975,22 @@ }, "type": "object" }, + "BackupContext": { + "description": "Backup context.", + "id": "BackupContext", + "properties": { + "backupId": { + "description": "The identifier of the backup.", + "format": "int64", + "type": "string" + }, + "kind": { + "description": "This is always **sql#backupContext**.", + "type": "string" + } + }, + "type": "object" + }, "BackupRetentionSettings": { "description": "We currently only support backup retention by specifying the number of backups we will retain.", "id": "BackupRetentionSettings", @@ -430,6 +2015,197 @@ }, "type": "object" }, + "BackupRun": { + "description": "A BackupRun resource.", + "id": "BackupRun", + "properties": { + "backupKind": { + "description": "Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.", + "enum": [ + "SQL_BACKUP_KIND_UNSPECIFIED", + "SNAPSHOT", + "PHYSICAL" + ], + "enumDescriptions": [ + "This is an unknown BackupKind.", + "The snapshot based backups", + "Physical backups" + ], + "type": "string" + }, + "description": { + "description": "The description of this run, only applicable to on-demand backups.", + "type": "string" + }, + "diskEncryptionConfiguration": { + "$ref": "DiskEncryptionConfiguration", + "description": "Encryption configuration specific to a backup." + }, + "diskEncryptionStatus": { + "$ref": "DiskEncryptionStatus", + "description": "Encryption status specific to a backup." + }, + "endTime": { + "description": "The time the backup operation completed in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.", + "format": "google-datetime", + "type": "string" + }, + "enqueuedTime": { + "description": "The time the run was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.", + "format": "google-datetime", + "type": "string" + }, + "error": { + "$ref": "OperationError", + "description": "Information about why the backup operation failed. This is only present if the run has the FAILED status." + }, + "id": { + "description": "The identifier for this backup run. Unique only for a specific Cloud SQL instance.", + "format": "int64", + "type": "string" + }, + "instance": { + "description": "Name of the database instance.", + "type": "string" + }, + "kind": { + "description": "This is always *sql#backupRun*.", + "type": "string" + }, + "location": { + "description": "Location of the backups.", + "type": "string" + }, + "selfLink": { + "description": "The URI of this resource.", + "type": "string" + }, + "startTime": { + "description": "The time the backup operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.", + "format": "google-datetime", + "type": "string" + }, + "status": { + "description": "The status of this run.", + "enum": [ + "SQL_BACKUP_RUN_STATUS_UNSPECIFIED", + "ENQUEUED", + "OVERDUE", + "RUNNING", + "FAILED", + "SUCCESSFUL", + "SKIPPED", + "DELETION_PENDING", + "DELETION_FAILED", + "DELETED" + ], + "enumDescriptions": [ + "The status of the run is unknown.", + "The backup operation was enqueued.", + "The backup is overdue across a given backup window. Indicates a problem. Example: Long-running operation in progress during the whole window.", + "The backup is in progress.", + "The backup failed.", + "The backup was successful.", + "The backup was skipped (without problems) for a given backup window. Example: Instance was idle.", + "The backup is about to be deleted.", + "The backup deletion failed.", + "The backup has been deleted." + ], + "type": "string" + }, + "type": { + "description": "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.", + "enum": [ + "SQL_BACKUP_RUN_TYPE_UNSPECIFIED", + "AUTOMATED", + "ON_DEMAND" + ], + "enumDescriptions": [ + "This is an unknown BackupRun type.", + "The backup schedule automatically triggers a backup.", + "The user manually triggers a backup." + ], + "type": "string" + }, + "windowStartTime": { + "description": "The start time of the backup window during which this the backup was attempted in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "BackupRunsListResponse": { + "description": "Backup run list results.", + "id": "BackupRunsListResponse", + "properties": { + "items": { + "description": "A list of backup runs in reverse chronological order of the enqueued time.", + "items": { + "$ref": "BackupRun" + }, + "type": "array" + }, + "kind": { + "description": "This is always *sql#backupRunsList*.", + "type": "string" + }, + "nextPageToken": { + "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.", + "type": "string" + } + }, + "type": "object" + }, + "BinLogCoordinates": { + "description": "Binary log coordinates.", + "id": "BinLogCoordinates", + "properties": { + "binLogFileName": { + "description": "Name of the binary log file for a Cloud SQL instance.", + "type": "string" + }, + "binLogPosition": { + "description": "Position (offset) within the binary log file.", + "format": "int64", + "type": "string" + }, + "kind": { + "description": "This is always *sql#binLogCoordinates*.", + "type": "string" + } + }, + "type": "object" + }, + "CloneContext": { + "description": "Database instance clone context.", + "id": "CloneContext", + "properties": { + "binLogCoordinates": { + "$ref": "BinLogCoordinates", + "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." + }, + "destinationInstanceName": { + "description": "Name of the Cloud SQL instance to be created as a clone.", + "type": "string" + }, + "kind": { + "description": "This is always *sql#cloneContext*.", + "type": "string" + }, + "pitrTimestampMs": { + "description": "Reserved for future use.", + "format": "int64", + "type": "string" + }, + "pointInTime": { + "description": "Timestamp, if specified, identifies the time to which the source instance is cloned.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "ConnectSettings": { "description": "Connect settings retrieval response.", "id": "ConnectSettings", @@ -512,12 +2288,54 @@ }, "type": "object" }, + "Database": { + "description": "Represents a SQL database on the Cloud SQL instance.", + "id": "Database", + "properties": { + "charset": { + "description": "The Cloud SQL charset value.", + "type": "string" + }, + "collation": { + "description": "The Cloud SQL collation value.", + "type": "string" + }, + "etag": { + "description": "This field is deprecated and will be removed from a future version of the API.", + "type": "string" + }, + "instance": { + "description": "The name of the Cloud SQL instance. This does not include the project ID.", + "type": "string" + }, + "kind": { + "description": "This is always **sql#database**.", + "type": "string" + }, + "name": { + "description": "The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.", + "type": "string" + }, + "project": { + "description": "The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.", + "type": "string" + }, + "selfLink": { + "description": "The URI of this resource.", + "type": "string" + }, + "sqlserverDatabaseDetails": { + "$ref": "SqlServerDatabaseDetails" + } + }, + "type": "object" + }, "DatabaseFlags": { "description": "Database flags for Cloud SQL instances.", "id": "DatabaseFlags", "properties": { "name": { - "description": "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 [Configuring Database Flags](/sql/docs/mysql/flags) in the Cloud SQL documentation.", + "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.", "type": "string" }, "value": { @@ -557,7 +2375,7 @@ "type": "string" }, "databaseVersion": { - "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*, or *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.", + "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*, *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2019_STANDARD*, *SQLSERVER_2019_ENTERPRISE*, *SQLSERVER_2019_EXPRESS*, or *SQLSERVER_2019_WEB*, *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.", "enum": [ "SQL_DATABASE_VERSION_UNSPECIFIED", "MYSQL_5_1", @@ -602,34 +2420,25 @@ }, "diskEncryptionConfiguration": { "$ref": "DiskEncryptionConfiguration", - "description": "Disk encryption configuration specific to an instance. Applies only to Second Generation instances." + "description": "Disk encryption configuration specific to an instance." }, "diskEncryptionStatus": { "$ref": "DiskEncryptionStatus", - "description": "Disk encryption status specific to an instance. Applies only to Second Generation instances." - }, - "encryptedRootPassword": { - "description": "For internal usage only. The encrypted password.", - "format": "byte", - "type": "string" + "description": "Disk encryption status specific to an instance." }, "etag": { "description": "This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead.", "type": "string" }, "failoverReplica": { - "description": "The name and status of the failover replica. This property is applicable only to Second Generation instances.", + "description": "The name and status of the failover replica.", "properties": { "available": { "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.", "type": "boolean" }, - "failoverInstance": { - "$ref": "InstanceReference", - "description": "A reference to the failover replica. If specified at instance creation, a failover replica is created for the instance. Currently, the failover replica can only be created in the same region as the primary instance." - }, "name": { - "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. This property is applicable only to Second Generation instances.", + "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.", "type": "string" } }, @@ -639,50 +2448,6 @@ "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.", "type": "string" }, - "installedVersion": { - "description": "installed_version stores the current fully resolved database version including minor version such as MySQL_5.6.50", - "enum": [ - "SQL_DATABASE_VERSION_UNSPECIFIED", - "MYSQL_5_1", - "MYSQL_5_5", - "MYSQL_5_6", - "MYSQL_5_7", - "POSTGRES_9_6", - "POSTGRES_11", - "SQLSERVER_2017_STANDARD", - "SQLSERVER_2017_ENTERPRISE", - "SQLSERVER_2017_EXPRESS", - "SQLSERVER_2017_WEB", - "POSTGRES_10", - "POSTGRES_12", - "POSTGRES_13", - "SQLSERVER_2019_STANDARD", - "SQLSERVER_2019_ENTERPRISE", - "SQLSERVER_2019_EXPRESS", - "SQLSERVER_2019_WEB" - ], - "enumDescriptions": [ - "This is an unknown database version.", - "The database version is MySQL 5.1.", - "The database version is MySQL 5.5.", - "The database version is MySQL 5.6.", - "The database version is MySQL 5.7.", - "The database version is PostgreSQL 9.6.", - "The database version is PostgreSQL 11.", - "The database version is SQL Server 2017 Standard.", - "The database version is SQL Server 2017 Enterprise.", - "The database version is SQL Server 2017 Express.", - "The database version is SQL Server 2017 Web.", - "The database version is PostgreSQL 10.", - "The database version is PostgreSQL 12.", - "The database version is PostgreSQL 13.", - "The database version is SQL Server 2019 Standard.", - "The database version is SQL Server 2019 Enterprise.", - "The database version is SQL Server 2019 Express.", - "The database version is SQL Server 2019 Web." - ], - "type": "string" - }, "instanceType": { "description": "The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer's premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica.", "enum": [ @@ -699,10 +2464,6 @@ ], "type": "string" }, - "instanceUid": { - "description": "Uid of the Cloud SQL instance. Used by Pantheon to check instance is created", - "type": "string" - }, "ipAddresses": { "description": "The assigned IP addresses for the instance.", "items": { @@ -718,10 +2479,6 @@ "description": "This is always *sql#instance*.", "type": "string" }, - "masterInstance": { - "$ref": "InstanceReference", - "description": "The reference to the instance which will act as primary in the replication setup." - }, "masterInstanceName": { "description": "The name of the instance which will act as primary in the replication setup.", "type": "string" @@ -755,13 +2512,6 @@ "$ref": "ReplicaConfiguration", "description": "Configuration specific to failover replicas and read replicas." }, - "replicaInstances": { - "description": "The replicas of the instance.", - "items": { - "$ref": "InstanceReference" - }, - "type": "array" - }, "replicaNames": { "description": "The replicas of the instance.", "items": { @@ -847,6 +2597,93 @@ }, "type": "object" }, + "DatabasesListResponse": { + "description": "Database list response.", + "id": "DatabasesListResponse", + "properties": { + "items": { + "description": "List of database resources in the instance.", + "items": { + "$ref": "Database" + }, + "type": "array" + }, + "kind": { + "description": "This is always *sql#databasesList*.", + "type": "string" + } + }, + "type": "object" + }, + "DemoteMasterConfiguration": { + "description": "Read-replica configuration for connecting to the on-premises primary instance.", + "id": "DemoteMasterConfiguration", + "properties": { + "kind": { + "description": "This is always **sql#demoteMasterConfiguration**.", + "type": "string" + }, + "mysqlReplicaConfiguration": { + "$ref": "DemoteMasterMySqlReplicaConfiguration", + "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." + } + }, + "type": "object" + }, + "DemoteMasterContext": { + "description": "Database instance demote primary instance context.", + "id": "DemoteMasterContext", + "properties": { + "kind": { + "description": "This is always *sql#demoteMasterContext*.", + "type": "string" + }, + "masterInstanceName": { + "description": "The name of the instance which will act as on-premises primary instance in the replication setup.", + "type": "string" + }, + "replicaConfiguration": { + "$ref": "DemoteMasterConfiguration", + "description": "Configuration specific to read-replicas replicating from the on-premises primary instance." + }, + "verifyGtidConsistency": { + "description": "Verify GTID consistency for demote operation. Default value: *True*. 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 value only if you know the reason for the GTID divergence and are confident that doing so will not cause any replication issues.", + "type": "boolean" + } + }, + "type": "object" + }, + "DemoteMasterMySqlReplicaConfiguration": { + "description": "Read-replica configuration specific to MySQL databases.", + "id": "DemoteMasterMySqlReplicaConfiguration", + "properties": { + "caCertificate": { + "description": "PEM representation of the trusted CA's x509 certificate.", + "type": "string" + }, + "clientCertificate": { + "description": "PEM representation of the replica's x509 certificate.", + "type": "string" + }, + "clientKey": { + "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.", + "type": "string" + }, + "kind": { + "description": "This is always **sql#demoteMasterMysqlReplicaConfiguration**.", + "type": "string" + }, + "password": { + "description": "The password for the replication connection.", + "type": "string" + }, + "username": { + "description": "The username for the replication connection.", + "type": "string" + } + }, + "type": "object" + }, "DenyMaintenancePeriod": { "description": "Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.", "id": "DenyMaintenancePeriod", @@ -881,16 +2718,249 @@ }, "type": "object" }, - "DiskEncryptionStatus": { - "description": "Disk encryption status for an instance.", - "id": "DiskEncryptionStatus", + "DiskEncryptionStatus": { + "description": "Disk encryption status for an instance.", + "id": "DiskEncryptionStatus", + "properties": { + "kind": { + "description": "This is always **sql#diskEncryptionStatus**.", + "type": "string" + }, + "kmsKeyVersionName": { + "description": "KMS key version used to encrypt the Cloud SQL instance resource", + "type": "string" + } + }, + "type": "object" + }, + "ExportContext": { + "description": "Database instance export context.", + "id": "ExportContext", + "properties": { + "csvExportOptions": { + "description": "Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.", + "properties": { + "selectQuery": { + "description": "The select query used to extract the data.", + "type": "string" + } + }, + "type": "object" + }, + "databases": { + "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**.", + "items": { + "type": "string" + }, + "type": "array" + }, + "fileType": { + "description": "The file type for the specified uri. **SQL**: The file contains SQL statements. **CSV**: The file contains CSV data. **BAK**: The file contains backup data for a SQL Server instance.", + "enum": [ + "SQL_FILE_TYPE_UNSPECIFIED", + "SQL", + "CSV", + "BAK" + ], + "enumDescriptions": [ + "Unknown file type.", + "File containing SQL statements.", + "File in CSV format.", + "" + ], + "type": "string" + }, + "kind": { + "description": "This is always **sql#exportContext**.", + "type": "string" + }, + "offload": { + "description": "Option for export offload.", + "type": "boolean" + }, + "sqlExportOptions": { + "description": "Options for exporting data as SQL statements.", + "properties": { + "mysqlExportOptions": { + "description": "Options for exporting from MySQL.", + "properties": { + "masterData": { + "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.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "schemaOnly": { + "description": "Export only schemas.", + "type": "boolean" + }, + "tables": { + "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.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "uri": { + "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.", + "type": "string" + } + }, + "type": "object" + }, + "FailoverContext": { + "description": "Database instance failover context.", + "id": "FailoverContext", + "properties": { + "kind": { + "description": "This is always *sql#failoverContext*.", + "type": "string" + }, + "settingsVersion": { + "description": "The current settings version of this instance. Request will be rejected if this version doesn't match the current settings version.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "Flag": { + "description": "A flag resource.", + "id": "Flag", + "properties": { + "allowedIntValues": { + "description": "Use this field if only certain integers are accepted. Can be combined with min_value and max_value to add additional values.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "allowedStringValues": { + "description": "For **STRING** flags, a list of strings that the value can be set to.", + "items": { + "type": "string" + }, + "type": "array" + }, + "appliesTo": { + "description": "The database version this flag applies to. Can be **MYSQL_8_0**, **MYSQL_5_6**, or **MYSQL_5_7**.", + "items": { + "enum": [ + "SQL_DATABASE_VERSION_UNSPECIFIED", + "MYSQL_5_1", + "MYSQL_5_5", + "MYSQL_5_6", + "MYSQL_5_7", + "POSTGRES_9_6", + "POSTGRES_11", + "SQLSERVER_2017_STANDARD", + "SQLSERVER_2017_ENTERPRISE", + "SQLSERVER_2017_EXPRESS", + "SQLSERVER_2017_WEB", + "POSTGRES_10", + "POSTGRES_12", + "POSTGRES_13", + "SQLSERVER_2019_STANDARD", + "SQLSERVER_2019_ENTERPRISE", + "SQLSERVER_2019_EXPRESS", + "SQLSERVER_2019_WEB" + ], + "enumDescriptions": [ + "This is an unknown database version.", + "The database version is MySQL 5.1.", + "The database version is MySQL 5.5.", + "The database version is MySQL 5.6.", + "The database version is MySQL 5.7.", + "The database version is PostgreSQL 9.6.", + "The database version is PostgreSQL 11.", + "The database version is SQL Server 2017 Standard.", + "The database version is SQL Server 2017 Enterprise.", + "The database version is SQL Server 2017 Express.", + "The database version is SQL Server 2017 Web.", + "The database version is PostgreSQL 10.", + "The database version is PostgreSQL 12.", + "The database version is PostgreSQL 13.", + "The database version is SQL Server 2019 Standard.", + "The database version is SQL Server 2019 Enterprise.", + "The database version is SQL Server 2019 Express.", + "The database version is SQL Server 2019 Web." + ], + "type": "string" + }, + "type": "array" + }, + "inBeta": { + "description": "Whether or not the flag is considered in beta.", + "type": "boolean" + }, + "kind": { + "description": "This is always **sql#flag**.", + "type": "string" + }, + "maxValue": { + "description": "For **INTEGER** flags, the maximum allowed value.", + "format": "int64", + "type": "string" + }, + "minValue": { + "description": "For **INTEGER** flags, the minimum allowed value.", + "format": "int64", + "type": "string" + }, + "name": { + "description": "This is the name of the flag. Flag names always use underscores, not hyphens, for example: **max_allowed_packet**", + "type": "string" + }, + "requiresRestart": { + "description": "Indicates whether changing this flag will trigger a database restart. Only applicable to Second Generation instances.", + "type": "boolean" + }, + "type": { + "description": "The type of the flag. Flags are typed to being **BOOLEAN**, **STRING**, **INTEGER** or **NONE**. **NONE** is used for flags which do not take a value, such as **skip_grant_tables**.", + "enum": [ + "SQL_FLAG_TYPE_UNSPECIFIED", + "BOOLEAN", + "STRING", + "INTEGER", + "NONE", + "MYSQL_TIMEZONE_OFFSET", + "FLOAT", + "REPEATED_STRING" + ], + "enumDescriptions": [ + "This is an unknown flag type.", + "Boolean type flag.", + "String type flag.", + "Integer type flag.", + "Flag type used for a server startup option.", + "Type introduced specially for MySQL TimeZone offset. Accept a string value with the format [-12:59, 13:00].", + "Float type flag.", + "Comma-separated list of the strings in a SqlFlagType enum." + ], + "type": "string" + } + }, + "type": "object" + }, + "FlagsListResponse": { + "description": "Flags list response.", + "id": "FlagsListResponse", "properties": { - "kind": { - "description": "This is always **sql#diskEncryptionStatus**.", - "type": "string" + "items": { + "description": "List of flags.", + "items": { + "$ref": "Flag" + }, + "type": "array" }, - "kmsKeyVersionName": { - "description": "KMS key version used to encrypt the Cloud SQL instance resource", + "kind": { + "description": "This is always **sql#flagsList**.", "type": "string" } }, @@ -927,6 +2997,85 @@ }, "type": "object" }, + "ImportContext": { + "description": "Database instance import context.", + "id": "ImportContext", + "properties": { + "bakImportOptions": { + "description": "Import parameters specific to SQL Server .BAK files", + "properties": { + "encryptionOptions": { + "properties": { + "certPath": { + "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.", + "type": "string" + }, + "pvkPassword": { + "description": "Password that encrypts the private key", + "type": "string" + }, + "pvkPath": { + "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.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "csvImportOptions": { + "description": "Options for importing data as CSV.", + "properties": { + "columns": { + "description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", + "items": { + "type": "string" + }, + "type": "array" + }, + "table": { + "description": "The table to which CSV data is imported.", + "type": "string" + } + }, + "type": "object" + }, + "database": { + "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.", + "type": "string" + }, + "fileType": { + "description": "The file type for the specified uri. **SQL**: The file contains SQL statements. **CSV**: The file contains CSV data.", + "enum": [ + "SQL_FILE_TYPE_UNSPECIFIED", + "SQL", + "CSV", + "BAK" + ], + "enumDescriptions": [ + "Unknown file type.", + "File containing SQL statements.", + "File in CSV format.", + "" + ], + "type": "string" + }, + "importUser": { + "description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", + "type": "string" + }, + "kind": { + "description": "This is always **sql#importContext**.", + "type": "string" + }, + "uri": { + "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.", + "type": "string" + } + }, + "type": "object" + }, "InsightsConfig": { "description": "Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration.", "id": "InsightsConfig", @@ -936,7 +3085,7 @@ "type": "boolean" }, "queryPlansPerMinute": { - "description": "Number of query plans generated by Insights per minute. Default is 5. Changing this will restart the database.", + "description": "Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.", "format": "int32", "type": "integer" }, @@ -956,17 +3105,57 @@ }, "type": "object" }, - "InstanceReference": { - "description": "Reference to another Cloud SQL instance.", - "id": "InstanceReference", + "InstancesCloneRequest": { + "description": "Database instance clone request.", + "id": "InstancesCloneRequest", "properties": { - "name": { - "description": "The name of the Cloud SQL instance being referenced.", - "type": "string" - }, - "region": { - "description": "The region of the Cloud SQL instance being referenced.", - "type": "string" + "cloneContext": { + "$ref": "CloneContext", + "description": "Contains details about the clone operation." + } + }, + "type": "object" + }, + "InstancesDemoteMasterRequest": { + "description": "Database demote primary instance request.", + "id": "InstancesDemoteMasterRequest", + "properties": { + "demoteMasterContext": { + "$ref": "DemoteMasterContext", + "description": "Contains details about the demoteMaster operation." + } + }, + "type": "object" + }, + "InstancesExportRequest": { + "description": "Database instance export request.", + "id": "InstancesExportRequest", + "properties": { + "exportContext": { + "$ref": "ExportContext", + "description": "Contains details about the export operation." + } + }, + "type": "object" + }, + "InstancesFailoverRequest": { + "description": "Instance failover request.", + "id": "InstancesFailoverRequest", + "properties": { + "failoverContext": { + "$ref": "FailoverContext", + "description": "Failover Context." + } + }, + "type": "object" + }, + "InstancesImportRequest": { + "description": "Database instance import request.", + "id": "InstancesImportRequest", + "properties": { + "importContext": { + "$ref": "ImportContext", + "description": "Contains details about the import operation." } }, "type": "object" @@ -1000,10 +3189,68 @@ }, "type": "object" }, + "InstancesListServerCasResponse": { + "description": "Instances ListServerCas response.", + "id": "InstancesListServerCasResponse", + "properties": { + "activeVersion": { + "type": "string" + }, + "certs": { + "description": "List of server CA certificates for the instance.", + "items": { + "$ref": "SslCert" + }, + "type": "array" + }, + "kind": { + "description": "This is always *sql#instancesListServerCas*.", + "type": "string" + } + }, + "type": "object" + }, + "InstancesRestoreBackupRequest": { + "description": "Database instance restore backup request.", + "id": "InstancesRestoreBackupRequest", + "properties": { + "restoreBackupContext": { + "$ref": "RestoreBackupContext", + "description": "Parameters required to perform the restore backup operation." + } + }, + "type": "object" + }, + "InstancesRotateServerCaRequest": { + "description": "Rotate server CA request.", + "id": "InstancesRotateServerCaRequest", + "properties": { + "rotateServerCaContext": { + "$ref": "RotateServerCaContext", + "description": "Contains details about the rotate server CA operation." + } + }, + "type": "object" + }, + "InstancesTruncateLogRequest": { + "description": "Instance truncate log request.", + "id": "InstancesTruncateLogRequest", + "properties": { + "truncateLogContext": { + "$ref": "TruncateLogContext", + "description": "Contains details about the truncate log operation." + } + }, + "type": "object" + }, "IpConfiguration": { "description": "IP Management configuration.", "id": "IpConfiguration", "properties": { + "allocatedIpRange": { + "description": "The name of the allocated ip range for the private ip CloudSQL 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])?. Reserved for future use.", + "type": "string" + }, "authorizedNetworks": { "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: **192.168.100.0/24**).", "items": { @@ -1064,6 +3311,10 @@ "description": "Preferred location. This specifies where a Cloud SQL instance is located. 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.", "id": "LocationPreference", "properties": { + "followGaeApplication": { + "description": "The App Engine application to follow, it must be in the same region as the Cloud SQL instance.", + "type": "string" + }, "kind": { "description": "This is always **sql#locationPreference**.", "type": "string" @@ -1098,7 +3349,7 @@ "type": "string" }, "updateTrack": { - "description": "Maintenance timing setting: **canary** (Earlier) or **stable** (Later). [Learn more] (https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/instance-settings#maintenance-timing-2ndgen).", + "description": "Maintenance timing setting: **canary** (Earlier) or **stable** (Later). [Learn more] (https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen).", "enum": [ "SQL_UPDATE_TRACK_UNSPECIFIED", "canary", @@ -1167,6 +3418,12 @@ }, "type": "object" }, + "MySqlSyncConfig": { + "description": "MySQL-specific external server sync settings.", + "id": "MySqlSyncConfig", + "properties": {}, + "type": "object" + }, "OnPremisesConfiguration": { "description": "On-premises instance configuration.", "id": "OnPremisesConfiguration", @@ -1179,48 +3436,332 @@ "description": "PEM representation of the replica's x509 certificate.", "type": "string" }, - "clientKey": { - "description": "PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate.", + "clientKey": { + "description": "PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate.", + "type": "string" + }, + "dumpFilePath": { + "description": "The dump file to create the Cloud SQL replica.", + "type": "string" + }, + "hostPort": { + "description": "The host and port of the on-premises instance in host:port format", + "type": "string" + }, + "kind": { + "description": "This is always *sql#onPremisesConfiguration*.", + "type": "string" + }, + "password": { + "description": "The password for connecting to on-premises instance.", + "type": "string" + }, + "username": { + "description": "The username for connecting to on-premises instance.", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.", + "id": "Operation", + "properties": { + "backupContext": { + "$ref": "BackupContext", + "description": "The context for backup operation, if applicable." + }, + "endTime": { + "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**.", + "format": "google-datetime", + "type": "string" + }, + "error": { + "$ref": "OperationErrors", + "description": "If errors occurred during processing of this operation, this field will be populated." + }, + "exportContext": { + "$ref": "ExportContext", + "description": "The context for export operation, if applicable." + }, + "importContext": { + "$ref": "ImportContext", + "description": "The context for import operation, if applicable." + }, + "insertTime": { + "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**.", + "format": "google-datetime", + "type": "string" + }, + "kind": { + "description": "This is always **sql#operation**.", + "type": "string" + }, + "name": { + "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", + "type": "string" + }, + "operationType": { + "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**", + "enum": [ + "SQL_OPERATION_TYPE_UNSPECIFIED", + "IMPORT", + "EXPORT", + "CREATE", + "UPDATE", + "DELETE", + "RESTART", + "BACKUP", + "SNAPSHOT", + "BACKUP_VOLUME", + "DELETE_VOLUME", + "RESTORE_VOLUME", + "INJECT_USER", + "CLONE", + "STOP_REPLICA", + "START_REPLICA", + "PROMOTE_REPLICA", + "CREATE_REPLICA", + "CREATE_USER", + "DELETE_USER", + "UPDATE_USER", + "CREATE_DATABASE", + "DELETE_DATABASE", + "UPDATE_DATABASE", + "FAILOVER", + "DELETE_BACKUP", + "RECREATE_REPLICA", + "TRUNCATE_LOG", + "DEMOTE_MASTER", + "MAINTENANCE", + "ENABLE_PRIVATE_IP", + "DEFER_MAINTENANCE", + "CREATE_CLONE", + "RESCHEDULE_MAINTENANCE", + "START_EXTERNAL_SYNC" + ], + "enumDescriptions": [ + "Unknown operation type.", + "Imports data into a Cloud SQL instance.", + "Exports data from a Cloud SQL instance to a Cloud Storage bucket.", + "Creates a new Cloud SQL instance.", + "Updates the settings of a Cloud SQL instance.", + "Deletes a Cloud SQL instance.", + "Restarts the Cloud SQL instance.", + "", + "", + "Performs instance backup.", + "Deletes an instance backup.", + "Restores an instance backup.", + "Injects a privileged user in mysql for MOB instances.", + "Clones a Cloud SQL instance.", + "Stops replication on a Cloud SQL read replica instance.", + "Starts replication on a Cloud SQL read replica instance.", + "Promotes a Cloud SQL replica instance.", + "Creates a Cloud SQL replica instance.", + "Creates a new user in a Cloud SQL instance.", + "Deletes a user from a Cloud SQL instance.", + "Updates an existing user in a Cloud SQL instance.", + "Creates a database in the Cloud SQL instance.", + "Deletes a database in the Cloud SQL instance.", + "Updates a database in the Cloud SQL instance.", + "Performs failover of an HA-enabled Cloud SQL failover replica.", + "Deletes the backup taken by a backup run.", + "", + "Truncates a general or slow log table in MySQL.", + "Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.", + "Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1-3 minutes.", + "This field is deprecated, and will be removed in future version of API.", + "", + "Creates clone instance.", + "Reschedule maintenance to another time.", + "Starts external sync of a Cloud SQL EM replica to an external primary instance." + ], + "type": "string" + }, + "selfLink": { + "description": "The URI of this resource.", + "type": "string" + }, + "startTime": { + "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**.", + "format": "google-datetime", + "type": "string" + }, + "status": { + "description": "The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED**", + "enum": [ + "SQL_OPERATION_STATUS_UNSPECIFIED", + "PENDING", + "RUNNING", + "DONE" + ], + "enumDescriptions": [ + "The state of the operation is unknown.", + "The operation has been queued, but has not started yet.", + "The operation is running.", + "The operation completed." + ], + "type": "string" + }, + "targetId": { + "description": "Name of the database instance related to this operation.", + "type": "string" + }, + "targetLink": { + "type": "string" + }, + "targetProject": { + "description": "The project ID of the target instance related to this operation.", + "type": "string" + }, + "user": { + "description": "The email address of the user who initiated this operation.", + "type": "string" + } + }, + "type": "object" + }, + "OperationError": { + "description": "Database instance operation error.", + "id": "OperationError", + "properties": { + "code": { + "description": "Identifies the specific error that occurred.", + "type": "string" + }, + "kind": { + "description": "This is always **sql#operationError**.", + "type": "string" + }, + "message": { + "description": "Additional information about the error encountered.", + "type": "string" + } + }, + "type": "object" + }, + "OperationErrors": { + "description": "Database instance operation errors list wrapper.", + "id": "OperationErrors", + "properties": { + "errors": { + "description": "The list of errors encountered while processing this operation.", + "items": { + "$ref": "OperationError" + }, + "type": "array" + }, + "kind": { + "description": "This is always **sql#operationErrors**.", + "type": "string" + } + }, + "type": "object" + }, + "OperationsListResponse": { + "description": "Operations list response.", + "id": "OperationsListResponse", + "properties": { + "items": { + "description": "List of operation resources.", + "items": { + "$ref": "Operation" + }, + "type": "array" + }, + "kind": { + "description": "This is always *sql#operationsList*.", + "type": "string" + }, + "nextPageToken": { + "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.", + "type": "string" + } + }, + "type": "object" + }, + "ReplicaConfiguration": { + "description": "Read-replica configuration for connecting to the primary instance.", + "id": "ReplicaConfiguration", + "properties": { + "failoverTarget": { + "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.", + "type": "boolean" + }, + "kind": { + "description": "This is always *sql#replicaConfiguration*.", + "type": "string" + }, + "mysqlReplicaConfiguration": { + "$ref": "MySqlReplicaConfiguration", + "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." + } + }, + "type": "object" + }, + "Reschedule": { + "id": "Reschedule", + "properties": { + "rescheduleType": { + "description": "Required. The type of the reschedule.", + "enum": [ + "RESCHEDULE_TYPE_UNSPECIFIED", + "IMMEDIATE", + "NEXT_AVAILABLE_WINDOW", + "SPECIFIC_TIME" + ], + "enumDescriptions": [ + "", + "Reschedules maintenance to happen now (within 5 minutes).", + "Reschedules maintenance to occur within one week from the originally scheduled day and time.", + "Reschedules maintenance to a specific time and day." + ], + "type": "string" + }, + "scheduleTime": { + "description": "Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.", + "format": "google-datetime", "type": "string" - }, - "dumpFilePath": { - "description": "The dump file to create the Cloud SQL replica.", + } + }, + "type": "object" + }, + "RestoreBackupContext": { + "description": "Database instance restore from backup context. Backup context contains source instance id and project id.", + "id": "RestoreBackupContext", + "properties": { + "backupRunId": { + "description": "The ID of the backup run to restore from.", + "format": "int64", "type": "string" }, - "hostPort": { - "description": "The host and port of the on-premises instance in host:port format", + "instanceId": { + "description": "The ID of the instance that the backup was taken from.", "type": "string" }, "kind": { - "description": "This is always *sql#onPremisesConfiguration*.", + "description": "This is always *sql#restoreBackupContext*.", "type": "string" }, - "password": { - "description": "The password for connecting to on-premises instance.", - "type": "string" - }, - "username": { - "description": "The username for connecting to on-premises instance.", + "project": { + "description": "The full project ID of the source instance.", "type": "string" } }, "type": "object" }, - "ReplicaConfiguration": { - "description": "Read-replica configuration for connecting to the primary instance.", - "id": "ReplicaConfiguration", + "RotateServerCaContext": { + "description": "Instance rotate server CA context.", + "id": "RotateServerCaContext", "properties": { - "failoverTarget": { - "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.", - "type": "boolean" - }, "kind": { - "description": "This is always *sql#replicaConfiguration*.", + "description": "This is always *sql#rotateServerCaContext*.", "type": "string" }, - "mysqlReplicaConfiguration": { - "$ref": "MySqlReplicaConfiguration", - "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." + "nextVersion": { + "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.", + "type": "string" } }, "type": "object" @@ -1249,8 +3790,15 @@ "$ref": "SqlActiveDirectoryConfig", "description": "Active Directory configuration, relevant only for Cloud SQL for SQL Server." }, + "authorizedGaeApplications": { + "description": "The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.", + "items": { + "type": "string" + }, + "type": "array" + }, "availabilityType": { - "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](/sql/docs/postgres/high-availability).", + "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).", "enum": [ "SQL_AVAILABILITY_TYPE_UNSPECIFIED", "ZONAL", @@ -1405,6 +3953,171 @@ }, "type": "object" }, + "SqlExternalSyncSettingError": { + "description": "External primary instance migration setting error.", + "id": "SqlExternalSyncSettingError", + "properties": { + "detail": { + "description": "Additional information about the error encountered.", + "type": "string" + }, + "kind": { + "description": "Can be *sql#externalSyncSettingError* or *sql#externalSyncSettingWarning*.", + "type": "string" + }, + "type": { + "description": "Identifies the specific error that occurred.", + "enum": [ + "SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED", + "CONNECTION_FAILURE", + "BINLOG_NOT_ENABLED", + "INCOMPATIBLE_DATABASE_VERSION", + "REPLICA_ALREADY_SETUP", + "INSUFFICIENT_PRIVILEGE", + "UNSUPPORTED_MIGRATION_TYPE", + "NO_PGLOGICAL_INSTALLED", + "PGLOGICAL_NODE_ALREADY_EXISTS", + "INVALID_WAL_LEVEL", + "INVALID_SHARED_PRELOAD_LIBRARY", + "INSUFFICIENT_MAX_REPLICATION_SLOTS", + "INSUFFICIENT_MAX_WAL_SENDERS", + "INSUFFICIENT_MAX_WORKER_PROCESSES", + "UNSUPPORTED_EXTENSIONS", + "INVALID_RDS_LOGICAL_REPLICATION", + "INVALID_LOGGING_SETUP", + "INVALID_DB_PARAM", + "UNSUPPORTED_GTID_MODE", + "SQLSERVER_AGENT_NOT_RUNNING", + "UNSUPPORTED_TABLE_DEFINITION", + "UNSUPPORTED_DEFINER", + "SQLSERVER_SERVERNAME_MISMATCH", + "PRIMARY_ALREADY_SETUP" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "Unsupported migration type.", + "No pglogical extension installed on databases, applicable for postgres.", + "pglogical node already exists on databases, applicable for postgres.", + "The value of parameter wal_level is not set to logical.", + "The value of parameter shared_preload_libraries does not include pglogical.", + "The value of parameter max_replication_slots is not sufficient.", + "The value of parameter max_wal_senders is not sufficient.", + "The value of parameter max_worker_processes is not sufficient.", + "Extensions installed are either not supported or having unsupported versions", + "The value of parameter rds.logical_replication is not set to 1.", + "The primary instance logging setup doesn't allow EM sync.", + "The primary instance database parameter setup doesn't allow EM sync.", + "The gtid_mode is not supported, applicable for MySQL.", + "SQL Server Agent is not running.", + "The table definition is not support due to missing primary key or replica identity, applicable for postgres.", + "The customer has a definer that will break EM setup.", + "SQL Server @@SERVERNAME does not match actual host name", + "The primary instance has been setup and will fail the setup." + ], + "type": "string" + } + }, + "type": "object" + }, + "SqlInstancesRescheduleMaintenanceRequestBody": { + "description": "Reschedule options for maintenance windows.", + "id": "SqlInstancesRescheduleMaintenanceRequestBody", + "properties": { + "reschedule": { + "$ref": "Reschedule", + "description": "Required. The type of the reschedule the user wants." + } + }, + "type": "object" + }, + "SqlInstancesStartExternalSyncRequest": { + "description": "Instance start external sync request.", + "id": "SqlInstancesStartExternalSyncRequest", + "properties": { + "mysqlSyncConfig": { + "$ref": "MySqlSyncConfig", + "description": "MySQL-specific settings for start external sync." + }, + "skipVerification": { + "description": "Whether to skip the verification step (VESS).", + "type": "boolean" + }, + "syncMode": { + "description": "External sync mode.", + "enum": [ + "EXTERNAL_SYNC_MODE_UNSPECIFIED", + "ONLINE", + "OFFLINE" + ], + "enumDescriptions": [ + "Unknown external sync mode, will be defaulted to ONLINE mode", + "Online external sync will set up replication after initial data external sync", + "Offline external sync only dumps and loads a one-time snapshot of the primary instance's data" + ], + "type": "string" + } + }, + "type": "object" + }, + "SqlInstancesVerifyExternalSyncSettingsRequest": { + "description": "Instance verify external sync settings request.", + "id": "SqlInstancesVerifyExternalSyncSettingsRequest", + "properties": { + "mysqlSyncConfig": { + "$ref": "MySqlSyncConfig", + "description": "Optional. MySQL-specific settings for start external sync." + }, + "syncMode": { + "description": "External sync mode", + "enum": [ + "EXTERNAL_SYNC_MODE_UNSPECIFIED", + "ONLINE", + "OFFLINE" + ], + "enumDescriptions": [ + "Unknown external sync mode, will be defaulted to ONLINE mode", + "Online external sync will set up replication after initial data external sync", + "Offline external sync only dumps and loads a one-time snapshot of the primary instance's data" + ], + "type": "string" + }, + "verifyConnectionOnly": { + "description": "Flag to enable verifying connection only", + "type": "boolean" + } + }, + "type": "object" + }, + "SqlInstancesVerifyExternalSyncSettingsResponse": { + "description": "Instance verify external sync settings response.", + "id": "SqlInstancesVerifyExternalSyncSettingsResponse", + "properties": { + "errors": { + "description": "List of migration violations.", + "items": { + "$ref": "SqlExternalSyncSettingError" + }, + "type": "array" + }, + "kind": { + "description": "This is always *sql#migrationSettingErrorList*.", + "type": "string" + }, + "warnings": { + "description": "List of migration warnings.", + "items": { + "$ref": "SqlExternalSyncSettingError" + }, + "type": "array" + } + }, + "type": "object" + }, "SqlOutOfDiskReport": { "description": "This message wraps up the information written by out-of-disk detection job.", "id": "SqlOutOfDiskReport", @@ -1455,6 +4168,40 @@ }, "type": "object" }, + "SqlServerDatabaseDetails": { + "description": "Represents a Sql Server database on the Cloud SQL instance.", + "id": "SqlServerDatabaseDetails", + "properties": { + "compatibilityLevel": { + "description": "The version of SQL Server with which the database is to be made compatible", + "format": "int32", + "type": "integer" + }, + "recoveryModel": { + "description": "The recovery model of a SQL Server database", + "type": "string" + } + }, + "type": "object" + }, + "SqlServerUserDetails": { + "description": "Represents a Sql Server user on the Cloud SQL instance.", + "id": "SqlServerUserDetails", + "properties": { + "disabled": { + "description": "If the user has been disabled", + "type": "boolean" + }, + "serverRoles": { + "description": "The server roles for this user", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "SslCert": { "description": "SslCerts Resource", "id": "SslCert", @@ -1489,6 +4236,10 @@ "description": "This is always sql#sslCert.", "type": "string" }, + "selfLink": { + "description": "The URI of this resource.", + "type": "string" + }, "sha1Fingerprint": { "description": "Sha1 Fingerprint.", "type": "string" @@ -1496,6 +4247,21 @@ }, "type": "object" }, + "SslCertDetail": { + "description": "SslCertDetail.", + "id": "SslCertDetail", + "properties": { + "certInfo": { + "$ref": "SslCert", + "description": "The public information about the cert." + }, + "certPrivateKey": { + "description": "The private key for the client cert, in pem format. Keep private in order to protect your security.", + "type": "string" + } + }, + "type": "object" + }, "SslCertsCreateEphemeralRequest": { "description": "SslCerts create ephemeral certificate request.", "id": "SslCertsCreateEphemeralRequest", @@ -1510,6 +4276,197 @@ } }, "type": "object" + }, + "SslCertsInsertRequest": { + "description": "SslCerts insert request.", + "id": "SslCertsInsertRequest", + "properties": { + "commonName": { + "description": "User supplied name. Must be a distinct name from the other certificates for this instance.", + "type": "string" + } + }, + "type": "object" + }, + "SslCertsInsertResponse": { + "description": "SslCert insert response.", + "id": "SslCertsInsertResponse", + "properties": { + "clientCert": { + "$ref": "SslCertDetail", + "description": "The new client certificate and private key." + }, + "kind": { + "description": "This is always *sql#sslCertsInsert*.", + "type": "string" + }, + "operation": { + "$ref": "Operation", + "description": "The operation to track the ssl certs insert request." + }, + "serverCaCert": { + "$ref": "SslCert", + "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." + } + }, + "type": "object" + }, + "SslCertsListResponse": { + "description": "SslCerts list response.", + "id": "SslCertsListResponse", + "properties": { + "items": { + "description": "List of client certificates for the instance.", + "items": { + "$ref": "SslCert" + }, + "type": "array" + }, + "kind": { + "description": "This is always *sql#sslCertsList*.", + "type": "string" + } + }, + "type": "object" + }, + "Tier": { + "description": "A Google Cloud SQL service tier resource.", + "id": "Tier", + "properties": { + "DiskQuota": { + "description": "The maximum disk size of this tier in bytes.", + "format": "int64", + "type": "string" + }, + "RAM": { + "description": "The maximum RAM usage of this tier in bytes.", + "format": "int64", + "type": "string" + }, + "kind": { + "description": "This is always *sql#tier*.", + "type": "string" + }, + "region": { + "description": "The applicable regions for this tier.", + "items": { + "type": "string" + }, + "type": "array" + }, + "tier": { + "description": "An identifier for the machine type, for example, db-custom-1-3840. For related information, see Pricing.", + "type": "string" + } + }, + "type": "object" + }, + "TiersListResponse": { + "description": "Tiers list response.", + "id": "TiersListResponse", + "properties": { + "items": { + "description": "List of tiers.", + "items": { + "$ref": "Tier" + }, + "type": "array" + }, + "kind": { + "description": "This is always *sql#tiersList*.", + "type": "string" + } + }, + "type": "object" + }, + "TruncateLogContext": { + "description": "Database Instance truncate log context.", + "id": "TruncateLogContext", + "properties": { + "kind": { + "description": "This is always *sql#truncateLogContext*.", + "type": "string" + }, + "logType": { + "description": "The type of log to truncate. Valid values are *MYSQL_GENERAL_TABLE* and *MYSQL_SLOW_TABLE*.", + "type": "string" + } + }, + "type": "object" + }, + "User": { + "description": "A Cloud SQL user resource.", + "id": "User", + "properties": { + "etag": { + "description": "This field is deprecated and will be removed from a future version of the API.", + "type": "string" + }, + "host": { + "description": "The host name 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.", + "type": "string" + }, + "instance": { + "description": "The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for *update* since it is already specified on the URL.", + "type": "string" + }, + "kind": { + "description": "This is always *sql#user*.", + "type": "string" + }, + "name": { + "description": "The name of the user in the Cloud SQL instance. Can be omitted for *update* since it is already specified in the URL.", + "type": "string" + }, + "password": { + "description": "The password for the user.", + "type": "string" + }, + "project": { + "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* since it is already specified on the URL.", + "type": "string" + }, + "sqlserverUserDetails": { + "$ref": "SqlServerUserDetails" + }, + "type": { + "description": "The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type.", + "enum": [ + "BUILT_IN", + "CLOUD_IAM_USER", + "CLOUD_IAM_SERVICE_ACCOUNT" + ], + "enumDescriptions": [ + "The database's built-in user type.", + "Cloud IAM user.", + "Cloud IAM service account." + ], + "type": "string" + } + }, + "type": "object" + }, + "UsersListResponse": { + "description": "User list response.", + "id": "UsersListResponse", + "properties": { + "items": { + "description": "List of user resources in the instance.", + "items": { + "$ref": "User" + }, + "type": "array" + }, + "kind": { + "description": "This is always *sql#usersList*.", + "type": "string" + }, + "nextPageToken": { + "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/discovery/sqladmin-v1beta4.json b/discovery/sqladmin-v1beta4.json index 398f7259ded..37de6e13e28 100644 --- a/discovery/sqladmin-v1beta4.json +++ b/discovery/sqladmin-v1beta4.json @@ -122,7 +122,7 @@ ], "parameters": { "id": { - "description": "The ID of the Backup Run to delete. To find a Backup Run ID, use the list method.", + "description": "The ID of the backup run to delete. To find a backup run ID, use the list method.", "format": "int64", "location": "path", "required": true, @@ -162,7 +162,7 @@ ], "parameters": { "id": { - "description": "The ID of this Backup Run.", + "description": "The ID of this backup run.", "format": "int64", "location": "path", "required": true, @@ -191,7 +191,7 @@ ] }, "insert": { - "description": "Creates a new backup run on demand. This method is applicable only to Second Generation instances.", + "description": "Creates a new backup run on demand.", "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns", "httpMethod": "POST", "id": "sql.backupRuns.insert", @@ -583,7 +583,7 @@ "flags": { "methods": { "list": { - "description": "List all available database flags for Cloud SQL instances.", + "description": "Lists all available database flags for Cloud SQL instances.", "flatPath": "sql/v1beta4/flags", "httpMethod": "GET", "id": "sql.flags.list", @@ -777,7 +777,7 @@ ] }, "failover": { - "description": "Failover the instance to its failover replica instance. Using this operation might cause your instance to restart.", + "description": "Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the Overview of high availability page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance.", "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/failover", "httpMethod": "POST", "id": "sql.instances.failover", @@ -1452,29 +1452,12 @@ "location": "path", "required": true, "type": "string" - }, - "skipVerification": { - "description": "Whether to skip the verification step (VESS).", - "location": "query", - "type": "boolean" - }, - "syncMode": { - "description": "External sync mode.", - "enum": [ - "EXTERNAL_SYNC_MODE_UNSPECIFIED", - "ONLINE", - "OFFLINE" - ], - "enumDescriptions": [ - "Unknown external sync mode, will be defaulted to ONLINE mode", - "Online external sync will set up replication after initial data external sync", - "Offline external sync only dumps and loads a one-time snapshot of the primary instance's data" - ], - "location": "query", - "type": "string" } }, "path": "sql/v1beta4/projects/{project}/instances/{instance}/startExternalSync", + "request": { + "$ref": "SqlInstancesStartExternalSyncRequest" + }, "response": { "$ref": "Operation" }, @@ -1504,29 +1487,12 @@ "location": "path", "required": true, "type": "string" - }, - "syncMode": { - "description": "External sync mode", - "enum": [ - "EXTERNAL_SYNC_MODE_UNSPECIFIED", - "ONLINE", - "OFFLINE" - ], - "enumDescriptions": [ - "Unknown external sync mode, will be defaulted to ONLINE mode", - "Online external sync will set up replication after initial data external sync", - "Offline external sync only dumps and loads a one-time snapshot of the primary instance's data" - ], - "location": "query", - "type": "string" - }, - "verifyConnectionOnly": { - "description": "Flag to enable verifying connection only", - "location": "query", - "type": "boolean" } }, "path": "sql/v1beta4/projects/{project}/instances/{instance}/verifyExternalSyncSettings", + "request": { + "$ref": "SqlInstancesVerifyExternalSyncSettingsRequest" + }, "response": { "$ref": "SqlInstancesVerifyExternalSyncSettingsResponse" }, @@ -1911,7 +1877,7 @@ } } }, - "revision": "20210627", + "revision": "20210727", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -2073,11 +2039,11 @@ }, "diskEncryptionConfiguration": { "$ref": "DiskEncryptionConfiguration", - "description": "Encryption configuration specific to a backup. Applies only to Second Generation instances." + "description": "Encryption configuration specific to a backup." }, "diskEncryptionStatus": { "$ref": "DiskEncryptionStatus", - "description": "Encryption status specific to a backup. Applies only to Second Generation instances." + "description": "Encryption status specific to a backup." }, "endTime": { "description": "The time the backup operation completed in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.", @@ -2371,7 +2337,7 @@ "id": "DatabaseFlags", "properties": { "name": { - "description": "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 Configuring Database Flags in the Cloud SQL documentation.", + "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 in the Cloud SQL documentation.", "type": "string" }, "value": { @@ -2411,7 +2377,7 @@ "type": "string" }, "databaseVersion": { - "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*, or *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.", + "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*, *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2019_STANDARD*, *SQLSERVER_2019_ENTERPRISE*, *SQLSERVER_2019_EXPRESS*, or *SQLSERVER_2019_WEB*, *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.", "enum": [ "SQL_DATABASE_VERSION_UNSPECIFIED", "MYSQL_5_1", @@ -2458,25 +2424,25 @@ }, "diskEncryptionConfiguration": { "$ref": "DiskEncryptionConfiguration", - "description": "Disk encryption configuration specific to an instance. Applies only to Second Generation instances." + "description": "Disk encryption configuration specific to an instance." }, "diskEncryptionStatus": { "$ref": "DiskEncryptionStatus", - "description": "Disk encryption status specific to an instance. Applies only to Second Generation instances." + "description": "Disk encryption status specific to an instance." }, "etag": { "description": "This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead.", "type": "string" }, "failoverReplica": { - "description": "The name and status of the failover replica. This property is applicable only to Second Generation instances.", + "description": "The name and status of the failover replica.", "properties": { "available": { "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.", "type": "boolean" }, "name": { - "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. This property is applicable only to Second Generation instances.", + "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.", "type": "string" } }, @@ -2685,7 +2651,7 @@ "description": "Configuration specific to read-replicas replicating from the on-premises primary instance." }, "verifyGtidConsistency": { - "description": "Verify GTID consistency for demote operation. Default value: *True*. 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.", + "description": "Verify GTID consistency for demote operation. Default value: *True*. 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.", "type": "boolean" } }, @@ -2958,7 +2924,7 @@ "type": "string" }, "requiresRestart": { - "description": "Indicates whether changing this flag will trigger a database restart. Only applicable to Second Generation instances.", + "description": "Indicates whether changing this flag will trigger a database restart.", "type": "boolean" }, "type": { @@ -3125,7 +3091,7 @@ "type": "boolean" }, "queryPlansPerMinute": { - "description": "Number of query plans generated by Insights per minute. Default is 5. Changing this will restart the database.", + "description": "Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.", "format": "int32", "type": "integer" }, @@ -3287,6 +3253,10 @@ "description": "IP Management configuration.", "id": "IpConfiguration", "properties": { + "allocatedIpRange": { + "description": "The name of the allocated ip range for the private ip CloudSQL 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])?. Reserved for future use.", + "type": "string" + }, "authorizedNetworks": { "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: *192.168.100.0/24*).", "items": { @@ -3454,6 +3424,12 @@ }, "type": "object" }, + "MySqlSyncConfig": { + "description": "MySQL-specific external server sync settings.", + "id": "MySqlSyncConfig", + "properties": {}, + "type": "object" + }, "OnPremisesConfiguration": { "description": "On-premises instance configuration.", "id": "OnPremisesConfiguration", @@ -3898,7 +3874,7 @@ }, "ipConfiguration": { "$ref": "IpConfiguration", - "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." + "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." }, "kind": { "description": "This is always *sql#settings*.", @@ -4065,6 +4041,62 @@ }, "type": "object" }, + "SqlInstancesStartExternalSyncRequest": { + "id": "SqlInstancesStartExternalSyncRequest", + "properties": { + "mysqlSyncConfig": { + "$ref": "MySqlSyncConfig", + "description": "MySQL-specific settings for start external sync." + }, + "skipVerification": { + "description": "Whether to skip the verification step (VESS).", + "type": "boolean" + }, + "syncMode": { + "description": "External sync mode.", + "enum": [ + "EXTERNAL_SYNC_MODE_UNSPECIFIED", + "ONLINE", + "OFFLINE" + ], + "enumDescriptions": [ + "Unknown external sync mode, will be defaulted to ONLINE mode", + "Online external sync will set up replication after initial data external sync", + "Offline external sync only dumps and loads a one-time snapshot of the primary instance's data" + ], + "type": "string" + } + }, + "type": "object" + }, + "SqlInstancesVerifyExternalSyncSettingsRequest": { + "id": "SqlInstancesVerifyExternalSyncSettingsRequest", + "properties": { + "mysqlSyncConfig": { + "$ref": "MySqlSyncConfig", + "description": "Optional. MySQL-specific settings for start external sync." + }, + "syncMode": { + "description": "External sync mode", + "enum": [ + "EXTERNAL_SYNC_MODE_UNSPECIFIED", + "ONLINE", + "OFFLINE" + ], + "enumDescriptions": [ + "Unknown external sync mode, will be defaulted to ONLINE mode", + "Online external sync will set up replication after initial data external sync", + "Offline external sync only dumps and loads a one-time snapshot of the primary instance's data" + ], + "type": "string" + }, + "verifyConnectionOnly": { + "description": "Flag to enable verifying connection only", + "type": "boolean" + } + }, + "type": "object" + }, "SqlInstancesVerifyExternalSyncSettingsResponse": { "description": "Instance verify external sync settings response.", "id": "SqlInstancesVerifyExternalSyncSettingsResponse", diff --git a/src/apis/sqladmin/v1.ts b/src/apis/sqladmin/v1.ts index 5e0ca3192b3..b8698b9d1c0 100644 --- a/src/apis/sqladmin/v1.ts +++ b/src/apis/sqladmin/v1.ts @@ -113,8 +113,16 @@ export namespace sqladmin_v1 { */ export class Sqladmin { context: APIRequestContext; + backupRuns: Resource$Backupruns; + connect: Resource$Connect; + databases: Resource$Databases; + flags: Resource$Flags; instances: Resource$Instances; + operations: Resource$Operations; projects: Resource$Projects; + sslCerts: Resource$Sslcerts; + tiers: Resource$Tiers; + users: Resource$Users; constructor(options: GlobalOptions, google?: GoogleConfigurable) { this.context = { @@ -122,8 +130,16 @@ export namespace sqladmin_v1 { google, }; + this.backupRuns = new Resource$Backupruns(this.context); + this.connect = new Resource$Connect(this.context); + this.databases = new Resource$Databases(this.context); + this.flags = new Resource$Flags(this.context); this.instances = new Resource$Instances(this.context); + this.operations = new Resource$Operations(this.context); this.projects = new Resource$Projects(this.context); + this.sslCerts = new Resource$Sslcerts(this.context); + this.tiers = new Resource$Tiers(this.context); + this.users = new Resource$Users(this.context); } } @@ -206,6 +222,19 @@ export namespace sqladmin_v1 { */ transactionLogRetentionDays?: number | null; } + /** + * Backup context. + */ + export interface Schema$BackupContext { + /** + * The identifier of the backup. + */ + backupId?: string | null; + /** + * This is always **sql#backupContext**. + */ + kind?: string | null; + } /** * We currently only support backup retention by specifying the number of backups we will retain. */ @@ -219,6 +248,134 @@ export namespace sqladmin_v1 { */ retentionUnit?: string | null; } + /** + * A BackupRun resource. + */ + export interface Schema$BackupRun { + /** + * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. + */ + backupKind?: string | null; + /** + * The description of this run, only applicable to on-demand backups. + */ + description?: string | null; + /** + * Encryption configuration specific to a backup. + */ + diskEncryptionConfiguration?: Schema$DiskEncryptionConfiguration; + /** + * Encryption status specific to a backup. + */ + diskEncryptionStatus?: Schema$DiskEncryptionStatus; + /** + * The time the backup operation completed in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. + */ + endTime?: string | null; + /** + * The time the run was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. + */ + enqueuedTime?: string | null; + /** + * Information about why the backup operation failed. This is only present if the run has the FAILED status. + */ + error?: Schema$OperationError; + /** + * The identifier for this backup run. Unique only for a specific Cloud SQL instance. + */ + id?: string | null; + /** + * Name of the database instance. + */ + instance?: string | null; + /** + * This is always *sql#backupRun*. + */ + kind?: string | null; + /** + * Location of the backups. + */ + location?: string | null; + /** + * The URI of this resource. + */ + selfLink?: string | null; + /** + * The time the backup operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. + */ + startTime?: string | null; + /** + * The status of this run. + */ + status?: string | null; + /** + * 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. + */ + type?: string | null; + /** + * The start time of the backup window during which this the backup was attempted in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. + */ + windowStartTime?: string | null; + } + /** + * Backup run list results. + */ + export interface Schema$BackupRunsListResponse { + /** + * A list of backup runs in reverse chronological order of the enqueued time. + */ + items?: Schema$BackupRun[]; + /** + * This is always *sql#backupRunsList*. + */ + kind?: string | null; + /** + * The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. + */ + nextPageToken?: string | null; + } + /** + * Binary log coordinates. + */ + export interface Schema$BinLogCoordinates { + /** + * Name of the binary log file for a Cloud SQL instance. + */ + binLogFileName?: string | null; + /** + * Position (offset) within the binary log file. + */ + binLogPosition?: string | null; + /** + * This is always *sql#binLogCoordinates*. + */ + kind?: string | null; + } + /** + * Database instance clone context. + */ + export interface Schema$CloneContext { + /** + * 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?: Schema$BinLogCoordinates; + /** + * Name of the Cloud SQL instance to be created as a clone. + */ + destinationInstanceName?: string | null; + /** + * This is always *sql#cloneContext*. + */ + kind?: string | null; + /** + * Reserved for future use. + */ + pitrTimestampMs?: string | null; + /** + * Timestamp, if specified, identifies the time to which the source instance is cloned. + */ + pointInTime?: string | null; + } /** * Connect settings retrieval response. */ @@ -244,12 +401,50 @@ export namespace sqladmin_v1 { */ serverCaCert?: Schema$SslCert; } + /** + * Represents a SQL database on the Cloud SQL instance. + */ + export interface Schema$Database { + /** + * The Cloud SQL charset value. + */ + charset?: string | null; + /** + * The Cloud SQL collation value. + */ + collation?: string | null; + /** + * This field is deprecated and will be removed from a future version of the API. + */ + etag?: string | null; + /** + * The name of the Cloud SQL instance. This does not include the project ID. + */ + instance?: string | null; + /** + * This is always **sql#database**. + */ + kind?: string | null; + /** + * The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. + */ + name?: string | null; + /** + * The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. + */ + project?: string | null; + /** + * The URI of this resource. + */ + selfLink?: string | null; + sqlserverDatabaseDetails?: Schema$SqlServerDatabaseDetails; + } /** * Database flags for Cloud SQL instances. */ export interface Schema$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 [Configuring Database Flags](/sql/docs/mysql/flags) in the Cloud SQL documentation. + * 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. */ name?: string | null; /** @@ -274,49 +469,33 @@ export namespace sqladmin_v1 { */ currentDiskSize?: string | null; /** - * 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*, or *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. + * 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*, *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2019_STANDARD*, *SQLSERVER_2019_ENTERPRISE*, *SQLSERVER_2019_EXPRESS*, or *SQLSERVER_2019_WEB*, *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. */ databaseVersion?: string | null; /** - * Disk encryption configuration specific to an instance. Applies only to Second Generation instances. + * Disk encryption configuration specific to an instance. */ diskEncryptionConfiguration?: Schema$DiskEncryptionConfiguration; /** - * Disk encryption status specific to an instance. Applies only to Second Generation instances. + * Disk encryption status specific to an instance. */ diskEncryptionStatus?: Schema$DiskEncryptionStatus; - /** - * For internal usage only. The encrypted password. - */ - encryptedRootPassword?: string | null; /** * This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead. */ etag?: string | null; /** - * The name and status of the failover replica. This property is applicable only to Second Generation instances. + * The name and status of the failover replica. */ - failoverReplica?: { - available?: boolean; - failoverInstance?: Schema$InstanceReference; - name?: string; - } | null; + failoverReplica?: {available?: boolean; name?: string} | null; /** * 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. */ gceZone?: string | null; - /** - * installed_version stores the current fully resolved database version including minor version such as MySQL_5.6.50 - */ - installedVersion?: string | null; /** * The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer's premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica. */ instanceType?: string | null; - /** - * Uid of the Cloud SQL instance. Used by Pantheon to check instance is created - */ - instanceUid?: string | null; /** * The assigned IP addresses for the instance. */ @@ -329,10 +508,6 @@ export namespace sqladmin_v1 { * This is always *sql#instance*. */ kind?: string | null; - /** - * The reference to the instance which will act as primary in the replication setup. - */ - masterInstance?: Schema$InstanceReference; /** * The name of the instance which will act as primary in the replication setup. */ @@ -365,10 +540,6 @@ export namespace sqladmin_v1 { * Configuration specific to failover replicas and read replicas. */ replicaConfiguration?: Schema$ReplicaConfiguration; - /** - * The replicas of the instance. - */ - replicaInstances?: Schema$InstanceReference[]; /** * The replicas of the instance. */ @@ -414,6 +585,82 @@ export namespace sqladmin_v1 { */ suspensionReason?: string[] | null; } + /** + * Database list response. + */ + export interface Schema$DatabasesListResponse { + /** + * List of database resources in the instance. + */ + items?: Schema$Database[]; + /** + * This is always *sql#databasesList*. + */ + kind?: string | null; + } + /** + * Read-replica configuration for connecting to the on-premises primary instance. + */ + export interface Schema$DemoteMasterConfiguration { + /** + * This is always **sql#demoteMasterConfiguration**. + */ + kind?: string | null; + /** + * 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. + */ + mysqlReplicaConfiguration?: Schema$DemoteMasterMySqlReplicaConfiguration; + } + /** + * Database instance demote primary instance context. + */ + export interface Schema$DemoteMasterContext { + /** + * This is always *sql#demoteMasterContext*. + */ + kind?: string | null; + /** + * The name of the instance which will act as on-premises primary instance in the replication setup. + */ + masterInstanceName?: string | null; + /** + * Configuration specific to read-replicas replicating from the on-premises primary instance. + */ + replicaConfiguration?: Schema$DemoteMasterConfiguration; + /** + * Verify GTID consistency for demote operation. Default value: *True*. 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 value only if you know the reason for the GTID divergence and are confident that doing so will not cause any replication issues. + */ + verifyGtidConsistency?: boolean | null; + } + /** + * Read-replica configuration specific to MySQL databases. + */ + export interface Schema$DemoteMasterMySqlReplicaConfiguration { + /** + * PEM representation of the trusted CA's x509 certificate. + */ + caCertificate?: string | null; + /** + * PEM representation of the replica's x509 certificate. + */ + clientCertificate?: string | null; + /** + * 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. + */ + clientKey?: string | null; + /** + * This is always **sql#demoteMasterMysqlReplicaConfiguration**. + */ + kind?: string | null; + /** + * The password for the replication connection. + */ + password?: string | null; + /** + * The username for the replication connection. + */ + username?: string | null; + } /** * Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied. */ @@ -458,121 +705,345 @@ export namespace sqladmin_v1 { kmsKeyVersionName?: string | null; } /** - * Ephemeral certificate creation request. + * Database instance export context. */ - export interface Schema$GenerateEphemeralCertRequest { + export interface Schema$ExportContext { /** - * Optional. Access token to include in the signed certificate. + * Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only. */ - access_token?: string | null; + csvExportOptions?: {selectQuery?: string} | null; /** - * PEM encoded public key to include in the signed certificate. + * 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**. */ - public_key?: string | null; + databases?: string[] | null; /** - * Optional. Optional snapshot read timestamp to trade freshness for performance. + * The file type for the specified uri. **SQL**: The file contains SQL statements. **CSV**: The file contains CSV data. **BAK**: The file contains backup data for a SQL Server instance. */ - readTime?: string | null; - } - /** - * Ephemeral certificate creation request. - */ - export interface Schema$GenerateEphemeralCertResponse { + fileType?: string | null; /** - * Generated cert + * This is always **sql#exportContext**. */ - ephemeralCert?: Schema$SslCert; - } - /** - * Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration. - */ - export interface Schema$InsightsConfig { + kind?: string | null; /** - * Whether Query Insights feature is enabled. + * Option for export offload. */ - queryInsightsEnabled?: boolean | null; + offload?: boolean | null; /** - * Number of query plans generated by Insights per minute. Default is 5. Changing this will restart the database. + * Options for exporting data as SQL statements. */ - queryPlansPerMinute?: number | null; + sqlExportOptions?: { + mysqlExportOptions?: {masterData?: number}; + schemaOnly?: boolean; + tables?: string[]; + } | null; /** - * 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. + * 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. */ - queryStringLength?: number | null; + uri?: string | null; + } + /** + * Database instance failover context. + */ + export interface Schema$FailoverContext { /** - * Whether Query Insights will record application tags from query when enabled. + * This is always *sql#failoverContext*. */ - recordApplicationTags?: boolean | null; + kind?: string | null; /** - * Whether Query Insights will record client address when enabled. + * The current settings version of this instance. Request will be rejected if this version doesn't match the current settings version. */ - recordClientAddress?: boolean | null; + settingsVersion?: string | null; } /** - * Reference to another Cloud SQL instance. + * A flag resource. */ - export interface Schema$InstanceReference { + export interface Schema$Flag { /** - * The name of the Cloud SQL instance being referenced. + * Use this field if only certain integers are accepted. Can be combined with min_value and max_value to add additional values. */ - name?: string | null; + allowedIntValues?: string[] | null; /** - * The region of the Cloud SQL instance being referenced. + * For **STRING** flags, a list of strings that the value can be set to. */ - region?: string | null; - } - /** - * Database instances list response. - */ - export interface Schema$InstancesListResponse { + allowedStringValues?: string[] | null; /** - * List of database instance resources. + * The database version this flag applies to. Can be **MYSQL_8_0**, **MYSQL_5_6**, or **MYSQL_5_7**. */ - items?: Schema$DatabaseInstance[]; + appliesTo?: string[] | null; /** - * This is always *sql#instancesList*. + * Whether or not the flag is considered in beta. */ - kind?: string | null; + inBeta?: boolean | null; /** - * The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. + * This is always **sql#flag**. */ - nextPageToken?: string | null; + kind?: string | null; /** - * List of warnings that occurred while handling the request. + * For **INTEGER** flags, the maximum allowed value. */ - warnings?: Schema$ApiWarning[]; - } - /** - * IP Management configuration. - */ - export interface Schema$IpConfiguration { + maxValue?: string | null; /** - * 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: **192.168.100.0/24**). + * For **INTEGER** flags, the minimum allowed value. */ - authorizedNetworks?: Schema$AclEntry[]; + minValue?: string | null; /** - * Whether the instance is assigned a public IP address or not. + * This is the name of the flag. Flag names always use underscores, not hyphens, for example: **max_allowed_packet** */ - ipv4Enabled?: boolean | null; + name?: string | null; /** - * The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, *x/projects/myProject/global/networks/default**. This setting can be updated, but it cannot be removed after it is set. + * Indicates whether changing this flag will trigger a database restart. Only applicable to Second Generation instances. */ - privateNetwork?: string | null; + requiresRestart?: boolean | null; /** - * Whether SSL connections over IP are enforced or not. + * The type of the flag. Flags are typed to being **BOOLEAN**, **STRING**, **INTEGER** or **NONE**. **NONE** is used for flags which do not take a value, such as **skip_grant_tables**. */ - requireSsl?: boolean | null; + type?: string | null; } /** - * Database instance IP Mapping. + * Flags list response. */ - export interface Schema$IpMapping { + export interface Schema$FlagsListResponse { /** - * The IP address assigned. + * List of flags. */ - ipAddress?: string | null; + items?: Schema$Flag[]; /** - * 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. + * This is always **sql#flagsList**. + */ + kind?: string | null; + } + /** + * Ephemeral certificate creation request. + */ + export interface Schema$GenerateEphemeralCertRequest { + /** + * Optional. Access token to include in the signed certificate. + */ + access_token?: string | null; + /** + * PEM encoded public key to include in the signed certificate. + */ + public_key?: string | null; + /** + * Optional. Optional snapshot read timestamp to trade freshness for performance. + */ + readTime?: string | null; + } + /** + * Ephemeral certificate creation request. + */ + export interface Schema$GenerateEphemeralCertResponse { + /** + * Generated cert + */ + ephemeralCert?: Schema$SslCert; + } + /** + * Database instance import context. + */ + export interface Schema$ImportContext { + /** + * Import parameters specific to SQL Server .BAK files + */ + bakImportOptions?: { + encryptionOptions?: { + certPath?: string; + pvkPassword?: string; + pvkPath?: string; + }; + } | null; + /** + * Options for importing data as CSV. + */ + csvImportOptions?: {columns?: string[]; table?: string} | null; + /** + * 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. + */ + database?: string | null; + /** + * The file type for the specified uri. **SQL**: The file contains SQL statements. **CSV**: The file contains CSV data. + */ + fileType?: string | null; + /** + * The PostgreSQL user for this import operation. PostgreSQL instances only. + */ + importUser?: string | null; + /** + * This is always **sql#importContext**. + */ + kind?: string | null; + /** + * 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. + */ + uri?: string | null; + } + /** + * Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration. + */ + export interface Schema$InsightsConfig { + /** + * Whether Query Insights feature is enabled. + */ + queryInsightsEnabled?: boolean | null; + /** + * Number of query execution plans captured by Insights per minute for all queries combined. Default is 5. + */ + queryPlansPerMinute?: number | null; + /** + * 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. + */ + queryStringLength?: number | null; + /** + * Whether Query Insights will record application tags from query when enabled. + */ + recordApplicationTags?: boolean | null; + /** + * Whether Query Insights will record client address when enabled. + */ + recordClientAddress?: boolean | null; + } + /** + * Database instance clone request. + */ + export interface Schema$InstancesCloneRequest { + /** + * Contains details about the clone operation. + */ + cloneContext?: Schema$CloneContext; + } + /** + * Database demote primary instance request. + */ + export interface Schema$InstancesDemoteMasterRequest { + /** + * Contains details about the demoteMaster operation. + */ + demoteMasterContext?: Schema$DemoteMasterContext; + } + /** + * Database instance export request. + */ + export interface Schema$InstancesExportRequest { + /** + * Contains details about the export operation. + */ + exportContext?: Schema$ExportContext; + } + /** + * Instance failover request. + */ + export interface Schema$InstancesFailoverRequest { + /** + * Failover Context. + */ + failoverContext?: Schema$FailoverContext; + } + /** + * Database instance import request. + */ + export interface Schema$InstancesImportRequest { + /** + * Contains details about the import operation. + */ + importContext?: Schema$ImportContext; + } + /** + * Database instances list response. + */ + export interface Schema$InstancesListResponse { + /** + * List of database instance resources. + */ + items?: Schema$DatabaseInstance[]; + /** + * This is always *sql#instancesList*. + */ + kind?: string | null; + /** + * The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. + */ + nextPageToken?: string | null; + /** + * List of warnings that occurred while handling the request. + */ + warnings?: Schema$ApiWarning[]; + } + /** + * Instances ListServerCas response. + */ + export interface Schema$InstancesListServerCasResponse { + activeVersion?: string | null; + /** + * List of server CA certificates for the instance. + */ + certs?: Schema$SslCert[]; + /** + * This is always *sql#instancesListServerCas*. + */ + kind?: string | null; + } + /** + * Database instance restore backup request. + */ + export interface Schema$InstancesRestoreBackupRequest { + /** + * Parameters required to perform the restore backup operation. + */ + restoreBackupContext?: Schema$RestoreBackupContext; + } + /** + * Rotate server CA request. + */ + export interface Schema$InstancesRotateServerCaRequest { + /** + * Contains details about the rotate server CA operation. + */ + rotateServerCaContext?: Schema$RotateServerCaContext; + } + /** + * Instance truncate log request. + */ + export interface Schema$InstancesTruncateLogRequest { + /** + * Contains details about the truncate log operation. + */ + truncateLogContext?: Schema$TruncateLogContext; + } + /** + * IP Management configuration. + */ + export interface Schema$IpConfiguration { + /** + * The name of the allocated ip range for the private ip CloudSQL 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])?. Reserved for future use. + */ + allocatedIpRange?: string | null; + /** + * 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: **192.168.100.0/24**). + */ + authorizedNetworks?: Schema$AclEntry[]; + /** + * Whether the instance is assigned a public IP address or not. + */ + ipv4Enabled?: boolean | null; + /** + * The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, *x/projects/myProject/global/networks/default**. This setting can be updated, but it cannot be removed after it is set. + */ + privateNetwork?: string | null; + /** + * Whether SSL connections over IP are enforced or not. + */ + requireSsl?: boolean | null; + } + /** + * Database instance IP Mapping. + */ + export interface Schema$IpMapping { + /** + * The IP address assigned. + */ + ipAddress?: string | null; + /** + * 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. */ timeToRetire?: string | null; /** @@ -584,6 +1055,10 @@ export namespace sqladmin_v1 { * Preferred location. This specifies where a Cloud SQL instance is located. 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. */ export interface Schema$LocationPreference { + /** + * The App Engine application to follow, it must be in the same region as the Cloud SQL instance. + */ + followGaeApplication?: string | null; /** * This is always **sql#locationPreference**. */ @@ -614,7 +1089,7 @@ export namespace sqladmin_v1 { */ kind?: string | null; /** - * Maintenance timing setting: **canary** (Earlier) or **stable** (Later). [Learn more] (https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/instance-settings#maintenance-timing-2ndgen). + * Maintenance timing setting: **canary** (Earlier) or **stable** (Later). [Learn more] (https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen). */ updateTrack?: string | null; } @@ -667,6 +1142,10 @@ export namespace sqladmin_v1 { */ verifyServerCertificate?: boolean | null; } + /** + * MySQL-specific external server sync settings. + */ + export interface Schema$MySqlSyncConfig {} /** * On-premises instance configuration. */ @@ -705,108 +1184,269 @@ export namespace sqladmin_v1 { username?: string | null; } /** - * Read-replica configuration for connecting to the primary instance. + * An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. */ - export interface Schema$ReplicaConfiguration { + export interface Schema$Operation { /** - * 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. + * The context for backup operation, if applicable. */ - failoverTarget?: boolean | null; + backupContext?: Schema$BackupContext; /** - * This is always *sql#replicaConfiguration*. + * 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**. */ - kind?: string | null; + endTime?: string | null; /** - * 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. + * If errors occurred during processing of this operation, this field will be populated. */ - mysqlReplicaConfiguration?: Schema$MySqlReplicaConfiguration; - } - /** - * Database instance settings. - */ - export interface Schema$Settings { + error?: Schema$OperationErrors; /** - * 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. + * The context for export operation, if applicable. */ - activationPolicy?: string | null; + exportContext?: Schema$ExportContext; /** - * Active Directory configuration, relevant only for Cloud SQL for SQL Server. + * The context for import operation, if applicable. */ - activeDirectoryConfig?: Schema$SqlActiveDirectoryConfig; + importContext?: Schema$ImportContext; /** - * 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](/sql/docs/postgres/high-availability). + * 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**. */ - availabilityType?: string | null; + insertTime?: string | null; /** - * The daily backup configuration for the instance. + * This is always **sql#operation**. */ - backupConfiguration?: Schema$BackupConfiguration; + kind?: string | null; /** - * The name of server Instance collation. + * An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. */ - collation?: string | null; + name?: string | null; /** - * 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. + * 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** */ - crashSafeReplicationEnabled?: boolean | null; + operationType?: string | null; /** - * The database flags passed to the instance at startup. + * The URI of this resource. */ - databaseFlags?: Schema$DatabaseFlags[]; + selfLink?: string | null; /** - * Configuration specific to read replica instances. Indicates whether replication is enabled or not. + * 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**. */ - databaseReplicationEnabled?: boolean | null; + startTime?: string | null; /** - * The size of data disk, in GB. The data disk size minimum is 10GB. + * The status of an operation. Valid values are: **PENDING** **RUNNING** **DONE** **SQL_OPERATION_STATUS_UNSPECIFIED** */ - dataDiskSizeGb?: string | null; + status?: string | null; /** - * The type of data disk: **PD_SSD** (default) or **PD_HDD**. + * Name of the database instance related to this operation. */ - dataDiskType?: string | null; + targetId?: string | null; + targetLink?: string | null; /** - * Deny maintenance periods + * The project ID of the target instance related to this operation. */ - denyMaintenancePeriods?: Schema$DenyMaintenancePeriod[]; + targetProject?: string | null; /** - * Insights configuration, for now relevant only for Postgres. + * The email address of the user who initiated this operation. */ - insightsConfig?: Schema$InsightsConfig; + user?: string | null; + } + /** + * Database instance operation error. + */ + export interface Schema$OperationError { /** - * 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. + * Identifies the specific error that occurred. */ - ipConfiguration?: Schema$IpConfiguration; + code?: string | null; /** - * This is always **sql#settings**. + * This is always **sql#operationError**. */ kind?: string | null; /** - * The location preference settings. This allows the instance to be located as near as possible to Compute Engine zone for better performance. + * Additional information about the error encountered. */ - locationPreference?: Schema$LocationPreference; + message?: string | null; + } + /** + * Database instance operation errors list wrapper. + */ + export interface Schema$OperationErrors { /** - * The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes. + * The list of errors encountered while processing this operation. */ - maintenanceWindow?: Schema$MaintenanceWindow; + errors?: Schema$OperationError[]; /** - * The pricing plan for this instance. This can be either **PER_USE** or **PACKAGE**. Only **PER_USE** is supported for Second Generation instances. + * This is always **sql#operationErrors**. */ - pricingPlan?: string | null; + kind?: string | null; + } + /** + * Operations list response. + */ + export interface Schema$OperationsListResponse { /** - * The type of replication this instance uses. This can be either **ASYNCHRONOUS** or **SYNCHRONOUS**. (Deprecated) This property was only applicable to First Generation instances. + * List of operation resources. */ - replicationType?: string | null; + items?: Schema$Operation[]; /** - * 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. + * This is always *sql#operationsList*. */ - settingsVersion?: string | null; + kind?: string | null; /** - * Configuration to increase storage size automatically. The default value is true. + * The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. */ - storageAutoResize?: boolean | null; + nextPageToken?: string | null; + } + /** + * Read-replica configuration for connecting to the primary instance. + */ + export interface Schema$ReplicaConfiguration { /** - * The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. + * 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. + */ + failoverTarget?: boolean | null; + /** + * This is always *sql#replicaConfiguration*. + */ + kind?: string | null; + /** + * 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. + */ + mysqlReplicaConfiguration?: Schema$MySqlReplicaConfiguration; + } + export interface Schema$Reschedule { + /** + * Required. The type of the reschedule. + */ + rescheduleType?: string | null; + /** + * Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. + */ + scheduleTime?: string | null; + } + /** + * Database instance restore from backup context. Backup context contains source instance id and project id. + */ + export interface Schema$RestoreBackupContext { + /** + * The ID of the backup run to restore from. + */ + backupRunId?: string | null; + /** + * The ID of the instance that the backup was taken from. + */ + instanceId?: string | null; + /** + * This is always *sql#restoreBackupContext*. + */ + kind?: string | null; + /** + * The full project ID of the source instance. + */ + project?: string | null; + } + /** + * Instance rotate server CA context. + */ + export interface Schema$RotateServerCaContext { + /** + * This is always *sql#rotateServerCaContext*. + */ + kind?: string | null; + /** + * The fingerprint of the next version to be rotated to. If left unspecified, will be rotated to the most recently added server CA version. + */ + nextVersion?: string | null; + } + /** + * Database instance settings. + */ + export interface Schema$Settings { + /** + * 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. + */ + activationPolicy?: string | null; + /** + * Active Directory configuration, relevant only for Cloud SQL for SQL Server. + */ + activeDirectoryConfig?: Schema$SqlActiveDirectoryConfig; + /** + * The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only. + */ + authorizedGaeApplications?: string[] | null; + /** + * 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). + */ + availabilityType?: string | null; + /** + * The daily backup configuration for the instance. + */ + backupConfiguration?: Schema$BackupConfiguration; + /** + * The name of server Instance collation. + */ + collation?: string | null; + /** + * 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. + */ + crashSafeReplicationEnabled?: boolean | null; + /** + * The database flags passed to the instance at startup. + */ + databaseFlags?: Schema$DatabaseFlags[]; + /** + * Configuration specific to read replica instances. Indicates whether replication is enabled or not. + */ + databaseReplicationEnabled?: boolean | null; + /** + * The size of data disk, in GB. The data disk size minimum is 10GB. + */ + dataDiskSizeGb?: string | null; + /** + * The type of data disk: **PD_SSD** (default) or **PD_HDD**. + */ + dataDiskType?: string | null; + /** + * Deny maintenance periods + */ + denyMaintenancePeriods?: Schema$DenyMaintenancePeriod[]; + /** + * Insights configuration, for now relevant only for Postgres. + */ + insightsConfig?: Schema$InsightsConfig; + /** + * 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?: Schema$IpConfiguration; + /** + * This is always **sql#settings**. + */ + kind?: string | null; + /** + * The location preference settings. This allows the instance to be located as near as possible to Compute Engine zone for better performance. + */ + locationPreference?: Schema$LocationPreference; + /** + * The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes. + */ + maintenanceWindow?: Schema$MaintenanceWindow; + /** + * The pricing plan for this instance. This can be either **PER_USE** or **PACKAGE**. Only **PER_USE** is supported for Second Generation instances. + */ + pricingPlan?: string | null; + /** + * The type of replication this instance uses. This can be either **ASYNCHRONOUS** or **SYNCHRONOUS**. (Deprecated) This property was only applicable to First Generation instances. + */ + replicationType?: string | null; + /** + * 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. + */ + settingsVersion?: string | null; + /** + * Configuration to increase storage size automatically. The default value is true. + */ + storageAutoResize?: boolean | null; + /** + * The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. */ storageAutoResizeLimit?: string | null; /** @@ -816,111 +1456,7822 @@ export namespace sqladmin_v1 { /** * User-provided labels, represented as a dictionary where each label is a single key value pair. */ - userLabels?: {[key: string]: string} | null; + userLabels?: {[key: string]: string} | null; + } + /** + * Active Directory configuration, relevant only for Cloud SQL for SQL Server. + */ + export interface Schema$SqlActiveDirectoryConfig { + /** + * The name of the domain (e.g., mydomain.com). + */ + domain?: string | null; + /** + * This is always sql#activeDirectoryConfig. + */ + kind?: string | null; + } + /** + * External primary instance migration setting error. + */ + export interface Schema$SqlExternalSyncSettingError { + /** + * Additional information about the error encountered. + */ + detail?: string | null; + /** + * Can be *sql#externalSyncSettingError* or *sql#externalSyncSettingWarning*. + */ + kind?: string | null; + /** + * Identifies the specific error that occurred. + */ + type?: string | null; + } + /** + * Reschedule options for maintenance windows. + */ + export interface Schema$SqlInstancesRescheduleMaintenanceRequestBody { + /** + * Required. The type of the reschedule the user wants. + */ + reschedule?: Schema$Reschedule; + } + /** + * Instance start external sync request. + */ + export interface Schema$SqlInstancesStartExternalSyncRequest { + /** + * MySQL-specific settings for start external sync. + */ + mysqlSyncConfig?: Schema$MySqlSyncConfig; + /** + * Whether to skip the verification step (VESS). + */ + skipVerification?: boolean | null; + /** + * External sync mode. + */ + syncMode?: string | null; + } + /** + * Instance verify external sync settings request. + */ + export interface Schema$SqlInstancesVerifyExternalSyncSettingsRequest { + /** + * Optional. MySQL-specific settings for start external sync. + */ + mysqlSyncConfig?: Schema$MySqlSyncConfig; + /** + * External sync mode + */ + syncMode?: string | null; + /** + * Flag to enable verifying connection only + */ + verifyConnectionOnly?: boolean | null; + } + /** + * Instance verify external sync settings response. + */ + export interface Schema$SqlInstancesVerifyExternalSyncSettingsResponse { + /** + * List of migration violations. + */ + errors?: Schema$SqlExternalSyncSettingError[]; + /** + * This is always *sql#migrationSettingErrorList*. + */ + kind?: string | null; + /** + * List of migration warnings. + */ + warnings?: Schema$SqlExternalSyncSettingError[]; + } + /** + * This message wraps up the information written by out-of-disk detection job. + */ + export interface Schema$SqlOutOfDiskReport { + /** + * The minimum recommended increase size in GigaBytes This field is consumed by the frontend Writers: -- the proactive database wellness job for OOD. Readers: -- the Pantheon frontend + */ + sqlMinRecommendedIncreaseSizeGb?: number | null; + /** + * 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 Pantheon frontend -- the proactive database wellness job + */ + sqlOutOfDiskState?: string | null; + } + /** + * Any scheduled maintenancce for this instance. + */ + export interface Schema$SqlScheduledMaintenance { + canDefer?: boolean | null; + /** + * If the scheduled maintenance can be rescheduled. + */ + canReschedule?: boolean | null; + /** + * Maintenance cannot be rescheduled to start beyond this deadline. + */ + scheduleDeadlineTime?: string | null; + /** + * The start time of any upcoming scheduled maintenance for this instance. + */ + startTime?: string | null; + } + /** + * Represents a Sql Server database on the Cloud SQL instance. + */ + export interface Schema$SqlServerDatabaseDetails { + /** + * The version of SQL Server with which the database is to be made compatible + */ + compatibilityLevel?: number | null; + /** + * The recovery model of a SQL Server database + */ + recoveryModel?: string | null; + } + /** + * Represents a Sql Server user on the Cloud SQL instance. + */ + export interface Schema$SqlServerUserDetails { + /** + * If the user has been disabled + */ + disabled?: boolean | null; + /** + * The server roles for this user + */ + serverRoles?: string[] | null; + } + /** + * SslCerts Resource + */ + export interface Schema$SslCert { + /** + * PEM representation. + */ + cert?: string | null; + /** + * Serial number, as extracted from the certificate. + */ + certSerialNumber?: string | null; + /** + * User supplied name. Constrained to [a-zA-Z.-_ ]+. + */ + commonName?: string | null; + /** + * 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** + */ + createTime?: string | null; + /** + * The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. + */ + expirationTime?: string | null; + /** + * Name of the database instance. + */ + instance?: string | null; + /** + * This is always sql#sslCert. + */ + kind?: string | null; + /** + * The URI of this resource. + */ + selfLink?: string | null; + /** + * Sha1 Fingerprint. + */ + sha1Fingerprint?: string | null; + } + /** + * SslCertDetail. + */ + export interface Schema$SslCertDetail { + /** + * The public information about the cert. + */ + certInfo?: Schema$SslCert; + /** + * The private key for the client cert, in pem format. Keep private in order to protect your security. + */ + certPrivateKey?: string | null; + } + /** + * SslCerts create ephemeral certificate request. + */ + export interface Schema$SslCertsCreateEphemeralRequest { + /** + * Access token to include in the signed certificate. + */ + access_token?: string | null; + /** + * PEM encoded public key to include in the signed certificate. + */ + public_key?: string | null; + } + /** + * SslCerts insert request. + */ + export interface Schema$SslCertsInsertRequest { + /** + * User supplied name. Must be a distinct name from the other certificates for this instance. + */ + commonName?: string | null; + } + /** + * SslCert insert response. + */ + export interface Schema$SslCertsInsertResponse { + /** + * The new client certificate and private key. + */ + clientCert?: Schema$SslCertDetail; + /** + * This is always *sql#sslCertsInsert*. + */ + kind?: string | null; + /** + * The operation to track the ssl certs insert request. + */ + operation?: Schema$Operation; + /** + * 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. + */ + serverCaCert?: Schema$SslCert; + } + /** + * SslCerts list response. + */ + export interface Schema$SslCertsListResponse { + /** + * List of client certificates for the instance. + */ + items?: Schema$SslCert[]; + /** + * This is always *sql#sslCertsList*. + */ + kind?: string | null; + } + /** + * A Google Cloud SQL service tier resource. + */ + export interface Schema$Tier { + /** + * The maximum disk size of this tier in bytes. + */ + DiskQuota?: string | null; + /** + * This is always *sql#tier*. + */ + kind?: string | null; + /** + * The maximum RAM usage of this tier in bytes. + */ + RAM?: string | null; + /** + * The applicable regions for this tier. + */ + region?: string[] | null; + /** + * An identifier for the machine type, for example, db-custom-1-3840. For related information, see Pricing. + */ + tier?: string | null; + } + /** + * Tiers list response. + */ + export interface Schema$TiersListResponse { + /** + * List of tiers. + */ + items?: Schema$Tier[]; + /** + * This is always *sql#tiersList*. + */ + kind?: string | null; + } + /** + * Database Instance truncate log context. + */ + export interface Schema$TruncateLogContext { + /** + * This is always *sql#truncateLogContext*. + */ + kind?: string | null; + /** + * The type of log to truncate. Valid values are *MYSQL_GENERAL_TABLE* and *MYSQL_SLOW_TABLE*. + */ + logType?: string | null; + } + /** + * A Cloud SQL user resource. + */ + export interface Schema$User { + /** + * This field is deprecated and will be removed from a future version of the API. + */ + etag?: string | null; + /** + * The host name 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. + */ + host?: string | null; + /** + * The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for *update* since it is already specified on the URL. + */ + instance?: string | null; + /** + * This is always *sql#user*. + */ + kind?: string | null; + /** + * The name of the user in the Cloud SQL instance. Can be omitted for *update* since it is already specified in the URL. + */ + name?: string | null; + /** + * The password for the user. + */ + password?: string | null; + /** + * The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for *update* since it is already specified on the URL. + */ + project?: string | null; + sqlserverUserDetails?: Schema$SqlServerUserDetails; + /** + * The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type. + */ + type?: string | null; + } + /** + * User list response. + */ + export interface Schema$UsersListResponse { + /** + * List of user resources in the instance. + */ + items?: Schema$User[]; + /** + * This is always *sql#usersList*. + */ + kind?: string | null; + /** + * An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. + */ + nextPageToken?: string | null; + } + + export class Resource$Backupruns { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Deletes the backup taken by a backup run. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.backupRuns.delete({ + * // The ID of the backup run to delete. To find a backup run ID, use the list method. + * id: 'placeholder-value', + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Backupruns$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Backupruns$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Backupruns$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Backupruns$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Backupruns$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Backupruns$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Backupruns$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Backupruns$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/backupRuns/{id}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['project', 'instance', 'id'], + pathParams: ['id', 'instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves a resource containing information about a backup run. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.backupRuns.get({ + * // The ID of this backup run. + * id: 'placeholder-value', + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupKind": "my_backupKind", + * // "description": "my_description", + * // "diskEncryptionConfiguration": {}, + * // "diskEncryptionStatus": {}, + * // "endTime": "my_endTime", + * // "enqueuedTime": "my_enqueuedTime", + * // "error": {}, + * // "id": "my_id", + * // "instance": "my_instance", + * // "kind": "my_kind", + * // "location": "my_location", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "type": "my_type", + * // "windowStartTime": "my_windowStartTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Backupruns$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Backupruns$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Backupruns$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Backupruns$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Backupruns$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Backupruns$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Backupruns$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Backupruns$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/backupRuns/{id}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'instance', 'id'], + pathParams: ['id', 'instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Creates a new backup run on demand. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.backupRuns.insert({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "backupKind": "my_backupKind", + * // "description": "my_description", + * // "diskEncryptionConfiguration": {}, + * // "diskEncryptionStatus": {}, + * // "endTime": "my_endTime", + * // "enqueuedTime": "my_enqueuedTime", + * // "error": {}, + * // "id": "my_id", + * // "instance": "my_instance", + * // "kind": "my_kind", + * // "location": "my_location", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "type": "my_type", + * // "windowStartTime": "my_windowStartTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + insert( + params: Params$Resource$Backupruns$Insert, + options: StreamMethodOptions + ): GaxiosPromise; + insert( + params?: Params$Resource$Backupruns$Insert, + options?: MethodOptions + ): GaxiosPromise; + insert( + params: Params$Resource$Backupruns$Insert, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Backupruns$Insert, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Backupruns$Insert, + callback: BodyResponseCallback + ): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: + | Params$Resource$Backupruns$Insert + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Backupruns$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Backupruns$Insert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/instances/{instance}/backupRuns' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists all backup runs associated with the project or a given instance and configuration in the reverse chronological order of the backup initiation time. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.backupRuns.list({ + * // Cloud SQL instance ID, or "-" for all instances. This does not include the project ID. + * instance: 'placeholder-value', + * // Maximum number of backup runs per response. + * maxResults: 'placeholder-value', + * // A previously-returned page token representing part of the larger set of results to view. + * pageToken: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "items": [], + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Backupruns$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Backupruns$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Backupruns$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Backupruns$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Backupruns$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Backupruns$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Backupruns$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Backupruns$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/instances/{instance}/backupRuns' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Backupruns$Delete + extends StandardParameters { + /** + * The ID of the backup run to delete. To find a backup run ID, use the list method. + */ + id?: string; + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + } + export interface Params$Resource$Backupruns$Get extends StandardParameters { + /** + * The ID of this backup run. + */ + id?: string; + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + } + export interface Params$Resource$Backupruns$Insert + extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BackupRun; + } + export interface Params$Resource$Backupruns$List extends StandardParameters { + /** + * Cloud SQL instance ID, or "-" for all instances. This does not include the project ID. + */ + instance?: string; + /** + * Maximum number of backup runs per response. + */ + maxResults?: number; + /** + * A previously-returned page token representing part of the larger set of results to view. + */ + pageToken?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + } + + export class Resource$Connect { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.connect.generateEphemeral({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "access_token": "my_access_token", + * // "public_key": "my_public_key", + * // "readTime": "my_readTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "ephemeralCert": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + generateEphemeralCert( + params: Params$Resource$Connect$Generateephemeralcert, + options: StreamMethodOptions + ): GaxiosPromise; + generateEphemeralCert( + params?: Params$Resource$Connect$Generateephemeralcert, + options?: MethodOptions + ): GaxiosPromise; + generateEphemeralCert( + params: Params$Resource$Connect$Generateephemeralcert, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + generateEphemeralCert( + params: Params$Resource$Connect$Generateephemeralcert, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + generateEphemeralCert( + params: Params$Resource$Connect$Generateephemeralcert, + callback: BodyResponseCallback + ): void; + generateEphemeralCert( + callback: BodyResponseCallback + ): void; + generateEphemeralCert( + paramsOrCallback?: + | Params$Resource$Connect$Generateephemeralcert + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Connect$Generateephemeralcert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Connect$Generateephemeralcert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}:generateEphemeralCert' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Retrieves connect settings about a Cloud SQL instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.connect.get({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * // Optional. Optional snapshot read timestamp to trade freshness for performance. + * readTime: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backendType": "my_backendType", + * // "databaseVersion": "my_databaseVersion", + * // "ipAddresses": [], + * // "kind": "my_kind", + * // "serverCaCert": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Connect$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Connect$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Connect$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Connect$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Connect$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Connect$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Connect$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Connect$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/connectSettings' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Connect$Generateephemeralcert + extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GenerateEphemeralCertRequest; + } + export interface Params$Resource$Connect$Get extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + /** + * Optional. Optional snapshot read timestamp to trade freshness for performance. + */ + readTime?: string; + } + + export class Resource$Databases { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Deletes a database from a Cloud SQL instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.databases.delete({ + * // Name of the database to be deleted in the instance. + * database: 'placeholder-value', + * // Database instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Databases$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Databases$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Databases$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Databases$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Databases$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Databases$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Databases$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Databases$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/databases/{database}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['project', 'instance', 'database'], + pathParams: ['database', 'instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves a resource containing information about a database inside a Cloud SQL instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.databases.get({ + * // Name of the database in the instance. + * database: 'placeholder-value', + * // Database instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "charset": "my_charset", + * // "collation": "my_collation", + * // "etag": "my_etag", + * // "instance": "my_instance", + * // "kind": "my_kind", + * // "name": "my_name", + * // "project": "my_project", + * // "selfLink": "my_selfLink", + * // "sqlserverDatabaseDetails": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Databases$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Databases$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Databases$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Databases$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Databases$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Databases$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Databases$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Databases$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/databases/{database}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'instance', 'database'], + pathParams: ['database', 'instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Inserts a resource containing information about a database inside a Cloud SQL instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.databases.insert({ + * // Database instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "charset": "my_charset", + * // "collation": "my_collation", + * // "etag": "my_etag", + * // "instance": "my_instance", + * // "kind": "my_kind", + * // "name": "my_name", + * // "project": "my_project", + * // "selfLink": "my_selfLink", + * // "sqlserverDatabaseDetails": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + insert( + params: Params$Resource$Databases$Insert, + options: StreamMethodOptions + ): GaxiosPromise; + insert( + params?: Params$Resource$Databases$Insert, + options?: MethodOptions + ): GaxiosPromise; + insert( + params: Params$Resource$Databases$Insert, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Databases$Insert, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Databases$Insert, + callback: BodyResponseCallback + ): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: + | Params$Resource$Databases$Insert + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Databases$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Databases$Insert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/instances/{instance}/databases' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists databases in the specified Cloud SQL instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.databases.list({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "items": [], + * // "kind": "my_kind" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Databases$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Databases$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Databases$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Databases$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Databases$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Databases$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Databases$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Databases$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/instances/{instance}/databases' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.databases.patch({ + * // Name of the database to be updated in the instance. + * database: 'placeholder-value', + * // Database instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "charset": "my_charset", + * // "collation": "my_collation", + * // "etag": "my_etag", + * // "instance": "my_instance", + * // "kind": "my_kind", + * // "name": "my_name", + * // "project": "my_project", + * // "selfLink": "my_selfLink", + * // "sqlserverDatabaseDetails": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Databases$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Databases$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Databases$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Databases$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Databases$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Databases$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Databases$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Databases$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/databases/{database}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['project', 'instance', 'database'], + pathParams: ['database', 'instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates a resource containing information about a database inside a Cloud SQL instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.databases.update({ + * // Name of the database to be updated in the instance. + * database: 'placeholder-value', + * // Database instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "charset": "my_charset", + * // "collation": "my_collation", + * // "etag": "my_etag", + * // "instance": "my_instance", + * // "kind": "my_kind", + * // "name": "my_name", + * // "project": "my_project", + * // "selfLink": "my_selfLink", + * // "sqlserverDatabaseDetails": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + update( + params: Params$Resource$Databases$Update, + options: StreamMethodOptions + ): GaxiosPromise; + update( + params?: Params$Resource$Databases$Update, + options?: MethodOptions + ): GaxiosPromise; + update( + params: Params$Resource$Databases$Update, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + update( + params: Params$Resource$Databases$Update, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + update( + params: Params$Resource$Databases$Update, + callback: BodyResponseCallback + ): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: + | Params$Resource$Databases$Update + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Databases$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Databases$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/databases/{database}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT', + }, + options + ), + params, + requiredParams: ['project', 'instance', 'database'], + pathParams: ['database', 'instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Databases$Delete extends StandardParameters { + /** + * Name of the database to be deleted in the instance. + */ + database?: string; + /** + * Database instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + } + export interface Params$Resource$Databases$Get extends StandardParameters { + /** + * Name of the database in the instance. + */ + database?: string; + /** + * Database instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + } + export interface Params$Resource$Databases$Insert extends StandardParameters { + /** + * Database instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Database; + } + export interface Params$Resource$Databases$List extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + } + export interface Params$Resource$Databases$Patch extends StandardParameters { + /** + * Name of the database to be updated in the instance. + */ + database?: string; + /** + * Database instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Database; + } + export interface Params$Resource$Databases$Update extends StandardParameters { + /** + * Name of the database to be updated in the instance. + */ + database?: string; + /** + * Database instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Database; + } + + export class Resource$Flags { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Lists all available database flags for Cloud SQL instances. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.flags.list({ + * // Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions. + * databaseVersion: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "items": [], + * // "kind": "my_kind" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Flags$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Flags$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Flags$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Flags$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Flags$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Flags$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Flags$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Flags$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/flags').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Flags$List extends StandardParameters { + /** + * Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions. + */ + databaseVersion?: string; + } + + export class Resource$Instances { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Adds a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.addServerCa({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + addServerCa( + params: Params$Resource$Instances$Addserverca, + options: StreamMethodOptions + ): GaxiosPromise; + addServerCa( + params?: Params$Resource$Instances$Addserverca, + options?: MethodOptions + ): GaxiosPromise; + addServerCa( + params: Params$Resource$Instances$Addserverca, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + addServerCa( + params: Params$Resource$Instances$Addserverca, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + addServerCa( + params: Params$Resource$Instances$Addserverca, + callback: BodyResponseCallback + ): void; + addServerCa(callback: BodyResponseCallback): void; + addServerCa( + paramsOrCallback?: + | Params$Resource$Instances$Addserverca + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Addserverca; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Addserverca; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/addServerCa' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.clone({ + * // The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the source as well as the clone Cloud SQL instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "cloneContext": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + clone( + params: Params$Resource$Instances$Clone, + options: StreamMethodOptions + ): GaxiosPromise; + clone( + params?: Params$Resource$Instances$Clone, + options?: MethodOptions + ): GaxiosPromise; + clone( + params: Params$Resource$Instances$Clone, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + clone( + params: Params$Resource$Instances$Clone, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + clone( + params: Params$Resource$Instances$Clone, + callback: BodyResponseCallback + ): void; + clone(callback: BodyResponseCallback): void; + clone( + paramsOrCallback?: + | Params$Resource$Instances$Clone + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Instances$Clone; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Clone; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/instances/{instance}/clone' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes a Cloud SQL instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.delete({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance to be deleted. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Instances$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Instances$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Instances$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Instances$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Instances$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Instances$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Instances$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/instances/{instance}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.demoteMaster({ + * // Cloud SQL instance name. + * instance: 'placeholder-value', + * // ID of the project that contains the instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "demoteMasterContext": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + demoteMaster( + params: Params$Resource$Instances$Demotemaster, + options: StreamMethodOptions + ): GaxiosPromise; + demoteMaster( + params?: Params$Resource$Instances$Demotemaster, + options?: MethodOptions + ): GaxiosPromise; + demoteMaster( + params: Params$Resource$Instances$Demotemaster, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + demoteMaster( + params: Params$Resource$Instances$Demotemaster, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + demoteMaster( + params: Params$Resource$Instances$Demotemaster, + callback: BodyResponseCallback + ): void; + demoteMaster(callback: BodyResponseCallback): void; + demoteMaster( + paramsOrCallback?: + | Params$Resource$Instances$Demotemaster + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Demotemaster; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Demotemaster; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/demoteMaster' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.export({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance to be exported. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "exportContext": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + export( + params: Params$Resource$Instances$Export, + options: StreamMethodOptions + ): GaxiosPromise; + export( + params?: Params$Resource$Instances$Export, + options?: MethodOptions + ): GaxiosPromise; + export( + params: Params$Resource$Instances$Export, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + export( + params: Params$Resource$Instances$Export, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + export( + params: Params$Resource$Instances$Export, + callback: BodyResponseCallback + ): void; + export(callback: BodyResponseCallback): void; + export( + paramsOrCallback?: + | Params$Resource$Instances$Export + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Instances$Export; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Export; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/instances/{instance}/export' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the Overview of high availability page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.failover({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // ID of the project that contains the read replica. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "failoverContext": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + failover( + params: Params$Resource$Instances$Failover, + options: StreamMethodOptions + ): GaxiosPromise; + failover( + params?: Params$Resource$Instances$Failover, + options?: MethodOptions + ): GaxiosPromise; + failover( + params: Params$Resource$Instances$Failover, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + failover( + params: Params$Resource$Instances$Failover, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + failover( + params: Params$Resource$Instances$Failover, + callback: BodyResponseCallback + ): void; + failover(callback: BodyResponseCallback): void; + failover( + paramsOrCallback?: + | Params$Resource$Instances$Failover + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Failover; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Failover; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/instances/{instance}/failover' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves a resource containing information about a Cloud SQL instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.get({ + * // Database instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backendType": "my_backendType", + * // "connectionName": "my_connectionName", + * // "currentDiskSize": "my_currentDiskSize", + * // "databaseVersion": "my_databaseVersion", + * // "diskEncryptionConfiguration": {}, + * // "diskEncryptionStatus": {}, + * // "etag": "my_etag", + * // "failoverReplica": {}, + * // "gceZone": "my_gceZone", + * // "instanceType": "my_instanceType", + * // "ipAddresses": [], + * // "ipv6Address": "my_ipv6Address", + * // "kind": "my_kind", + * // "masterInstanceName": "my_masterInstanceName", + * // "maxDiskSize": "my_maxDiskSize", + * // "name": "my_name", + * // "onPremisesConfiguration": {}, + * // "outOfDiskReport": {}, + * // "project": "my_project", + * // "region": "my_region", + * // "replicaConfiguration": {}, + * // "replicaNames": [], + * // "rootPassword": "my_rootPassword", + * // "satisfiesPzs": false, + * // "scheduledMaintenance": {}, + * // "secondaryGceZone": "my_secondaryGceZone", + * // "selfLink": "my_selfLink", + * // "serverCaCert": {}, + * // "serviceAccountEmailAddress": "my_serviceAccountEmailAddress", + * // "settings": {}, + * // "state": "my_state", + * // "suspensionReason": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Instances$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Instances$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Instances$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Instances$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Instances$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Instances$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Instances$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/instances/{instance}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.import({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "importContext": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + import( + params: Params$Resource$Instances$Import, + options: StreamMethodOptions + ): GaxiosPromise; + import( + params?: Params$Resource$Instances$Import, + options?: MethodOptions + ): GaxiosPromise; + import( + params: Params$Resource$Instances$Import, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + import( + params: Params$Resource$Instances$Import, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + import( + params: Params$Resource$Instances$Import, + callback: BodyResponseCallback + ): void; + import(callback: BodyResponseCallback): void; + import( + paramsOrCallback?: + | Params$Resource$Instances$Import + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Instances$Import; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Import; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/instances/{instance}/import' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Creates a new Cloud SQL instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.insert({ + * // Project ID of the project to which the newly created Cloud SQL instances should belong. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "backendType": "my_backendType", + * // "connectionName": "my_connectionName", + * // "currentDiskSize": "my_currentDiskSize", + * // "databaseVersion": "my_databaseVersion", + * // "diskEncryptionConfiguration": {}, + * // "diskEncryptionStatus": {}, + * // "etag": "my_etag", + * // "failoverReplica": {}, + * // "gceZone": "my_gceZone", + * // "instanceType": "my_instanceType", + * // "ipAddresses": [], + * // "ipv6Address": "my_ipv6Address", + * // "kind": "my_kind", + * // "masterInstanceName": "my_masterInstanceName", + * // "maxDiskSize": "my_maxDiskSize", + * // "name": "my_name", + * // "onPremisesConfiguration": {}, + * // "outOfDiskReport": {}, + * // "project": "my_project", + * // "region": "my_region", + * // "replicaConfiguration": {}, + * // "replicaNames": [], + * // "rootPassword": "my_rootPassword", + * // "satisfiesPzs": false, + * // "scheduledMaintenance": {}, + * // "secondaryGceZone": "my_secondaryGceZone", + * // "selfLink": "my_selfLink", + * // "serverCaCert": {}, + * // "serviceAccountEmailAddress": "my_serviceAccountEmailAddress", + * // "settings": {}, + * // "state": "my_state", + * // "suspensionReason": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + insert( + params: Params$Resource$Instances$Insert, + options: StreamMethodOptions + ): GaxiosPromise; + insert( + params?: Params$Resource$Instances$Insert, + options?: MethodOptions + ): GaxiosPromise; + insert( + params: Params$Resource$Instances$Insert, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Instances$Insert, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Instances$Insert, + callback: BodyResponseCallback + ): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: + | Params$Resource$Instances$Insert + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Instances$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Insert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/projects/{project}/instances').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project'], + pathParams: ['project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists instances under a given project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.list({ + * // A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. + * filter: 'placeholder-value', + * // The maximum number of results to return per response. + * maxResults: 'placeholder-value', + * // A previously-returned page token representing part of the larger set of results to view. + * pageToken: 'placeholder-value', + * // Project ID of the project for which to list Cloud SQL instances. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "items": [], + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken", + * // "warnings": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Instances$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Instances$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Instances$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Instances$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Instances$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Instances$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Instances$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/projects/{project}/instances').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project'], + pathParams: ['project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.listServerCas({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "activeVersion": "my_activeVersion", + * // "certs": [], + * // "kind": "my_kind" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + listServerCas( + params: Params$Resource$Instances$Listservercas, + options: StreamMethodOptions + ): GaxiosPromise; + listServerCas( + params?: Params$Resource$Instances$Listservercas, + options?: MethodOptions + ): GaxiosPromise; + listServerCas( + params: Params$Resource$Instances$Listservercas, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + listServerCas( + params: Params$Resource$Instances$Listservercas, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + listServerCas( + params: Params$Resource$Instances$Listservercas, + callback: BodyResponseCallback + ): void; + listServerCas( + callback: BodyResponseCallback + ): void; + listServerCas( + paramsOrCallback?: + | Params$Resource$Instances$Listservercas + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Listservercas; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Listservercas; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/listServerCas' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates settings of a Cloud SQL instance. This method supports patch semantics. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.patch({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "backendType": "my_backendType", + * // "connectionName": "my_connectionName", + * // "currentDiskSize": "my_currentDiskSize", + * // "databaseVersion": "my_databaseVersion", + * // "diskEncryptionConfiguration": {}, + * // "diskEncryptionStatus": {}, + * // "etag": "my_etag", + * // "failoverReplica": {}, + * // "gceZone": "my_gceZone", + * // "instanceType": "my_instanceType", + * // "ipAddresses": [], + * // "ipv6Address": "my_ipv6Address", + * // "kind": "my_kind", + * // "masterInstanceName": "my_masterInstanceName", + * // "maxDiskSize": "my_maxDiskSize", + * // "name": "my_name", + * // "onPremisesConfiguration": {}, + * // "outOfDiskReport": {}, + * // "project": "my_project", + * // "region": "my_region", + * // "replicaConfiguration": {}, + * // "replicaNames": [], + * // "rootPassword": "my_rootPassword", + * // "satisfiesPzs": false, + * // "scheduledMaintenance": {}, + * // "secondaryGceZone": "my_secondaryGceZone", + * // "selfLink": "my_selfLink", + * // "serverCaCert": {}, + * // "serviceAccountEmailAddress": "my_serviceAccountEmailAddress", + * // "settings": {}, + * // "state": "my_state", + * // "suspensionReason": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Instances$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Instances$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Instances$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Instances$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Instances$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Instances$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Instances$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/instances/{instance}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.promoteReplica({ + * // Cloud SQL read replica instance name. + * instance: 'placeholder-value', + * // ID of the project that contains the read replica. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + promoteReplica( + params: Params$Resource$Instances$Promotereplica, + options: StreamMethodOptions + ): GaxiosPromise; + promoteReplica( + params?: Params$Resource$Instances$Promotereplica, + options?: MethodOptions + ): GaxiosPromise; + promoteReplica( + params: Params$Resource$Instances$Promotereplica, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + promoteReplica( + params: Params$Resource$Instances$Promotereplica, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + promoteReplica( + params: Params$Resource$Instances$Promotereplica, + callback: BodyResponseCallback + ): void; + promoteReplica(callback: BodyResponseCallback): void; + promoteReplica( + paramsOrCallback?: + | Params$Resource$Instances$Promotereplica + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Promotereplica; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Promotereplica; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/promoteReplica' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes all client certificates and generates a new server SSL certificate for the instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.resetSslConfig({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + resetSslConfig( + params: Params$Resource$Instances$Resetsslconfig, + options: StreamMethodOptions + ): GaxiosPromise; + resetSslConfig( + params?: Params$Resource$Instances$Resetsslconfig, + options?: MethodOptions + ): GaxiosPromise; + resetSslConfig( + params: Params$Resource$Instances$Resetsslconfig, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + resetSslConfig( + params: Params$Resource$Instances$Resetsslconfig, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + resetSslConfig( + params: Params$Resource$Instances$Resetsslconfig, + callback: BodyResponseCallback + ): void; + resetSslConfig(callback: BodyResponseCallback): void; + resetSslConfig( + paramsOrCallback?: + | Params$Resource$Instances$Resetsslconfig + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Resetsslconfig; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Resetsslconfig; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/resetSslConfig' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Restarts a Cloud SQL instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.restart({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance to be restarted. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + restart( + params: Params$Resource$Instances$Restart, + options: StreamMethodOptions + ): GaxiosPromise; + restart( + params?: Params$Resource$Instances$Restart, + options?: MethodOptions + ): GaxiosPromise; + restart( + params: Params$Resource$Instances$Restart, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + restart( + params: Params$Resource$Instances$Restart, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + restart( + params: Params$Resource$Instances$Restart, + callback: BodyResponseCallback + ): void; + restart(callback: BodyResponseCallback): void; + restart( + paramsOrCallback?: + | Params$Resource$Instances$Restart + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Restart; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Restart; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/instances/{instance}/restart' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.restoreBackup({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "restoreBackupContext": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + restoreBackup( + params: Params$Resource$Instances$Restorebackup, + options: StreamMethodOptions + ): GaxiosPromise; + restoreBackup( + params?: Params$Resource$Instances$Restorebackup, + options?: MethodOptions + ): GaxiosPromise; + restoreBackup( + params: Params$Resource$Instances$Restorebackup, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + restoreBackup( + params: Params$Resource$Instances$Restorebackup, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + restoreBackup( + params: Params$Resource$Instances$Restorebackup, + callback: BodyResponseCallback + ): void; + restoreBackup(callback: BodyResponseCallback): void; + restoreBackup( + paramsOrCallback?: + | Params$Resource$Instances$Restorebackup + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Restorebackup; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Restorebackup; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/restoreBackup' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.rotateServerCa({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "rotateServerCaContext": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + rotateServerCa( + params: Params$Resource$Instances$Rotateserverca, + options: StreamMethodOptions + ): GaxiosPromise; + rotateServerCa( + params?: Params$Resource$Instances$Rotateserverca, + options?: MethodOptions + ): GaxiosPromise; + rotateServerCa( + params: Params$Resource$Instances$Rotateserverca, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + rotateServerCa( + params: Params$Resource$Instances$Rotateserverca, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + rotateServerCa( + params: Params$Resource$Instances$Rotateserverca, + callback: BodyResponseCallback + ): void; + rotateServerCa(callback: BodyResponseCallback): void; + rotateServerCa( + paramsOrCallback?: + | Params$Resource$Instances$Rotateserverca + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Rotateserverca; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Rotateserverca; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/rotateServerCa' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Starts the replication in the read replica instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.startReplica({ + * // Cloud SQL read replica instance name. + * instance: 'placeholder-value', + * // ID of the project that contains the read replica. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + startReplica( + params: Params$Resource$Instances$Startreplica, + options: StreamMethodOptions + ): GaxiosPromise; + startReplica( + params?: Params$Resource$Instances$Startreplica, + options?: MethodOptions + ): GaxiosPromise; + startReplica( + params: Params$Resource$Instances$Startreplica, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + startReplica( + params: Params$Resource$Instances$Startreplica, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + startReplica( + params: Params$Resource$Instances$Startreplica, + callback: BodyResponseCallback + ): void; + startReplica(callback: BodyResponseCallback): void; + startReplica( + paramsOrCallback?: + | Params$Resource$Instances$Startreplica + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Startreplica; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Startreplica; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/startReplica' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Stops the replication in the read replica instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.stopReplica({ + * // Cloud SQL read replica instance name. + * instance: 'placeholder-value', + * // ID of the project that contains the read replica. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + stopReplica( + params: Params$Resource$Instances$Stopreplica, + options: StreamMethodOptions + ): GaxiosPromise; + stopReplica( + params?: Params$Resource$Instances$Stopreplica, + options?: MethodOptions + ): GaxiosPromise; + stopReplica( + params: Params$Resource$Instances$Stopreplica, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + stopReplica( + params: Params$Resource$Instances$Stopreplica, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + stopReplica( + params: Params$Resource$Instances$Stopreplica, + callback: BodyResponseCallback + ): void; + stopReplica(callback: BodyResponseCallback): void; + stopReplica( + paramsOrCallback?: + | Params$Resource$Instances$Stopreplica + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Stopreplica; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Stopreplica; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/stopReplica' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Truncate MySQL general and slow query log tables MySQL only. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.truncateLog({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the Cloud SQL project. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "truncateLogContext": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + truncateLog( + params: Params$Resource$Instances$Truncatelog, + options: StreamMethodOptions + ): GaxiosPromise; + truncateLog( + params?: Params$Resource$Instances$Truncatelog, + options?: MethodOptions + ): GaxiosPromise; + truncateLog( + params: Params$Resource$Instances$Truncatelog, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + truncateLog( + params: Params$Resource$Instances$Truncatelog, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + truncateLog( + params: Params$Resource$Instances$Truncatelog, + callback: BodyResponseCallback + ): void; + truncateLog(callback: BodyResponseCallback): void; + truncateLog( + paramsOrCallback?: + | Params$Resource$Instances$Truncatelog + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Truncatelog; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Truncatelog; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/truncateLog' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.instances.update({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "backendType": "my_backendType", + * // "connectionName": "my_connectionName", + * // "currentDiskSize": "my_currentDiskSize", + * // "databaseVersion": "my_databaseVersion", + * // "diskEncryptionConfiguration": {}, + * // "diskEncryptionStatus": {}, + * // "etag": "my_etag", + * // "failoverReplica": {}, + * // "gceZone": "my_gceZone", + * // "instanceType": "my_instanceType", + * // "ipAddresses": [], + * // "ipv6Address": "my_ipv6Address", + * // "kind": "my_kind", + * // "masterInstanceName": "my_masterInstanceName", + * // "maxDiskSize": "my_maxDiskSize", + * // "name": "my_name", + * // "onPremisesConfiguration": {}, + * // "outOfDiskReport": {}, + * // "project": "my_project", + * // "region": "my_region", + * // "replicaConfiguration": {}, + * // "replicaNames": [], + * // "rootPassword": "my_rootPassword", + * // "satisfiesPzs": false, + * // "scheduledMaintenance": {}, + * // "secondaryGceZone": "my_secondaryGceZone", + * // "selfLink": "my_selfLink", + * // "serverCaCert": {}, + * // "serviceAccountEmailAddress": "my_serviceAccountEmailAddress", + * // "settings": {}, + * // "state": "my_state", + * // "suspensionReason": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + update( + params: Params$Resource$Instances$Update, + options: StreamMethodOptions + ): GaxiosPromise; + update( + params?: Params$Resource$Instances$Update, + options?: MethodOptions + ): GaxiosPromise; + update( + params: Params$Resource$Instances$Update, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + update( + params: Params$Resource$Instances$Update, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + update( + params: Params$Resource$Instances$Update, + callback: BodyResponseCallback + ): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: + | Params$Resource$Instances$Update + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Instances$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/instances/{instance}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Instances$Addserverca + extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + } + export interface Params$Resource$Instances$Clone extends StandardParameters { + /** + * The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the source as well as the clone Cloud SQL instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesCloneRequest; + } + export interface Params$Resource$Instances$Delete extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance to be deleted. + */ + project?: string; + } + export interface Params$Resource$Instances$Demotemaster + extends StandardParameters { + /** + * Cloud SQL instance name. + */ + instance?: string; + /** + * ID of the project that contains the instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesDemoteMasterRequest; + } + export interface Params$Resource$Instances$Export extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance to be exported. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesExportRequest; + } + export interface Params$Resource$Instances$Failover + extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * ID of the project that contains the read replica. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesFailoverRequest; + } + export interface Params$Resource$Instances$Get extends StandardParameters { + /** + * Database instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + } + export interface Params$Resource$Instances$Import extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesImportRequest; + } + export interface Params$Resource$Instances$Insert extends StandardParameters { + /** + * Project ID of the project to which the newly created Cloud SQL instances should belong. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$DatabaseInstance; + } + export interface Params$Resource$Instances$List extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. + */ + filter?: string; + /** + * The maximum number of results to return per response. + */ + maxResults?: number; + /** + * A previously-returned page token representing part of the larger set of results to view. + */ + pageToken?: string; + /** + * Project ID of the project for which to list Cloud SQL instances. + */ + project?: string; + } + export interface Params$Resource$Instances$Listservercas + extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + } + export interface Params$Resource$Instances$Patch extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$DatabaseInstance; + } + export interface Params$Resource$Instances$Promotereplica + extends StandardParameters { + /** + * Cloud SQL read replica instance name. + */ + instance?: string; + /** + * ID of the project that contains the read replica. + */ + project?: string; + } + export interface Params$Resource$Instances$Resetsslconfig + extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + } + export interface Params$Resource$Instances$Restart + extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance to be restarted. + */ + project?: string; + } + export interface Params$Resource$Instances$Restorebackup + extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesRestoreBackupRequest; + } + export interface Params$Resource$Instances$Rotateserverca + extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesRotateServerCaRequest; + } + export interface Params$Resource$Instances$Startreplica + extends StandardParameters { + /** + * Cloud SQL read replica instance name. + */ + instance?: string; + /** + * ID of the project that contains the read replica. + */ + project?: string; + } + export interface Params$Resource$Instances$Stopreplica + extends StandardParameters { + /** + * Cloud SQL read replica instance name. + */ + instance?: string; + /** + * ID of the project that contains the read replica. + */ + project?: string; + } + export interface Params$Resource$Instances$Truncatelog + extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the Cloud SQL project. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesTruncateLogRequest; + } + export interface Params$Resource$Instances$Update extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$DatabaseInstance; + } + + export class Resource$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Retrieves an instance operation that has been performed on an instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.operations.get({ + * // Instance operation ID. + * operation: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Operations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Operations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Operations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/operations/{operation}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'operation'], + pathParams: ['operation', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.operations.list({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Maximum number of operations per response. + * maxResults: 'placeholder-value', + * // A previously-returned page token representing part of the larger set of results to view. + * pageToken: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "items": [], + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Operations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Operations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Operations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Operations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Operations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Operations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/projects/{project}/operations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project'], + pathParams: ['project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Operations$Get extends StandardParameters { + /** + * Instance operation ID. + */ + operation?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + } + export interface Params$Resource$Operations$List extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Maximum number of operations per response. + */ + maxResults?: number; + /** + * A previously-returned page token representing part of the larger set of results to view. + */ + pageToken?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + } + + export class Resource$Projects { + context: APIRequestContext; + instances: Resource$Projects$Instances; + constructor(context: APIRequestContext) { + this.context = context; + this.instances = new Resource$Projects$Instances(this.context); + } + } + + export class Resource$Projects$Instances { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Reschedules the maintenance on the given instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.projects.instances.rescheduleMaintenance({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // ID of the project that contains the instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "reschedule": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + rescheduleMaintenance( + params: Params$Resource$Projects$Instances$Reschedulemaintenance, + options: StreamMethodOptions + ): GaxiosPromise; + rescheduleMaintenance( + params?: Params$Resource$Projects$Instances$Reschedulemaintenance, + options?: MethodOptions + ): GaxiosPromise; + rescheduleMaintenance( + params: Params$Resource$Projects$Instances$Reschedulemaintenance, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + rescheduleMaintenance( + params: Params$Resource$Projects$Instances$Reschedulemaintenance, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + rescheduleMaintenance( + params: Params$Resource$Projects$Instances$Reschedulemaintenance, + callback: BodyResponseCallback + ): void; + rescheduleMaintenance( + callback: BodyResponseCallback + ): void; + rescheduleMaintenance( + paramsOrCallback?: + | Params$Resource$Projects$Instances$Reschedulemaintenance + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Instances$Reschedulemaintenance; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Reschedulemaintenance; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/rescheduleMaintenance' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Start External primary instance migration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.projects.instances.startExternalSync({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // ID of the project that contains the instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "mysqlSyncConfig": {}, + * // "skipVerification": false, + * // "syncMode": "my_syncMode" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + startExternalSync( + params: Params$Resource$Projects$Instances$Startexternalsync, + options: StreamMethodOptions + ): GaxiosPromise; + startExternalSync( + params?: Params$Resource$Projects$Instances$Startexternalsync, + options?: MethodOptions + ): GaxiosPromise; + startExternalSync( + params: Params$Resource$Projects$Instances$Startexternalsync, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + startExternalSync( + params: Params$Resource$Projects$Instances$Startexternalsync, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + startExternalSync( + params: Params$Resource$Projects$Instances$Startexternalsync, + callback: BodyResponseCallback + ): void; + startExternalSync(callback: BodyResponseCallback): void; + startExternalSync( + paramsOrCallback?: + | Params$Resource$Projects$Instances$Startexternalsync + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Instances$Startexternalsync; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Startexternalsync; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/startExternalSync' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Verify External primary instance external sync settings. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.projects.instances.verifyExternalSyncSettings({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "mysqlSyncConfig": {}, + * // "syncMode": "my_syncMode", + * // "verifyConnectionOnly": false + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "errors": [], + * // "kind": "my_kind", + * // "warnings": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + verifyExternalSyncSettings( + params: Params$Resource$Projects$Instances$Verifyexternalsyncsettings, + options: StreamMethodOptions + ): GaxiosPromise; + verifyExternalSyncSettings( + params?: Params$Resource$Projects$Instances$Verifyexternalsyncsettings, + options?: MethodOptions + ): GaxiosPromise; + verifyExternalSyncSettings( + params: Params$Resource$Projects$Instances$Verifyexternalsyncsettings, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + verifyExternalSyncSettings( + params: Params$Resource$Projects$Instances$Verifyexternalsyncsettings, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + verifyExternalSyncSettings( + params: Params$Resource$Projects$Instances$Verifyexternalsyncsettings, + callback: BodyResponseCallback + ): void; + verifyExternalSyncSettings( + callback: BodyResponseCallback + ): void; + verifyExternalSyncSettings( + paramsOrCallback?: + | Params$Resource$Projects$Instances$Verifyexternalsyncsettings + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Instances$Verifyexternalsyncsettings; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = + {} as Params$Resource$Projects$Instances$Verifyexternalsyncsettings; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Instances$Reschedulemaintenance + extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * ID of the project that contains the instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SqlInstancesRescheduleMaintenanceRequestBody; + } + export interface Params$Resource$Projects$Instances$Startexternalsync + extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * ID of the project that contains the instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SqlInstancesStartExternalSyncRequest; + } + export interface Params$Resource$Projects$Instances$Verifyexternalsyncsettings + extends StandardParameters { + /** + * Cloud SQL instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SqlInstancesVerifyExternalSyncSettingsRequest; + } + + export class Resource$Sslcerts { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.sslCerts.createEphemeral({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the Cloud SQL project. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "access_token": "my_access_token", + * // "public_key": "my_public_key" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "cert": "my_cert", + * // "certSerialNumber": "my_certSerialNumber", + * // "commonName": "my_commonName", + * // "createTime": "my_createTime", + * // "expirationTime": "my_expirationTime", + * // "instance": "my_instance", + * // "kind": "my_kind", + * // "selfLink": "my_selfLink", + * // "sha1Fingerprint": "my_sha1Fingerprint" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + createEphemeral( + params: Params$Resource$Sslcerts$Createephemeral, + options: StreamMethodOptions + ): GaxiosPromise; + createEphemeral( + params?: Params$Resource$Sslcerts$Createephemeral, + options?: MethodOptions + ): GaxiosPromise; + createEphemeral( + params: Params$Resource$Sslcerts$Createephemeral, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + createEphemeral( + params: Params$Resource$Sslcerts$Createephemeral, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + createEphemeral( + params: Params$Resource$Sslcerts$Createephemeral, + callback: BodyResponseCallback + ): void; + createEphemeral(callback: BodyResponseCallback): void; + createEphemeral( + paramsOrCallback?: + | Params$Resource$Sslcerts$Createephemeral + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Sslcerts$Createephemeral; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sslcerts$Createephemeral; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/createEphemeral' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.sslCerts.delete({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * // Sha1 FingerPrint. + * sha1Fingerprint: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Sslcerts$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Sslcerts$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Sslcerts$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Sslcerts$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Sslcerts$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Sslcerts$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Sslcerts$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sslcerts$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['project', 'instance', 'sha1Fingerprint'], + pathParams: ['instance', 'project', 'sha1Fingerprint'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creation. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.sslCerts.get({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * // Sha1 FingerPrint. + * sha1Fingerprint: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "cert": "my_cert", + * // "certSerialNumber": "my_certSerialNumber", + * // "commonName": "my_commonName", + * // "createTime": "my_createTime", + * // "expirationTime": "my_expirationTime", + * // "instance": "my_instance", + * // "kind": "my_kind", + * // "selfLink": "my_selfLink", + * // "sha1Fingerprint": "my_sha1Fingerprint" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Sslcerts$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Sslcerts$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Sslcerts$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Sslcerts$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Sslcerts$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Sslcerts$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Sslcerts$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sslcerts$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'instance', 'sha1Fingerprint'], + pathParams: ['instance', 'project', 'sha1Fingerprint'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.sslCerts.insert({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "commonName": "my_commonName" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientCert": {}, + * // "kind": "my_kind", + * // "operation": {}, + * // "serverCaCert": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + insert( + params: Params$Resource$Sslcerts$Insert, + options: StreamMethodOptions + ): GaxiosPromise; + insert( + params?: Params$Resource$Sslcerts$Insert, + options?: MethodOptions + ): GaxiosPromise; + insert( + params: Params$Resource$Sslcerts$Insert, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Sslcerts$Insert, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Sslcerts$Insert, + callback: BodyResponseCallback + ): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: + | Params$Resource$Sslcerts$Insert + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Sslcerts$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sslcerts$Insert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/instances/{instance}/sslCerts' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists all of the current SSL certificates for the instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const sqladmin = google.sqladmin('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/sqlservice.admin', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.sslCerts.list({ + * // Cloud SQL instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "items": [], + * // "kind": "my_kind" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Sslcerts$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Sslcerts$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Sslcerts$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Sslcerts$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Sslcerts$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Sslcerts$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Sslcerts$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sslcerts$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/projects/{project}/instances/{instance}/sslCerts' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } - /** - * Active Directory configuration, relevant only for Cloud SQL for SQL Server. - */ - export interface Schema$SqlActiveDirectoryConfig { - /** - * The name of the domain (e.g., mydomain.com). - */ - domain?: string | null; + + export interface Params$Resource$Sslcerts$Createephemeral + extends StandardParameters { /** - * This is always sql#activeDirectoryConfig. + * Cloud SQL instance ID. This does not include the project ID. */ - kind?: string | null; - } - /** - * This message wraps up the information written by out-of-disk detection job. - */ - export interface Schema$SqlOutOfDiskReport { + instance?: string; /** - * The minimum recommended increase size in GigaBytes This field is consumed by the frontend Writers: -- the proactive database wellness job for OOD. Readers: -- the Pantheon frontend + * Project ID of the Cloud SQL project. */ - sqlMinRecommendedIncreaseSizeGb?: number | null; + project?: string; + /** - * 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 Pantheon frontend -- the proactive database wellness job + * Request body metadata */ - sqlOutOfDiskState?: string | null; + requestBody?: Schema$SslCertsCreateEphemeralRequest; } - /** - * Any scheduled maintenancce for this instance. - */ - export interface Schema$SqlScheduledMaintenance { - canDefer?: boolean | null; + export interface Params$Resource$Sslcerts$Delete extends StandardParameters { /** - * If the scheduled maintenance can be rescheduled. + * Cloud SQL instance ID. This does not include the project ID. */ - canReschedule?: boolean | null; + instance?: string; /** - * Maintenance cannot be rescheduled to start beyond this deadline. + * Project ID of the project that contains the instance. */ - scheduleDeadlineTime?: string | null; + project?: string; /** - * The start time of any upcoming scheduled maintenance for this instance. + * Sha1 FingerPrint. */ - startTime?: string | null; + sha1Fingerprint?: string; } - /** - * SslCerts Resource - */ - export interface Schema$SslCert { - /** - * PEM representation. - */ - cert?: string | null; - /** - * Serial number, as extracted from the certificate. - */ - certSerialNumber?: string | null; + export interface Params$Resource$Sslcerts$Get extends StandardParameters { /** - * User supplied name. Constrained to [a-zA-Z.-_ ]+. + * Cloud SQL instance ID. This does not include the project ID. */ - commonName?: string | null; + instance?: string; /** - * 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** + * Project ID of the project that contains the instance. */ - createTime?: string | null; + project?: string; /** - * The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. + * Sha1 FingerPrint. */ - expirationTime?: string | null; + sha1Fingerprint?: string; + } + export interface Params$Resource$Sslcerts$Insert extends StandardParameters { /** - * Name of the database instance. + * Cloud SQL instance ID. This does not include the project ID. */ - instance?: string | null; + instance?: string; /** - * This is always sql#sslCert. + * Project ID of the project that contains the instance. */ - kind?: string | null; + project?: string; + /** - * Sha1 Fingerprint. + * Request body metadata */ - sha1Fingerprint?: string | null; + requestBody?: Schema$SslCertsInsertRequest; } - /** - * SslCerts create ephemeral certificate request. - */ - export interface Schema$SslCertsCreateEphemeralRequest { + export interface Params$Resource$Sslcerts$List extends StandardParameters { /** - * Access token to include in the signed certificate. + * Cloud SQL instance ID. This does not include the project ID. */ - access_token?: string | null; + instance?: string; /** - * PEM encoded public key to include in the signed certificate. + * Project ID of the project that contains the instance. */ - public_key?: string | null; + project?: string; } - export class Resource$Instances { + export class Resource$Tiers { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; } /** - * Lists instances under a given project. + * Lists all available machine types (tiers) for Cloud SQL, for example, db-custom-1-3840. For more information, see https://cloud.google.com/sql/pricing. * @example * ```js * // Before running the sample: @@ -948,14 +9299,8 @@ export namespace sqladmin_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await sqladmin.instances.list({ - * // A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. - * filter: 'placeholder-value', - * // The maximum number of results to return per response. - * maxResults: 'placeholder-value', - * // A previously-returned page token representing part of the larger set of results to view. - * pageToken: 'placeholder-value', - * // Project ID of the project for which to list Cloud SQL instances. + * const res = await sql.tiers.list({ + * // Project ID of the project for which to list tiers. * project: 'placeholder-value', * }); * console.log(res.data); @@ -963,9 +9308,7 @@ export namespace sqladmin_v1 { * // Example response * // { * // "items": [], - * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", - * // "warnings": [] + * // "kind": "my_kind" * // } * } * @@ -982,53 +9325,51 @@ export namespace sqladmin_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ list( - params: Params$Resource$Instances$List, + params: Params$Resource$Tiers$List, options: StreamMethodOptions ): GaxiosPromise; list( - params?: Params$Resource$Instances$List, + params?: Params$Resource$Tiers$List, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; list( - params: Params$Resource$Instances$List, + params: Params$Resource$Tiers$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; list( - params: Params$Resource$Instances$List, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Tiers$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; list( - params: Params$Resource$Instances$List, - callback: BodyResponseCallback + params: Params$Resource$Tiers$List, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; list( paramsOrCallback?: - | Params$Resource$Instances$List - | BodyResponseCallback + | Params$Resource$Tiers$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Instances$List; + let params = (paramsOrCallback || {}) as Params$Resource$Tiers$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$List; + params = {} as Params$Resource$Tiers$List; options = {}; } @@ -1041,7 +9382,7 @@ export namespace sqladmin_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/projects/{project}/instances').replace( + url: (rootUrl + '/v1/projects/{project}/tiers').replace( /([^:]\/)\/+/g, '$1' ), @@ -1055,56 +9396,31 @@ export namespace sqladmin_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } } - export interface Params$Resource$Instances$List extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. - */ - filter?: string; - /** - * The maximum number of results to return per response. - */ - maxResults?: number; - /** - * A previously-returned page token representing part of the larger set of results to view. - */ - pageToken?: string; + export interface Params$Resource$Tiers$List extends StandardParameters { /** - * Project ID of the project for which to list Cloud SQL instances. + * Project ID of the project for which to list tiers. */ project?: string; } - export class Resource$Projects { - context: APIRequestContext; - instances: Resource$Projects$Instances; - constructor(context: APIRequestContext) { - this.context = context; - this.instances = new Resource$Projects$Instances(this.context); - } - } - - export class Resource$Projects$Instances { + export class Resource$Users { context: APIRequestContext; - createEphemeral: Resource$Projects$Instances$Createephemeral; constructor(context: APIRequestContext) { this.context = context; - this.createEphemeral = new Resource$Projects$Instances$Createephemeral( - this.context - ); } /** - * Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database. + * Deletes a user from a Cloud SQL instance. * @example * ```js * // Before running the sample: @@ -1128,31 +9444,40 @@ export namespace sqladmin_v1 { * }); * * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await sqladmin.projects.instances.generateEphemeralCert({ - * // Cloud SQL instance ID. This does not include the project ID. - * instance: 'placeholder-value', - * // Project ID of the project that contains the instance. - * project: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "access_token": "my_access_token", - * // "public_key": "my_public_key", - * // "readTime": "my_readTime" - * // } - * }, + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await sql.users.delete({ + * // Host of the user in the instance. + * host: 'placeholder-value', + * // Database instance ID. This does not include the project ID. + * instance: 'placeholder-value', + * // Name of the user in the instance. + * name: 'placeholder-value', + * // Project ID of the project that contains the instance. + * project: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "ephemeralCert": {} + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" * // } * } * @@ -1168,57 +9493,49 @@ export namespace sqladmin_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - generateEphemeralCert( - params: Params$Resource$Projects$Instances$Generateephemeralcert, + delete( + params: Params$Resource$Users$Delete, options: StreamMethodOptions ): GaxiosPromise; - generateEphemeralCert( - params?: Params$Resource$Projects$Instances$Generateephemeralcert, + delete( + params?: Params$Resource$Users$Delete, options?: MethodOptions - ): GaxiosPromise; - generateEphemeralCert( - params: Params$Resource$Projects$Instances$Generateephemeralcert, + ): GaxiosPromise; + delete( + params: Params$Resource$Users$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - generateEphemeralCert( - params: Params$Resource$Projects$Instances$Generateephemeralcert, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - generateEphemeralCert( - params: Params$Resource$Projects$Instances$Generateephemeralcert, - callback: BodyResponseCallback + delete( + params: Params$Resource$Users$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - generateEphemeralCert( - callback: BodyResponseCallback + delete( + params: Params$Resource$Users$Delete, + callback: BodyResponseCallback ): void; - generateEphemeralCert( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Projects$Instances$Generateephemeralcert - | BodyResponseCallback + | Params$Resource$Users$Delete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Instances$Generateephemeralcert; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Users$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Instances$Generateephemeralcert; + params = {} as Params$Resource$Users$Delete; options = {}; } @@ -1232,10 +9549,9 @@ export namespace sqladmin_v1 { options: Object.assign( { url: ( - rootUrl + - '/v1/projects/{project}/instances/{instance}:generateEphemeralCert' + rootUrl + '/v1/projects/{project}/instances/{instance}/users' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'DELETE', }, options ), @@ -1245,19 +9561,17 @@ export namespace sqladmin_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } /** - * Retrieves a resource containing information about a Cloud SQL instance. + * Creates a new user in a Cloud SQL instance. * @example * ```js * // Before running the sample: @@ -1285,53 +9599,48 @@ export namespace sqladmin_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await sqladmin.projects.instances.get({ + * const res = await sql.users.insert({ * // Database instance ID. This does not include the project ID. * instance: 'placeholder-value', * // Project ID of the project that contains the instance. * project: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "etag": "my_etag", + * // "host": "my_host", + * // "instance": "my_instance", + * // "kind": "my_kind", + * // "name": "my_name", + * // "password": "my_password", + * // "project": "my_project", + * // "sqlserverUserDetails": {}, + * // "type": "my_type" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "backendType": "my_backendType", - * // "connectionName": "my_connectionName", - * // "currentDiskSize": "my_currentDiskSize", - * // "databaseVersion": "my_databaseVersion", - * // "diskEncryptionConfiguration": {}, - * // "diskEncryptionStatus": {}, - * // "encryptedRootPassword": "my_encryptedRootPassword", - * // "etag": "my_etag", - * // "failoverReplica": {}, - * // "gceZone": "my_gceZone", - * // "installedVersion": "my_installedVersion", - * // "instanceType": "my_instanceType", - * // "instanceUid": "my_instanceUid", - * // "ipAddresses": [], - * // "ipv6Address": "my_ipv6Address", + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "masterInstance": {}, - * // "masterInstanceName": "my_masterInstanceName", - * // "maxDiskSize": "my_maxDiskSize", * // "name": "my_name", - * // "onPremisesConfiguration": {}, - * // "outOfDiskReport": {}, - * // "project": "my_project", - * // "region": "my_region", - * // "replicaConfiguration": {}, - * // "replicaInstances": [], - * // "replicaNames": [], - * // "rootPassword": "my_rootPassword", - * // "satisfiesPzs": false, - * // "scheduledMaintenance": {}, - * // "secondaryGceZone": "my_secondaryGceZone", + * // "operationType": "my_operationType", * // "selfLink": "my_selfLink", - * // "serverCaCert": {}, - * // "serviceAccountEmailAddress": "my_serviceAccountEmailAddress", - * // "settings": {}, - * // "state": "my_state", - * // "suspensionReason": [] + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" * // } * } * @@ -1347,50 +9656,49 @@ export namespace sqladmin_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Projects$Instances$Get, + insert( + params: Params$Resource$Users$Insert, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Projects$Instances$Get, + insert( + params?: Params$Resource$Users$Insert, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Instances$Get, + ): GaxiosPromise; + insert( + params: Params$Resource$Users$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Instances$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + insert( + params: Params$Resource$Users$Insert, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Instances$Get, - callback: BodyResponseCallback + insert( + params: Params$Resource$Users$Insert, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + insert(callback: BodyResponseCallback): void; + insert( paramsOrCallback?: - | Params$Resource$Projects$Instances$Get - | BodyResponseCallback + | Params$Resource$Users$Insert + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Instances$Get; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Users$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Instances$Get; + params = {} as Params$Resource$Users$Insert; options = {}; } @@ -1404,9 +9712,9 @@ export namespace sqladmin_v1 { options: Object.assign( { url: ( - rootUrl + '/v1/projects/{project}/instances/{instance}' + rootUrl + '/v1/projects/{project}/instances/{instance}/users' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), @@ -1416,17 +9724,17 @@ export namespace sqladmin_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Retrieves connect settings about a Cloud SQL instance. + * Lists users in the specified Cloud SQL instance. * @example * ```js * // Before running the sample: @@ -1454,23 +9762,19 @@ export namespace sqladmin_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await sqladmin.projects.instances.getConnectSettings({ - * // Cloud SQL instance ID. This does not include the project ID. + * const res = await sql.users.list({ + * // Database instance ID. This does not include the project ID. * instance: 'placeholder-value', * // Project ID of the project that contains the instance. * project: 'placeholder-value', - * // Optional. Optional snapshot read timestamp to trade freshness for performance. - * readTime: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "backendType": "my_backendType", - * // "databaseVersion": "my_databaseVersion", - * // "ipAddresses": [], + * // "items": [], * // "kind": "my_kind", - * // "serverCaCert": {} + * // "nextPageToken": "my_nextPageToken" * // } * } * @@ -1486,52 +9790,52 @@ export namespace sqladmin_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getConnectSettings( - params: Params$Resource$Projects$Instances$Getconnectsettings, + list( + params: Params$Resource$Users$List, options: StreamMethodOptions ): GaxiosPromise; - getConnectSettings( - params?: Params$Resource$Projects$Instances$Getconnectsettings, + list( + params?: Params$Resource$Users$List, options?: MethodOptions - ): GaxiosPromise; - getConnectSettings( - params: Params$Resource$Projects$Instances$Getconnectsettings, + ): GaxiosPromise; + list( + params: Params$Resource$Users$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getConnectSettings( - params: Params$Resource$Projects$Instances$Getconnectsettings, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - getConnectSettings( - params: Params$Resource$Projects$Instances$Getconnectsettings, - callback: BodyResponseCallback + list( + params: Params$Resource$Users$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getConnectSettings( - callback: BodyResponseCallback + list( + params: Params$Resource$Users$List, + callback: BodyResponseCallback ): void; - getConnectSettings( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Projects$Instances$Getconnectsettings - | BodyResponseCallback + | Params$Resource$Users$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Instances$Getconnectsettings; + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Users$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Instances$Getconnectsettings; + params = {} as Params$Resource$Users$List; options = {}; } @@ -1545,8 +9849,7 @@ export namespace sqladmin_v1 { options: Object.assign( { url: ( - rootUrl + - '/v1/projects/{project}/instances/{instance}/connectSettings' + rootUrl + '/v1/projects/{project}/instances/{instance}/users' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, @@ -1558,67 +9861,17 @@ export namespace sqladmin_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Projects$Instances$Generateephemeralcert - extends StandardParameters { - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GenerateEphemeralCertRequest; - } - export interface Params$Resource$Projects$Instances$Get - extends StandardParameters { - /** - * Database instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - } - export interface Params$Resource$Projects$Instances$Getconnectsettings - extends StandardParameters { - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - /** - * Optional. Optional snapshot read timestamp to trade freshness for performance. - */ - readTime?: string; - } - - export class Resource$Projects$Instances$Createephemeral { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database. + * Updates an existing user in a Cloud SQL instance. * @example * ```js * // Before running the sample: @@ -1646,18 +9899,29 @@ export namespace sqladmin_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await sqladmin.projects.instances.createEphemeral.create({ - * // Cloud SQL instance ID. This does not include the project ID. + * const res = await sql.users.update({ + * // Optional. Host of the user in the instance. + * host: 'placeholder-value', + * // Database instance ID. This does not include the project ID. * instance: 'placeholder-value', - * // Project ID of the Cloud SQL project. + * // Name of the user in the instance. + * name: 'placeholder-value', + * // Project ID of the project that contains the instance. * project: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "access_token": "my_access_token", - * // "public_key": "my_public_key" + * // "etag": "my_etag", + * // "host": "my_host", + * // "instance": "my_instance", + * // "kind": "my_kind", + * // "name": "my_name", + * // "password": "my_password", + * // "project": "my_project", + * // "sqlserverUserDetails": {}, + * // "type": "my_type" * // } * }, * }); @@ -1665,14 +9929,22 @@ export namespace sqladmin_v1 { * * // Example response * // { - * // "cert": "my_cert", - * // "certSerialNumber": "my_certSerialNumber", - * // "commonName": "my_commonName", - * // "createTime": "my_createTime", - * // "expirationTime": "my_expirationTime", - * // "instance": "my_instance", + * // "backupContext": {}, + * // "endTime": "my_endTime", + * // "error": {}, + * // "exportContext": {}, + * // "importContext": {}, + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "sha1Fingerprint": "my_sha1Fingerprint" + * // "name": "my_name", + * // "operationType": "my_operationType", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "targetProject": "my_targetProject", + * // "user": "my_user" * // } * } * @@ -1688,51 +9960,49 @@ export namespace sqladmin_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - create( - params: Params$Resource$Projects$Instances$Createephemeral$Create, + update( + params: Params$Resource$Users$Update, options: StreamMethodOptions ): GaxiosPromise; - create( - params?: Params$Resource$Projects$Instances$Createephemeral$Create, + update( + params?: Params$Resource$Users$Update, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Instances$Createephemeral$Create, + ): GaxiosPromise; + update( + params: Params$Resource$Users$Update, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Instances$Createephemeral$Create, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + update( + params: Params$Resource$Users$Update, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Instances$Createephemeral$Create, - callback: BodyResponseCallback + update( + params: Params$Resource$Users$Update, + callback: BodyResponseCallback ): void; - create(callback: BodyResponseCallback): void; - create( + update(callback: BodyResponseCallback): void; + update( paramsOrCallback?: - | Params$Resource$Projects$Instances$Createephemeral$Create - | BodyResponseCallback + | Params$Resource$Users$Update + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Instances$Createephemeral$Create; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Users$Update; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = - {} as Params$Resource$Projects$Instances$Createephemeral$Create; + params = {} as Params$Resource$Users$Update; options = {}; } @@ -1746,10 +10016,9 @@ export namespace sqladmin_v1 { options: Object.assign( { url: ( - rootUrl + - '/v1/projects/{project}/instances/{instance}/createEphemeral' + rootUrl + '/v1/projects/{project}/instances/{instance}/users' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'PUT', }, options ), @@ -1759,30 +10028,80 @@ export namespace sqladmin_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } } - export interface Params$Resource$Projects$Instances$Createephemeral$Create - extends StandardParameters { + export interface Params$Resource$Users$Delete extends StandardParameters { /** - * Cloud SQL instance ID. This does not include the project ID. + * Host of the user in the instance. + */ + host?: string; + /** + * Database instance ID. This does not include the project ID. */ instance?: string; /** - * Project ID of the Cloud SQL project. + * Name of the user in the instance. + */ + name?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + } + export interface Params$Resource$Users$Insert extends StandardParameters { + /** + * Database instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. */ project?: string; /** * Request body metadata */ - requestBody?: Schema$SslCertsCreateEphemeralRequest; + requestBody?: Schema$User; + } + export interface Params$Resource$Users$List extends StandardParameters { + /** + * Database instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + } + export interface Params$Resource$Users$Update extends StandardParameters { + /** + * Optional. Host of the user in the instance. + */ + host?: string; + /** + * Database instance ID. This does not include the project ID. + */ + instance?: string; + /** + * Name of the user in the instance. + */ + name?: string; + /** + * Project ID of the project that contains the instance. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$User; } } diff --git a/src/apis/sqladmin/v1beta4.ts b/src/apis/sqladmin/v1beta4.ts index 17c804d47bf..2d99b64c8c8 100644 --- a/src/apis/sqladmin/v1beta4.ts +++ b/src/apis/sqladmin/v1beta4.ts @@ -261,11 +261,11 @@ export namespace sqladmin_v1beta4 { */ description?: string | null; /** - * Encryption configuration specific to a backup. Applies only to Second Generation instances. + * Encryption configuration specific to a backup. */ diskEncryptionConfiguration?: Schema$DiskEncryptionConfiguration; /** - * Encryption status specific to a backup. Applies only to Second Generation instances. + * Encryption status specific to a backup. */ diskEncryptionStatus?: Schema$DiskEncryptionStatus; /** @@ -444,7 +444,7 @@ export namespace sqladmin_v1beta4 { */ export interface Schema$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 Configuring Database Flags in the Cloud SQL documentation. + * 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 in the Cloud SQL documentation. */ name?: string | null; /** @@ -469,15 +469,15 @@ export namespace sqladmin_v1beta4 { */ currentDiskSize?: string | null; /** - * 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*, or *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. + * 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*, *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2019_STANDARD*, *SQLSERVER_2019_ENTERPRISE*, *SQLSERVER_2019_EXPRESS*, or *SQLSERVER_2019_WEB*, *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. */ databaseVersion?: string | null; /** - * Disk encryption configuration specific to an instance. Applies only to Second Generation instances. + * Disk encryption configuration specific to an instance. */ diskEncryptionConfiguration?: Schema$DiskEncryptionConfiguration; /** - * Disk encryption status specific to an instance. Applies only to Second Generation instances. + * Disk encryption status specific to an instance. */ diskEncryptionStatus?: Schema$DiskEncryptionStatus; /** @@ -485,7 +485,7 @@ export namespace sqladmin_v1beta4 { */ etag?: string | null; /** - * The name and status of the failover replica. This property is applicable only to Second Generation instances. + * The name and status of the failover replica. */ failoverReplica?: {available?: boolean; name?: string} | null; /** @@ -628,7 +628,7 @@ export namespace sqladmin_v1beta4 { */ replicaConfiguration?: Schema$DemoteMasterConfiguration; /** - * Verify GTID consistency for demote operation. Default value: *True*. 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. + * Verify GTID consistency for demote operation. Default value: *True*. 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. */ verifyGtidConsistency?: boolean | null; } @@ -791,7 +791,7 @@ export namespace sqladmin_v1beta4 { */ name?: string | null; /** - * Indicates whether changing this flag will trigger a database restart. Only applicable to Second Generation instances. + * Indicates whether changing this flag will trigger a database restart. */ requiresRestart?: boolean | null; /** @@ -886,7 +886,7 @@ export namespace sqladmin_v1beta4 { */ queryInsightsEnabled?: boolean | null; /** - * Number of query plans generated by Insights per minute. Default is 5. Changing this will restart the database. + * Number of query execution plans captured by Insights per minute for all queries combined. Default is 5. */ queryPlansPerMinute?: number | null; /** @@ -1013,6 +1013,10 @@ export namespace sqladmin_v1beta4 { * IP Management configuration. */ export interface Schema$IpConfiguration { + /** + * The name of the allocated ip range for the private ip CloudSQL 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])?. Reserved for future use. + */ + allocatedIpRange?: string | null; /** * 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: *192.168.100.0/24*). */ @@ -1138,6 +1142,10 @@ export namespace sqladmin_v1beta4 { */ verifyServerCertificate?: boolean | null; } + /** + * MySQL-specific external server sync settings. + */ + export interface Schema$MySqlSyncConfig {} /** * On-premises instance configuration. */ @@ -1406,7 +1414,7 @@ export namespace sqladmin_v1beta4 { */ insightsConfig?: Schema$InsightsConfig; /** - * 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. + * 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. */ ipConfiguration?: Schema$IpConfiguration; /** @@ -1489,6 +1497,34 @@ export namespace sqladmin_v1beta4 { */ reschedule?: Schema$Reschedule; } + export interface Schema$SqlInstancesStartExternalSyncRequest { + /** + * MySQL-specific settings for start external sync. + */ + mysqlSyncConfig?: Schema$MySqlSyncConfig; + /** + * Whether to skip the verification step (VESS). + */ + skipVerification?: boolean | null; + /** + * External sync mode. + */ + syncMode?: string | null; + } + export interface Schema$SqlInstancesVerifyExternalSyncSettingsRequest { + /** + * Optional. MySQL-specific settings for start external sync. + */ + mysqlSyncConfig?: Schema$MySqlSyncConfig; + /** + * External sync mode + */ + syncMode?: string | null; + /** + * Flag to enable verifying connection only + */ + verifyConnectionOnly?: boolean | null; + } /** * Instance verify external sync settings response. */ @@ -1816,7 +1852,7 @@ export namespace sqladmin_v1beta4 { * * // Do the magic * const res = await sql.backupRuns.delete({ - * // The ID of the Backup Run to delete. To find a Backup Run ID, use the list method. + * // The ID of the backup run to delete. To find a backup run ID, use the list method. * id: 'placeholder-value', * // Cloud SQL instance ID. This does not include the project ID. * instance: 'placeholder-value', @@ -1967,7 +2003,7 @@ export namespace sqladmin_v1beta4 { * * // Do the magic * const res = await sql.backupRuns.get({ - * // The ID of this Backup Run. + * // The ID of this backup run. * id: 'placeholder-value', * // Cloud SQL instance ID. This does not include the project ID. * instance: 'placeholder-value', @@ -2088,7 +2124,7 @@ export namespace sqladmin_v1beta4 { } /** - * Creates a new backup run on demand. This method is applicable only to Second Generation instances. + * Creates a new backup run on demand. * @example * ```js * // Before running the sample: @@ -2407,7 +2443,7 @@ export namespace sqladmin_v1beta4 { export interface Params$Resource$Backupruns$Delete extends StandardParameters { /** - * The ID of the Backup Run to delete. To find a Backup Run ID, use the list method. + * The ID of the backup run to delete. To find a backup run ID, use the list method. */ id?: string; /** @@ -2421,7 +2457,7 @@ export namespace sqladmin_v1beta4 { } export interface Params$Resource$Backupruns$Get extends StandardParameters { /** - * The ID of this Backup Run. + * The ID of this backup run. */ id?: string; /** @@ -3832,7 +3868,7 @@ export namespace sqladmin_v1beta4 { } /** - * List all available database flags for Cloud SQL instances. + * Lists all available database flags for Cloud SQL instances. * @example * ```js * // Before running the sample: @@ -4740,7 +4776,7 @@ export namespace sqladmin_v1beta4 { } /** - * Failover the instance to its failover replica instance. Using this operation might cause your instance to restart. + * Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the Overview of high availability page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance. * @example * ```js * // Before running the sample: @@ -8090,10 +8126,16 @@ export namespace sqladmin_v1beta4 { * instance: 'placeholder-value', * // ID of the project that contains the instance. * project: 'placeholder-value', - * // Whether to skip the verification step (VESS). - * skipVerification: 'placeholder-value', - * // External sync mode. - * syncMode: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "mysqlSyncConfig": {}, + * // "skipVerification": false, + * // "syncMode": "my_syncMode" + * // } + * }, * }); * console.log(res.data); * @@ -8243,10 +8285,16 @@ export namespace sqladmin_v1beta4 { * instance: 'placeholder-value', * // Project ID of the project that contains the instance. * project: 'placeholder-value', - * // External sync mode - * syncMode: 'placeholder-value', - * // Flag to enable verifying connection only - * verifyConnectionOnly: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "mysqlSyncConfig": {}, + * // "syncMode": "my_syncMode", + * // "verifyConnectionOnly": false + * // } + * }, * }); * console.log(res.data); * @@ -8386,14 +8434,11 @@ export namespace sqladmin_v1beta4 { * ID of the project that contains the instance. */ project?: string; + /** - * Whether to skip the verification step (VESS). - */ - skipVerification?: boolean; - /** - * External sync mode. + * Request body metadata */ - syncMode?: string; + requestBody?: Schema$SqlInstancesStartExternalSyncRequest; } export interface Params$Resource$Projects$Instances$Verifyexternalsyncsettings extends StandardParameters { @@ -8405,14 +8450,11 @@ export namespace sqladmin_v1beta4 { * Project ID of the project that contains the instance. */ project?: string; + /** - * External sync mode - */ - syncMode?: string; - /** - * Flag to enable verifying connection only + * Request body metadata */ - verifyConnectionOnly?: boolean; + requestBody?: Schema$SqlInstancesVerifyExternalSyncSettingsRequest; } export class Resource$Sslcerts {