googleapis
Version:
Google APIs Client Library for Node.js
1,374 lines • 132 kB
TypeScript
/**
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { OAuth2Client, JWT, Compute, UserRefreshClient } from 'google-auth-library';
import { GoogleConfigurable, MethodOptions, GlobalOptions, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { GaxiosPromise } from 'gaxios';
export declare namespace sqladmin_v1beta4 {
interface Options extends GlobalOptions {
version: 'v1beta4';
}
interface StandardParameters {
/**
* Data format for the response.
*/
alt?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
*/
quotaUser?: string;
/**
* Deprecated. Please use quotaUser instead.
*/
userIp?: string;
}
/**
* Cloud SQL Admin API
*
* Creates and manages Cloud SQL instances, which provide fully managed MySQL or PostgreSQL databases.
*
* @example
* const {google} = require('googleapis');
* const sqladmin = google.sqladmin('v1beta4');
*
* @namespace sqladmin
* @type {Function}
* @version v1beta4
* @variation v1beta4
* @param {object=} options Options for Sqladmin
*/
class Sqladmin {
context: APIRequestContext;
backupRuns: Resource$Backupruns;
databases: Resource$Databases;
flags: Resource$Flags;
instances: Resource$Instances;
operations: Resource$Operations;
sslCerts: Resource$Sslcerts;
tiers: Resource$Tiers;
users: Resource$Users;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* An entry for an Access Control list.
*/
interface Schema$AclEntry {
/**
* The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
*/
expirationTime?: string;
/**
* This is always sql#aclEntry.
*/
kind?: string;
/**
* An optional label to identify this entry.
*/
name?: string;
/**
* The whitelisted value for the access control list.
*/
value?: string;
}
/**
* An Admin API warning message.
*/
interface Schema$ApiWarning {
/**
* Code to uniquely identify the warning type.
*/
code?: string;
/**
* The warning message.
*/
message?: string;
}
/**
* Database instance backup configuration.
*/
interface Schema$BackupConfiguration {
/**
* Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
*/
binaryLogEnabled?: boolean;
/**
* Whether this configuration is enabled.
*/
enabled?: boolean;
/**
* This is always sql#backupConfiguration.
*/
kind?: string;
/**
* The location of the backup.
*/
location?: string;
/**
* Reserved for future use.
*/
replicationLogArchivingEnabled?: boolean;
/**
* Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
*/
startTime?: string;
}
/**
* A BackupRun resource.
*/
interface Schema$BackupRun {
/**
* The description of this run, only applicable to on-demand backups.
*/
description?: string;
/**
* The time the backup operation completed in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
*/
endTime?: string;
/**
* The time the run was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
*/
enqueuedTime?: string;
/**
* 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;
/**
* Name of the database instance.
*/
instance?: string;
/**
* This is always sql#backupRun.
*/
kind?: string;
/**
* The location of the backup.
*/
location?: string;
/**
* The URI of this resource.
*/
selfLink?: string;
/**
* The time the backup operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
*/
startTime?: string;
/**
* The status of this run.
*/
status?: string;
/**
* The type of this run; can be either "AUTOMATED" or "ON_DEMAND".
*/
type?: string;
/**
* 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;
}
/**
* Backup run list results.
*/
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;
/**
* 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;
}
/**
* Binary log coordinates.
*/
interface Schema$BinLogCoordinates {
/**
* Name of the binary log file for a Cloud SQL instance.
*/
binLogFileName?: string;
/**
* Position (offset) within the binary log file.
*/
binLogPosition?: string;
/**
* This is always sql#binLogCoordinates.
*/
kind?: string;
}
/**
* Database instance clone context.
*/
interface Schema$CloneContext {
/**
* Binary log coordinates, if specified, identify the position up to which the source instance should be 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;
/**
* This is always sql#cloneContext.
*/
kind?: string;
/**
* Reserved for future use.
*/
pitrTimestampMs?: string;
}
/**
* Represents a SQL database on the Cloud SQL instance.
*/
interface Schema$Database {
/**
* The MySQL charset value.
*/
charset?: string;
/**
* The MySQL collation value.
*/
collation?: string;
/**
* This field is deprecated and will be removed from a future version of the API.
*/
etag?: string;
/**
* The name of the Cloud SQL instance. This does not include the project ID.
*/
instance?: string;
/**
* This is always sql#database.
*/
kind?: string;
/**
* The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
*/
name?: string;
/**
* The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.
*/
project?: string;
/**
* The URI of this resource.
*/
selfLink?: string;
}
/**
* Database flags for Cloud SQL instances.
*/
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 should be specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.
*/
name?: string;
/**
* The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
*/
value?: string;
}
/**
* A Cloud SQL instance resource.
*/
interface Schema$DatabaseInstance {
/**
* FIRST_GEN: First Generation instance. MySQL only. SECOND_GEN: Second Generation instance or PostgreSQL instance. EXTERNAL: A database server that is not managed by Google. This property is read-only; use the tier property in the settings object to determine the database type and Second or First Generation.
*/
backendType?: string;
/**
* Connection name of the Cloud SQL instance used in connection strings.
*/
connectionName?: string;
/**
* The current disk usage of the instance in bytes. This property has been deprecated. Users should use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see this announcement for details.
*/
currentDiskSize?: string;
/**
* The database engine type and version. The databaseVersion field can not be changed after instance creation. MySQL Second Generation instances: MYSQL_5_7 (default) or MYSQL_5_6. PostgreSQL instances: POSTGRES_9_6 (default) or POSTGRES_11 Beta. MySQL First Generation instances: MYSQL_5_6 (default) or MYSQL_5_5
*/
databaseVersion?: string;
/**
* Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
*/
diskEncryptionConfiguration?: Schema$DiskEncryptionConfiguration;
/**
* Disk encryption status specific to an instance. Applies only to Second Generation instances.
*/
diskEncryptionStatus?: Schema$DiskEncryptionStatus;
/**
* This field is deprecated and will be removed from a future version of the API. Use the settings.settingsVersion field instead.
*/
etag?: string;
/**
* The name and status of the failover replica. This property is applicable only to Second Generation instances.
*/
failoverReplica?: {
available?: boolean;
name?: string;
};
/**
* 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;
/**
* The instance type. This can be one of the following. CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master. 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;
/**
* The assigned IP addresses for the instance.
*/
ipAddresses?: Schema$IpMapping[];
/**
* The IPv6 address assigned to the instance. This property is applicable only to First Generation instances.
*/
ipv6Address?: string;
/**
* This is always sql#instance.
*/
kind?: string;
/**
* The name of the instance which will act as master in the replication setup.
*/
masterInstanceName?: string;
/**
* The maximum disk size of the instance in bytes.
*/
maxDiskSize?: string;
/**
* Name of the Cloud SQL instance. This does not include the project ID.
*/
name?: string;
/**
* Configuration specific to on-premises instances.
*/
onPremisesConfiguration?: Schema$OnPremisesConfiguration;
/**
* The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
*/
project?: string;
/**
* The geographical region. Can be us-central (FIRST_GEN instances only), us-central1 (SECOND_GEN instances only), asia-east1 or europe-west1. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation). The region can not be changed after instance creation.
*/
region?: string;
/**
* Configuration specific to failover replicas and read replicas.
*/
replicaConfiguration?: Schema$ReplicaConfiguration;
/**
* The replicas of the instance.
*/
replicaNames?: string[];
/**
* Initial root password. Use only on creation.
*/
rootPassword?: string;
/**
* The URI of this resource.
*/
selfLink?: string;
/**
* SSL configuration.
*/
serverCaCert?: Schema$SslCert;
/**
* The service account email address assigned to the instance. This property is applicable only to Second Generation instances.
*/
serviceAccountEmailAddress?: string;
/**
* The user settings.
*/
settings?: Schema$Settings;
/**
* The current serving state of the Cloud SQL instance. This can be one of the following. RUNNABLE: The instance is running, or is ready to run when accessed. SUSPENDED: The instance is not available, for example due to problems with billing. PENDING_CREATE: The instance is being created. MAINTENANCE: The instance is down for maintenance. FAILED: The instance creation failed. UNKNOWN_STATE: The state of the instance is unknown.
*/
state?: string;
/**
* If the instance state is SUSPENDED, the reason for the suspension.
*/
suspensionReason?: string[];
}
/**
* Database list response.
*/
interface Schema$DatabasesListResponse {
/**
* List of database resources in the instance.
*/
items?: Schema$Database[];
/**
* This is always sql#databasesList.
*/
kind?: string;
}
/**
* Read-replica configuration for connecting to the on-premises master.
*/
interface Schema$DemoteMasterConfiguration {
/**
* This is always sql#demoteMasterConfiguration.
*/
kind?: string;
/**
* MySQL specific configuration when replicating from a MySQL on-premises master. 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 master context.
*/
interface Schema$DemoteMasterContext {
/**
* This is always sql#demoteMasterContext.
*/
kind?: string;
/**
* The name of the instance which will act as on-premises master in the replication setup.
*/
masterInstanceName?: string;
/**
* Configuration specific to read-replicas replicating from the on-premises master.
*/
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 master 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;
}
/**
* Read-replica configuration specific to MySQL databases.
*/
interface Schema$DemoteMasterMySqlReplicaConfiguration {
/**
* PEM representation of the trusted CA's x509 certificate.
*/
caCertificate?: string;
/**
* PEM representation of the slave's x509 certificate.
*/
clientCertificate?: string;
/**
* PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate. The format of the slave's private key can be either PKCS #1 or PKCS #8.
*/
clientKey?: string;
/**
* This is always sql#demoteMasterMysqlReplicaConfiguration.
*/
kind?: string;
/**
* The password for the replication connection.
*/
password?: string;
/**
* The username for the replication connection.
*/
username?: string;
}
/**
* Disk encryption configuration.
*/
interface Schema$DiskEncryptionConfiguration {
/**
* This is always sql#diskEncryptionConfiguration.
*/
kind?: string;
/**
* KMS key resource name
*/
kmsKeyName?: string;
}
/**
* Disk encryption status.
*/
interface Schema$DiskEncryptionStatus {
/**
* This is always sql#diskEncryptionStatus.
*/
kind?: string;
/**
* KMS key version used to encrypt the Cloud SQL instance disk
*/
kmsKeyVersionName?: string;
}
/**
* Database instance export context.
*/
interface Schema$ExportContext {
/**
* Options for exporting data as CSV.
*/
csvExportOptions?: {
selectQuery?: string;
};
/**
* 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: Specify exactly one database to be exported. If fileType is CSV, this database must match the database used in the csvExportOptions.selectQuery property.
*/
databases?: string[];
/**
* The file type for the specified uri. SQL: The file contains SQL statements. CSV: The file contains CSV data.
*/
fileType?: string;
/**
* This is always sql#exportContext.
*/
kind?: string;
/**
* Options for exporting data as SQL statements.
*/
sqlExportOptions?: {
mysqlExportOptions?: {
masterData?: number;
};
schemaOnly?: boolean;
tables?: string[];
};
/**
* 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 requests succeeds, but the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
*/
uri?: string;
}
/**
* Database instance failover context.
*/
interface Schema$FailoverContext {
/**
* This is always sql#failoverContext.
*/
kind?: string;
/**
* The current settings version of this instance. Request will be rejected if this version doesn't match the current settings version.
*/
settingsVersion?: string;
}
/**
* A flag resource.
*/
interface Schema$Flag {
/**
* For STRING flags, a list of strings that the value can be set to.
*/
allowedStringValues?: string[];
/**
* The database version this flag applies to. Can be MYSQL_5_5, MYSQL_5_6, or MYSQL_5_7. MYSQL_5_7 is applicable only to Second Generation instances.
*/
appliesTo?: string[];
/**
* True if the flag is only released in Beta.
*/
inBeta?: boolean;
/**
* This is always sql#flag.
*/
kind?: string;
/**
* For INTEGER flags, the maximum allowed value.
*/
maxValue?: string;
/**
* For INTEGER flags, the minimum allowed value.
*/
minValue?: string;
/**
* This is the name of the flag. Flag names always use underscores, not hyphens, e.g. max_allowed_packet
*/
name?: string;
/**
* Indicates whether changing this flag will trigger a database restart. Only applicable to Second Generation instances.
*/
requiresRestart?: boolean;
/**
* 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.
*/
type?: string;
}
/**
* Flags list response.
*/
interface Schema$FlagsListResponse {
/**
* List of flags.
*/
items?: Schema$Flag[];
/**
* This is always sql#flagsList.
*/
kind?: string;
}
/**
* Database instance import context.
*/
interface Schema$ImportContext {
/**
* Options for importing data as CSV.
*/
csvImportOptions?: {
columns?: string[];
table?: string;
};
/**
* 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;
/**
* The file type for the specified uri. SQL: The file contains SQL statements. CSV: The file contains CSV data.
*/
fileType?: string;
/**
* The PostgreSQL user for this import operation. PostgreSQL instances only.
*/
importUser?: string;
/**
* This is always sql#importContext.
*/
kind?: string;
/**
* 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;
}
/**
* Database instance clone request.
*/
interface Schema$InstancesCloneRequest {
/**
* Contains details about the clone operation.
*/
cloneContext?: Schema$CloneContext;
}
/**
* Database demote master request.
*/
interface Schema$InstancesDemoteMasterRequest {
/**
* Contains details about the demoteMaster operation.
*/
demoteMasterContext?: Schema$DemoteMasterContext;
}
/**
* Database instance export request.
*/
interface Schema$InstancesExportRequest {
/**
* Contains details about the export operation.
*/
exportContext?: Schema$ExportContext;
}
/**
* Instance failover request.
*/
interface Schema$InstancesFailoverRequest {
/**
* Failover Context.
*/
failoverContext?: Schema$FailoverContext;
}
/**
* Database instance import request.
*/
interface Schema$InstancesImportRequest {
/**
* Contains details about the import operation.
*/
importContext?: Schema$ImportContext;
}
/**
* Database instances list response.
*/
interface Schema$InstancesListResponse {
/**
* List of database instance resources.
*/
items?: Schema$DatabaseInstance[];
/**
* This is always sql#instancesList.
*/
kind?: string;
/**
* 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;
/**
* List of warnings that ocurred while handling the request.
*/
warnings?: Schema$ApiWarning[];
}
/**
* Instances ListServerCas response.
*/
interface Schema$InstancesListServerCasResponse {
activeVersion?: string;
/**
* List of server CA certificates for the instance.
*/
certs?: Schema$SslCert[];
/**
* This is always sql#instancesListServerCas.
*/
kind?: string;
}
/**
* Database instance restore backup request.
*/
interface Schema$InstancesRestoreBackupRequest {
/**
* Parameters required to perform the restore backup operation.
*/
restoreBackupContext?: Schema$RestoreBackupContext;
}
/**
* Rotate Server CA request.
*/
interface Schema$InstancesRotateServerCaRequest {
/**
* Contains details about the rotate server CA operation.
*/
rotateServerCaContext?: Schema$RotateServerCaContext;
}
/**
* Instance truncate log request.
*/
interface Schema$InstancesTruncateLogRequest {
/**
* Contains details about the truncate log operation.
*/
truncateLogContext?: Schema$TruncateLogContext;
}
/**
* IP Management configuration.
*/
interface Schema$IpConfiguration {
/**
* The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
*/
authorizedNetworks?: Schema$AclEntry[];
/**
* Whether the instance should be assigned an IP address or not.
*/
ipv4Enabled?: boolean;
/**
* The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, /projects/myProject/global/networks/default. This setting can be updated, but it cannot be removed after it is set.
*/
privateNetwork?: string;
/**
* Whether SSL connections over IP should be enforced or not.
*/
requireSsl?: boolean;
}
/**
* Database instance IP Mapping.
*/
interface Schema$IpMapping {
/**
* The IP address assigned.
*/
ipAddress?: string;
/**
* The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
*/
timeToRetire?: string;
/**
* The type of this IP address. A PRIMARY address is a public address that can accept incoming connections. A PRIVATE address is a private address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported.
*/
type?: string;
}
/**
* Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified.
*/
interface Schema$LocationPreference {
/**
* The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
*/
followGaeApplication?: string;
/**
* This is always sql#locationPreference.
*/
kind?: string;
/**
* The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, etc.).
*/
zone?: string;
}
/**
* Maintenance window. This specifies when a v2 Cloud SQL instance should preferably be restarted for system maintenance purposes.
*/
interface Schema$MaintenanceWindow {
/**
* day of week (1-7), starting on Monday.
*/
day?: number;
/**
* hour of day - 0 to 23.
*/
hour?: number;
/**
* This is always sql#maintenanceWindow.
*/
kind?: string;
/**
* Maintenance timing setting: canary (Earlier) or stable (Later). Learn more.
*/
updateTrack?: string;
}
/**
* Read-replica configuration specific to MySQL databases.
*/
interface Schema$MySqlReplicaConfiguration {
/**
* PEM representation of the trusted CA's x509 certificate.
*/
caCertificate?: string;
/**
* PEM representation of the slave's x509 certificate.
*/
clientCertificate?: string;
/**
* PEM representation of the slave's private key. The corresponsing public key is encoded in the client's certificate.
*/
clientKey?: string;
/**
* Seconds to wait between connect retries. MySQL's default is 60 seconds.
*/
connectRetryInterval?: number;
/**
* Path to a SQL dump file in Google Cloud Storage from which the slave instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps should have the binlog co-ordinates from which replication should begin. This can be accomplished by setting --master-data to 1 when using mysqldump.
*/
dumpFilePath?: string;
/**
* This is always sql#mysqlReplicaConfiguration.
*/
kind?: string;
/**
* Interval in milliseconds between replication heartbeats.
*/
masterHeartbeatPeriod?: string;
/**
* The password for the replication connection.
*/
password?: string;
/**
* A list of permissible ciphers to use for SSL encryption.
*/
sslCipher?: string;
/**
* The username for the replication connection.
*/
username?: string;
/**
* Whether or not to check the master's Common Name value in the certificate that it sends during the SSL handshake.
*/
verifyServerCertificate?: boolean;
}
/**
* On-premises instance configuration.
*/
interface Schema$OnPremisesConfiguration {
/**
* The host and port of the on-premises instance in host:port format
*/
hostPort?: string;
/**
* This is always sql#onPremisesConfiguration.
*/
kind?: string;
}
/**
* An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
*/
interface Schema$Operation {
/**
* The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
*/
endTime?: string;
/**
* If errors occurred during processing of this operation, this field will be populated.
*/
error?: Schema$OperationErrors;
/**
* The context for export operation, if applicable.
*/
exportContext?: Schema$ExportContext;
/**
* The context for import operation, if applicable.
*/
importContext?: Schema$ImportContext;
/**
* The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
*/
insertTime?: string;
/**
* This is always sql#operation.
*/
kind?: string;
/**
* An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
*/
name?: string;
/**
* 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 .
*/
operationType?: string;
/**
* The URI of this resource.
*/
selfLink?: string;
/**
* The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
*/
startTime?: string;
/**
* The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
*/
status?: string;
/**
* Name of the database instance related to this operation.
*/
targetId?: string;
targetLink?: string;
/**
* The project ID of the target instance related to this operation.
*/
targetProject?: string;
/**
* The email address of the user who initiated this operation.
*/
user?: string;
}
/**
* Database instance operation error.
*/
interface Schema$OperationError {
/**
* Identifies the specific error that occurred.
*/
code?: string;
/**
* This is always sql#operationError.
*/
kind?: string;
/**
* Additional information about the error encountered.
*/
message?: string;
}
/**
* Database instance operation errors list wrapper.
*/
interface Schema$OperationErrors {
/**
* The list of errors encountered while processing this operation.
*/
errors?: Schema$OperationError[];
/**
* This is always sql#operationErrors.
*/
kind?: string;
}
/**
* Database instance list operations response.
*/
interface Schema$OperationsListResponse {
/**
* List of operation resources.
*/
items?: Schema$Operation[];
/**
* This is always sql#operationsList.
*/
kind?: string;
/**
* 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;
}
/**
* Read-replica configuration for connecting to the master.
*/
interface Schema$ReplicaConfiguration {
/**
* 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 master instance fails, the replica instance will be promoted as the new master instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the master instance.
*/
failoverTarget?: boolean;
/**
* This is always sql#replicaConfiguration.
*/
kind?: string;
/**
* MySQL specific configuration when replicating from a MySQL on-premises master. 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;
}
/**
* Database instance restore from backup context.
*/
interface Schema$RestoreBackupContext {
/**
* The ID of the backup run to restore from.
*/
backupRunId?: string;
/**
* The ID of the instance that the backup was taken from.
*/
instanceId?: string;
/**
* This is always sql#restoreBackupContext.
*/
kind?: string;
/**
* The full project ID of the source instance.
*/
project?: string;
}
/**
* Instance rotate server CA context.
*/
interface Schema$RotateServerCaContext {
/**
* This is always sql#rotateServerCaContext.
*/
kind?: string;
/**
* 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;
}
/**
* Database instance settings.
*/
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. ON_DEMAND: First Generation instances only. The instance responds to incoming requests, and turns itself off when not in use. Instances with PER_USE pricing turn off after 15 minutes of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours of inactivity.
*/
activationPolicy?: string;
/**
* The App Engine app IDs that can access this instance. First Generation instances only.
*/
authorizedGaeApplications?: string[];
/**
* Availability type (PostgreSQL instances only). 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.
*/
availabilityType?: string;
/**
* The daily backup configuration for the instance.
*/
backupConfiguration?: Schema$BackupConfiguration;
/**
* Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property is only applicable to First Generation instances.
*/
crashSafeReplicationEnabled?: boolean;
/**
* 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;
/**
* The size of data disk, in GB. The data disk size minimum is 10GB. Not used for First Generation instances.
*/
dataDiskSizeGb?: string;
/**
* The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
*/
dataDiskType?: string;
/**
* 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;
/**
* The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location is only applicable to First Generation instances.
*/
locationPreference?: Schema$LocationPreference;
/**
* The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes. Not used for First Generation instances.
*/
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;
/**
* The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. This property is only applicable to First Generation instances.
*/
replicationType?: string;
/**
* 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;
/**
* Configuration to increase storage size automatically. The default value is true. Not used for First Generation instances.
*/
storageAutoResize?: boolean;
/**
* The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. Not used for First Generation instances.
*/
storageAutoResizeLimit?: string;
/**
* The tier (or machine type) for this instance, for example db-n1-standard-1 (MySQL instances) or db-custom-1-3840 (PostgreSQL instances). For MySQL instances, this property determines whether the instance is First or Second Generation. For more information, see Instance Settings.
*/
tier?: string;
/**
* User-provided labels, represented as a dictionary where each label is a single key value pair.
*/
userLabels?: {
[key: string]: string;
};
}
/**
* SslCerts Resource
*/
interface Schema$SslCert {
/**
* PEM representation.
*/
cert?: string;
/**
* Serial number, as extracted from the certificate.
*/
certSerialNumber?: string;
/**
* User supplied name. Constrained to [a-zA-Z.-_ ]+.
*/
commonName?: string;
/**
* The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
*/
createTime?: string;
/**
* The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
*/
expirationTime?: string;
/**
* Name of the database instance.
*/
instance?: string;
/**
* This is always sql#sslCert.
*/
kind?: string;
/**
* The URI of this resource.
*/
selfLink?: string;
/**
* Sha1 Fingerprint.
*/
sha1Fingerprint?: string;
}
/**
* SslCertDetail.
*/
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;
}
/**
* SslCerts create ephemeral certificate request.
*/
interface Schema$SslCertsCreateEphemeralRequest {
/**
* PEM encoded public key to include in the signed certificate.
*/
public_key?: string;
}
/**
* SslCerts insert request.
*/
interface Schema$SslCertsInsertRequest {
/**
* User supplied name. Must be a distinct name from the other certificates for this instance.
*/
commonName?: string;
}
/**
* SslCert insert response.
*/
interface Schema$SslCertsInsertResponse {
/**
* The new client certificate and private key. For First Generation instances, the new certificate does not take effect until the instance is restarted.
*/
clientCert?: Schema$SslCertDetail;
/**
* This is always sql#sslCertsInsert.
*/
kind?: string;
/**
* 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.
*/
interface Schema$SslCertsListResponse {
/**
* List of client certificates for the instance.
*/
items?: Schema$SslCert[];
/**
* This is always sql#sslCertsList.
*/
kind?: string;
}
/**
* A Google Cloud SQL service tier resource.
*/
interface Schema$Tier {
/**
* The maximum disk size of this tier in bytes.
*/
DiskQuota?: string;
/**
* This is always sql#tier.
*/
kind?: string;
/**
* The maximum RAM usage of this tier in bytes.
*/
RAM?: string;
/**
* The applicable regions for this tier.
*/
region?: string[];
/**
* An identifier for the machine type, for example, db-n1-standard-1. For related information, see Pricing.
*/
tier?: string;
}
/**
* Tiers list response.
*/
interface Schema$TiersListResponse {
/**
* List of tiers.
*/
items?: Schema$Tier[];
/**
* This is always sql#tiersList.
*/
kind?: string;
}
/**
* Database Instance truncate log context.
*/
interface Schema$TruncateLogContext {
/**
* This is always sql#truncateLogContext.
*/
kind?: string;
/**
* The type of log to truncate. Valid values are MYSQL_GENERAL_TABLE and MYSQL_SLOW_TABLE.
*/
logType?: string;
}
/**
* A Cloud SQL user resource.
*/
interface Schema$User {
/**
* This field is deprecated and will be removed from a future version of the API.
*/
etag?: string;
/**
* 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;
/**
* 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;
/**
* This is always sql#user.
*/
kind?: string;
/**
* 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;
/**
* The password for the user.
*/
password?: string;
/**
* 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;
}
/**
* User list response.
*/
interface Schema$UsersListResponse {
/**
* List of user resources in the instance.
*/
items?: Schema$User[];
/**
* This is always sql#usersList.
*/
kind?: string;
/**
* 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;
}
class Resource$Backupruns {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* sql.backupRuns.delete
* @desc Deletes the backup taken by a backup run.
* @alias sql.backupRuns.delete
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.id The ID of the Backup Run to delete. To find a Backup Run ID, use the list method.
* @param {string} params.instance Cloud SQL instance ID. This does not include the project ID.
* @param {string} params.pr