@googleapis/sqladmin 7.2.0 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v1beta4.ts CHANGED
@@ -163,6 +163,15 @@ export namespace sqladmin_v1beta4 {
163
163
  */
164
164
  value?: string | null;
165
165
  }
166
+ /**
167
+ * Specifies options for controlling advanced machine features.
168
+ */
169
+ export interface Schema$AdvancedMachineFeatures {
170
+ /**
171
+ * The number of threads per physical core.
172
+ */
173
+ threadsPerCore?: number | null;
174
+ }
166
175
  /**
167
176
  * An Admin API warning message.
168
177
  */
@@ -205,7 +214,7 @@ export namespace sqladmin_v1beta4 {
205
214
  */
206
215
  location?: string | null;
207
216
  /**
208
- * (Postgres only) Whether point in time recovery is enabled.
217
+ * Whether point in time recovery is enabled.
209
218
  */
210
219
  pointInTimeRecoveryEnabled?: boolean | null;
211
220
  /**
@@ -234,6 +243,19 @@ export namespace sqladmin_v1beta4 {
234
243
  */
235
244
  kind?: string | null;
236
245
  }
246
+ /**
247
+ * Backup Reencryption Config
248
+ */
249
+ export interface Schema$BackupReencryptionConfig {
250
+ /**
251
+ * Backup re-encryption limit
252
+ */
253
+ backupLimit?: number | null;
254
+ /**
255
+ * Type of backups users want to re-encrypt.
256
+ */
257
+ backupType?: string | null;
258
+ }
237
259
  /**
238
260
  * We currently only support backup retention by specifying the number of backups we will retain.
239
261
  */
