@googleapis/sqladmin 7.1.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,12 @@
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
+
3
10
  ## [7.1.0](https://github.com/googleapis/google-api-nodejs-client/compare/sqladmin-v7.0.0...sqladmin-v7.1.0) (2023-03-13)
4
11
 
5
12
 
package/build/v1.d.ts CHANGED
@@ -56,7 +56,7 @@ export declare namespace sqladmin_v1 {
56
56
  upload_protocol?: string;
57
57
  }
58
58
  /**
59
- * sqladmin API (prod)
59
+ * Cloud SQL Admin API
60
60
  *
61
61
  * API for Cloud SQL database instance management
62
62
  *
@@ -1404,6 +1404,15 @@ export declare namespace sqladmin_v1 {
1404
1404
  */
1405
1405
  reuseInterval?: number | null;
1406
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
+ }
1407
1416
  /**
1408
1417
  * Read-replica configuration for connecting to the primary instance.
1409
1418
  */
@@ -1618,6 +1627,19 @@ export declare namespace sqladmin_v1 {
1618
1627
  */
1619
1628
  type?: string | null;
1620
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
+ }
1621
1643
  /**
1622
1644
  * Reschedule options for maintenance windows.
1623
1645
  */
@@ -1627,6 +1649,11 @@ export declare namespace sqladmin_v1 {
1627
1649
  */
1628
1650
  reschedule?: Schema$Reschedule;
1629
1651
  }
1652
+ /**
1653
+ * Instance reset replica size request.
1654
+ */
1655
+ export interface Schema$SqlInstancesResetReplicaSizeRequest {
1656
+ }
1630
1657
  /**
1631
1658
  * Instance start external sync request.
1632
1659
  */
@@ -5460,6 +5487,152 @@ export declare namespace sqladmin_v1 {
5460
5487
  export class Resource$Projects$Instances {
5461
5488
  context: APIRequestContext;
5462
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;
5463
5636
  /**
5464
5637
  * Reschedules the maintenance on the given instance.
5465
5638
  * @example
@@ -5544,6 +5717,88 @@ export declare namespace sqladmin_v1 {
5544
5717
  rescheduleMaintenance(params: Params$Resource$Projects$Instances$Reschedulemaintenance, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
5545
5718
  rescheduleMaintenance(params: Params$Resource$Projects$Instances$Reschedulemaintenance, callback: BodyResponseCallback<Schema$Operation>): void;
5546
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;
5547
5802
  /**
5548
5803
  * Start External primary instance migration.
5549
5804
  * @example
@@ -5705,6 +5960,30 @@ export declare namespace sqladmin_v1 {
5705
5960
  verifyExternalSyncSettings(params: Params$Resource$Projects$Instances$Verifyexternalsyncsettings, callback: BodyResponseCallback<Schema$SqlInstancesVerifyExternalSyncSettingsResponse>): void;
5706
5961
  verifyExternalSyncSettings(callback: BodyResponseCallback<Schema$SqlInstancesVerifyExternalSyncSettingsResponse>): void;
5707
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
+ }
5708
5987
  export interface Params$Resource$Projects$Instances$Reschedulemaintenance extends StandardParameters {
5709
5988
  /**
5710
5989
  * Cloud SQL instance ID. This does not include the project ID.
@@ -5719,6 +5998,20 @@ export declare namespace sqladmin_v1 {
5719
5998
  */
5720
5999
  requestBody?: Schema$SqlInstancesRescheduleMaintenanceRequestBody;
5721
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
+ }
5722
6015
  export interface Params$Resource$Projects$Instances$Startexternalsync extends StandardParameters {
5723
6016
  /**
5724
6017
  * Cloud SQL instance ID. This does not include the project ID.
package/build/v1.js CHANGED
@@ -22,7 +22,7 @@ const googleapis_common_1 = require("googleapis-common");
22
22
  var sqladmin_v1;
23
23
  (function (sqladmin_v1) {
24
24
  /**
25
- * sqladmin API (prod)
25
+ * Cloud SQL Admin API
26
26
  *
27
27
  * API for Cloud SQL database instance management
28
28
  *
@@ -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
  {});