googleapis
Version:
Google APIs Client Library for Node.js
1,329 lines • 273 kB
TypeScript
import { OAuth2Client, JWT, Compute, UserRefreshClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace sql_v1beta4 {
export interface Options extends GlobalOptions {
version: 'v1beta4';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: 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;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Cloud SQL Admin API
*
* API for Cloud SQL database instance management
*
* @example
* const {google} = require('googleapis');
* const sql = google.sql('v1beta4');
*
* @namespace sql
* @type {Function}
* @version v1beta4
* @variation v1beta4
* @param {object=} options Options for Sql
*/
export class Sql {
context: APIRequestContext;
backupRuns: Resource$Backupruns;
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);
}
/**
* An entry for an Access Control list.
*/
export 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 | null;
/**
* This is always *sql#aclEntry*.
*/
kind?: string | null;
/**
* Optional. A label to identify this entry.
*/
name?: string | null;
/**
* The allowlisted value for the access control list.
*/
value?: string | null;
}
/**
* An Admin API warning message.
*/
export interface Schema$ApiWarning {
/**
* Code to uniquely identify the warning type.
*/
code?: string | null;
/**
* The warning message.
*/
message?: string | null;
}
/**
* Database instance backup configuration.
*/
export interface Schema$BackupConfiguration {
/**
* (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
*/
binaryLogEnabled?: boolean | null;
/**
* Whether this configuration is enabled.
*/
enabled?: boolean | null;
/**
* This is always *sql#backupConfiguration*.
*/
kind?: string | null;
/**
* Location of the backup
*/
location?: string | null;
/**
* Reserved for future use.
*/
pointInTimeRecoveryEnabled?: boolean | null;
/**
* Reserved for future use.
*/
replicationLogArchivingEnabled?: boolean | null;
/**
* Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
*/
startTime?: 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. Applies only to Second Generation instances.
*/
diskEncryptionConfiguration?: Schema$DiskEncryptionConfiguration;
/**
* Encryption status specific to a backup. Applies only to Second Generation instances.
*/
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".
*/
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;
/**
* Reserved for future use.
*/
pointInTime?: string | null;
}
/**
* 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 in the Cloud SQL documentation.
*/
name?: string | null;
/**
* The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn't take a value.
*/
value?: string | null;
}
/**
* A Cloud SQL instance resource. Next field: 34
*/
export interface Schema$DatabaseInstance {
/**
* *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type.
*/
backendType?: string | null;
/**
* Connection name of the Cloud SQL instance used in connection strings.
*/
connectionName?: string | null;
/**
* The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see this announcement for details.
*/
currentDiskSize?: string | null;
/**
* The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *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.
*/
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 | null;
/**
* The name and status of the failover replica. This property is applicable only to Second Generation instances.
*/
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;
/**
* 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 | null;
/**
* The assigned IP addresses for the instance.
*/
ipAddresses?: Schema$IpMapping[];
/**
* The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
*/
ipv6Address?: string | null;
/**
* This is always *sql#instance*.
*/
kind?: string | null;
/**
* The name of the instance which will act as master in the replication setup.
*/
masterInstanceName?: string | null;
/**
* The maximum disk size of the instance in bytes.
*/
maxDiskSize?: string | null;
/**
* Name of the Cloud SQL instance. This does not include the project ID.
*/
name?: string | null;
/**
* 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 | null;
/**
* The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation.
*/
region?: string | null;
/**
* Configuration specific to failover replicas and read replicas.
*/
replicaConfiguration?: Schema$ReplicaConfiguration;
/**
* The replicas of the instance.
*/
replicaNames?: string[] | null;
/**
* Initial root password. Use only on creation.
*/
rootPassword?: string | null;
/**
* The start time of any upcoming scheduled maintenance for this instance.
*/
scheduledMaintenance?: Schema$SqlScheduledMaintenance;
/**
* The URI of this resource.
*/
selfLink?: string | null;
/**
* 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 | null;
/**
* 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 | null;
/**
* If the instance state is SUSPENDED, the reason for the suspension.
*/
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 master.
*/
export interface Schema$DemoteMasterConfiguration {
/**
* This is always *sql#demoteMasterConfiguration*.
*/
kind?: string | null;
/**
* 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.
*/
export interface Schema$DemoteMasterContext {
/**
* This is always *sql#demoteMasterContext*.
*/
kind?: string | null;
/**
* The name of the instance which will act as on-premises master in the replication setup.
*/
masterInstanceName?: string | null;
/**
* 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 | 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;
}
/**
* Disk encryption configuration for an instance.
*/
export interface Schema$DiskEncryptionConfiguration {
/**
* This is always *sql#diskEncryptionConfiguration*.
*/
kind?: string | null;
/**
* Resource name of KMS key for disk encryption
*/
kmsKeyName?: string | null;
}
/**
* Disk encryption status for an instance.
*/
export interface Schema$DiskEncryptionStatus {
/**
* This is always *sql#diskEncryptionStatus*.
*/
kind?: string | null;
/**
* KMS key version used to encrypt the Cloud SQL instance resource
*/
kmsKeyVersionName?: string | null;
}
/**
* Database instance export context.
*/
export interface Schema$ExportContext {
/**
* Options for exporting data as CSV.
*/
csvExportOptions?: {
selectQuery?: string;
} | null;
/**
* 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.
*/
databases?: string[] | null;
/**
* The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
*/
fileType?: string | null;
/**
* This is always *sql#exportContext*.
*/
kind?: string | null;
/**
* Option for export offload.
*/
offload?: boolean | null;
/**
* Options for exporting data as SQL statements.
*/
sqlExportOptions?: {
mysqlExportOptions?: {
masterData?: number;
};
schemaOnly?: boolean;
tables?: string[];
} | null;
/**
* 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 | null;
}
/**
* Database instance failover context.
*/
export interface Schema$FailoverContext {
/**
* This is always *sql#failoverContext*.
*/
kind?: string | null;
/**
* The current settings version of this instance. Request will be rejected if this version doesn't match the current settings version.
*/
settingsVersion?: string | null;
}
/**
* A flag resource.
*/
export interface Schema$Flag {
/**
* Use this field if only certain integers are accepted. Can be combined with min_value and max_value to add additional values.
*/
allowedIntValues?: string[] | null;
/**
* For *STRING* flags, a list of strings that the value can be set to.
*/
allowedStringValues?: string[] | null;
/**
* 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[] | null;
/**
* Whether or not the flag is considered in beta.
*/
inBeta?: boolean | null;
/**
* This is always *sql#flag*.
*/
kind?: string | null;
/**
* For *INTEGER* flags, the maximum allowed value.
*/
maxValue?: string | null;
/**
* For *INTEGER* flags, the minimum allowed value.
*/
minValue?: string | null;
/**
* This is the name of the flag. Flag names always use underscores, not hyphens, for example: *max_allowed_packet*
*/
name?: string | null;
/**
* Indicates whether changing this flag will trigger a database restart. Only applicable to Second Generation instances.
*/
requiresRestart?: boolean | null;
/**
* 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 | null;
}
/**
* Flags list response.
*/
export interface Schema$FlagsListResponse {
/**
* List of flags.
*/
items?: Schema$Flag[];
/**
* This is always *sql#flagsList*.
*/
kind?: string | null;
}
/**
* 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;
}
/**
* Database instance clone request.
*/
export interface Schema$InstancesCloneRequest {
/**
* Contains details about the clone operation.
*/
cloneContext?: Schema$CloneContext;
}
/**
* Database demote master 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 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 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;
/**
* 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 | null;
}
/**
* Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified.
*/
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*.
*/
kind?: string | null;
/**
* The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
*/
zone?: string | null;
}
/**
* Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes.
*/
export interface Schema$MaintenanceWindow {
/**
* day of week (1-7), starting on Monday.
*/
day?: number | null;
/**
* hour of day - 0 to 23.
*/
hour?: number | null;
/**
* This is always *sql#maintenanceWindow*.
*/
kind?: string | null;
/**
* Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
*/
updateTrack?: string | null;
}
/**
* Read-replica configuration specific to MySQL databases.
*/
export interface Schema$MySqlReplicaConfiguration {
/**
* 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.
*/
clientKey?: string | null;
/**
* Seconds to wait between connect retries. MySQL's default is 60 seconds.
*/
connectRetryInterval?: number | null;
/**
* Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.
*/
dumpFilePath?: string | null;
/**
* This is always *sql#mysqlReplicaConfiguration*.
*/
kind?: string | null;
/**
* Interval in milliseconds between replication heartbeats.
*/
masterHeartbeatPeriod?: string | null;
/**
* The password for the replication connection.
*/
password?: string | null;
/**
* A list of permissible ciphers to use for SSL encryption.
*/
sslCipher?: string | null;
/**
* The username for the replication connection.
*/
username?: string | null;
/**
* Whether or not to check the master's Common Name value in the certificate that it sends during the SSL handshake.
*/
verifyServerCertificate?: boolean | null;
}
/**
* On-premises instance configuration.
*/
export interface Schema$OnPremisesConfiguration {
/**
* 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.
*/
clientKey?: string | null;
/**
* The dump file to create the Cloud SQL replica.
*/
dumpFilePath?: string | null;
/**
* The host and port of the on-premises instance in host:port format
*/
hostPort?: string | null;
/**
* This is always *sql#onPremisesConfiguration*.
*/
kind?: string | null;
/**
* The password for connecting to on-premises instance.
*/
password?: string | null;
/**
* The username for connecting to on-premises instance.
*/
username?: string | null;
}
/**
* 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$Operation {
/**
* The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
*/
endTime?: string | null;
/**
* 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 | null;
/**
* This is always *sql#operation*.
*/
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.
*/
name?: string | null;
/**
* 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 | null;
/**
* The URI of this resource.
*/
selfLink?: string | null;
/**
* The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
*/
startTime?: string | null;
/**
* The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
*/
status?: string | null;
/**
* Name of the database instance related to this operation.
*/
targetId?: string | null;
targetLink?: string | null;
/**
* The project ID of the target instance related to this operation.
*/
targetProject?: string | null;
/**
* The email address of the user who initiated this operation.
*/
user?: string | null;
}
/**
* Database instance operation error.
*/
export interface Schema$OperationError {
/**
* Identifies the specific error that occurred.
*/
code?: string | null;
/**
* This is always *sql#operationError*.
*/
kind?: string | null;
/**
* Additional information about the error encountered.
*/
message?: string | null;
}
/**
* Database instance operation errors list wrapper.
*/
export interface Schema$OperationErrors {
/**
* The list of errors encountered while processing this operation.
*/
errors?: Schema$OperationError[];
/**
* This is always *sql#operationErrors*.
*/
kind?: string | null;
}
/**
* Database instance list operations response.
*/
export interface Schema$OperationsListResponse {
/**
* List of operation resources.
*/
items?: Schema$Operation[];
/**
* This is always *sql#operationsList*.
*/
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;
}
/**
* Read-replica configuration for connecting to the master.
*/
export 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 | null;
/**
* This is always *sql#replicaConfiguration*.
*/
kind?: string | null;
/**
* 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;
}
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;
/**
* 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.
*/
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. Not used for First Generation instances.
*/
dataDiskType?: string | null;
/**
* 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 either an App Engine app or Compute Engine zone for better performance. App Engine co-location was 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.
*/
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;
/**
* The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances).
*/
tier?: string | null;
/**
* User-provided labels, represented as a dictionary where each label is a single key value pair.
*/
userLabels?: {
[key: string]: string;
} | null;
}
/**
* External master migration setting error.
*/
export interface Schema$SqlExternalSyncSettingError {
/**
* Additional information about the error encountered.
*/
detail?: string | null;
/**
* This is always *sql#migrationSettingError*.
*/
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 verify external sync settings response.
*/
export interface Schema$SqlInstancesVerifyExternalSyncSettingsResponse {
/**
* List of migration violations.
*/
errors?: Schema$SqlExternalSyncSettingError[];
/**
* This is always *sql#migrationSettingErrorList*.
*/
kind?: 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;
/**
* 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 numbe