@@ -399,6 +421,10 @@ export namespace sqladmin_v1beta4 {
399
421
  * 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`.
400
422
  */
401
423
  databaseVersion?: string | null;
424
+ /**
425
+ * The dns name of the instance.
426
+ */
427
+ dnsName?: string | null;
402
428
  /**
403
429
  * The assigned IP addresses for the instance.
404
430
  */
@@ -472,7 +498,7 @@ export namespace sqladmin_v1beta4 {
472
498
  */
473
499
  export interface Schema$DatabaseInstance {
474
500
  /**
475
- * List all maintenance versions applicable on the instance
501
+ * Output only. List all maintenance versions applicable on the instance
476
502
  */
477
503
  availableMaintenanceVersions?: string[] | null;
478
504
  /**
@@ -739,6 +765,10 @@ export namespace sqladmin_v1beta4 {
739
765
  */
740
766
  kmsKeyVersionName?: string | null;
741
767
  }
768
+ /**
769
+ * 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); \}
770
+ */
771
+ export interface Schema$Empty {}
742
772
  /**
743
773
  * Database instance export context.
744
774
  */
@@ -746,7 +776,13 @@ export namespace sqladmin_v1beta4 {
746
776
  /**
747
777
  * Options for exporting BAK files (SQL Server-only)
748
778
  */
749
- bakExportOptions?: {stripeCount?: number; striped?: boolean} | null;
779
+ bakExportOptions?: {
780
+ bakType?: string;
781
+ copyOnly?: boolean;
782
+ differentialBase?: boolean;
783
+ stripeCount?: number;
784
+ striped?: boolean;
785
+ } | null;
750
786
  /**
751
787
  * Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.
752
788
  */
@@ -895,11 +931,14 @@ export namespace sqladmin_v1beta4 {
895
931
  * Import parameters specific to SQL Server .BAK files
896
932
  */
897
933
  bakImportOptions?: {
934
+ bakType?: string;
898
935
  encryptionOptions?: {
899
936
  certPath?: string;
900
937
  pvkPassword?: string;
901
938
  pvkPath?: string;
902
939
  };
940
+ noRecovery?: boolean;
941
+ recoveryOnly?: boolean;
903
942
  striped?: boolean;
904
943
  } | null;
905
944
  /**
@@ -1056,6 +1095,15 @@ export namespace sqladmin_v1beta4 {
1056
1095
  */
1057
1096
  kind?: string | null;
1058
1097
  }
1098
+ /**
1099
+ * Database Instance reencrypt request.
1100
+ */
1101
+ export interface Schema$InstancesReencryptRequest {
1102
+ /**
1103
+ * Configuration specific to backup re-encryption
1104
+ */
1105
+ backupReencryptionConfig?: Schema$BackupReencryptionConfig;
1106
+ }
1059
1107
  /**
1060
1108
  * Database instance restore backup request.
1061
1109
  */
@@ -1540,6 +1588,10 @@ export namespace sqladmin_v1beta4 {
1540
1588
  * Active Directory configuration, relevant only for Cloud SQL for SQL Server.
1541
1589
  */
1542
1590
  activeDirectoryConfig?: Schema$SqlActiveDirectoryConfig;
1591
+ /**
1592
+ * Specifies advance machine configuration for the instance relevant only for SQL Server.
1593
+ */
1594
+ advancedMachineFeatures?: Schema$AdvancedMachineFeatures;
1543
1595
  /**
1544
1596
  * The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1545
1597
  */
@@ -1687,6 +1739,10 @@ export namespace sqladmin_v1beta4 {
1687
1739
  * This is always `sql#getDiskShrinkConfig`.
1688
1740
  */
1689
1741
  kind?: string | null;
1742
+ /**
1743
+ * Additional message to customers.
1744
+ */
1745
+ message?: string | null;
1690
1746
  /**
1691
1747
  * The minimum size to which a disk can be shrunk in GigaBytes.
1692
1748
  */
@@ -1718,6 +1774,10 @@ export namespace sqladmin_v1beta4 {
1718
1774
  * External sync mode.
1719
1775
  */
1720
1776
  syncMode?: string | null;
1777
+ /**
1778
+ * Optional. Parallel level for initial data sync. Currently only applicable for MySQL.
1779
+ */
1780
+ syncParallelLevel?: string | null;
1721
1781
  }
1722
1782
  export interface Schema$SqlInstancesVerifyExternalSyncSettingsRequest {
1723
1783
  /**
@@ -2988,6 +3048,7 @@ export namespace sqladmin_v1beta4 {
2988
3048
  * // {
2989
3049
  * // "backendType": "my_backendType",
2990
3050
  * // "databaseVersion": "my_databaseVersion",
3051
+ * // "dnsName": "my_dnsName",
2991
3052
  * // "ipAddresses": [],
2992
3053
  * // "kind": "my_kind",
2993
3054
  * // "region": "my_region",
@@ -3417,7 +3478,7 @@ export namespace sqladmin_v1beta4 {
3417
3478
  }
3418
3479
 
3419
3480
  /**
3420
- * Inserts a resource containing information about a database inside a Cloud SQL instance.
3481
+ * Inserts a resource containing information about a database inside a Cloud SQL instance. **Note:** You can't modify the default character set and collation.
3421
3482
  * @example
3422
3483
  * ```js
3423
3484
  * // Before running the sample:
@@ -6351,6 +6412,163 @@ export namespace sqladmin_v1beta4 {
6351
6412
  }
6352
6413
  }
6353
6414
 
6415
+ /**
6416
+ * Reencrypt CMEK instance with latest key version.
6417
+ * @example
6418
+ * ```js
6419
+ * // Before running the sample:
6420
+ * // - Enable the API at:
6421
+ * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
6422
+ * // - Login into gcloud by running:
6423
+ * // `$ gcloud auth application-default login`
6424
+ * // - Install the npm module by running:
6425
+ * // `$ npm install googleapis`
6426
+ *
6427
+ * const {google} = require('googleapis');
6428
+ * const sqladmin = google.sqladmin('v1beta4');
6429
+ *
6430
+ * async function main() {
6431
+ * const auth = new google.auth.GoogleAuth({
6432
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6433
+ * scopes: [
6434
+ * 'https://www.googleapis.com/auth/cloud-platform',
6435
+ * 'https://www.googleapis.com/auth/sqlservice.admin',
6436
+ * ],
6437
+ * });
6438
+ *
6439
+ * // Acquire an auth client, and bind it to all future calls
6440
+ * const authClient = await auth.getClient();
6441
+ * google.options({auth: authClient});
6442
+ *
6443
+ * // Do the magic
6444
+ * const res = await sql.instances.reencrypt({
6445
+ * // Cloud SQL instance ID. This does not include the project ID.
6446
+ * instance: 'placeholder-value',
6447
+ * // ID of the project that contains the instance.
6448
+ * project: 'placeholder-value',
6449
+ *
6450
+ * // Request body metadata
6451
+ * requestBody: {
6452
+ * // request body parameters
6453
+ * // {
6454
+ * // "backupReencryptionConfig": {}
6455
+ * // }
6456
+ * },
6457
+ * });
6458
+ * console.log(res.data);
6459
+ *
6460
+ * // Example response
6461
+ * // {
6462
+ * // "backupContext": {},
6463
+ * // "endTime": "my_endTime",
6464
+ * // "error": {},
6465
+ * // "exportContext": {},
6466
+ * // "importContext": {},
6467
+ * // "insertTime": "my_insertTime",
6468
+ * // "kind": "my_kind",
6469
+ * // "name": "my_name",
6470
+ * // "operationType": "my_operationType",
6471
+ * // "selfLink": "my_selfLink",
6472
+ * // "startTime": "my_startTime",
6473
+ * // "status": "my_status",
6474
+ * // "targetId": "my_targetId",
6475
+ * // "targetLink": "my_targetLink",
6476
+ * // "targetProject": "my_targetProject",
6477
+ * // "user": "my_user"
6478
+ * // }
6479
+ * }
6480
+ *
6481
+ * main().catch(e => {
6482
+ * console.error(e);
6483
+ * throw e;
6484
+ * });
6485
+ *
6486
+ * ```
6487
+ *
6488
+ * @param params - Parameters for request
6489
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
6490
+ * @param callback - Optional callback that handles the response.
6491
+ * @returns A promise if used with async/await, or void if used with a callback.
6492
+ */
6493
+ reencrypt(
6494
+ params: Params$Resource$Instances$Reencrypt,
6495
+ options: StreamMethodOptions
6496
+ ): GaxiosPromise<Readable>;
6497
+ reencrypt(
6498
+ params?: Params$Resource$Instances$Reencrypt,
6499
+ options?: MethodOptions
6500
+ ): GaxiosPromise<Schema$Operation>;
6501
+ reencrypt(
6502
+ params: Params$Resource$Instances$Reencrypt,
6503
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
6504
+ callback: BodyResponseCallback<Readable>
6505
+ ): void;
6506
+ reencrypt(
6507
+ params: Params$Resource$Instances$Reencrypt,
6508
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
6509
+ callback: BodyResponseCallback<Schema$Operation>
6510
+ ): void;
6511
+ reencrypt(
6512
+ params: Params$Resource$Instances$Reencrypt,
6513
+ callback: BodyResponseCallback<Schema$Operation>
6514
+ ): void;
6515
+ reencrypt(callback: BodyResponseCallback<Schema$Operation>): void;
6516
+ reencrypt(
6517
+ paramsOrCallback?:
6518
+ | Params$Resource$Instances$Reencrypt
6519
+ | BodyResponseCallback<Schema$Operation>
6520
+ | BodyResponseCallback<Readable>,
6521
+ optionsOrCallback?:
6522
+ | MethodOptions
6523
+ | StreamMethodOptions
6524
+ | BodyResponseCallback<Schema$Operation>
6525
+ | BodyResponseCallback<Readable>,
6526
+ callback?:
6527
+ | BodyResponseCallback<Schema$Operation>
6528
+ | BodyResponseCallback<Readable>
6529
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
6530
+ let params = (paramsOrCallback ||
6531
+ {}) as Params$Resource$Instances$Reencrypt;
6532
+ let options = (optionsOrCallback || {}) as MethodOptions;
6533
+
6534
+ if (typeof paramsOrCallback === 'function') {
6535
+ callback = paramsOrCallback;
6536
+ params = {} as Params$Resource$Instances$Reencrypt;
6537
+ options = {};
6538
+ }
6539
+
6540
+ if (typeof optionsOrCallback === 'function') {
6541
+ callback = optionsOrCallback;
6542
+ options = {};
6543
+ }
6544
+
6545
+ const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
6546
+ const parameters = {
6547
+ options: Object.assign(
6548
+ {
6549
+ url: (
6550
+ rootUrl +
6551
+ '/sql/v1beta4/projects/{project}/instances/{instance}/reencrypt'
6552
+ ).replace(/([^:]\/)\/+/g, '$1'),
6553
+ method: 'POST',
6554
+ },
6555
+ options
6556
+ ),
6557
+ params,
6558
+ requiredParams: ['project', 'instance'],
6559
+ pathParams: ['instance', 'project'],
6560
+ context: this.context,
6561
+ };
6562
+ if (callback) {
6563
+ createAPIRequest<Schema$Operation>(
6564
+ parameters,
6565
+ callback as BodyResponseCallback<unknown>
6566
+ );
6567
+ } else {
6568
+ return createAPIRequest<Schema$Operation>(parameters);
6569
+ }
6570
+ }
6571
+
6354
6572
  /**
6355
6573
  * Deletes all client certificates and generates a new server SSL certificate for the instance.
6356
6574
  * @example
@@ -7783,6 +8001,22 @@ export namespace sqladmin_v1beta4 {
7783
8001
  */
7784
8002
  project?: string;
7785
8003
  }
8004
+ export interface Params$Resource$Instances$Reencrypt
8005
+ extends StandardParameters {
8006
+ /**
8007
+ * Cloud SQL instance ID. This does not include the project ID.
8008
+ */
8009
+ instance?: string;
8010
+ /**
8011
+ * ID of the project that contains the instance.
8012
+ */
8013
+ project?: string;
8014
+
8015
+ /**
8016
+ * Request body metadata
8017
+ */
8018
+ requestBody?: Schema$InstancesReencryptRequest;
8019
+ }
7786
8020
  export interface Params$Resource$Instances$Resetsslconfig
7787
8021
  extends StandardParameters {
7788
8022
  /**
@@ -7897,6 +8131,138 @@ export namespace sqladmin_v1beta4 {
7897
8131
  this.context = context;
7898
8132
  }
7899
8133
 
8134
+ /**
8135
+ * Cancels an instance operation that has been performed on an instance.
8136
+ * @example
8137
+ * ```js
8138
+ * // Before running the sample:
8139
+ * // - Enable the API at:
8140
+ * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
8141
+ * // - Login into gcloud by running:
8142
+ * // `$ gcloud auth application-default login`
8143
+ * // - Install the npm module by running:
8144
+ * // `$ npm install googleapis`
8145
+ *
8146
+ * const {google} = require('googleapis');
8147
+ * const sqladmin = google.sqladmin('v1beta4');
8148
+ *
8149
+ * async function main() {
8150
+ * const auth = new google.auth.GoogleAuth({
8151
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
8152
+ * scopes: [
8153
+ * 'https://www.googleapis.com/auth/cloud-platform',
8154
+ * 'https://www.googleapis.com/auth/sqlservice.admin',
8155
+ * ],
8156
+ * });
8157
+ *
8158
+ * // Acquire an auth client, and bind it to all future calls
8159
+ * const authClient = await auth.getClient();
8160
+ * google.options({auth: authClient});
8161
+ *
8162
+ * // Do the magic
8163
+ * const res = await sql.operations.cancel({
8164
+ * // Instance operation ID.
8165
+ * operation: 'placeholder-value',
8166
+ * // Project ID of the project that contains the instance.
8167
+ * project: 'placeholder-value',
8168
+ * });
8169
+ * console.log(res.data);
8170
+ *
8171
+ * // Example response
8172
+ * // {}
8173
+ * }
8174
+ *
8175
+ * main().catch(e => {
8176
+ * console.error(e);
8177
+ * throw e;
8178
+ * });
8179
+ *
8180
+ * ```
8181
+ *
8182
+ * @param params - Parameters for request
8183
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
8184
+ * @param callback - Optional callback that handles the response.
8185
+ * @returns A promise if used with async/await, or void if used with a callback.
8186
+ */
8187
+ cancel(
8188
+ params: Params$Resource$Operations$Cancel,
8189
+ options: StreamMethodOptions
8190
+ ): GaxiosPromise<Readable>;
8191
+ cancel(
8192
+ params?: Params$Resource$Operations$Cancel,
8193
+ options?: MethodOptions
8194
+ ): GaxiosPromise<Schema$Empty>;
8195
+ cancel(
8196
+ params: Params$Resource$Operations$Cancel,
8197
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
8198
+ callback: BodyResponseCallback<Readable>
8199
+ ): void;
8200
+ cancel(
8201
+ params: Params$Resource$Operations$Cancel,
8202
+ options: MethodOptions | BodyResponseCallback<Schema$Empty>,
8203
+ callback: BodyResponseCallback<Schema$Empty>
8204
+ ): void;
8205
+ cancel(
8206
+ params: Params$Resource$Operations$Cancel,
8207
+ callback: BodyResponseCallback<Schema$Empty>
8208
+ ): void;
8209
+ cancel(callback: BodyResponseCallback<Schema$Empty>): void;
8210
+ cancel(
8211
+ paramsOrCallback?:
8212
+ | Params$Resource$Operations$Cancel
8213
+ | BodyResponseCallback<Schema$Empty>
8214
+ | BodyResponseCallback<Readable>,
8215
+ optionsOrCallback?:
8216
+ | MethodOptions
8217
+ | StreamMethodOptions
8218
+ | BodyResponseCallback<Schema$Empty>
8219
+ | BodyResponseCallback<Readable>,
8220
+ callback?:
8221
+ | BodyResponseCallback<Schema$Empty>
8222
+ | BodyResponseCallback<Readable>
8223
+ ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
8224
+ let params = (paramsOrCallback ||
8225
+ {}) as Params$Resource$Operations$Cancel;
8226
+ let options = (optionsOrCallback || {}) as MethodOptions;
8227
+
8228
+ if (typeof paramsOrCallback === 'function') {
8229
+ callback = paramsOrCallback;
8230
+ params = {} as Params$Resource$Operations$Cancel;
8231
+ options = {};
8232
+ }
8233
+
8234
+ if (typeof optionsOrCallback === 'function') {
8235
+ callback = optionsOrCallback;
8236
+ options = {};
8237
+ }
8238
+
8239
+ const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
8240
+ const parameters = {
8241
+ options: Object.assign(
8242
+ {
8243
+ url: (
8244
+ rootUrl +
8245
+ '/sql/v1beta4/projects/{project}/operations/{operation}/cancel'
8246
+ ).replace(/([^:]\/)\/+/g, '$1'),
8247
+ method: 'POST',
8248
+ },
8249
+ options
8250
+ ),
8251
+ params,
8252
+ requiredParams: ['project', 'operation'],
8253
+ pathParams: ['operation', 'project'],
8254
+ context: this.context,
8255
+ };
8256
+ if (callback) {
8257
+ createAPIRequest<Schema$Empty>(
8258
+ parameters,
8259
+ callback as BodyResponseCallback<unknown>
8260
+ );
8261
+ } else {
8262
+ return createAPIRequest<Schema$Empty>(parameters);
8263
+ }
8264
+ }
8265
+
7900
8266
  /**
7901
8267
  * Retrieves an instance operation that has been performed on an instance.
7902
8268
  * @example
@@ -8188,6 +8554,17 @@ export namespace sqladmin_v1beta4 {
8188
8554
  }
8189
8555
  }
8190
8556
 
8557
+ export interface Params$Resource$Operations$Cancel
8558
+ extends StandardParameters {
8559
+ /**
8560
+ * Instance operation ID.
8561
+ */
8562
+ operation?: string;
8563
+ /**
8564
+ * Project ID of the project that contains the instance.
8565
+ */
8566
+ project?: string;
8567
+ }
8191
8568
  export interface Params$Resource$Operations$Get extends StandardParameters {
8192
8569
  /**
8193
8570
  * Instance operation ID.
@@ -8272,6 +8649,7 @@ export namespace sqladmin_v1beta4 {
8272
8649
  * // Example response
8273
8650
  * // {
8274
8651
  * // "kind": "my_kind",
8652
+ * // "message": "my_message",
8275
8653
  * // "minimalTargetSizeGb": "my_minimalTargetSizeGb"
8276
8654
  * // }
8277
8655
  * }
@@ -8888,7 +9266,8 @@ export namespace sqladmin_v1beta4 {
8888
9266
  * // {
8889
9267
  * // "mysqlSyncConfig": {},
8890
9268
  * // "skipVerification": false,
8891
- * // "syncMode": "my_syncMode"
9269
+ * // "syncMode": "my_syncMode",
9270
+ * // "syncParallelLevel": "my_syncParallelLevel"
8892
9271
  * // }
8893
9272
  * },
8894
9273
  * });