@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 +14 -0
- package/build/v1.d.ts +326 -0
- package/build/v1.js +96 -0
- package/build/v1.js.map +1 -1
- package/build/v1beta4.d.ts +326 -0
- package/build/v1beta4.js +96 -0
- package/build/v1beta4.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +558 -0
- package/v1beta4.ts +558 -0
package/v1.ts
CHANGED
|
@@ -1366,6 +1366,39 @@ export namespace sqladmin_v1 {
|
|
|
1366
1366
|
*/
|
|
1367
1367
|
kind?: string | null;
|
|
1368
1368
|
}
|
|
1369
|
+
/**
|
|
1370
|
+
* Represents the metadata of the long-running operation.
|
|
1371
|
+
*/
|
|
1372
|
+
export interface Schema$OperationMetadata {
|
|
1373
|
+
/**
|
|
1374
|
+
* Output only. API version used to start the operation.
|
|
1375
|
+
*/
|
|
1376
|
+
apiVersion?: string | null;
|
|
1377
|
+
/**
|
|
1378
|
+
* 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`.
|
|
1379
|
+
*/
|
|
1380
|
+
cancelRequested?: boolean | null;
|
|
1381
|
+
/**
|
|
1382
|
+
* Output only. The time the operation was created.
|
|
1383
|
+
*/
|
|
1384
|
+
createTime?: string | null;
|
|
1385
|
+
/**
|
|
1386
|
+
* Output only. The time the operation finished running.
|
|
1387
|
+
*/
|
|
1388
|
+
endTime?: string | null;
|
|
1389
|
+
/**
|
|
1390
|
+
* Output only. Human-readable status of the operation, if any.
|
|
1391
|
+
*/
|
|
1392
|
+
statusDetail?: string | null;
|
|
1393
|
+
/**
|
|
1394
|
+
* Output only. Server-defined resource path for the target of the operation.
|
|
1395
|
+
*/
|
|
1396
|
+
target?: string | null;
|
|
1397
|
+
/**
|
|
1398
|
+
* Output only. Name of the verb executed by the operation.
|
|
1399
|
+
*/
|
|
1400
|
+
verb?: string | null;
|
|
1401
|
+
}
|
|
1369
1402
|
/**
|
|
1370
1403
|
* Operations list response.
|
|
1371
1404
|
*/
|
|
@@ -1425,6 +1458,15 @@ export namespace sqladmin_v1 {
|
|
|
1425
1458
|
*/
|
|
1426
1459
|
reuseInterval?: number | null;
|
|
1427
1460
|
}
|
|
1461
|
+
/**
|
|
1462
|
+
* Perform disk shrink context.
|
|
1463
|
+
*/
|
|
1464
|
+
export interface Schema$PerformDiskShrinkContext {
|
|
1465
|
+
/**
|
|
1466
|
+
* The target disk shrink size in GigaBytes.
|
|
1467
|
+
*/
|
|
1468
|
+
targetSizeGb?: string | null;
|
|
1469
|
+
}
|
|
1428
1470
|
/**
|
|
1429
1471
|
* Read-replica configuration for connecting to the primary instance.
|
|
1430
1472
|
*/
|
|
@@ -1637,6 +1679,19 @@ export namespace sqladmin_v1 {
|
|
|
1637
1679
|
*/
|
|
1638
1680
|
type?: string | null;
|
|
1639
1681
|
}
|
|
1682
|
+
/**
|
|
1683
|
+
* Instance get disk shrink config response.
|
|
1684
|
+
*/
|
|
1685
|
+
export interface Schema$SqlInstancesGetDiskShrinkConfigResponse {
|
|
1686
|
+
/**
|
|
1687
|
+
* This is always `sql#getDiskShrinkConfig`.
|
|
1688
|
+
*/
|
|
1689
|
+
kind?: string | null;
|
|
1690
|
+
/**
|
|
1691
|
+
* The minimum size to which a disk can be shrunk in GigaBytes.
|
|
1692
|
+
*/
|
|
1693
|
+
minimalTargetSizeGb?: string | null;
|
|
1694
|
+
}
|
|
1640
1695
|
/**
|
|
1641
1696
|
* Reschedule options for maintenance windows.
|
|
1642
1697
|
*/
|
|
@@ -1646,6 +1701,10 @@ export namespace sqladmin_v1 {
|
|
|
1646
1701
|
*/
|
|
1647
1702
|
reschedule?: Schema$Reschedule;
|
|
1648
1703
|
}
|
|
1704
|
+
/**
|
|
1705
|
+
* Instance reset replica size request.
|
|
1706
|
+
*/
|
|
1707
|
+
export interface Schema$SqlInstancesResetReplicaSizeRequest {}
|
|
1649
1708
|
/**
|
|
1650
1709
|
* Instance start external sync request.
|
|
1651
1710
|
*/
|
|
@@ -8173,6 +8232,307 @@ export namespace sqladmin_v1 {
|
|
|
8173
8232
|
this.context = context;
|
|
8174
8233
|
}
|
|
8175
8234
|
|
|
8235
|
+
/**
|
|
8236
|
+
* Get Disk Shrink Config for a given instance.
|
|
8237
|
+
* @example
|
|
8238
|
+
* ```js
|
|
8239
|
+
* // Before running the sample:
|
|
8240
|
+
* // - Enable the API at:
|
|
8241
|
+
* // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
|
|
8242
|
+
* // - Login into gcloud by running:
|
|
8243
|
+
* // `$ gcloud auth application-default login`
|
|
8244
|
+
* // - Install the npm module by running:
|
|
8245
|
+
* // `$ npm install googleapis`
|
|
8246
|
+
*
|
|
8247
|
+
* const {google} = require('googleapis');
|
|
8248
|
+
* const sqladmin = google.sqladmin('v1');
|
|
8249
|
+
*
|
|
8250
|
+
* async function main() {
|
|
8251
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8252
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8253
|
+
* scopes: [
|
|
8254
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
8255
|
+
* 'https://www.googleapis.com/auth/sqlservice.admin',
|
|
8256
|
+
* ],
|
|
8257
|
+
* });
|
|
8258
|
+
*
|
|
8259
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8260
|
+
* const authClient = await auth.getClient();
|
|
8261
|
+
* google.options({auth: authClient});
|
|
8262
|
+
*
|
|
8263
|
+
* // Do the magic
|
|
8264
|
+
* const res = await sql.projects.instances.getDiskShrinkConfig({
|
|
8265
|
+
* // Cloud SQL instance ID. This does not include the project ID.
|
|
8266
|
+
* instance: 'placeholder-value',
|
|
8267
|
+
* // Project ID of the project that contains the instance.
|
|
8268
|
+
* project: 'placeholder-value',
|
|
8269
|
+
* });
|
|
8270
|
+
* console.log(res.data);
|
|
8271
|
+
*
|
|
8272
|
+
* // Example response
|
|
8273
|
+
* // {
|
|
8274
|
+
* // "kind": "my_kind",
|
|
8275
|
+
* // "minimalTargetSizeGb": "my_minimalTargetSizeGb"
|
|
8276
|
+
* // }
|
|
8277
|
+
* }
|
|
8278
|
+
*
|
|
8279
|
+
* main().catch(e => {
|
|
8280
|
+
* console.error(e);
|
|
8281
|
+
* throw e;
|
|
8282
|
+
* });
|
|
8283
|
+
*
|
|
8284
|
+
* ```
|
|
8285
|
+
*
|
|
8286
|
+
* @param params - Parameters for request
|
|
8287
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8288
|
+
* @param callback - Optional callback that handles the response.
|
|
8289
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8290
|
+
*/
|
|
8291
|
+
getDiskShrinkConfig(
|
|
8292
|
+
params: Params$Resource$Projects$Instances$Getdiskshrinkconfig,
|
|
8293
|
+
options: StreamMethodOptions
|
|
8294
|
+
): GaxiosPromise<Readable>;
|
|
8295
|
+
getDiskShrinkConfig(
|
|
8296
|
+
params?: Params$Resource$Projects$Instances$Getdiskshrinkconfig,
|
|
8297
|
+
options?: MethodOptions
|
|
8298
|
+
): GaxiosPromise<Schema$SqlInstancesGetDiskShrinkConfigResponse>;
|
|
8299
|
+
getDiskShrinkConfig(
|
|
8300
|
+
params: Params$Resource$Projects$Instances$Getdiskshrinkconfig,
|
|
8301
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8302
|
+
callback: BodyResponseCallback<Readable>
|
|
8303
|
+
): void;
|
|
8304
|
+
getDiskShrinkConfig(
|
|
8305
|
+
params: Params$Resource$Projects$Instances$Getdiskshrinkconfig,
|
|
8306
|
+
options:
|
|
8307
|
+
| MethodOptions
|
|
8308
|
+
| BodyResponseCallback<Schema$SqlInstancesGetDiskShrinkConfigResponse>,
|
|
8309
|
+
callback: BodyResponseCallback<Schema$SqlInstancesGetDiskShrinkConfigResponse>
|
|
8310
|
+
): void;
|
|
8311
|
+
getDiskShrinkConfig(
|
|
8312
|
+
params: Params$Resource$Projects$Instances$Getdiskshrinkconfig,
|
|
8313
|
+
callback: BodyResponseCallback<Schema$SqlInstancesGetDiskShrinkConfigResponse>
|
|
8314
|
+
): void;
|
|
8315
|
+
getDiskShrinkConfig(
|
|
8316
|
+
callback: BodyResponseCallback<Schema$SqlInstancesGetDiskShrinkConfigResponse>
|
|
8317
|
+
): void;
|
|
8318
|
+
getDiskShrinkConfig(
|
|
8319
|
+
paramsOrCallback?:
|
|
8320
|
+
| Params$Resource$Projects$Instances$Getdiskshrinkconfig
|
|
8321
|
+
| BodyResponseCallback<Schema$SqlInstancesGetDiskShrinkConfigResponse>
|
|
8322
|
+
| BodyResponseCallback<Readable>,
|
|
8323
|
+
optionsOrCallback?:
|
|
8324
|
+
| MethodOptions
|
|
8325
|
+
| StreamMethodOptions
|
|
8326
|
+
| BodyResponseCallback<Schema$SqlInstancesGetDiskShrinkConfigResponse>
|
|
8327
|
+
| BodyResponseCallback<Readable>,
|
|
8328
|
+
callback?:
|
|
8329
|
+
| BodyResponseCallback<Schema$SqlInstancesGetDiskShrinkConfigResponse>
|
|
8330
|
+
| BodyResponseCallback<Readable>
|
|
8331
|
+
):
|
|
8332
|
+
| void
|
|
8333
|
+
| GaxiosPromise<Schema$SqlInstancesGetDiskShrinkConfigResponse>
|
|
8334
|
+
| GaxiosPromise<Readable> {
|
|
8335
|
+
let params = (paramsOrCallback ||
|
|
8336
|
+
{}) as Params$Resource$Projects$Instances$Getdiskshrinkconfig;
|
|
8337
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8338
|
+
|
|
8339
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8340
|
+
callback = paramsOrCallback;
|
|
8341
|
+
params = {} as Params$Resource$Projects$Instances$Getdiskshrinkconfig;
|
|
8342
|
+
options = {};
|
|
8343
|
+
}
|
|
8344
|
+
|
|
8345
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8346
|
+
callback = optionsOrCallback;
|
|
8347
|
+
options = {};
|
|
8348
|
+
}
|
|
8349
|
+
|
|
8350
|
+
const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
|
|
8351
|
+
const parameters = {
|
|
8352
|
+
options: Object.assign(
|
|
8353
|
+
{
|
|
8354
|
+
url: (
|
|
8355
|
+
rootUrl +
|
|
8356
|
+
'/v1/projects/{project}/instances/{instance}/getDiskShrinkConfig'
|
|
8357
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
8358
|
+
method: 'GET',
|
|
8359
|
+
},
|
|
8360
|
+
options
|
|
8361
|
+
),
|
|
8362
|
+
params,
|
|
8363
|
+
requiredParams: ['project', 'instance'],
|
|
8364
|
+
pathParams: ['instance', 'project'],
|
|
8365
|
+
context: this.context,
|
|
8366
|
+
};
|
|
8367
|
+
if (callback) {
|
|
8368
|
+
createAPIRequest<Schema$SqlInstancesGetDiskShrinkConfigResponse>(
|
|
8369
|
+
parameters,
|
|
8370
|
+
callback as BodyResponseCallback<unknown>
|
|
8371
|
+
);
|
|
8372
|
+
} else {
|
|
8373
|
+
return createAPIRequest<Schema$SqlInstancesGetDiskShrinkConfigResponse>(
|
|
8374
|
+
parameters
|
|
8375
|
+
);
|
|
8376
|
+
}
|
|
8377
|
+
}
|
|
8378
|
+
|
|
8379
|
+
/**
|
|
8380
|
+
* Perform Disk Shrink on primary instance.
|
|
8381
|
+
* @example
|
|
8382
|
+
* ```js
|
|
8383
|
+
* // Before running the sample:
|
|
8384
|
+
* // - Enable the API at:
|
|
8385
|
+
* // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
|
|
8386
|
+
* // - Login into gcloud by running:
|
|
8387
|
+
* // `$ gcloud auth application-default login`
|
|
8388
|
+
* // - Install the npm module by running:
|
|
8389
|
+
* // `$ npm install googleapis`
|
|
8390
|
+
*
|
|
8391
|
+
* const {google} = require('googleapis');
|
|
8392
|
+
* const sqladmin = google.sqladmin('v1');
|
|
8393
|
+
*
|
|
8394
|
+
* async function main() {
|
|
8395
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8396
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8397
|
+
* scopes: [
|
|
8398
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
8399
|
+
* 'https://www.googleapis.com/auth/sqlservice.admin',
|
|
8400
|
+
* ],
|
|
8401
|
+
* });
|
|
8402
|
+
*
|
|
8403
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8404
|
+
* const authClient = await auth.getClient();
|
|
8405
|
+
* google.options({auth: authClient});
|
|
8406
|
+
*
|
|
8407
|
+
* // Do the magic
|
|
8408
|
+
* const res = await sql.projects.instances.performDiskShrink({
|
|
8409
|
+
* // Cloud SQL instance ID. This does not include the project ID.
|
|
8410
|
+
* instance: 'placeholder-value',
|
|
8411
|
+
* // Project ID of the project that contains the instance.
|
|
8412
|
+
* project: 'placeholder-value',
|
|
8413
|
+
*
|
|
8414
|
+
* // Request body metadata
|
|
8415
|
+
* requestBody: {
|
|
8416
|
+
* // request body parameters
|
|
8417
|
+
* // {
|
|
8418
|
+
* // "targetSizeGb": "my_targetSizeGb"
|
|
8419
|
+
* // }
|
|
8420
|
+
* },
|
|
8421
|
+
* });
|
|
8422
|
+
* console.log(res.data);
|
|
8423
|
+
*
|
|
8424
|
+
* // Example response
|
|
8425
|
+
* // {
|
|
8426
|
+
* // "backupContext": {},
|
|
8427
|
+
* // "endTime": "my_endTime",
|
|
8428
|
+
* // "error": {},
|
|
8429
|
+
* // "exportContext": {},
|
|
8430
|
+
* // "importContext": {},
|
|
8431
|
+
* // "insertTime": "my_insertTime",
|
|
8432
|
+
* // "kind": "my_kind",
|
|
8433
|
+
* // "name": "my_name",
|
|
8434
|
+
* // "operationType": "my_operationType",
|
|
8435
|
+
* // "selfLink": "my_selfLink",
|
|
8436
|
+
* // "startTime": "my_startTime",
|
|
8437
|
+
* // "status": "my_status",
|
|
8438
|
+
* // "targetId": "my_targetId",
|
|
8439
|
+
* // "targetLink": "my_targetLink",
|
|
8440
|
+
* // "targetProject": "my_targetProject",
|
|
8441
|
+
* // "user": "my_user"
|
|
8442
|
+
* // }
|
|
8443
|
+
* }
|
|
8444
|
+
*
|
|
8445
|
+
* main().catch(e => {
|
|
8446
|
+
* console.error(e);
|
|
8447
|
+
* throw e;
|
|
8448
|
+
* });
|
|
8449
|
+
*
|
|
8450
|
+
* ```
|
|
8451
|
+
*
|
|
8452
|
+
* @param params - Parameters for request
|
|
8453
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8454
|
+
* @param callback - Optional callback that handles the response.
|
|
8455
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8456
|
+
*/
|
|
8457
|
+
performDiskShrink(
|
|
8458
|
+
params: Params$Resource$Projects$Instances$Performdiskshrink,
|
|
8459
|
+
options: StreamMethodOptions
|
|
8460
|
+
): GaxiosPromise<Readable>;
|
|
8461
|
+
performDiskShrink(
|
|
8462
|
+
params?: Params$Resource$Projects$Instances$Performdiskshrink,
|
|
8463
|
+
options?: MethodOptions
|
|
8464
|
+
): GaxiosPromise<Schema$Operation>;
|
|
8465
|
+
performDiskShrink(
|
|
8466
|
+
params: Params$Resource$Projects$Instances$Performdiskshrink,
|
|
8467
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8468
|
+
callback: BodyResponseCallback<Readable>
|
|
8469
|
+
): void;
|
|
8470
|
+
performDiskShrink(
|
|
8471
|
+
params: Params$Resource$Projects$Instances$Performdiskshrink,
|
|
8472
|
+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
|
|
8473
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8474
|
+
): void;
|
|
8475
|
+
performDiskShrink(
|
|
8476
|
+
params: Params$Resource$Projects$Instances$Performdiskshrink,
|
|
8477
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8478
|
+
): void;
|
|
8479
|
+
performDiskShrink(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
8480
|
+
performDiskShrink(
|
|
8481
|
+
paramsOrCallback?:
|
|
8482
|
+
| Params$Resource$Projects$Instances$Performdiskshrink
|
|
8483
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8484
|
+
| BodyResponseCallback<Readable>,
|
|
8485
|
+
optionsOrCallback?:
|
|
8486
|
+
| MethodOptions
|
|
8487
|
+
| StreamMethodOptions
|
|
8488
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8489
|
+
| BodyResponseCallback<Readable>,
|
|
8490
|
+
callback?:
|
|
8491
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8492
|
+
| BodyResponseCallback<Readable>
|
|
8493
|
+
): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
|
|
8494
|
+
let params = (paramsOrCallback ||
|
|
8495
|
+
{}) as Params$Resource$Projects$Instances$Performdiskshrink;
|
|
8496
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8497
|
+
|
|
8498
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8499
|
+
callback = paramsOrCallback;
|
|
8500
|
+
params = {} as Params$Resource$Projects$Instances$Performdiskshrink;
|
|
8501
|
+
options = {};
|
|
8502
|
+
}
|
|
8503
|
+
|
|
8504
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8505
|
+
callback = optionsOrCallback;
|
|
8506
|
+
options = {};
|
|
8507
|
+
}
|
|
8508
|
+
|
|
8509
|
+
const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
|
|
8510
|
+
const parameters = {
|
|
8511
|
+
options: Object.assign(
|
|
8512
|
+
{
|
|
8513
|
+
url: (
|
|
8514
|
+
rootUrl +
|
|
8515
|
+
'/v1/projects/{project}/instances/{instance}/performDiskShrink'
|
|
8516
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
8517
|
+
method: 'POST',
|
|
8518
|
+
},
|
|
8519
|
+
options
|
|
8520
|
+
),
|
|
8521
|
+
params,
|
|
8522
|
+
requiredParams: ['project', 'instance'],
|
|
8523
|
+
pathParams: ['instance', 'project'],
|
|
8524
|
+
context: this.context,
|
|
8525
|
+
};
|
|
8526
|
+
if (callback) {
|
|
8527
|
+
createAPIRequest<Schema$Operation>(
|
|
8528
|
+
parameters,
|
|
8529
|
+
callback as BodyResponseCallback<unknown>
|
|
8530
|
+
);
|
|
8531
|
+
} else {
|
|
8532
|
+
return createAPIRequest<Schema$Operation>(parameters);
|
|
8533
|
+
}
|
|
8534
|
+
}
|
|
8535
|
+
|
|
8176
8536
|
/**
|
|
8177
8537
|
* Reschedules the maintenance on the given instance.
|
|
8178
8538
|
* @example
|
|
@@ -8332,6 +8692,161 @@ export namespace sqladmin_v1 {
|
|
|
8332
8692
|
}
|
|
8333
8693
|
}
|
|
8334
8694
|
|
|
8695
|
+
/**
|
|
8696
|
+
* Reset Replica Size to primary instance disk size.
|
|
8697
|
+
* @example
|
|
8698
|
+
* ```js
|
|
8699
|
+
* // Before running the sample:
|
|
8700
|
+
* // - Enable the API at:
|
|
8701
|
+
* // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
|
|
8702
|
+
* // - Login into gcloud by running:
|
|
8703
|
+
* // `$ gcloud auth application-default login`
|
|
8704
|
+
* // - Install the npm module by running:
|
|
8705
|
+
* // `$ npm install googleapis`
|
|
8706
|
+
*
|
|
8707
|
+
* const {google} = require('googleapis');
|
|
8708
|
+
* const sqladmin = google.sqladmin('v1');
|
|
8709
|
+
*
|
|
8710
|
+
* async function main() {
|
|
8711
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8712
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8713
|
+
* scopes: [
|
|
8714
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
8715
|
+
* 'https://www.googleapis.com/auth/sqlservice.admin',
|
|
8716
|
+
* ],
|
|
8717
|
+
* });
|
|
8718
|
+
*
|
|
8719
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8720
|
+
* const authClient = await auth.getClient();
|
|
8721
|
+
* google.options({auth: authClient});
|
|
8722
|
+
*
|
|
8723
|
+
* // Do the magic
|
|
8724
|
+
* const res = await sql.projects.instances.resetReplicaSize({
|
|
8725
|
+
* // Cloud SQL read replica instance name.
|
|
8726
|
+
* instance: 'placeholder-value',
|
|
8727
|
+
* // ID of the project that contains the read replica.
|
|
8728
|
+
* project: 'placeholder-value',
|
|
8729
|
+
*
|
|
8730
|
+
* // Request body metadata
|
|
8731
|
+
* requestBody: {
|
|
8732
|
+
* // request body parameters
|
|
8733
|
+
* // {}
|
|
8734
|
+
* },
|
|
8735
|
+
* });
|
|
8736
|
+
* console.log(res.data);
|
|
8737
|
+
*
|
|
8738
|
+
* // Example response
|
|
8739
|
+
* // {
|
|
8740
|
+
* // "backupContext": {},
|
|
8741
|
+
* // "endTime": "my_endTime",
|
|
8742
|
+
* // "error": {},
|
|
8743
|
+
* // "exportContext": {},
|
|
8744
|
+
* // "importContext": {},
|
|
8745
|
+
* // "insertTime": "my_insertTime",
|
|
8746
|
+
* // "kind": "my_kind",
|
|
8747
|
+
* // "name": "my_name",
|
|
8748
|
+
* // "operationType": "my_operationType",
|
|
8749
|
+
* // "selfLink": "my_selfLink",
|
|
8750
|
+
* // "startTime": "my_startTime",
|
|
8751
|
+
* // "status": "my_status",
|
|
8752
|
+
* // "targetId": "my_targetId",
|
|
8753
|
+
* // "targetLink": "my_targetLink",
|
|
8754
|
+
* // "targetProject": "my_targetProject",
|
|
8755
|
+
* // "user": "my_user"
|
|
8756
|
+
* // }
|
|
8757
|
+
* }
|
|
8758
|
+
*
|
|
8759
|
+
* main().catch(e => {
|
|
8760
|
+
* console.error(e);
|
|
8761
|
+
* throw e;
|
|
8762
|
+
* });
|
|
8763
|
+
*
|
|
8764
|
+
* ```
|
|
8765
|
+
*
|
|
8766
|
+
* @param params - Parameters for request
|
|
8767
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8768
|
+
* @param callback - Optional callback that handles the response.
|
|
8769
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8770
|
+
*/
|
|
8771
|
+
resetReplicaSize(
|
|
8772
|
+
params: Params$Resource$Projects$Instances$Resetreplicasize,
|
|
8773
|
+
options: StreamMethodOptions
|
|
8774
|
+
): GaxiosPromise<Readable>;
|
|
8775
|
+
resetReplicaSize(
|
|
8776
|
+
params?: Params$Resource$Projects$Instances$Resetreplicasize,
|
|
8777
|
+
options?: MethodOptions
|
|
8778
|
+
): GaxiosPromise<Schema$Operation>;
|
|
8779
|
+
resetReplicaSize(
|
|
8780
|
+
params: Params$Resource$Projects$Instances$Resetreplicasize,
|
|
8781
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8782
|
+
callback: BodyResponseCallback<Readable>
|
|
8783
|
+
): void;
|
|
8784
|
+
resetReplicaSize(
|
|
8785
|
+
params: Params$Resource$Projects$Instances$Resetreplicasize,
|
|
8786
|
+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
|
|
8787
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8788
|
+
): void;
|
|
8789
|
+
resetReplicaSize(
|
|
8790
|
+
params: Params$Resource$Projects$Instances$Resetreplicasize,
|
|
8791
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8792
|
+
): void;
|
|
8793
|
+
resetReplicaSize(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
8794
|
+
resetReplicaSize(
|
|
8795
|
+
paramsOrCallback?:
|
|
8796
|
+
| Params$Resource$Projects$Instances$Resetreplicasize
|
|
8797
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8798
|
+
| BodyResponseCallback<Readable>,
|
|
8799
|
+
optionsOrCallback?:
|
|
8800
|
+
| MethodOptions
|
|
8801
|
+
| StreamMethodOptions
|
|
8802
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8803
|
+
| BodyResponseCallback<Readable>,
|
|
8804
|
+
callback?:
|
|
8805
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8806
|
+
| BodyResponseCallback<Readable>
|
|
8807
|
+
): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
|
|
8808
|
+
let params = (paramsOrCallback ||
|
|
8809
|
+
{}) as Params$Resource$Projects$Instances$Resetreplicasize;
|
|
8810
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8811
|
+
|
|
8812
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8813
|
+
callback = paramsOrCallback;
|
|
8814
|
+
params = {} as Params$Resource$Projects$Instances$Resetreplicasize;
|
|
8815
|
+
options = {};
|
|
8816
|
+
}
|
|
8817
|
+
|
|
8818
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8819
|
+
callback = optionsOrCallback;
|
|
8820
|
+
options = {};
|
|
8821
|
+
}
|
|
8822
|
+
|
|
8823
|
+
const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
|
|
8824
|
+
const parameters = {
|
|
8825
|
+
options: Object.assign(
|
|
8826
|
+
{
|
|
8827
|
+
url: (
|
|
8828
|
+
rootUrl +
|
|
8829
|
+
'/v1/projects/{project}/instances/{instance}/resetReplicaSize'
|
|
8830
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
8831
|
+
method: 'POST',
|
|
8832
|
+
},
|
|
8833
|
+
options
|
|
8834
|
+
),
|
|
8835
|
+
params,
|
|
8836
|
+
requiredParams: ['project', 'instance'],
|
|
8837
|
+
pathParams: ['instance', 'project'],
|
|
8838
|
+
context: this.context,
|
|
8839
|
+
};
|
|
8840
|
+
if (callback) {
|
|
8841
|
+
createAPIRequest<Schema$Operation>(
|
|
8842
|
+
parameters,
|
|
8843
|
+
callback as BodyResponseCallback<unknown>
|
|
8844
|
+
);
|
|
8845
|
+
} else {
|
|
8846
|
+
return createAPIRequest<Schema$Operation>(parameters);
|
|
8847
|
+
}
|
|
8848
|
+
}
|
|
8849
|
+
|
|
8335
8850
|
/**
|
|
8336
8851
|
* Start External primary instance migration.
|
|
8337
8852
|
* @example
|
|
@@ -8649,6 +9164,33 @@ export namespace sqladmin_v1 {
|
|
|
8649
9164
|
}
|
|
8650
9165
|
}
|
|
8651
9166
|
|
|
9167
|
+
export interface Params$Resource$Projects$Instances$Getdiskshrinkconfig
|
|
9168
|
+
extends StandardParameters {
|
|
9169
|
+
/**
|
|
9170
|
+
* Cloud SQL instance ID. This does not include the project ID.
|
|
9171
|
+
*/
|
|
9172
|
+
instance?: string;
|
|
9173
|
+
/**
|
|
9174
|
+
* Project ID of the project that contains the instance.
|
|
9175
|
+
*/
|
|
9176
|
+
project?: string;
|
|
9177
|
+
}
|
|
9178
|
+
export interface Params$Resource$Projects$Instances$Performdiskshrink
|
|
9179
|
+
extends StandardParameters {
|
|
9180
|
+
/**
|
|
9181
|
+
* Cloud SQL instance ID. This does not include the project ID.
|
|
9182
|
+
*/
|
|
9183
|
+
instance?: string;
|
|
9184
|
+
/**
|
|
9185
|
+
* Project ID of the project that contains the instance.
|
|
9186
|
+
*/
|
|
9187
|
+
project?: string;
|
|
9188
|
+
|
|
9189
|
+
/**
|
|
9190
|
+
* Request body metadata
|
|
9191
|
+
*/
|
|
9192
|
+
requestBody?: Schema$PerformDiskShrinkContext;
|
|
9193
|
+
}
|
|
8652
9194
|
export interface Params$Resource$Projects$Instances$Reschedulemaintenance
|
|
8653
9195
|
extends StandardParameters {
|
|
8654
9196
|
/**
|
|
@@ -8665,6 +9207,22 @@ export namespace sqladmin_v1 {
|
|
|
8665
9207
|
*/
|
|
8666
9208
|
requestBody?: Schema$SqlInstancesRescheduleMaintenanceRequestBody;
|
|
8667
9209
|
}
|
|
9210
|
+
export interface Params$Resource$Projects$Instances$Resetreplicasize
|
|
9211
|
+
extends StandardParameters {
|
|
9212
|
+
/**
|
|
9213
|
+
* Cloud SQL read replica instance name.
|
|
9214
|
+
*/
|
|
9215
|
+
instance?: string;
|
|
9216
|
+
/**
|
|
9217
|
+
* ID of the project that contains the read replica.
|
|
9218
|
+
*/
|
|
9219
|
+
project?: string;
|
|
9220
|
+
|
|
9221
|
+
/**
|
|
9222
|
+
* Request body metadata
|
|
9223
|
+
*/
|
|
9224
|
+
requestBody?: Schema$SqlInstancesResetReplicaSizeRequest;
|
|
9225
|
+
}
|
|
8668
9226
|
export interface Params$Resource$Projects$Instances$Startexternalsync
|
|
8669
9227
|
extends StandardParameters {
|
|
8670
9228
|
/**
|