@googleapis/sqladmin 7.0.0 → 7.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [7.2.0](https://github.com/googleapis/google-api-nodejs-client/compare/sqladmin-v7.1.0...sqladmin-v7.2.0) (2023-03-22)
4
+
5
+
6
+ ### Features
7
+
8
+ * **sqladmin:** update the API ([34c6ad3](https://github.com/googleapis/google-api-nodejs-client/commit/34c6ad32fbc53c4765e17e8fc4b219b68eac6b86))
9
+
10
+ ## [7.1.0](https://github.com/googleapis/google-api-nodejs-client/compare/sqladmin-v7.0.0...sqladmin-v7.1.0) (2023-03-13)
11
+
12
+
13
+ ### Features
14
+
15
+ * **sqladmin:** update the API ([8663278](https://github.com/googleapis/google-api-nodejs-client/commit/866327845846577bf83b778cfd4ba7fb65caf171))
16
+
3
17
  ## [7.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/sqladmin-v6.1.0...sqladmin-v7.0.0) (2023-02-24)
4
18
 
5
19
 
package/build/v1.d.ts CHANGED
@@ -1312,6 +1312,39 @@ export declare namespace sqladmin_v1 {
1312
1312
  */
1313
1313
  kind?: string | null;
1314
1314
  }
1315
+ /**
1316
+ * Represents the metadata of the long-running operation.
1317
+ */
1318
+ export interface Schema$OperationMetadata {
1319
+ /**
1320
+ * Output only. API version used to start the operation.
1321
+ */
1322
+ apiVersion?: string | null;
1323
+ /**
1324
+ * Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
1325
+ */
1326
+ cancelRequested?: boolean | null;
1327
+ /**
1328
+ * Output only. The time the operation was created.
1329
+ */
1330
+ createTime?: string | null;
1331
+ /**
1332
+ * Output only. The time the operation finished running.
1333
+ */
1334
+ endTime?: string | null;
1335
+ /**
1336
+ * Output only. Human-readable status of the operation, if any.
1337
+ */
1338
+ statusDetail?: string | null;
1339
+ /**
1340
+ * Output only. Server-defined resource path for the target of the operation.
1341
+ */
1342
+ target?: string | null;
1343
+ /**
1344
+ * Output only. Name of the verb executed by the operation.
1345
+ */
1346
+ verb?: string | null;
1347
+ }
1315
1348
  /**
1316
1349
  * Operations list response.
1317
1350
  */
@@ -1371,6 +1404,15 @@ export declare namespace sqladmin_v1 {
1371
1404
  */
1372
1405
  reuseInterval?: number | null;
1373
1406
  }
1407
+ /**
1408
+ * Perform disk shrink context.
1409
+ */
1410
+ export interface Schema$PerformDiskShrinkContext {
1411
+ /**
1412
+ * The target disk shrink size in GigaBytes.
1413
+ */
1414
+ targetSizeGb?: string | null;
1415
+ }
1374
1416
  /**
1375
1417
  * Read-replica configuration for connecting to the primary instance.
1376
1418
  */
@@ -1585,6 +1627,19 @@ export declare namespace sqladmin_v1 {
1585
1627
  */
1586
1628
  type?: string | null;
1587
1629
  }
1630
+ /**
1631
+ * Instance get disk shrink config response.
1632
+ */
1633
+ export interface Schema$SqlInstancesGetDiskShrinkConfigResponse {
1634
+ /**
1635
+ * This is always `sql#getDiskShrinkConfig`.
1636
+ */
1637
+ kind?: string | null;
1638
+ /**
1639
+ * The minimum size to which a disk can be shrunk in GigaBytes.
1640
+ */
1641
+ minimalTargetSizeGb?: string | null;
1642
+ }
1588
1643
  /**
1589
1644
  * Reschedule options for maintenance windows.
1590
1645
  */
@@ -1594,6 +1649,11 @@ export declare namespace sqladmin_v1 {
1594
1649
  */
1595
1650
  reschedule?: Schema$Reschedule;
1596
1651
  }
1652
+ /**
1653
+ * Instance reset replica size request.
1654
+ */
1655
+ export interface Schema$SqlInstancesResetReplicaSizeRequest {
1656
+ }
1597
1657
  /**
1598
1658
  * Instance start external sync request.
1599
1659
  */
@@ -5427,6 +5487,152 @@ export declare namespace sqladmin_v1 {
5427
5487
  export class Resource$Projects$Instances {
5428
5488
  context: APIRequestContext;
5429
5489
  constructor(context: APIRequestContext);
5490
+ /**
5491
+ * Get Disk Shrink Config for a given instance.
5492
+ * @example
5493
+ * ```js
5494
+ * // Before running the sample:
5495
+ * // - Enable the API at:
5496
+ * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
5497
+ * // - Login into gcloud by running:
5498
+ * // `$ gcloud auth application-default login`
5499
+ * // - Install the npm module by running:
5500
+ * // `$ npm install googleapis`
5501
+ *
5502
+ * const {google} = require('googleapis');
5503
+ * const sqladmin = google.sqladmin('v1');
5504
+ *
5505
+ * async function main() {
5506
+ * const auth = new google.auth.GoogleAuth({
5507
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5508
+ * scopes: [
5509
+ * 'https://www.googleapis.com/auth/cloud-platform',
5510
+ * 'https://www.googleapis.com/auth/sqlservice.admin',
5511
+ * ],
5512
+ * });
5513
+ *
5514
+ * // Acquire an auth client, and bind it to all future calls
5515
+ * const authClient = await auth.getClient();
5516
+ * google.options({auth: authClient});
5517
+ *
5518
+ * // Do the magic
5519
+ * const res = await sql.projects.instances.getDiskShrinkConfig({
5520
+ * // Cloud SQL instance ID. This does not include the project ID.
5521
+ * instance: 'placeholder-value',
5522
+ * // Project ID of the project that contains the instance.
5523
+ * project: 'placeholder-value',
5524
+ * });
5525
+ * console.log(res.data);
5526
+ *
5527
+ * // Example response
5528
+ * // {
5529
+ * // "kind": "my_kind",
5530
+ * // "minimalTargetSizeGb": "my_minimalTargetSizeGb"
5531
+ * // }
5532
+ * }
5533
+ *
5534
+ * main().catch(e => {
5535
+ * console.error(e);
5536
+ * throw e;
5537
+ * });
5538
+ *
5539
+ * ```
5540
+ *
5541
+ * @param params - Parameters for request
5542
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
5543
+ * @param callback - Optional callback that handles the response.
5544
+ * @returns A promise if used with async/await, or void if used with a callback.
5545
+ */
5546
+ getDiskShrinkConfig(params: Params$Resource$Projects$Instances$Getdiskshrinkconfig, options: StreamMethodOptions): GaxiosPromise<Readable>;
5547
+ getDiskShrinkConfig(params?: Params$Resource$Projects$Instances$Getdiskshrinkconfig, options?: MethodOptions): GaxiosPromise<Schema$SqlInstancesGetDiskShrinkConfigResponse>;
5548
+ getDiskShrinkConfig(params: Params$Resource$Projects$Instances$Getdiskshrinkconfig, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
5549
+ getDiskShrinkConfig(params: Params$Resource$Projects$Instances$Getdiskshrinkconfig, options: MethodOptions | BodyResponseCallback<Schema$SqlInstancesGetDiskShrinkConfigResponse>, callback: BodyResponseCallback<Schema$SqlInstancesGetDiskShrinkConfigResponse>): void;
5550
+ getDiskShrinkConfig(params: Params$Resource$Projects$Instances$Getdiskshrinkconfig, callback: BodyResponseCallback<Schema$SqlInstancesGetDiskShrinkConfigResponse>): void;
5551
+ getDiskShrinkConfig(callback: BodyResponseCallback<Schema$SqlInstancesGetDiskShrinkConfigResponse>): void;
5552
+ /**
5553
+ * Perform Disk Shrink on primary instance.
5554
+ * @example
5555
+ * ```js
5556
+ * // Before running the sample:
5557
+ * // - Enable the API at:
5558
+ * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
5559
+ * // - Login into gcloud by running:
5560
+ * // `$ gcloud auth application-default login`
5561
+ * // - Install the npm module by running:
5562
+ * // `$ npm install googleapis`
5563
+ *
5564
+ * const {google} = require('googleapis');
5565
+ * const sqladmin = google.sqladmin('v1');
5566
+ *
5567
+ * async function main() {
5568
+ * const auth = new google.auth.GoogleAuth({
5569
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5570
+ * scopes: [
5571
+ * 'https://www.googleapis.com/auth/cloud-platform',
5572
+ * 'https://www.googleapis.com/auth/sqlservice.admin',
5573
+ * ],
5574
+ * });
5575
+ *
5576
+ * // Acquire an auth client, and bind it to all future calls
5577
+ * const authClient = await auth.getClient();
5578
+ * google.options({auth: authClient});
5579
+ *
5580
+ * // Do the magic
5581
+ * const res = await sql.projects.instances.performDiskShrink({
5582
+ * // Cloud SQL instance ID. This does not include the project ID.
5583
+ * instance: 'placeholder-value',
5584
+ * // Project ID of the project that contains the instance.
5585
+ * project: 'placeholder-value',
5586
+ *
5587
+ * // Request body metadata
5588
+ * requestBody: {
5589
+ * // request body parameters
5590
+ * // {
5591
+ * // "targetSizeGb": "my_targetSizeGb"
5592
+ * // }
5593
+ * },
5594
+ * });
5595
+ * console.log(res.data);
5596
+ *
5597
+ * // Example response
5598
+ * // {
5599
+ * // "backupContext": {},
5600
+ * // "endTime": "my_endTime",
5601
+ * // "error": {},
5602
+ * // "exportContext": {},
5603
+ * // "importContext": {},
5604
+ * // "insertTime": "my_insertTime",
5605
+ * // "kind": "my_kind",
5606
+ * // "name": "my_name",
5607
+ * // "operationType": "my_operationType",
5608
+ * // "selfLink": "my_selfLink",
5609
+ * // "startTime": "my_startTime",
5610
+ * // "status": "my_status",
5611
+ * // "targetId": "my_targetId",
5612
+ * // "targetLink": "my_targetLink",
5613
+ * // "targetProject": "my_targetProject",
5614
+ * // "user": "my_user"
5615
+ * // }
5616
+ * }
5617
+ *
5618
+ * main().catch(e => {
5619
+ * console.error(e);
5620
+ * throw e;
5621
+ * });
5622
+ *
5623
+ * ```
5624
+ *
5625
+ * @param params - Parameters for request
5626
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
5627
+ * @param callback - Optional callback that handles the response.
5628
+ * @returns A promise if used with async/await, or void if used with a callback.
5629
+ */
5630
+ performDiskShrink(params: Params$Resource$Projects$Instances$Performdiskshrink, options: StreamMethodOptions): GaxiosPromise<Readable>;
5631
+ performDiskShrink(params?: Params$Resource$Projects$Instances$Performdiskshrink, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
5632
+ performDiskShrink(params: Params$Resource$Projects$Instances$Performdiskshrink, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
5633
+ performDiskShrink(params: Params$Resource$Projects$Instances$Performdiskshrink, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
5634
+ performDiskShrink(params: Params$Resource$Projects$Instances$Performdiskshrink, callback: BodyResponseCallback<Schema$Operation>): void;
5635
+ performDiskShrink(callback: BodyResponseCallback<Schema$Operation>): void;
5430
5636
  /**
5431
5637
  * Reschedules the maintenance on the given instance.
5432
5638
  * @example
@@ -5511,6 +5717,88 @@ export declare namespace sqladmin_v1 {
5511
5717
  rescheduleMaintenance(params: Params$Resource$Projects$Instances$Reschedulemaintenance, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
5512
5718
  rescheduleMaintenance(params: Params$Resource$Projects$Instances$Reschedulemaintenance, callback: BodyResponseCallback<Schema$Operation>): void;
5513
5719
  rescheduleMaintenance(callback: BodyResponseCallback<Schema$Operation>): void;
5720
+ /**
5721
+ * Reset Replica Size to primary instance disk size.
5722
+ * @example
5723
+ * ```js
5724
+ * // Before running the sample:
5725
+ * // - Enable the API at:
5726
+ * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
5727
+ * // - Login into gcloud by running:
5728
+ * // `$ gcloud auth application-default login`
5729
+ * // - Install the npm module by running:
5730
+ * // `$ npm install googleapis`
5731
+ *
5732
+ * const {google} = require('googleapis');
5733
+ * const sqladmin = google.sqladmin('v1');
5734
+ *
5735
+ * async function main() {
5736
+ * const auth = new google.auth.GoogleAuth({
5737
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5738
+ * scopes: [
5739
+ * 'https://www.googleapis.com/auth/cloud-platform',
5740
+ * 'https://www.googleapis.com/auth/sqlservice.admin',
5741
+ * ],
5742
+ * });
5743
+ *
5744
+ * // Acquire an auth client, and bind it to all future calls
5745
+ * const authClient = await auth.getClient();
5746
+ * google.options({auth: authClient});
5747
+ *
5748
+ * // Do the magic
5749
+ * const res = await sql.projects.instances.resetReplicaSize({
5750
+ * // Cloud SQL read replica instance name.
5751
+ * instance: 'placeholder-value',
5752
+ * // ID of the project that contains the read replica.
5753
+ * project: 'placeholder-value',
5754
+ *
5755
+ * // Request body metadata
5756
+ * requestBody: {
5757
+ * // request body parameters
5758
+ * // {}
5759
+ * },
5760
+ * });
5761
+ * console.log(res.data);
5762
+ *
5763
+ * // Example response
5764
+ * // {
5765
+ * // "backupContext": {},
5766
+ * // "endTime": "my_endTime",
5767
+ * // "error": {},
5768
+ * // "exportContext": {},
5769
+ * // "importContext": {},
5770
+ * // "insertTime": "my_insertTime",
5771
+ * // "kind": "my_kind",
5772
+ * // "name": "my_name",
5773
+ * // "operationType": "my_operationType",
5774
+ * // "selfLink": "my_selfLink",
5775
+ * // "startTime": "my_startTime",
5776
+ * // "status": "my_status",
5777
+ * // "targetId": "my_targetId",
5778
+ * // "targetLink": "my_targetLink",
5779
+ * // "targetProject": "my_targetProject",
5780
+ * // "user": "my_user"
5781
+ * // }
5782
+ * }
5783
+ *
5784
+ * main().catch(e => {
5785
+ * console.error(e);
5786
+ * throw e;
5787
+ * });
5788
+ *
5789
+ * ```
5790
+ *
5791
+ * @param params - Parameters for request
5792
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
5793
+ * @param callback - Optional callback that handles the response.
5794
+ * @returns A promise if used with async/await, or void if used with a callback.
5795
+ */
5796
+ resetReplicaSize(params: Params$Resource$Projects$Instances$Resetreplicasize, options: StreamMethodOptions): GaxiosPromise<Readable>;
5797
+ resetReplicaSize(params?: Params$Resource$Projects$Instances$Resetreplicasize, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
5798
+ resetReplicaSize(params: Params$Resource$Projects$Instances$Resetreplicasize, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
5799
+ resetReplicaSize(params: Params$Resource$Projects$Instances$Resetreplicasize, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
5800
+ resetReplicaSize(params: Params$Resource$Projects$Instances$Resetreplicasize, callback: BodyResponseCallback<Schema$Operation>): void;
5801
+ resetReplicaSize(callback: BodyResponseCallback<Schema$Operation>): void;
5514
5802
  /**
5515
5803
  * Start External primary instance migration.
5516
5804
  * @example
@@ -5672,6 +5960,30 @@ export declare namespace sqladmin_v1 {
5672
5960
  verifyExternalSyncSettings(params: Params$Resource$Projects$Instances$Verifyexternalsyncsettings, callback: BodyResponseCallback<Schema$SqlInstancesVerifyExternalSyncSettingsResponse>): void;
5673
5961
  verifyExternalSyncSettings(callback: BodyResponseCallback<Schema$SqlInstancesVerifyExternalSyncSettingsResponse>): void;
5674
5962
  }
5963
+ export interface Params$Resource$Projects$Instances$Getdiskshrinkconfig extends StandardParameters {
5964
+ /**
5965
+ * Cloud SQL instance ID. This does not include the project ID.
5966
+ */
5967
+ instance?: string;
5968
+ /**
5969
+ * Project ID of the project that contains the instance.
5970
+ */
5971
+ project?: string;
5972
+ }
5973
+ export interface Params$Resource$Projects$Instances$Performdiskshrink extends StandardParameters {
5974
+ /**
5975
+ * Cloud SQL instance ID. This does not include the project ID.
5976
+ */
5977
+ instance?: string;
5978
+ /**
5979
+ * Project ID of the project that contains the instance.
5980
+ */
5981
+ project?: string;
5982
+ /**
5983
+ * Request body metadata
5984
+ */
5985
+ requestBody?: Schema$PerformDiskShrinkContext;
5986
+ }
5675
5987
  export interface Params$Resource$Projects$Instances$Reschedulemaintenance extends StandardParameters {
5676
5988
  /**
5677
5989
  * Cloud SQL instance ID. This does not include the project ID.
@@ -5686,6 +5998,20 @@ export declare namespace sqladmin_v1 {
5686
5998
  */
5687
5999
  requestBody?: Schema$SqlInstancesRescheduleMaintenanceRequestBody;
5688
6000
  }
6001
+ export interface Params$Resource$Projects$Instances$Resetreplicasize extends StandardParameters {
6002
+ /**
6003
+ * Cloud SQL read replica instance name.
6004
+ */
6005
+ instance?: string;
6006
+ /**
6007
+ * ID of the project that contains the read replica.
6008
+ */
6009
+ project?: string;
6010
+ /**
6011
+ * Request body metadata
6012
+ */
6013
+ requestBody?: Schema$SqlInstancesResetReplicaSizeRequest;
6014
+ }
5689
6015
  export interface Params$Resource$Projects$Instances$Startexternalsync extends StandardParameters {
5690
6016
  /**
5691
6017
  * Cloud SQL instance ID. This does not include the project ID.
package/build/v1.js CHANGED
@@ -1211,6 +1211,70 @@ var sqladmin_v1;
1211
1211
  constructor(context) {
1212
1212
  this.context = context;
1213
1213
  }
1214
+ getDiskShrinkConfig(paramsOrCallback, optionsOrCallback, callback) {
1215
+ let params = (paramsOrCallback ||
1216
+ {});
1217
+ let options = (optionsOrCallback || {});
1218
+ if (typeof paramsOrCallback === 'function') {
1219
+ callback = paramsOrCallback;
1220
+ params = {};
1221
+ options = {};
1222
+ }
1223
+ if (typeof optionsOrCallback === 'function') {
1224
+ callback = optionsOrCallback;
1225
+ options = {};
1226
+ }
1227
+ const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
1228
+ const parameters = {
1229
+ options: Object.assign({
1230
+ url: (rootUrl +
1231
+ '/v1/projects/{project}/instances/{instance}/getDiskShrinkConfig').replace(/([^:]\/)\/+/g, '$1'),
1232
+ method: 'GET',
1233
+ }, options),
1234
+ params,
1235
+ requiredParams: ['project', 'instance'],
1236
+ pathParams: ['instance', 'project'],
1237
+ context: this.context,
1238
+ };
1239
+ if (callback) {
1240
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
1241
+ }
1242
+ else {
1243
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
1244
+ }
1245
+ }
1246
+ performDiskShrink(paramsOrCallback, optionsOrCallback, callback) {
1247
+ let params = (paramsOrCallback ||
1248
+ {});
1249
+ let options = (optionsOrCallback || {});
1250
+ if (typeof paramsOrCallback === 'function') {
1251
+ callback = paramsOrCallback;
1252
+ params = {};
1253
+ options = {};
1254
+ }
1255
+ if (typeof optionsOrCallback === 'function') {
1256
+ callback = optionsOrCallback;
1257
+ options = {};
1258
+ }
1259
+ const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
1260
+ const parameters = {
1261
+ options: Object.assign({
1262
+ url: (rootUrl +
1263
+ '/v1/projects/{project}/instances/{instance}/performDiskShrink').replace(/([^:]\/)\/+/g, '$1'),
1264
+ method: 'POST',
1265
+ }, options),
1266
+ params,
1267
+ requiredParams: ['project', 'instance'],
1268
+ pathParams: ['instance', 'project'],
1269
+ context: this.context,
1270
+ };
1271
+ if (callback) {
1272
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
1273
+ }
1274
+ else {
1275
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
1276
+ }
1277
+ }
1214
1278
  rescheduleMaintenance(paramsOrCallback, optionsOrCallback, callback) {
1215
1279
  let params = (paramsOrCallback ||
1216
1280
  {});
@@ -1243,6 +1307,38 @@ var sqladmin_v1;
1243
1307
  return (0, googleapis_common_1.createAPIRequest)(parameters);
1244
1308
  }
1245
1309
  }
1310
+ resetReplicaSize(paramsOrCallback, optionsOrCallback, callback) {
1311
+ let params = (paramsOrCallback ||
1312
+ {});
1313
+ let options = (optionsOrCallback || {});
1314
+ if (typeof paramsOrCallback === 'function') {
1315
+ callback = paramsOrCallback;
1316
+ params = {};
1317
+ options = {};
1318
+ }
1319
+ if (typeof optionsOrCallback === 'function') {
1320
+ callback = optionsOrCallback;
1321
+ options = {};
1322
+ }
1323
+ const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
1324
+ const parameters = {
1325
+ options: Object.assign({
1326
+ url: (rootUrl +
1327
+ '/v1/projects/{project}/instances/{instance}/resetReplicaSize').replace(/([^:]\/)\/+/g, '$1'),
1328
+ method: 'POST',
1329
+ }, options),
1330
+ params,
1331
+ requiredParams: ['project', 'instance'],
1332
+ pathParams: ['instance', 'project'],
1333
+ context: this.context,
1334
+ };
1335
+ if (callback) {
1336
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
1337
+ }
1338
+ else {
1339
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
1340
+ }
1341
+ }
1246
1342
  startExternalSync(paramsOrCallback, optionsOrCallback, callback) {
1247
1343
  let params = (paramsOrCallback ||
1248
1344
  {});