UNPKG

googleapis

Version:
1,309 lines 178 kB
/// <reference types="node" /> import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { Readable } from 'stream'; export declare namespace sqladmin_v1 { export interface Options extends GlobalOptions { version: 'v1'; } 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('v1'); * ``` */ export class Sqladmin { context: APIRequestContext; backupRuns: Resource$Backupruns; connect: Resource$Connect; databases: Resource$Databases; flags: Resource$Flags; instances: Resource$Instances; operations: Resource$Operations; projects: Resource$Projects; sslCerts: Resource$Sslcerts; tiers: Resource$Tiers; users: Resource$Users; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * 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; } /** * 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; } /** * Database instance backup configuration. */ export interface Schema$BackupConfiguration { /** * Backup retention settings. */ backupRetentionSettings?: Schema$BackupRetentionSettings; /** * (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; /** * 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; } /** * 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; /** * 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; /** * 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. (Point-in-time recovery for PostgreSQL only) Clone to an instance in the specified zone. If no zone is specified, clone to the same zone as the source instance. */ preferredZone?: 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; /** * The database engine type and version. The `databaseVersion` field cannot be changed after instance creation. MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11`, `POSTGRES_12` (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; /** * The assigned IP addresses for the instance. */ ipAddresses?: Schema$IpMapping[]; /** * This is always `sql#connectSettings`. */ kind?: string | null; /** * Whether PSC connectivity is enabled for this instance. */ pscEnabled?: boolean | null; /** * The cloud region for the instance. For example, `us-central1`, `europe-west1`. The region cannot be changed after instance creation. */ region?: string | null; /** * SSL configuration. */ serverCaCert?: Schema$SslCert; } /** * Represents a SQL database on the Cloud SQL instance. */ export interface Schema$Database { /** * The Cloud SQL charset value. */ charset?: string | null; /** * The Cloud SQL collation value. */ collation?: string | null; /** * This field is deprecated and will be removed from a future version of the API. */ etag?: string | null; /** * The name of the Cloud SQL instance. This does not include the project ID. */ instance?: string | null; /** * This is always `sql#database`. */ kind?: string | null; /** * The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. */ name?: string | null; /** * The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. */ project?: string | null; /** * The URI of this resource. */ selfLink?: string | null; sqlserverDatabaseDetails?: Schema$SqlServerDatabaseDetails; } /** * Database flags for Cloud SQL instances. */ export interface Schema$DatabaseFlags { /** * The name of the flag. These flags are passed at instance startup, so include both server options and system variables. 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; /** * 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; /** * 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; /** * 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; /** * 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. 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. You must set root passwords before you can connect to PostgreSQL instances. */ rootPassword?: string | null; /** * The status indicating if instance satisfiesPzs. 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 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; } /** * 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; } /** * 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 corresponsing public key is encoded in the client's certificate. The format of the replica's private key can be either PKCS #1 or PKCS #8. */ clientKey?: string | null; /** * This is always `sql#demoteMasterMysqlReplicaConfiguration`. */ kind?: string | null; /** * The password for the replication connection. */ password?: string | null; /** * The username for the replication connection. */ username?: string | null; } /** * Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied. */ 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 no maintenance interval 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; } /** * 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 { } /** * Database instance export context. */ export interface Schema$ExportContext { /** * Options for exporting BAK files (SQL Server-only) */ bakExportOptions?: { bakType?: string; copyOnly?: boolean; differentialBase?: boolean; 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:` You must specify one database to be exported. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`. */ databases?: string[] | null; /** * The file type for the specified uri. */ 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 request 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 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; /** * 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 that 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; } /** * Ephemeral certificate creation request. */ export interface Schema$GenerateEphemeralCertRequest { /** * Optional. Access token to include in the signed certificate. */ access_token?: string | null; /** * PEM encoded public key to include in the signed certificate. */ public_key?: string | null; /** * Optional. Optional snapshot read timestamp to trade freshness for performance. */ readTime?: string | null; /** * Optional. If set, it will contain the cert valid duration. */ validDuration?: string | null; } /** * Ephemeral certificate creation request. */ export interface Schema$GenerateEphemeralCertResponse { /** * Generated cert */ ephemeralCert?: Schema$SslCert; } /** * Database instance import context. */ export interface Schema$ImportContext { /** * Import parameters specific to SQL Server .BAK files */ bakImportOptions?: { bakType?: string; encryptionOptions?: { certPath?: string; pvkPassword?: string; pvkPath?: string; }; noRecovery?: boolean; recoveryOnly?: boolean; stopAt?: string; stopAtMark?: string; striped?: boolean; } | null; /** * Options for importing data as CSV. */ csvImportOptions?: { columns?: string[]; escapeCharacter?: string; fieldsTerminatedBy?: string; linesTerminatedBy?: string; quoteCharacter?: string; table?: string; } | null; /** * The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If `fileType` is `CSV`, one database must be specified. */ database?: string | null; /** * The file type for the specified uri.\`SQL`: The file contains SQL statements. \`CSV`: The file contains CSV data. */ fileType?: string | null; /** * The PostgreSQL user for this import operation. PostgreSQL instances only. */ importUser?: string | null; /** * This is always `sql#importContext`. */ kind?: string | null; /** * Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file. */ uri?: string | null; } /** * Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration. */ export interface Schema$InsightsConfig { /** * Whether Query Insights feature is enabled. */ queryInsightsEnabled?: boolean | null; /** * Number of query execution plans captured by Insights per minute for all queries combined. Default is 5. */ queryPlansPerMinute?: number | null; /** * Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value. Changing query length will restart the database. */ queryStringLength?: number | null; /** * Whether Query Insights will record application tags from query when enabled. */ recordApplicationTags?: boolean | null; /** * Whether Query Insights will record client address when enabled. */ recordClientAddress?: boolean | null; } /** * Reference to another Cloud SQL instance. */ export interface Schema$InstanceReference { /** * The name of the Cloud SQL instance being referenced. This does not include the project ID. */ name?: string | null; /** * The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it. */ project?: string | null; /** * The region of the Cloud SQL instance being referenced. */ region?: string | null; } /** * Database instance clone request. */ export interface Schema$InstancesCloneRequest { /** * Contains details about the clone operation. */ cloneContext?: Schema$CloneContext; } /** * Database demote primary instance request. */ export interface Schema$InstancesDemoteMasterRequest { /** * Contains details about the demoteMaster operation. */ demoteMasterContext?: Schema$DemoteMasterContext; } /** * Database instance export request. */ export interface Schema$InstancesExportRequest { /** * Contains details about the export operation. */ exportContext?: Schema$ExportContext; } /** * Instance failover request. */ export interface Schema$InstancesFailoverRequest { /** * Failover Context. */ failoverContext?: Schema$FailoverContext; } /** * Database instance import request. */ export interface Schema$InstancesImportRequest { /** * Contains details about the import operation. */ importContext?: Schema$ImportContext; } /** * Database instances list response. */ export interface Schema$InstancesListResponse { /** * List of database instance resources. */ items?: Schema$DatabaseInstance[]; /** * This is always `sql#instancesList`. */ kind?: string | null; /** * The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. */ nextPageToken?: string | null; /** * List of warnings that occurred while handling the request. */ warnings?: Schema$ApiWarning[]; } /** * Instances ListServerCas response. */ export interface Schema$InstancesListServerCasResponse { activeVersion?: string | null; /** * List of server CA certificates for the instance. */ certs?: Schema$SslCert[]; /** * This is always `sql#instancesListServerCas`. */ kind?: string | null; } /** * Database Instance reencrypt request. */ export interface Schema$InstancesReencryptRequest { /** * Configuration specific to backup re-encryption */ backupReencryptionConfig?: Schema$BackupReencryptionConfig; } /** * Database instance restore backup request. */ export interface Schema$InstancesRestoreBackupRequest { /** * Parameters required to perform the restore backup operation. */ restoreBackupContext?: Schema$RestoreBackupContext; } /** * Rotate server CA request. */ export interface Schema$InstancesRotateServerCaRequest { /** * Contains details about the rotate server CA operation. */ rotateServerCaContext?: Schema$RotateServerCaContext; } /** * Instance truncate log request. */ export interface Schema$InstancesTruncateLogRequest { /** * Contains details about the truncate log operation. */ truncateLogContext?: Schema$TruncateLogContext; } /** * IP Management configuration. */ export interface Schema$IpConfiguration { /** * The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.` */ allocatedIpRange?: string | null; /** * The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`). */ authorizedNetworks?: Schema$AclEntry[]; /** * Controls connectivity to private IP instances from Google services, such as BigQuery. */ enablePrivatePathForGoogleCloudServices?: boolean | null; /** * 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, `/projects/myProject/global/networks/default`. This setting can be updated, but it cannot be removed after it is set. */ privateNetwork?: string | null; /** * PSC settings for this instance. */ pscConfig?: Schema$PscConfig; /** * Whether SSL connections over IP are enforced or not. */ requireSsl?: boolean | null; } /** * Database instance IP Mapping. */ export interface Schema$IpMapping { /** * The IP address assigned. */ ipAddress?: string | null; /** * The due time for this IP to be retired in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. This field is only available when the IP is scheduled to be retired. */ timeToRetire?: string | null; /** * 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. 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. WARNING: Changing this might restart the instance. */ followGaeApplication?: string | null; /** * This is always `sql#locationPreference`. */ kind?: string | null; /** * The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). */ secondaryZone?: string | null; /** * The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). WARNING: Changing this might restart the instance. */ 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](https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen). */ 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 primary instance's Common Name value in the certificate that it sends during the SSL handshake. */ verifyServerCertificate?: boolean | null; } /** * MySQL-specific external server sync settings. */ export interface Schema$MySqlSyncConfig { /** * Flags to use for the initial dump. */ initialSyncFlags?: Schema$SyncFlags[]; } /** * 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 reference to Cloud SQL instance if the source is Cloud SQL. */ sourceInstance?: Schema$InstanceReference; /** * 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 context for backup operation, if applicable. */ backupContext?: Schema$BackupContext; /** * The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. */ endTime?: string | null; /** * If