@googleapis/sqladmin 8.0.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
@@ -214,7 +214,7 @@ export namespace sqladmin_v1beta4 {
214
214
  */
215
215
  location?: string | null;
216
216
  /**
217
- * (Postgres only) Whether point in time recovery is enabled.
217
+ * Whether point in time recovery is enabled.
218
218
  */
219
219
  pointInTimeRecoveryEnabled?: boolean | null;
220
220
  /**
@@ -243,6 +243,19 @@ export namespace sqladmin_v1beta4 {
243
243
  */
244
244
  kind?: string | null;
245
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
+ }
246
259
  /**
247
260
  * We currently only support backup retention by specifying the number of backups we will retain.
248
261
  */
@@ -408,6 +421,10 @@ export namespace sqladmin_v1beta4 {
408
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`.
409
422
  */
410
423
  databaseVersion?: string | null;
424
+ /**
425
+ * The dns name of the instance.
426
+ */
427
+ dnsName?: string | null;
411
428
  /**
412
429
  * The assigned IP addresses for the instance.
413
430
  */
@@ -748,6 +765,10 @@ export namespace sqladmin_v1beta4 {
748
765
  */
749
766
  kmsKeyVersionName?: string | null;
750
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 {}
751
772
  /**
752
773
  * Database instance export context.
753
774
  */
@@ -755,7 +776,13 @@ export namespace sqladmin_v1beta4 {
755
776
  /**
756
777
  * Options for exporting BAK files (SQL Server-only)
757
778
  */
758
- 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;
759
786
  /**
760
787
  * Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.
761
788
  */
@@ -904,11 +931,14 @@ export namespace sqladmin_v1beta4 {
904
931
  * Import parameters specific to SQL Server .BAK files
905
932
  */
906
933
  bakImportOptions?: {
934
+ bakType?: string;
907
935
  encryptionOptions?: {
908
936
  certPath?: string;
909
937
  pvkPassword?: string;
910
938
  pvkPath?: string;
911
939
  };
940
+ noRecovery?: boolean;
941
+ recoveryOnly?: boolean;
912
942
  striped?: boolean;
913
943
  } | null;
914
944
  /**
@@ -1065,6 +1095,15 @@ export namespace sqladmin_v1beta4 {
1065
1095
  */
1066
1096
  kind?: string | null;
1067
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
+ }
1068
1107
  /**
1069
1108
  * Database instance restore backup request.
1070
1109
  */
@@ -1700,6 +1739,10 @@ export namespace sqladmin_v1beta4 {
1700
1739
  * This is always `sql#getDiskShrinkConfig`.
1701
1740
  */
1702
1741
  kind?: string | null;
1742
+ /**
1743
+ * Additional message to customers.
1744
+ */
1745
+ message?: string | null;
1703
1746
  /**
1704
1747
  * The minimum size to which a disk can be shrunk in GigaBytes.
1705
1748
  */
@@ -1731,6 +1774,10 @@ export namespace sqladmin_v1beta4 {
1731
1774
  * External sync mode.
1732
1775
  */
1733
1776
  syncMode?: string | null;
1777
+ /**
1778
+ * Optional. Parallel level for initial data sync. Currently only applicable for MySQL.
1779
+ */
1780
+ syncParallelLevel?: string | null;
1734
1781
  }
1735
1782
  export interface Schema$SqlInstancesVerifyExternalSyncSettingsRequest {
1736
1783
  /**
@@ -3001,6 +3048,7 @@ export namespace sqladmin_v1beta4 {
3001
3048
  * // {
3002
3049
  * // "backendType": "my_backendType",
3003
3050
  * // "databaseVersion": "my_databaseVersion",
3051
+ * // "dnsName": "my_dnsName",
3004
3052
  * // "ipAddresses": [],
3005
3053
  * // "kind": "my_kind",
3006
3054
  * // "region": "my_region",
@@ -3430,7 +3478,7 @@ export namespace sqladmin_v1beta4 {
3430
3478
  }
3431
3479
 
3432
3480
  /**
3433
- * 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.
3434
3482
  * @example
3435
3483
  * ```js
3436
3484
  * // Before running the sample:
@@ -6364,6 +6412,163 @@ export namespace sqladmin_v1beta4 {
6364
6412
  }
6365
6413
  }
6366
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
+
6367
6572
  /**
6368
6573
  * Deletes all client certificates and generates a new server SSL certificate for the instance.
6369
6574
  * @example
@@ -7796,6 +8001,22 @@ export namespace sqladmin_v1beta4 {
7796
8001
  */
7797
8002
  project?: string;
7798
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
+ }
7799
8020
  export interface Params$Resource$Instances$Resetsslconfig
7800
8021
  extends StandardParameters {
7801
8022
  /**
@@ -7910,6 +8131,138 @@ export namespace sqladmin_v1beta4 {
7910
8131
  this.context = context;
7911
8132
  }
7912
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
+
7913
8266
  /**
7914
8267
  * Retrieves an instance operation that has been performed on an instance.
7915
8268
  * @example
@@ -8201,6 +8554,17 @@ export namespace sqladmin_v1beta4 {
8201
8554
  }
8202
8555
  }
8203
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
+ }
8204
8568
  export interface Params$Resource$Operations$Get extends StandardParameters {
8205
8569
  /**
8206
8570
  * Instance operation ID.
@@ -8285,6 +8649,7 @@ export namespace sqladmin_v1beta4 {
8285
8649
  * // Example response
8286
8650
  * // {
8287
8651
  * // "kind": "my_kind",
8652
+ * // "message": "my_message",
8288
8653
  * // "minimalTargetSizeGb": "my_minimalTargetSizeGb"
8289
8654
  * // }
8290
8655
  * }
@@ -8901,7 +9266,8 @@ export namespace sqladmin_v1beta4 {
8901
9266
  * // {
8902
9267
  * // "mysqlSyncConfig": {},
8903
9268
  * // "skipVerification": false,
8904
- * // "syncMode": "my_syncMode"
9269
+ * // "syncMode": "my_syncMode",
9270
+ * // "syncParallelLevel": "my_syncParallelLevel"
8905
9271
  * // }
8906
9272
  * },
8907
9273
  * });