@googleapis/sqladmin 8.0.0 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [9.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/sqladmin-v8.0.0...sqladmin-v9.0.0) (2023-06-22)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * This release has breaking changes.
9
+
10
+ ### Features
11
+
12
+ * run the generator ([#3260](https://github.com/googleapis/google-api-nodejs-client/issues/3260)) ([8efb786](https://github.com/googleapis/google-api-nodejs-client/commit/8efb7861b7da4bc1472a4b654e46f90b29fbff20))
13
+
3
14
  ## [8.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/sqladmin-v7.2.0...sqladmin-v8.0.0) (2023-04-08)
4
15
 
5
16
 
package/build/v1.d.ts CHANGED
@@ -152,7 +152,7 @@ export declare namespace sqladmin_v1 {
152
152
  */
153
153
  location?: string | null;
154
154
  /**
155
- * (Postgres only) Whether point in time recovery is enabled.
155
+ * Whether point in time recovery is enabled.
156
156
  */
157
157
  pointInTimeRecoveryEnabled?: boolean | null;
158
158
  /**
@@ -181,6 +181,19 @@ export declare namespace sqladmin_v1 {
181
181
  */
182
182
  kind?: string | null;
183
183
  }
184
+ /**
185
+ * Backup Reencryption Config
186
+ */
187
+ export interface Schema$BackupReencryptionConfig {
188
+ /**
189
+ * Backup re-encryption limit
190
+ */
191
+ backupLimit?: number | null;
192
+ /**
193
+ * Type of backups users want to re-encrypt.
194
+ */
195
+ backupType?: string | null;
196
+ }
184
197
  /**
185
198
  * We currently only support backup retention by specifying the number of backups we will retain.
186
199
  */
@@ -346,6 +359,10 @@ export declare namespace sqladmin_v1 {
346
359
  * 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`.
347
360
  */
348
361
  databaseVersion?: string | null;
362
+ /**
363
+ * The dns name of the instance.
364
+ */
365
+ dnsName?: string | null;
349
366
  /**
350
367
  * The assigned IP addresses for the instance.
351
368
  */
@@ -689,6 +706,11 @@ export declare namespace sqladmin_v1 {
689
706
  */
690
707
  kmsKeyVersionName?: string | null;
691
708
  }
709
+ /**
710
+ * 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); \}
711
+ */
712
+ export interface Schema$Empty {
713
+ }
692
714
  /**
693
715
  * Database instance export context.
694
716
  */
@@ -697,6 +719,9 @@ export declare namespace sqladmin_v1 {
697
719
  * Options for exporting BAK files (SQL Server-only)
698
720
  */
699
721
  bakExportOptions?: {
722
+ bakType?: string;
723
+ copyOnly?: boolean;
724
+ differentialBase?: boolean;
700
725
  stripeCount?: number;
701
726
  striped?: boolean;
702
727
  } | null;
@@ -850,11 +875,14 @@ export declare namespace sqladmin_v1 {
850
875
  * Import parameters specific to SQL Server .BAK files
851
876
  */
852
877
  bakImportOptions?: {
878
+ bakType?: string;
853
879
  encryptionOptions?: {
854
880
  certPath?: string;
855
881
  pvkPassword?: string;
856
882
  pvkPath?: string;
857
883
  };
884
+ noRecovery?: boolean;
885
+ recoveryOnly?: boolean;
858
886
  striped?: boolean;
859
887
  } | null;
860
888
  /**
@@ -1011,6 +1039,15 @@ export declare namespace sqladmin_v1 {
1011
1039
  */
1012
1040
  kind?: string | null;
1013
1041
  }
1042
+ /**
1043
+ * Database Instance reencrypt request.
1044
+ */
1045
+ export interface Schema$InstancesReencryptRequest {
1046
+ /**
1047
+ * Configuration specific to backup re-encryption
1048
+ */
1049
+ backupReencryptionConfig?: Schema$BackupReencryptionConfig;
1050
+ }
1014
1051
  /**
1015
1052
  * Database instance restore backup request.
1016
1053
  */
@@ -1648,6 +1685,10 @@ export declare namespace sqladmin_v1 {
1648
1685
  * This is always `sql#getDiskShrinkConfig`.
1649
1686
  */
1650
1687
  kind?: string | null;
1688
+ /**
1689
+ * Additional message to customers.
1690
+ */
1691
+ message?: string | null;
1651
1692
  /**
1652
1693
  * The minimum size to which a disk can be shrunk in GigaBytes.
1653
1694
  */
@@ -1683,6 +1724,10 @@ export declare namespace sqladmin_v1 {
1683
1724
  * External sync mode.
1684
1725
  */
1685
1726
  syncMode?: string | null;
1727
+ /**
1728
+ * Optional. Parallel level for initial data sync. Currently only applicable for MySQL.
1729
+ */
1730
+ syncParallelLevel?: string | null;
1686
1731
  }
1687
1732
  /**
1688
1733
  * Instance verify external sync settings request.
@@ -2568,6 +2613,7 @@ export declare namespace sqladmin_v1 {
2568
2613
  * // {
2569
2614
  * // "backendType": "my_backendType",
2570
2615
  * // "databaseVersion": "my_databaseVersion",
2616
+ * // "dnsName": "my_dnsName",
2571
2617
  * // "ipAddresses": [],
2572
2618
  * // "kind": "my_kind",
2573
2619
  * // "region": "my_region",
@@ -2775,7 +2821,7 @@ export declare namespace sqladmin_v1 {
2775
2821
  get(params: Params$Resource$Databases$Get, callback: BodyResponseCallback<Schema$Database>): void;
2776
2822
  get(callback: BodyResponseCallback<Schema$Database>): void;
2777
2823
  /**
2778
- * Inserts a resource containing information about a database inside a Cloud SQL instance.
2824
+ * Inserts a resource containing information about a database inside a Cloud SQL instance. **Note:** You can't modify the default character set and collation.
2779
2825
  * @example
2780
2826
  * ```js
2781
2827
  * // Before running the sample:
@@ -4383,6 +4429,90 @@ export declare namespace sqladmin_v1 {
4383
4429
  promoteReplica(params: Params$Resource$Instances$Promotereplica, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
4384
4430
  promoteReplica(params: Params$Resource$Instances$Promotereplica, callback: BodyResponseCallback<Schema$Operation>): void;
4385
4431
  promoteReplica(callback: BodyResponseCallback<Schema$Operation>): void;
4432
+ /**
4433
+ * Reencrypt CMEK instance with latest key version.
4434
+ * @example
4435
+ * ```js
4436
+ * // Before running the sample:
4437
+ * // - Enable the API at:
4438
+ * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
4439
+ * // - Login into gcloud by running:
4440
+ * // `$ gcloud auth application-default login`
4441
+ * // - Install the npm module by running:
4442
+ * // `$ npm install googleapis`
4443
+ *
4444
+ * const {google} = require('googleapis');
4445
+ * const sqladmin = google.sqladmin('v1');
4446
+ *
4447
+ * async function main() {
4448
+ * const auth = new google.auth.GoogleAuth({
4449
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4450
+ * scopes: [
4451
+ * 'https://www.googleapis.com/auth/cloud-platform',
4452
+ * 'https://www.googleapis.com/auth/sqlservice.admin',
4453
+ * ],
4454
+ * });
4455
+ *
4456
+ * // Acquire an auth client, and bind it to all future calls
4457
+ * const authClient = await auth.getClient();
4458
+ * google.options({auth: authClient});
4459
+ *
4460
+ * // Do the magic
4461
+ * const res = await sql.instances.reencrypt({
4462
+ * // Cloud SQL instance ID. This does not include the project ID.
4463
+ * instance: 'placeholder-value',
4464
+ * // ID of the project that contains the instance.
4465
+ * project: 'placeholder-value',
4466
+ *
4467
+ * // Request body metadata
4468
+ * requestBody: {
4469
+ * // request body parameters
4470
+ * // {
4471
+ * // "backupReencryptionConfig": {}
4472
+ * // }
4473
+ * },
4474
+ * });
4475
+ * console.log(res.data);
4476
+ *
4477
+ * // Example response
4478
+ * // {
4479
+ * // "backupContext": {},
4480
+ * // "endTime": "my_endTime",
4481
+ * // "error": {},
4482
+ * // "exportContext": {},
4483
+ * // "importContext": {},
4484
+ * // "insertTime": "my_insertTime",
4485
+ * // "kind": "my_kind",
4486
+ * // "name": "my_name",
4487
+ * // "operationType": "my_operationType",
4488
+ * // "selfLink": "my_selfLink",
4489
+ * // "startTime": "my_startTime",
4490
+ * // "status": "my_status",
4491
+ * // "targetId": "my_targetId",
4492
+ * // "targetLink": "my_targetLink",
4493
+ * // "targetProject": "my_targetProject",
4494
+ * // "user": "my_user"
4495
+ * // }
4496
+ * }
4497
+ *
4498
+ * main().catch(e => {
4499
+ * console.error(e);
4500
+ * throw e;
4501
+ * });
4502
+ *
4503
+ * ```
4504
+ *
4505
+ * @param params - Parameters for request
4506
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
4507
+ * @param callback - Optional callback that handles the response.
4508
+ * @returns A promise if used with async/await, or void if used with a callback.
4509
+ */
4510
+ reencrypt(params: Params$Resource$Instances$Reencrypt, options: StreamMethodOptions): GaxiosPromise<Readable>;
4511
+ reencrypt(params?: Params$Resource$Instances$Reencrypt, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
4512
+ reencrypt(params: Params$Resource$Instances$Reencrypt, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
4513
+ reencrypt(params: Params$Resource$Instances$Reencrypt, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
4514
+ reencrypt(params: Params$Resource$Instances$Reencrypt, callback: BodyResponseCallback<Schema$Operation>): void;
4515
+ reencrypt(callback: BodyResponseCallback<Schema$Operation>): void;
4386
4516
  /**
4387
4517
  * Deletes all client certificates and generates a new server SSL certificate for the instance.
4388
4518
  * @example
@@ -5221,6 +5351,20 @@ export declare namespace sqladmin_v1 {
5221
5351
  */
5222
5352
  project?: string;
5223
5353
  }
5354
+ export interface Params$Resource$Instances$Reencrypt extends StandardParameters {
5355
+ /**
5356
+ * Cloud SQL instance ID. This does not include the project ID.
5357
+ */
5358
+ instance?: string;
5359
+ /**
5360
+ * ID of the project that contains the instance.
5361
+ */
5362
+ project?: string;
5363
+ /**
5364
+ * Request body metadata
5365
+ */
5366
+ requestBody?: Schema$InstancesReencryptRequest;
5367
+ }
5224
5368
  export interface Params$Resource$Instances$Resetsslconfig extends StandardParameters {
5225
5369
  /**
5226
5370
  * Cloud SQL instance ID. This does not include the project ID.
@@ -5320,6 +5464,65 @@ export declare namespace sqladmin_v1 {
5320
5464
  export class Resource$Operations {
5321
5465
  context: APIRequestContext;
5322
5466
  constructor(context: APIRequestContext);
5467
+ /**
5468
+ * Cancels an instance operation that has been performed on an instance.
5469
+ * @example
5470
+ * ```js
5471
+ * // Before running the sample:
5472
+ * // - Enable the API at:
5473
+ * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
5474
+ * // - Login into gcloud by running:
5475
+ * // `$ gcloud auth application-default login`
5476
+ * // - Install the npm module by running:
5477
+ * // `$ npm install googleapis`
5478
+ *
5479
+ * const {google} = require('googleapis');
5480
+ * const sqladmin = google.sqladmin('v1');
5481
+ *
5482
+ * async function main() {
5483
+ * const auth = new google.auth.GoogleAuth({
5484
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5485
+ * scopes: [
5486
+ * 'https://www.googleapis.com/auth/cloud-platform',
5487
+ * 'https://www.googleapis.com/auth/sqlservice.admin',
5488
+ * ],
5489
+ * });
5490
+ *
5491
+ * // Acquire an auth client, and bind it to all future calls
5492
+ * const authClient = await auth.getClient();
5493
+ * google.options({auth: authClient});
5494
+ *
5495
+ * // Do the magic
5496
+ * const res = await sql.operations.cancel({
5497
+ * // Instance operation ID.
5498
+ * operation: 'placeholder-value',
5499
+ * // Project ID of the project that contains the instance.
5500
+ * project: 'placeholder-value',
5501
+ * });
5502
+ * console.log(res.data);
5503
+ *
5504
+ * // Example response
5505
+ * // {}
5506
+ * }
5507
+ *
5508
+ * main().catch(e => {
5509
+ * console.error(e);
5510
+ * throw e;
5511
+ * });
5512
+ *
5513
+ * ```
5514
+ *
5515
+ * @param params - Parameters for request
5516
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
5517
+ * @param callback - Optional callback that handles the response.
5518
+ * @returns A promise if used with async/await, or void if used with a callback.
5519
+ */
5520
+ cancel(params: Params$Resource$Operations$Cancel, options: StreamMethodOptions): GaxiosPromise<Readable>;
5521
+ cancel(params?: Params$Resource$Operations$Cancel, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
5522
+ cancel(params: Params$Resource$Operations$Cancel, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
5523
+ cancel(params: Params$Resource$Operations$Cancel, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
5524
+ cancel(params: Params$Resource$Operations$Cancel, callback: BodyResponseCallback<Schema$Empty>): void;
5525
+ cancel(callback: BodyResponseCallback<Schema$Empty>): void;
5323
5526
  /**
5324
5527
  * Retrieves an instance operation that has been performed on an instance.
5325
5528
  * @example
@@ -5464,6 +5667,16 @@ export declare namespace sqladmin_v1 {
5464
5667
  list(params: Params$Resource$Operations$List, callback: BodyResponseCallback<Schema$OperationsListResponse>): void;
5465
5668
  list(callback: BodyResponseCallback<Schema$OperationsListResponse>): void;
5466
5669
  }
5670
+ export interface Params$Resource$Operations$Cancel extends StandardParameters {
5671
+ /**
5672
+ * Instance operation ID.
5673
+ */
5674
+ operation?: string;
5675
+ /**
5676
+ * Project ID of the project that contains the instance.
5677
+ */
5678
+ project?: string;
5679
+ }
5467
5680
  export interface Params$Resource$Operations$Get extends StandardParameters {
5468
5681
  /**
5469
5682
  * Instance operation ID.
@@ -5540,6 +5753,7 @@ export declare namespace sqladmin_v1 {
5540
5753
  * // Example response
5541
5754
  * // {
5542
5755
  * // "kind": "my_kind",
5756
+ * // "message": "my_message",
5543
5757
  * // "minimalTargetSizeGb": "my_minimalTargetSizeGb"
5544
5758
  * // }
5545
5759
  * }
@@ -5853,7 +6067,8 @@ export declare namespace sqladmin_v1 {
5853
6067
  * // {
5854
6068
  * // "mysqlSyncConfig": {},
5855
6069
  * // "skipVerification": false,
5856
- * // "syncMode": "my_syncMode"
6070
+ * // "syncMode": "my_syncMode",
6071
+ * // "syncParallelLevel": "my_syncParallelLevel"
5857
6072
  * // }
5858
6073
  * },
5859
6074
  * });
package/build/v1.js CHANGED
@@ -879,6 +879,37 @@ var sqladmin_v1;
879
879
  return (0, googleapis_common_1.createAPIRequest)(parameters);
880
880
  }
881
881
  }
882
+ reencrypt(paramsOrCallback, optionsOrCallback, callback) {
883
+ let params = (paramsOrCallback ||
884
+ {});
885
+ let options = (optionsOrCallback || {});
886
+ if (typeof paramsOrCallback === 'function') {
887
+ callback = paramsOrCallback;
888
+ params = {};
889
+ options = {};
890
+ }
891
+ if (typeof optionsOrCallback === 'function') {
892
+ callback = optionsOrCallback;
893
+ options = {};
894
+ }
895
+ const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
896
+ const parameters = {
897
+ options: Object.assign({
898
+ url: (rootUrl + '/v1/projects/{project}/instances/{instance}/reencrypt').replace(/([^:]\/)\/+/g, '$1'),
899
+ method: 'POST',
900
+ }, options),
901
+ params,
902
+ requiredParams: ['project', 'instance'],
903
+ pathParams: ['instance', 'project'],
904
+ context: this.context,
905
+ };
906
+ if (callback) {
907
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
908
+ }
909
+ else {
910
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
911
+ }
912
+ }
882
913
  resetSslConfig(paramsOrCallback, optionsOrCallback, callback) {
883
914
  let params = (paramsOrCallback ||
884
915
  {});
@@ -1138,6 +1169,37 @@ var sqladmin_v1;
1138
1169
  constructor(context) {
1139
1170
  this.context = context;
1140
1171
  }
1172
+ cancel(paramsOrCallback, optionsOrCallback, callback) {
1173
+ let params = (paramsOrCallback ||
1174
+ {});
1175
+ let options = (optionsOrCallback || {});
1176
+ if (typeof paramsOrCallback === 'function') {
1177
+ callback = paramsOrCallback;
1178
+ params = {};
1179
+ options = {};
1180
+ }
1181
+ if (typeof optionsOrCallback === 'function') {
1182
+ callback = optionsOrCallback;
1183
+ options = {};
1184
+ }
1185
+ const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
1186
+ const parameters = {
1187
+ options: Object.assign({
1188
+ url: (rootUrl + '/v1/projects/{project}/operations/{operation}/cancel').replace(/([^:]\/)\/+/g, '$1'),
1189
+ method: 'POST',
1190
+ }, options),
1191
+ params,
1192
+ requiredParams: ['project', 'operation'],
1193
+ pathParams: ['operation', 'project'],
1194
+ context: this.context,
1195
+ };
1196
+ if (callback) {
1197
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
1198
+ }
1199
+ else {
1200
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
1201
+ }
1202
+ }
1141
1203
  get(paramsOrCallback, optionsOrCallback, callback) {
1142
1204
  let params = (paramsOrCallback || {});
1143
1205
  let options = (optionsOrCallback || {});