@googleapis/sqladmin 8.0.0 → 9.1.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 +18 -0
- package/build/v1.d.ts +324 -3
- package/build/v1.js +94 -0
- package/build/v1.js.map +1 -1
- package/build/v1beta4.d.ts +324 -3
- package/build/v1beta4.js +96 -0
- package/build/v1beta4.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +557 -4
- package/v1beta4.ts +559 -4
package/v1.ts
CHANGED
|
@@ -214,7 +214,7 @@ export namespace sqladmin_v1 {
|
|
|
214
214
|
*/
|
|
215
215
|
location?: string | null;
|
|
216
216
|
/**
|
|
217
|
-
*
|
|
217
|
+
* Whether point in time recovery is enabled.
|
|
218
218
|
*/
|
|
219
219
|
pointInTimeRecoveryEnabled?: boolean | null;
|
|
220
220
|
/**
|
|
@@ -243,6 +243,19 @@ export namespace sqladmin_v1 {
|
|
|
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
|
*/
|
|
@@ -395,6 +408,10 @@ export namespace sqladmin_v1 {
|
|
|
395
408
|
* Timestamp, if specified, identifies the time to which the source instance is cloned.
|
|
396
409
|
*/
|
|
397
410
|
pointInTime?: string | null;
|
|
411
|
+
/**
|
|
412
|
+
* Optional. (Point-in-time recovery for PostgreSQL only) Clone to an instance in the specified zone. If no zone is specified, clone to the same zone as the source instance.
|
|
413
|
+
*/
|
|
414
|
+
preferredZone?: string | null;
|
|
398
415
|
}
|
|
399
416
|
/**
|
|
400
417
|
* Connect settings retrieval response.
|
|
@@ -408,6 +425,10 @@ export namespace sqladmin_v1 {
|
|
|
408
425
|
* 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`, `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
426
|
*/
|
|
410
427
|
databaseVersion?: string | null;
|
|
428
|
+
/**
|
|
429
|
+
* The dns name of the instance.
|
|
430
|
+
*/
|
|
431
|
+
dnsName?: string | null;
|
|
411
432
|
/**
|
|
412
433
|
* The assigned IP addresses for the instance.
|
|
413
434
|
*/
|
|
@@ -638,6 +659,15 @@ export namespace sqladmin_v1 {
|
|
|
638
659
|
*/
|
|
639
660
|
kind?: string | null;
|
|
640
661
|
}
|
|
662
|
+
/**
|
|
663
|
+
* Data cache configurations.
|
|
664
|
+
*/
|
|
665
|
+
export interface Schema$DataCacheConfig {
|
|
666
|
+
/**
|
|
667
|
+
* Whether data cache is enabled for the instance.
|
|
668
|
+
*/
|
|
669
|
+
dataCacheEnabled?: boolean | null;
|
|
670
|
+
}
|
|
641
671
|
/**
|
|
642
672
|
* Read-replica configuration for connecting to the on-premises primary instance.
|
|
643
673
|
*/
|
|
@@ -748,6 +778,10 @@ export namespace sqladmin_v1 {
|
|
|
748
778
|
*/
|
|
749
779
|
kmsKeyVersionName?: string | null;
|
|
750
780
|
}
|
|
781
|
+
/**
|
|
782
|
+
* 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); \}
|
|
783
|
+
*/
|
|
784
|
+
export interface Schema$Empty {}
|
|
751
785
|
/**
|
|
752
786
|
* Database instance export context.
|
|
753
787
|
*/
|
|
@@ -755,7 +789,13 @@ export namespace sqladmin_v1 {
|
|
|
755
789
|
/**
|
|
756
790
|
* Options for exporting BAK files (SQL Server-only)
|
|
757
791
|
*/
|
|
758
|
-
bakExportOptions?: {
|
|
792
|
+
bakExportOptions?: {
|
|
793
|
+
bakType?: string;
|
|
794
|
+
copyOnly?: boolean;
|
|
795
|
+
differentialBase?: boolean;
|
|
796
|
+
stripeCount?: number;
|
|
797
|
+
striped?: boolean;
|
|
798
|
+
} | null;
|
|
759
799
|
/**
|
|
760
800
|
* Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.
|
|
761
801
|
*/
|
|
@@ -904,11 +944,14 @@ export namespace sqladmin_v1 {
|
|
|
904
944
|
* Import parameters specific to SQL Server .BAK files
|
|
905
945
|
*/
|
|
906
946
|
bakImportOptions?: {
|
|
947
|
+
bakType?: string;
|
|
907
948
|
encryptionOptions?: {
|
|
908
949
|
certPath?: string;
|
|
909
950
|
pvkPassword?: string;
|
|
910
951
|
pvkPath?: string;
|
|
911
952
|
};
|
|
953
|
+
noRecovery?: boolean;
|
|
954
|
+
recoveryOnly?: boolean;
|
|
912
955
|
striped?: boolean;
|
|
913
956
|
} | null;
|
|
914
957
|
/**
|
|
@@ -1065,6 +1108,15 @@ export namespace sqladmin_v1 {
|
|
|
1065
1108
|
*/
|
|
1066
1109
|
kind?: string | null;
|
|
1067
1110
|
}
|
|
1111
|
+
/**
|
|
1112
|
+
* Database Instance reencrypt request.
|
|
1113
|
+
*/
|
|
1114
|
+
export interface Schema$InstancesReencryptRequest {
|
|
1115
|
+
/**
|
|
1116
|
+
* Configuration specific to backup re-encryption
|
|
1117
|
+
*/
|
|
1118
|
+
backupReencryptionConfig?: Schema$BackupReencryptionConfig;
|
|
1119
|
+
}
|
|
1068
1120
|
/**
|
|
1069
1121
|
* Database instance restore backup request.
|
|
1070
1122
|
*/
|
|
@@ -1585,6 +1637,10 @@ export namespace sqladmin_v1 {
|
|
|
1585
1637
|
* Configuration specific to read replica instances. Indicates whether replication is enabled or not. WARNING: Changing this restarts the instance.
|
|
1586
1638
|
*/
|
|
1587
1639
|
databaseReplicationEnabled?: boolean | null;
|
|
1640
|
+
/**
|
|
1641
|
+
* Configuration for data cache.
|
|
1642
|
+
*/
|
|
1643
|
+
dataCacheConfig?: Schema$DataCacheConfig;
|
|
1588
1644
|
/**
|
|
1589
1645
|
* The size of data disk, in GB. The data disk size minimum is 10GB.
|
|
1590
1646
|
*/
|
|
@@ -1601,6 +1657,10 @@ export namespace sqladmin_v1 {
|
|
|
1601
1657
|
* Deny maintenance periods
|
|
1602
1658
|
*/
|
|
1603
1659
|
denyMaintenancePeriods?: Schema$DenyMaintenancePeriod[];
|
|
1660
|
+
/**
|
|
1661
|
+
* Optional. The edition of the instance.
|
|
1662
|
+
*/
|
|
1663
|
+
edition?: string | null;
|
|
1604
1664
|
/**
|
|
1605
1665
|
* Insights configuration, for now relevant only for Postgres.
|
|
1606
1666
|
*/
|
|
@@ -1700,11 +1760,28 @@ export namespace sqladmin_v1 {
|
|
|
1700
1760
|
* This is always `sql#getDiskShrinkConfig`.
|
|
1701
1761
|
*/
|
|
1702
1762
|
kind?: string | null;
|
|
1763
|
+
/**
|
|
1764
|
+
* Additional message to customers.
|
|
1765
|
+
*/
|
|
1766
|
+
message?: string | null;
|
|
1703
1767
|
/**
|
|
1704
1768
|
* The minimum size to which a disk can be shrunk in GigaBytes.
|
|
1705
1769
|
*/
|
|
1706
1770
|
minimalTargetSizeGb?: string | null;
|
|
1707
1771
|
}
|
|
1772
|
+
/**
|
|
1773
|
+
* Instance get latest recovery time response.
|
|
1774
|
+
*/
|
|
1775
|
+
export interface Schema$SqlInstancesGetLatestRecoveryTimeResponse {
|
|
1776
|
+
/**
|
|
1777
|
+
* This is always `sql#getLatestRecoveryTime`.
|
|
1778
|
+
*/
|
|
1779
|
+
kind?: string | null;
|
|
1780
|
+
/**
|
|
1781
|
+
* Timestamp, identifies the latest recovery time of the source instance.
|
|
1782
|
+
*/
|
|
1783
|
+
latestRecoveryTime?: string | null;
|
|
1784
|
+
}
|
|
1708
1785
|
/**
|
|
1709
1786
|
* Reschedule options for maintenance windows.
|
|
1710
1787
|
*/
|
|
@@ -1734,6 +1811,10 @@ export namespace sqladmin_v1 {
|
|
|
1734
1811
|
* External sync mode.
|
|
1735
1812
|
*/
|
|
1736
1813
|
syncMode?: string | null;
|
|
1814
|
+
/**
|
|
1815
|
+
* Optional. Parallel level for initial data sync. Currently only applicable for MySQL.
|
|
1816
|
+
*/
|
|
1817
|
+
syncParallelLevel?: string | null;
|
|
1737
1818
|
}
|
|
1738
1819
|
/**
|
|
1739
1820
|
* Instance verify external sync settings request.
|
|
@@ -3005,6 +3086,7 @@ export namespace sqladmin_v1 {
|
|
|
3005
3086
|
* // {
|
|
3006
3087
|
* // "backendType": "my_backendType",
|
|
3007
3088
|
* // "databaseVersion": "my_databaseVersion",
|
|
3089
|
+
* // "dnsName": "my_dnsName",
|
|
3008
3090
|
* // "ipAddresses": [],
|
|
3009
3091
|
* // "kind": "my_kind",
|
|
3010
3092
|
* // "region": "my_region",
|
|
@@ -3434,7 +3516,7 @@ export namespace sqladmin_v1 {
|
|
|
3434
3516
|
}
|
|
3435
3517
|
|
|
3436
3518
|
/**
|
|
3437
|
-
* Inserts a resource containing information about a database inside a Cloud SQL instance.
|
|
3519
|
+
* Inserts a resource containing information about a database inside a Cloud SQL instance. **Note:** You can't modify the default character set and collation.
|
|
3438
3520
|
* @example
|
|
3439
3521
|
* ```js
|
|
3440
3522
|
* // Before running the sample:
|
|
@@ -6364,6 +6446,162 @@ export namespace sqladmin_v1 {
|
|
|
6364
6446
|
}
|
|
6365
6447
|
}
|
|
6366
6448
|
|
|
6449
|
+
/**
|
|
6450
|
+
* Reencrypt CMEK instance with latest key version.
|
|
6451
|
+
* @example
|
|
6452
|
+
* ```js
|
|
6453
|
+
* // Before running the sample:
|
|
6454
|
+
* // - Enable the API at:
|
|
6455
|
+
* // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
|
|
6456
|
+
* // - Login into gcloud by running:
|
|
6457
|
+
* // `$ gcloud auth application-default login`
|
|
6458
|
+
* // - Install the npm module by running:
|
|
6459
|
+
* // `$ npm install googleapis`
|
|
6460
|
+
*
|
|
6461
|
+
* const {google} = require('googleapis');
|
|
6462
|
+
* const sqladmin = google.sqladmin('v1');
|
|
6463
|
+
*
|
|
6464
|
+
* async function main() {
|
|
6465
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6466
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6467
|
+
* scopes: [
|
|
6468
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
6469
|
+
* 'https://www.googleapis.com/auth/sqlservice.admin',
|
|
6470
|
+
* ],
|
|
6471
|
+
* });
|
|
6472
|
+
*
|
|
6473
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6474
|
+
* const authClient = await auth.getClient();
|
|
6475
|
+
* google.options({auth: authClient});
|
|
6476
|
+
*
|
|
6477
|
+
* // Do the magic
|
|
6478
|
+
* const res = await sql.instances.reencrypt({
|
|
6479
|
+
* // Cloud SQL instance ID. This does not include the project ID.
|
|
6480
|
+
* instance: 'placeholder-value',
|
|
6481
|
+
* // ID of the project that contains the instance.
|
|
6482
|
+
* project: 'placeholder-value',
|
|
6483
|
+
*
|
|
6484
|
+
* // Request body metadata
|
|
6485
|
+
* requestBody: {
|
|
6486
|
+
* // request body parameters
|
|
6487
|
+
* // {
|
|
6488
|
+
* // "backupReencryptionConfig": {}
|
|
6489
|
+
* // }
|
|
6490
|
+
* },
|
|
6491
|
+
* });
|
|
6492
|
+
* console.log(res.data);
|
|
6493
|
+
*
|
|
6494
|
+
* // Example response
|
|
6495
|
+
* // {
|
|
6496
|
+
* // "backupContext": {},
|
|
6497
|
+
* // "endTime": "my_endTime",
|
|
6498
|
+
* // "error": {},
|
|
6499
|
+
* // "exportContext": {},
|
|
6500
|
+
* // "importContext": {},
|
|
6501
|
+
* // "insertTime": "my_insertTime",
|
|
6502
|
+
* // "kind": "my_kind",
|
|
6503
|
+
* // "name": "my_name",
|
|
6504
|
+
* // "operationType": "my_operationType",
|
|
6505
|
+
* // "selfLink": "my_selfLink",
|
|
6506
|
+
* // "startTime": "my_startTime",
|
|
6507
|
+
* // "status": "my_status",
|
|
6508
|
+
* // "targetId": "my_targetId",
|
|
6509
|
+
* // "targetLink": "my_targetLink",
|
|
6510
|
+
* // "targetProject": "my_targetProject",
|
|
6511
|
+
* // "user": "my_user"
|
|
6512
|
+
* // }
|
|
6513
|
+
* }
|
|
6514
|
+
*
|
|
6515
|
+
* main().catch(e => {
|
|
6516
|
+
* console.error(e);
|
|
6517
|
+
* throw e;
|
|
6518
|
+
* });
|
|
6519
|
+
*
|
|
6520
|
+
* ```
|
|
6521
|
+
*
|
|
6522
|
+
* @param params - Parameters for request
|
|
6523
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
6524
|
+
* @param callback - Optional callback that handles the response.
|
|
6525
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6526
|
+
*/
|
|
6527
|
+
reencrypt(
|
|
6528
|
+
params: Params$Resource$Instances$Reencrypt,
|
|
6529
|
+
options: StreamMethodOptions
|
|
6530
|
+
): GaxiosPromise<Readable>;
|
|
6531
|
+
reencrypt(
|
|
6532
|
+
params?: Params$Resource$Instances$Reencrypt,
|
|
6533
|
+
options?: MethodOptions
|
|
6534
|
+
): GaxiosPromise<Schema$Operation>;
|
|
6535
|
+
reencrypt(
|
|
6536
|
+
params: Params$Resource$Instances$Reencrypt,
|
|
6537
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
6538
|
+
callback: BodyResponseCallback<Readable>
|
|
6539
|
+
): void;
|
|
6540
|
+
reencrypt(
|
|
6541
|
+
params: Params$Resource$Instances$Reencrypt,
|
|
6542
|
+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
|
|
6543
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
6544
|
+
): void;
|
|
6545
|
+
reencrypt(
|
|
6546
|
+
params: Params$Resource$Instances$Reencrypt,
|
|
6547
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
6548
|
+
): void;
|
|
6549
|
+
reencrypt(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
6550
|
+
reencrypt(
|
|
6551
|
+
paramsOrCallback?:
|
|
6552
|
+
| Params$Resource$Instances$Reencrypt
|
|
6553
|
+
| BodyResponseCallback<Schema$Operation>
|
|
6554
|
+
| BodyResponseCallback<Readable>,
|
|
6555
|
+
optionsOrCallback?:
|
|
6556
|
+
| MethodOptions
|
|
6557
|
+
| StreamMethodOptions
|
|
6558
|
+
| BodyResponseCallback<Schema$Operation>
|
|
6559
|
+
| BodyResponseCallback<Readable>,
|
|
6560
|
+
callback?:
|
|
6561
|
+
| BodyResponseCallback<Schema$Operation>
|
|
6562
|
+
| BodyResponseCallback<Readable>
|
|
6563
|
+
): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
|
|
6564
|
+
let params = (paramsOrCallback ||
|
|
6565
|
+
{}) as Params$Resource$Instances$Reencrypt;
|
|
6566
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
6567
|
+
|
|
6568
|
+
if (typeof paramsOrCallback === 'function') {
|
|
6569
|
+
callback = paramsOrCallback;
|
|
6570
|
+
params = {} as Params$Resource$Instances$Reencrypt;
|
|
6571
|
+
options = {};
|
|
6572
|
+
}
|
|
6573
|
+
|
|
6574
|
+
if (typeof optionsOrCallback === 'function') {
|
|
6575
|
+
callback = optionsOrCallback;
|
|
6576
|
+
options = {};
|
|
6577
|
+
}
|
|
6578
|
+
|
|
6579
|
+
const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
|
|
6580
|
+
const parameters = {
|
|
6581
|
+
options: Object.assign(
|
|
6582
|
+
{
|
|
6583
|
+
url: (
|
|
6584
|
+
rootUrl + '/v1/projects/{project}/instances/{instance}/reencrypt'
|
|
6585
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
6586
|
+
method: 'POST',
|
|
6587
|
+
},
|
|
6588
|
+
options
|
|
6589
|
+
),
|
|
6590
|
+
params,
|
|
6591
|
+
requiredParams: ['project', 'instance'],
|
|
6592
|
+
pathParams: ['instance', 'project'],
|
|
6593
|
+
context: this.context,
|
|
6594
|
+
};
|
|
6595
|
+
if (callback) {
|
|
6596
|
+
createAPIRequest<Schema$Operation>(
|
|
6597
|
+
parameters,
|
|
6598
|
+
callback as BodyResponseCallback<unknown>
|
|
6599
|
+
);
|
|
6600
|
+
} else {
|
|
6601
|
+
return createAPIRequest<Schema$Operation>(parameters);
|
|
6602
|
+
}
|
|
6603
|
+
}
|
|
6604
|
+
|
|
6367
6605
|
/**
|
|
6368
6606
|
* Deletes all client certificates and generates a new server SSL certificate for the instance.
|
|
6369
6607
|
* @example
|
|
@@ -7795,6 +8033,22 @@ export namespace sqladmin_v1 {
|
|
|
7795
8033
|
*/
|
|
7796
8034
|
project?: string;
|
|
7797
8035
|
}
|
|
8036
|
+
export interface Params$Resource$Instances$Reencrypt
|
|
8037
|
+
extends StandardParameters {
|
|
8038
|
+
/**
|
|
8039
|
+
* Cloud SQL instance ID. This does not include the project ID.
|
|
8040
|
+
*/
|
|
8041
|
+
instance?: string;
|
|
8042
|
+
/**
|
|
8043
|
+
* ID of the project that contains the instance.
|
|
8044
|
+
*/
|
|
8045
|
+
project?: string;
|
|
8046
|
+
|
|
8047
|
+
/**
|
|
8048
|
+
* Request body metadata
|
|
8049
|
+
*/
|
|
8050
|
+
requestBody?: Schema$InstancesReencryptRequest;
|
|
8051
|
+
}
|
|
7798
8052
|
export interface Params$Resource$Instances$Resetsslconfig
|
|
7799
8053
|
extends StandardParameters {
|
|
7800
8054
|
/**
|
|
@@ -7909,6 +8163,137 @@ export namespace sqladmin_v1 {
|
|
|
7909
8163
|
this.context = context;
|
|
7910
8164
|
}
|
|
7911
8165
|
|
|
8166
|
+
/**
|
|
8167
|
+
* Cancels an instance operation that has been performed on an instance.
|
|
8168
|
+
* @example
|
|
8169
|
+
* ```js
|
|
8170
|
+
* // Before running the sample:
|
|
8171
|
+
* // - Enable the API at:
|
|
8172
|
+
* // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
|
|
8173
|
+
* // - Login into gcloud by running:
|
|
8174
|
+
* // `$ gcloud auth application-default login`
|
|
8175
|
+
* // - Install the npm module by running:
|
|
8176
|
+
* // `$ npm install googleapis`
|
|
8177
|
+
*
|
|
8178
|
+
* const {google} = require('googleapis');
|
|
8179
|
+
* const sqladmin = google.sqladmin('v1');
|
|
8180
|
+
*
|
|
8181
|
+
* async function main() {
|
|
8182
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8183
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8184
|
+
* scopes: [
|
|
8185
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
8186
|
+
* 'https://www.googleapis.com/auth/sqlservice.admin',
|
|
8187
|
+
* ],
|
|
8188
|
+
* });
|
|
8189
|
+
*
|
|
8190
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8191
|
+
* const authClient = await auth.getClient();
|
|
8192
|
+
* google.options({auth: authClient});
|
|
8193
|
+
*
|
|
8194
|
+
* // Do the magic
|
|
8195
|
+
* const res = await sql.operations.cancel({
|
|
8196
|
+
* // Instance operation ID.
|
|
8197
|
+
* operation: 'placeholder-value',
|
|
8198
|
+
* // Project ID of the project that contains the instance.
|
|
8199
|
+
* project: 'placeholder-value',
|
|
8200
|
+
* });
|
|
8201
|
+
* console.log(res.data);
|
|
8202
|
+
*
|
|
8203
|
+
* // Example response
|
|
8204
|
+
* // {}
|
|
8205
|
+
* }
|
|
8206
|
+
*
|
|
8207
|
+
* main().catch(e => {
|
|
8208
|
+
* console.error(e);
|
|
8209
|
+
* throw e;
|
|
8210
|
+
* });
|
|
8211
|
+
*
|
|
8212
|
+
* ```
|
|
8213
|
+
*
|
|
8214
|
+
* @param params - Parameters for request
|
|
8215
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8216
|
+
* @param callback - Optional callback that handles the response.
|
|
8217
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8218
|
+
*/
|
|
8219
|
+
cancel(
|
|
8220
|
+
params: Params$Resource$Operations$Cancel,
|
|
8221
|
+
options: StreamMethodOptions
|
|
8222
|
+
): GaxiosPromise<Readable>;
|
|
8223
|
+
cancel(
|
|
8224
|
+
params?: Params$Resource$Operations$Cancel,
|
|
8225
|
+
options?: MethodOptions
|
|
8226
|
+
): GaxiosPromise<Schema$Empty>;
|
|
8227
|
+
cancel(
|
|
8228
|
+
params: Params$Resource$Operations$Cancel,
|
|
8229
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8230
|
+
callback: BodyResponseCallback<Readable>
|
|
8231
|
+
): void;
|
|
8232
|
+
cancel(
|
|
8233
|
+
params: Params$Resource$Operations$Cancel,
|
|
8234
|
+
options: MethodOptions | BodyResponseCallback<Schema$Empty>,
|
|
8235
|
+
callback: BodyResponseCallback<Schema$Empty>
|
|
8236
|
+
): void;
|
|
8237
|
+
cancel(
|
|
8238
|
+
params: Params$Resource$Operations$Cancel,
|
|
8239
|
+
callback: BodyResponseCallback<Schema$Empty>
|
|
8240
|
+
): void;
|
|
8241
|
+
cancel(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
8242
|
+
cancel(
|
|
8243
|
+
paramsOrCallback?:
|
|
8244
|
+
| Params$Resource$Operations$Cancel
|
|
8245
|
+
| BodyResponseCallback<Schema$Empty>
|
|
8246
|
+
| BodyResponseCallback<Readable>,
|
|
8247
|
+
optionsOrCallback?:
|
|
8248
|
+
| MethodOptions
|
|
8249
|
+
| StreamMethodOptions
|
|
8250
|
+
| BodyResponseCallback<Schema$Empty>
|
|
8251
|
+
| BodyResponseCallback<Readable>,
|
|
8252
|
+
callback?:
|
|
8253
|
+
| BodyResponseCallback<Schema$Empty>
|
|
8254
|
+
| BodyResponseCallback<Readable>
|
|
8255
|
+
): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
|
|
8256
|
+
let params = (paramsOrCallback ||
|
|
8257
|
+
{}) as Params$Resource$Operations$Cancel;
|
|
8258
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8259
|
+
|
|
8260
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8261
|
+
callback = paramsOrCallback;
|
|
8262
|
+
params = {} as Params$Resource$Operations$Cancel;
|
|
8263
|
+
options = {};
|
|
8264
|
+
}
|
|
8265
|
+
|
|
8266
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8267
|
+
callback = optionsOrCallback;
|
|
8268
|
+
options = {};
|
|
8269
|
+
}
|
|
8270
|
+
|
|
8271
|
+
const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
|
|
8272
|
+
const parameters = {
|
|
8273
|
+
options: Object.assign(
|
|
8274
|
+
{
|
|
8275
|
+
url: (
|
|
8276
|
+
rootUrl + '/v1/projects/{project}/operations/{operation}/cancel'
|
|
8277
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
8278
|
+
method: 'POST',
|
|
8279
|
+
},
|
|
8280
|
+
options
|
|
8281
|
+
),
|
|
8282
|
+
params,
|
|
8283
|
+
requiredParams: ['project', 'operation'],
|
|
8284
|
+
pathParams: ['operation', 'project'],
|
|
8285
|
+
context: this.context,
|
|
8286
|
+
};
|
|
8287
|
+
if (callback) {
|
|
8288
|
+
createAPIRequest<Schema$Empty>(
|
|
8289
|
+
parameters,
|
|
8290
|
+
callback as BodyResponseCallback<unknown>
|
|
8291
|
+
);
|
|
8292
|
+
} else {
|
|
8293
|
+
return createAPIRequest<Schema$Empty>(parameters);
|
|
8294
|
+
}
|
|
8295
|
+
}
|
|
8296
|
+
|
|
7912
8297
|
/**
|
|
7913
8298
|
* Retrieves an instance operation that has been performed on an instance.
|
|
7914
8299
|
* @example
|
|
@@ -8201,6 +8586,17 @@ export namespace sqladmin_v1 {
|
|
|
8201
8586
|
}
|
|
8202
8587
|
}
|
|
8203
8588
|
|
|
8589
|
+
export interface Params$Resource$Operations$Cancel
|
|
8590
|
+
extends StandardParameters {
|
|
8591
|
+
/**
|
|
8592
|
+
* Instance operation ID.
|
|
8593
|
+
*/
|
|
8594
|
+
operation?: string;
|
|
8595
|
+
/**
|
|
8596
|
+
* Project ID of the project that contains the instance.
|
|
8597
|
+
*/
|
|
8598
|
+
project?: string;
|
|
8599
|
+
}
|
|
8204
8600
|
export interface Params$Resource$Operations$Get extends StandardParameters {
|
|
8205
8601
|
/**
|
|
8206
8602
|
* Instance operation ID.
|
|
@@ -8285,6 +8681,7 @@ export namespace sqladmin_v1 {
|
|
|
8285
8681
|
* // Example response
|
|
8286
8682
|
* // {
|
|
8287
8683
|
* // "kind": "my_kind",
|
|
8684
|
+
* // "message": "my_message",
|
|
8288
8685
|
* // "minimalTargetSizeGb": "my_minimalTargetSizeGb"
|
|
8289
8686
|
* // }
|
|
8290
8687
|
* }
|
|
@@ -8389,6 +8786,150 @@ export namespace sqladmin_v1 {
|
|
|
8389
8786
|
}
|
|
8390
8787
|
}
|
|
8391
8788
|
|
|
8789
|
+
/**
|
|
8790
|
+
* Get Latest Recovery Time for a given instance.
|
|
8791
|
+
* @example
|
|
8792
|
+
* ```js
|
|
8793
|
+
* // Before running the sample:
|
|
8794
|
+
* // - Enable the API at:
|
|
8795
|
+
* // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
|
|
8796
|
+
* // - Login into gcloud by running:
|
|
8797
|
+
* // `$ gcloud auth application-default login`
|
|
8798
|
+
* // - Install the npm module by running:
|
|
8799
|
+
* // `$ npm install googleapis`
|
|
8800
|
+
*
|
|
8801
|
+
* const {google} = require('googleapis');
|
|
8802
|
+
* const sqladmin = google.sqladmin('v1');
|
|
8803
|
+
*
|
|
8804
|
+
* async function main() {
|
|
8805
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8806
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8807
|
+
* scopes: [
|
|
8808
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
8809
|
+
* 'https://www.googleapis.com/auth/sqlservice.admin',
|
|
8810
|
+
* ],
|
|
8811
|
+
* });
|
|
8812
|
+
*
|
|
8813
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8814
|
+
* const authClient = await auth.getClient();
|
|
8815
|
+
* google.options({auth: authClient});
|
|
8816
|
+
*
|
|
8817
|
+
* // Do the magic
|
|
8818
|
+
* const res = await sql.projects.instances.getLatestRecoveryTime({
|
|
8819
|
+
* // Cloud SQL instance ID. This does not include the project ID.
|
|
8820
|
+
* instance: 'placeholder-value',
|
|
8821
|
+
* // Project ID of the project that contains the instance.
|
|
8822
|
+
* project: 'placeholder-value',
|
|
8823
|
+
* });
|
|
8824
|
+
* console.log(res.data);
|
|
8825
|
+
*
|
|
8826
|
+
* // Example response
|
|
8827
|
+
* // {
|
|
8828
|
+
* // "kind": "my_kind",
|
|
8829
|
+
* // "latestRecoveryTime": "my_latestRecoveryTime"
|
|
8830
|
+
* // }
|
|
8831
|
+
* }
|
|
8832
|
+
*
|
|
8833
|
+
* main().catch(e => {
|
|
8834
|
+
* console.error(e);
|
|
8835
|
+
* throw e;
|
|
8836
|
+
* });
|
|
8837
|
+
*
|
|
8838
|
+
* ```
|
|
8839
|
+
*
|
|
8840
|
+
* @param params - Parameters for request
|
|
8841
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8842
|
+
* @param callback - Optional callback that handles the response.
|
|
8843
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8844
|
+
*/
|
|
8845
|
+
getLatestRecoveryTime(
|
|
8846
|
+
params: Params$Resource$Projects$Instances$Getlatestrecoverytime,
|
|
8847
|
+
options: StreamMethodOptions
|
|
8848
|
+
): GaxiosPromise<Readable>;
|
|
8849
|
+
getLatestRecoveryTime(
|
|
8850
|
+
params?: Params$Resource$Projects$Instances$Getlatestrecoverytime,
|
|
8851
|
+
options?: MethodOptions
|
|
8852
|
+
): GaxiosPromise<Schema$SqlInstancesGetLatestRecoveryTimeResponse>;
|
|
8853
|
+
getLatestRecoveryTime(
|
|
8854
|
+
params: Params$Resource$Projects$Instances$Getlatestrecoverytime,
|
|
8855
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8856
|
+
callback: BodyResponseCallback<Readable>
|
|
8857
|
+
): void;
|
|
8858
|
+
getLatestRecoveryTime(
|
|
8859
|
+
params: Params$Resource$Projects$Instances$Getlatestrecoverytime,
|
|
8860
|
+
options:
|
|
8861
|
+
| MethodOptions
|
|
8862
|
+
| BodyResponseCallback<Schema$SqlInstancesGetLatestRecoveryTimeResponse>,
|
|
8863
|
+
callback: BodyResponseCallback<Schema$SqlInstancesGetLatestRecoveryTimeResponse>
|
|
8864
|
+
): void;
|
|
8865
|
+
getLatestRecoveryTime(
|
|
8866
|
+
params: Params$Resource$Projects$Instances$Getlatestrecoverytime,
|
|
8867
|
+
callback: BodyResponseCallback<Schema$SqlInstancesGetLatestRecoveryTimeResponse>
|
|
8868
|
+
): void;
|
|
8869
|
+
getLatestRecoveryTime(
|
|
8870
|
+
callback: BodyResponseCallback<Schema$SqlInstancesGetLatestRecoveryTimeResponse>
|
|
8871
|
+
): void;
|
|
8872
|
+
getLatestRecoveryTime(
|
|
8873
|
+
paramsOrCallback?:
|
|
8874
|
+
| Params$Resource$Projects$Instances$Getlatestrecoverytime
|
|
8875
|
+
| BodyResponseCallback<Schema$SqlInstancesGetLatestRecoveryTimeResponse>
|
|
8876
|
+
| BodyResponseCallback<Readable>,
|
|
8877
|
+
optionsOrCallback?:
|
|
8878
|
+
| MethodOptions
|
|
8879
|
+
| StreamMethodOptions
|
|
8880
|
+
| BodyResponseCallback<Schema$SqlInstancesGetLatestRecoveryTimeResponse>
|
|
8881
|
+
| BodyResponseCallback<Readable>,
|
|
8882
|
+
callback?:
|
|
8883
|
+
| BodyResponseCallback<Schema$SqlInstancesGetLatestRecoveryTimeResponse>
|
|
8884
|
+
| BodyResponseCallback<Readable>
|
|
8885
|
+
):
|
|
8886
|
+
| void
|
|
8887
|
+
| GaxiosPromise<Schema$SqlInstancesGetLatestRecoveryTimeResponse>
|
|
8888
|
+
| GaxiosPromise<Readable> {
|
|
8889
|
+
let params = (paramsOrCallback ||
|
|
8890
|
+
{}) as Params$Resource$Projects$Instances$Getlatestrecoverytime;
|
|
8891
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8892
|
+
|
|
8893
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8894
|
+
callback = paramsOrCallback;
|
|
8895
|
+
params = {} as Params$Resource$Projects$Instances$Getlatestrecoverytime;
|
|
8896
|
+
options = {};
|
|
8897
|
+
}
|
|
8898
|
+
|
|
8899
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8900
|
+
callback = optionsOrCallback;
|
|
8901
|
+
options = {};
|
|
8902
|
+
}
|
|
8903
|
+
|
|
8904
|
+
const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
|
|
8905
|
+
const parameters = {
|
|
8906
|
+
options: Object.assign(
|
|
8907
|
+
{
|
|
8908
|
+
url: (
|
|
8909
|
+
rootUrl +
|
|
8910
|
+
'/v1/projects/{project}/instances/{instance}/getLatestRecoveryTime'
|
|
8911
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
8912
|
+
method: 'GET',
|
|
8913
|
+
},
|
|
8914
|
+
options
|
|
8915
|
+
),
|
|
8916
|
+
params,
|
|
8917
|
+
requiredParams: ['project', 'instance'],
|
|
8918
|
+
pathParams: ['instance', 'project'],
|
|
8919
|
+
context: this.context,
|
|
8920
|
+
};
|
|
8921
|
+
if (callback) {
|
|
8922
|
+
createAPIRequest<Schema$SqlInstancesGetLatestRecoveryTimeResponse>(
|
|
8923
|
+
parameters,
|
|
8924
|
+
callback as BodyResponseCallback<unknown>
|
|
8925
|
+
);
|
|
8926
|
+
} else {
|
|
8927
|
+
return createAPIRequest<Schema$SqlInstancesGetLatestRecoveryTimeResponse>(
|
|
8928
|
+
parameters
|
|
8929
|
+
);
|
|
8930
|
+
}
|
|
8931
|
+
}
|
|
8932
|
+
|
|
8392
8933
|
/**
|
|
8393
8934
|
* Perform Disk Shrink on primary instance.
|
|
8394
8935
|
* @example
|
|
@@ -8901,7 +9442,8 @@ export namespace sqladmin_v1 {
|
|
|
8901
9442
|
* // {
|
|
8902
9443
|
* // "mysqlSyncConfig": {},
|
|
8903
9444
|
* // "skipVerification": false,
|
|
8904
|
-
* // "syncMode": "my_syncMode"
|
|
9445
|
+
* // "syncMode": "my_syncMode",
|
|
9446
|
+
* // "syncParallelLevel": "my_syncParallelLevel"
|
|
8905
9447
|
* // }
|
|
8906
9448
|
* },
|
|
8907
9449
|
* });
|
|
@@ -9188,6 +9730,17 @@ export namespace sqladmin_v1 {
|
|
|
9188
9730
|
*/
|
|
9189
9731
|
project?: string;
|
|
9190
9732
|
}
|
|
9733
|
+
export interface Params$Resource$Projects$Instances$Getlatestrecoverytime
|
|
9734
|
+
extends StandardParameters {
|
|
9735
|
+
/**
|
|
9736
|
+
* Cloud SQL instance ID. This does not include the project ID.
|
|
9737
|
+
*/
|
|
9738
|
+
instance?: string;
|
|
9739
|
+
/**
|
|
9740
|
+
* Project ID of the project that contains the instance.
|
|
9741
|
+
*/
|
|
9742
|
+
project?: string;
|
|
9743
|
+
}
|
|
9191
9744
|
export interface Params$Resource$Projects$Instances$Performdiskshrink
|
|
9192
9745
|
extends StandardParameters {
|
|
9193
9746
|
/**
|