googleapis
Version:
Google APIs Client Library for Node.js
1,271 lines • 480 kB
TypeScript
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace sqladmin_v1beta4 {
export interface Options extends GlobalOptions {
version: 'v1beta4';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | 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
* ```js
* const {google} = require('googleapis');
* const sqladmin = google.sqladmin('v1beta4');
* ```
*/
export class Sqladmin {
context: APIRequestContext;
backupRuns: Resource$Backupruns;
backups: Resource$Backups;
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);
}
/**
* An entry for an Access Control list.
*/
export interface Schema$AclEntry {
/**
* The time when this access control entry expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
*/
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;
}
/**
* Acquire SSRS lease context.
*/
export interface Schema$AcquireSsrsLeaseContext {
/**
* Lease duration needed for the SSRS setup.
*/
duration?: string | null;
/**
* The report database to be used for the SSRS setup.
*/
reportDatabase?: string | null;
/**
* The username to be used as the service login to connect to the report database for SSRS setup.
*/
serviceLogin?: string | null;
/**
* The username to be used as the setup login to connect to the database server for SSRS setup.
*/
setupLogin?: string | null;
}
/**
* Specifies options for controlling advanced machine features.
*/
export interface Schema$AdvancedMachineFeatures {
/**
* The number of threads per physical core.
*/
threadsPerCore?: number | 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;
/**
* The region name for REGION_UNREACHABLE warning.
*/
region?: string | null;
}
/**
* An available database version. It can be a major or a minor version.
*/
export interface Schema$AvailableDatabaseVersion {
/**
* The database version's display name.
*/
displayName?: string | null;
/**
* The version's major version name.
*/
majorVersion?: string | null;
/**
* The database version name. For MySQL 8.0, this string provides the database major and minor version.
*/
name?: string | null;
}
/**
* A backup resource.
*/
export interface Schema$Backup {
/**
* Output only. This output contains the following values: start_time: All database writes up to this time are available. end_time: Any database writes after this time aren't available.
*/
backupInterval?: Schema$Interval;
/**
* Output only. Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
*/
backupKind?: string | null;
/**
* Output only. The mapping to backup run resource used for IAM validations.
*/
backupRun?: string | null;
/**
* Output only. The database version of the instance of at the time this backup was made.
*/
databaseVersion?: string | null;
/**
* The description of this backup.
*/
description?: string | null;
/**
* Output only. Information about why the backup operation fails (for example, when the backup state fails).
*/
error?: Schema$OperationError;
/**
* Backup expiration time. A UTC timestamp of when this resource expired.
*/
expiryTime?: string | null;
/**
* The name of the database instance.
*/
instance?: string | null;
/**
* Optional. Output only. Timestamp in UTC of when the instance associated with this backup is deleted.
*/
instanceDeletionTime?: string | null;
/**
* Optional. Output only. Instance setting of the source instance that's associated with this backup.
*/
instanceSettings?: Schema$DatabaseInstance;
/**
* Output only. This is always `sql#backup`.
*/
kind?: string | null;
/**
* Output only. This output contains the encryption configuration for a backup and the resource name of the KMS key for disk encryption.
*/
kmsKey?: string | null;
/**
* Output only. This output contains the encryption status for a backup and the version of the KMS key that's used to encrypt the Cloud SQL instance.
*/
kmsKeyVersion?: string | null;
/**
* The storage location of the backups. The location can be multi-regional.
*/
location?: string | null;
/**
* Output only. The maximum chargeable bytes for the backup.
*/
maxChargeableBytes?: string | null;
/**
* Output only. The resource name of the backup. Format: projects/{project\}/backups/{backup\}.
*/
name?: string | null;
/**
* Output only. This status indicates whether the backup satisfies PZI. The status is reserved for future use.
*/
satisfiesPzi?: boolean | null;
/**
* Output only. This status indicates whether the backup satisfies PZS. The status is reserved for future use.
*/
satisfiesPzs?: boolean | null;
/**
* Output only. The URI of this resource.
*/
selfLink?: string | null;
/**
* Output only. The state of this backup.
*/
state?: string | null;
/**
* Output only. This output contains a backup time zone. If a Cloud SQL for SQL Server instance has a different time zone from the backup's time zone, then the restore to the instance doesn't happen.
*/
timeZone?: string | null;
/**
* Input only. The time-to-live (TTL) interval for this resource (in days). For example: ttlDays:7, means 7 days from the current time. The expiration time can't exceed 365 days from the time that the backup is created.
*/
ttlDays?: string | null;
/**
* Output only. The type of this backup. The type can be "AUTOMATED", "ON_DEMAND", or “FINAL”.
*/
type?: string | null;
}
/**
* Database instance backup configuration.
*/
export interface Schema$BackupConfiguration {
/**
* Backup retention settings.
*/
backupRetentionSettings?: Schema$BackupRetentionSettings;
/**
* Output only. Backup tier that manages the backups for the instance.
*/
backupTier?: string | null;
/**
* (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;
/**
* Whether point in time recovery is enabled.
*/
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;
/**
* Output only. This value contains the storage location of transactional logs for the database for point-in-time recovery.
*/
transactionalLogStorageState?: string | null;
/**
* The number of days of transaction logs we retain for point in time restore, from 1-7.
*/
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;
/**
* The name of the backup. Format: projects/{project\}/backups/{backup\}
*/
name?: string | null;
}
/**
* Backup Reencryption Config
*/
export interface Schema$BackupReencryptionConfig {
/**
* Backup re-encryption limit
*/
backupLimit?: number | null;
/**
* Type of backups users want to re-encrypt.
*/
backupType?: string | null;
}
/**
* We currently only support backup retention by specifying the number of backups we will retain.
*/
export interface Schema$BackupRetentionSettings {
/**
* Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.
*/
retainedBackups?: number | null;
/**
* The unit that 'retained_backups' represents.
*/
retentionUnit?: string | null;
}
/**
* A BackupRun resource.
*/
export interface Schema$BackupRun {
/**
* Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
*/
backupKind?: string | null;
/**
* Output only. The instance database version at the time this backup was made.
*/
databaseVersion?: 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](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
*/
endTime?: string | null;
/**
* The time the run was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
*/
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;
/**
* Output only. The maximum chargeable bytes for the backup.
*/
maxChargeableBytes?: string | null;
/**
* The URI of this resource.
*/
selfLink?: string | null;
/**
* The time the backup operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
*/
startTime?: string | null;
/**
* The status of this run.
*/
status?: string | null;
/**
* Backup time zone to prevent restores to an instance with a different time zone. Now relevant only for SQL Server.
*/
timeZone?: string | null;
/**
* The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". This field defaults to "ON_DEMAND" and is ignored, when specified for insert requests.
*/
type?: string | null;
/**
* The start time of the backup window during which this the backup was attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
*/
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 {
/**
* The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. Reserved for future use.
*/
allocatedIpRange?: string | null;
/**
* 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;
/**
* (SQL Server only) Clone only the specified databases from the source instance. Clone all databases if empty.
*/
databaseNames?: string[] | null;
/**
* 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;
/**
* Optional. Copy clone and point-in-time recovery clone of a regional instance in the specified zones. If not specified, clone to the same secondary zone as the source instance. This value cannot be the same as the preferred_zone field.
*/
preferredSecondaryZone?: string | null;
/**
* Optional. Copy clone and point-in-time recovery clone of an instance to the specified zone. If no zone is specified, clone to the same primary zone as the source instance.
*/
preferredZone?: string | null;
/**
* The timestamp used to identify the time when the source instance is deleted. If this instance is deleted, then you must set the timestamp.
*/
sourceInstanceDeletionTime?: string | null;
}
/**
* Contains the name and datatype of a column.
*/
export interface Schema$Column {
/**
* Name of the column.
*/
name?: string | null;
/**
* Datatype of the column.
*/
type?: string | null;
}
/**
* The managed connection pooling configuration.
*/
export interface Schema$ConnectionPoolConfig {
/**
* Whether managed connection pooling is enabled.
*/
connectionPoolingEnabled?: boolean | null;
/**
* Optional. List of connection pool configuration flags.
*/
flags?: Schema$ConnectionPoolFlags[];
/**
* Output only. Number of connection poolers.
*/
poolerCount?: number | null;
}
/**
* Connection pool flags for Cloud SQL instances managed connection pool configuration.
*/
export interface Schema$ConnectionPoolFlags {
/**
* Required. The name of the flag.
*/
name?: string | null;
/**
* Required. The value of the flag. Boolean flags are set to `on` for true and `off` for false. This field must be omitted if the flag doesn't take a value.
*/
value?: string | null;
}
/**
* Details of a single read pool node of a read pool.
*/
export interface Schema$ConnectPoolNodeConfig {
/**
* Output only. The DNS name of the read pool node.
*/
dnsName?: string | null;
/**
* Output only. The list of DNS names used by this read pool node.
*/
dnsNames?: Schema$DnsNameMapping[];
/**
* Output only. Mappings containing IP addresses that can be used to connect to the read pool node.
*/
ipAddresses?: Schema$IpMapping[];
/**
* Output only. The name of the read pool node. Doesn't include the project ID.
*/
name?: string | null;
}
/**
* Connect settings retrieval response.
*/
export interface Schema$ConnectSettings {
/**
* `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;
/**
* Custom subject alternative names for the server certificate.
*/
customSubjectAlternativeNames?: 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` or `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. SQL Server instances: `SQLSERVER_2017_STANDARD` (default), `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or `SQLSERVER_2019_WEB`.
*/
databaseVersion?: string | null;
/**
* The dns name of the instance.
*/
dnsName?: string | null;
/**
* Output only. The list of DNS names used by this instance.
*/
dnsNames?: Schema$DnsNameMapping[];
/**
* The assigned IP addresses for the instance.
*/
ipAddresses?: Schema$IpMapping[];
/**
* This is always `sql#connectSettings`.
*/
kind?: string | null;
/**
* Optional. Output only. mdx_protocol_support controls how the client uses metadata exchange when connecting to the instance. The values in the list representing parts of the MDX protocol that are supported by this instance. When the list is empty, the instance does not support MDX, so the client must not send an MDX request. The default is empty.
*/
mdxProtocolSupport?: string[] | null;
/**
* The number of read pool nodes in a read pool.
*/
nodeCount?: number | null;
/**
* Output only. Entries containing information about each read pool node of the read pool.
*/
nodes?: Schema$ConnectPoolNodeConfig[];
/**
* Whether PSC connectivity is enabled for this instance.
*/
pscEnabled?: boolean | null;
/**
* The cloud region for the instance. e.g. `us-central1`, `europe-west1`. The region cannot be changed after instance creation.
*/
region?: string | null;
/**
* SSL configuration.
*/
serverCaCert?: Schema$SslCert;
/**
* Specify what type of CA is used for the server certificate.
*/
serverCaMode?: 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. 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;
/**
* The value of the flag. Boolean flags are set to `on` for true and `off` for false. This field must be omitted if the flag doesn't take a value.
*/
value?: string | null;
}
/**
* A Cloud SQL instance resource.
*/
export interface Schema$DatabaseInstance {
/**
* Output only. List all maintenance versions applicable on the instance
*/
availableMaintenanceVersions?: string[] | null;
/**
* The backend type. `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type.
*/
backendType?: string | null;
/**
* Connection name of the Cloud SQL instance used in connection strings.
*/
connectionName?: string | null;
/**
* Output only. The time when the instance was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
*/
createTime?: 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](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) for details.
*/
currentDiskSize?: string | null;
/**
* Output only. Stores the current database version running on the instance including minor version such as `MYSQL_8_0_18`.
*/
databaseInstalledVersion?: string | null;
/**
* The database engine type and version. The `databaseVersion` field cannot be changed after instance creation.
*/
databaseVersion?: string | null;
/**
* Disk encryption configuration specific to an instance.
*/
diskEncryptionConfiguration?: Schema$DiskEncryptionConfiguration;
/**
* Disk encryption status specific to an instance.
*/
diskEncryptionStatus?: Schema$DiskEncryptionStatus;
/**
* Output only. The dns name of the instance.
*/
dnsName?: string | null;
/**
* Output only. The list of DNS names used by this instance.
*/
dnsNames?: Schema$DnsNameMapping[];
/**
* 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.
*/
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. WARNING: Changing this might restart the instance.
*/
gceZone?: string | null;
/**
* Gemini instance configuration.
*/
geminiConfig?: Schema$GeminiInstanceConfig;
/**
* Input only. Determines whether an in-place major version upgrade of replicas happens when an in-place major version upgrade of a primary instance is initiated.
*/
includeReplicasForMajorVersionUpgrade?: boolean | null;
/**
* The instance type.
*/
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 current software version on the instance.
*/
maintenanceVersion?: string | null;
/**
* The name of the instance which will act as primary 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;
/**
* The number of read pool nodes in a read pool.
*/
nodeCount?: number | null;
/**
* Output only. Entries containing information about each read pool node of the read pool.
*/
nodes?: Schema$PoolNodeConfig[];
/**
* Configuration specific to on-premises instances.
*/
onPremisesConfiguration?: Schema$OnPremisesConfiguration;
/**
* This field represents the report generated by the proactive database wellness job for OutOfDisk issues. * Writers: * the proactive database wellness job for OOD. * Readers: * the proactive database wellness job
*/
outOfDiskReport?: Schema$SqlOutOfDiskReport;
/**
* Output only. DEPRECATED: please use write_endpoint instead.
*/
primaryDnsName?: string | null;
/**
* The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
*/
project?: string | null;
/**
* Output only. The link to service attachment of PSC instance.
*/
pscServiceAttachmentLink?: string | null;
/**
* The geographical region of the Cloud SQL instance. It can be one of the [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) where Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and `us-central1`. The default value is `us-central1`.
*/
region?: string | null;
/**
* Configuration specific to failover replicas and read replicas.
*/
replicaConfiguration?: Schema$ReplicaConfiguration;
/**
* The replicas of the instance.
*/
replicaNames?: string[] | null;
/**
* A primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance experiences regional failure. Applicable to MySQL and PostgreSQL.
*/
replicationCluster?: Schema$ReplicationCluster;
/**
* Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances.
*/
rootPassword?: string | null;
/**
* Output only. This status indicates whether the instance satisfies PZI. The status is reserved for future use.
*/
satisfiesPzi?: boolean | null;
/**
* This status indicates whether the instance satisfies PZS. The status is reserved for future use.
*/
satisfiesPzs?: boolean | null;
/**
* The start time of any upcoming scheduled maintenance for this instance.
*/
scheduledMaintenance?: Schema$SqlScheduledMaintenance;
/**
* The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone.
*/
secondaryGceZone?: string | null;
/**
* 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 read-only.
*/
serviceAccountEmailAddress?: string | null;
/**
* The user settings.
*/
settings?: Schema$Settings;
/**
* The SQL network architecture for the instance.
*/
sqlNetworkArchitecture?: string | null;
/**
* The current serving state of the Cloud SQL instance.
*/
state?: string | null;
/**
* If the instance state is SUSPENDED, the reason for the suspension.
*/
suspensionReason?: string[] | null;
/**
* Input only. Whether Cloud SQL is enabled to switch storing point-in-time recovery log files from a data disk to Cloud Storage.
*/
switchTransactionLogsToCloudStorageEnabled?: boolean | null;
/**
* Optional. Input only. Immutable. Tag keys and tag values that are bound to this instance. You must represent each item in the map as: `"" : ""`. For example, a single resource can have the following tags: ``` "123/environment": "production", "123/costCenter": "marketing", ``` For more information on tag creation and management, see https://cloud.google.com/resource-manager/docs/tags/tags-overview.
*/
tags?: {
[key: string]: string;
} | null;
/**
* Output only. All database versions that are available for upgrade.
*/
upgradableDatabaseVersions?: Schema$AvailableDatabaseVersion[];
/**
* Output only. The dns name of the primary instance in a replication group.
*/
writeEndpoint?: 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;
}
/**
* Data cache configurations.
*/
export interface Schema$DataCacheConfig {
/**
* Whether data cache is enabled for the instance.
*/
dataCacheEnabled?: boolean | null;
}
/**
* This context is used to demote an existing standalone instance to be a Cloud SQL read replica for an external database server.
*/
export interface Schema$DemoteContext {
/**
* This is always `sql#demoteContext`.
*/
kind?: string | null;
/**
* Required. The name of the instance which acts as an on-premises primary instance in the replication setup.
*/
sourceRepresentativeInstanceName?: 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;
/**
* Flag to skip replication setup on the instance.
*/
skipReplicationSetup?: boolean | null;
/**
* Verify the GTID consistency for demote operation. Default value: `True`. Setting this flag to `false` enables you to bypass the GTID consistency check between on-premises primary instance and Cloud SQL instance during the demotion operation but also exposes you to the risk of future replication failures. Change the value only if you know the reason for the GTID divergence and are confident that doing so will not cause any replication issues.
*/
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 corresponding 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.
*/
export interface Schema$DenyMaintenancePeriod {
/**
* "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
*/
endDate?: string | null;
/**
* "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
*/
startDate?: string | null;
/**
* Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
*/
time?: 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;
}
/**
* DNS metadata.
*/
export interface Schema$DnsNameMapping {
/**
* Output only. The connection type of the DNS name.
*/
connectionType?: string | null;
/**
* Output only. The scope that the DNS name applies to.
*/
dnsScope?: string | null;
/**
* Output only. The DNS name.
*/
name?: string | null;
/**
* Output only. The manager for this DNS record.
*/
recordManager?: string | null;
}
/**
* A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
*/
export interface Schema$Empty {
}
/**
* The request payload used to execute SQL statements.
*/
export interface Schema$ExecuteSqlPayload {
/**
* Optional. Specifies the name of the application that is making the request. This field is used for telemetry. Only alphanumeric characters, dashes, and underscores are allowed. The maximum length is 32 characters.
*/
application?: string | null;
/**
* Optional. When set to true, the API caller identity associated with the request is used for database authentication. The API caller must be an IAM user in the database.
*/
autoIamAuthn?: boolean | null;
/**
* Optional. Name of the database on which the statement will be executed.
*/
database?: string | null;
/**
* Optional. Controls how the API should respond when the SQL execution result is incomplete due to the size limit or another error. The default mode is to throw an error.
*/
partialResultMode?: string | null;
/**
* Optional. The maximum number of rows returned per SQL statement.
*/
rowLimit?: string | null;
/**
* Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons.
*/
sqlStatement?: string | null;
/**
* Optional. The name of an existing database user to connect to the database. When `auto_iam_authn` is set to true, this field is ignored and the API caller's IAM user is used.
*/
user?: string | null;
}
/**
* Database instance export context.
*/
export interface Schema$ExportContext {
/**
* Options for exporting BAK files (SQL Server-only)
*/
bakExportOptions?: {
bakType?: string;
copyOnly?: boolean;
differentialBase?: boolean;
exportLogEndTime?: string;
exportLogStartTime?: string;
stripeCount?: number;
striped?: boolean;
} | null;
/**
* Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.
*/
csvExportOptions?: {
escapeCharacter?: string;
fieldsTerminatedBy?: string;
linesTerminatedBy?: string;
quoteCharacter?: string;
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:` If you don't specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. 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`.
*/
databases?: string[] | null;
/**
* The file type for the specified uri.
*/
fileType?: string | null;
/**
* This is always `sql#exportContext`.
*/
kind?: string | null;
/**
* Whether to perform a serverless export.
*/
offload?: boolean | null;
/**
* Options for exporting data as SQL statements.
*/
sqlExportOptions?: {
mysqlExportOptions?: {
masterData?: number;
};
parallel?: boolean;
postgresExportOptions?: {
clean?: boolean;
ifExists?: boolean;
};
schemaOnly?: boolean;
tables?: string[];
threads?: number;
} | null;
/**
* Optional. Export parameters specific to SQL Server TDE certificates
*/
tdeExportOptions?: {
certificatePath?: string;
name?: string;
privateKeyPassword?: string;
privateKeyPath?: 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 request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.
*/
uri?: string | null;
}
/**
* The selected object that Cloud SQL migrates.
*/
export interface Schema$ExternalSyncSelectedObject {
/**
* The name of the database that Cloud SQL migrates.
*/
database?: 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;
}
/**
* Config used to determine the final backup settings for the instance.
*/
export interface Schema$FinalBackupConfig {
/**
* Whether the final backup is enabled for the instance.
*/
enabled?: boolean | null;
/**
* The number of days to retain the final backup after the instance deletion. The final backup will be purged at (time_of_instance_deletion + retention_days).
*/
retentionDays?: number | 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 instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or `SQLSERVER_2019_WEB`. See [the complete list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
*/
appliesTo?: string[] | null;
/**
* Scope of flag.
*/
flagScope?: 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;
/**
* Recommended flag value in integer format for UI display.
*/
recommendedIntValue?: string | null;
/**
* Recommended flag value in string format for UI display.
*/
recommendedStringValue?: 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