@googleapis/sqladmin 40.0.0 → 41.0.1

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/v1.ts CHANGED
@@ -124,6 +124,7 @@ export namespace sqladmin_v1 {
124
124
  sslCerts: Resource$Sslcerts;
125
125
  tiers: Resource$Tiers;
126
126
  users: Resource$Users;
127
+ workloadCaptures: Resource$Workloadcaptures;
127
128
 
128
129
  constructor(options: GlobalOptions, google?: GoogleConfigurable) {
129
130
  this.context = {
@@ -145,6 +146,7 @@ export namespace sqladmin_v1 {
145
146
  this.sslCerts = new Resource$Sslcerts(this.context);
146
147
  this.tiers = new Resource$Tiers(this.context);
147
148
  this.users = new Resource$Users(this.context);
149
+ this.workloadCaptures = new Resource$Workloadcaptures(this.context);
148
150
  }
149
151
  }
150
152
 
@@ -1224,6 +1226,10 @@ export namespace sqladmin_v1 {
1224
1226
  * Disk encryption configuration for an instance.
1225
1227
  */
1226
1228
  export interface Schema$DiskEncryptionConfiguration {
1229
+ /**
1230
+ * Optional. Whether to enforce CMEK log encryption at source. When enforced, transaction logs are encrypted prior to being uploaded to Cloud Storage. If not enforced, then CMEK logs are encrypted by the Cloud Storage service.
1231
+ */
1232
+ cmekSourceLogEncryptionEnforced?: boolean | null;
1227
1233
  /**
1228
1234
  * Optional. If true, enables Confidential Mode for the instance's Hyperdisk Balanced volumes. Only supported for zonal C4A instances currently.
1229
1235
  */
@@ -1233,7 +1239,7 @@ export namespace sqladmin_v1 {
1233
1239
  */
1234
1240
  kind?: string | null;
1235
1241
  /**
1236
- * Resource name of KMS key for disk encryption
1242
+ * Resource name of KMS key for disk encryption.
1237
1243
  */
1238
1244
  kmsKeyName?: string | null;
1239
1245
  }
@@ -2247,10 +2253,26 @@ export namespace sqladmin_v1 {
2247
2253
  * The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
2248
2254
  */
2249
2255
  startTime?: string | null;
2256
+ /**
2257
+ * The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.
2258
+ */
2259
+ startWorkloadCaptureContext?: Schema$StartWorkloadCaptureContext;
2260
+ /**
2261
+ * The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).
2262
+ */
2263
+ startWorkloadReplayContext?: Schema$StartWorkloadReplayContext;
2250
2264
  /**
2251
2265
  * The status of an operation.
2252
2266
  */
2253
2267
  status?: string | null;
2268
+ /**
2269
+ * The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.
2270
+ */
2271
+ stopWorkloadCaptureContext?: Schema$StopWorkloadCaptureContext;
2272
+ /**
2273
+ * The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.
2274
+ */
2275
+ stopWorkloadReplayContext?: Schema$StopWorkloadReplayContext;
2254
2276
  /**
2255
2277
  * Optional. The sub operation based on the operation type.
2256
2278
  */
@@ -3122,9 +3144,6 @@ export namespace sqladmin_v1 {
3122
3144
  */
3123
3145
  operationId?: string | null;
3124
3146
  }
3125
- /**
3126
- * Execute SQL statements response.
3127
- */
3128
3147
  export interface Schema$SqlInstancesExecuteSqlResponse {
3129
3148
  /**
3130
3149
  * A list of notices and warnings generated during query execution. For PostgreSQL, this includes all notices and warnings. For MySQL, this includes warnings generated by the last executed statement. To retrieve all warnings for a multi-statement query, `SHOW WARNINGS` must be executed after each statement.
@@ -3395,6 +3414,42 @@ export namespace sqladmin_v1 {
3395
3414
  */
3396
3415
  maintenanceType?: string | null;
3397
3416
  }
3417
+ /**
3418
+ * Request to start executing a captured workload on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).
3419
+ */
3420
+ export interface Schema$SqlWorkloadCapturesStartReplayRequest {
3421
+ /**
3422
+ * Required. Contains details about the start workload replay operation.
3423
+ */
3424
+ startWorkloadReplayContext?: Schema$StartWorkloadReplayContext;
3425
+ }
3426
+ /**
3427
+ * Request to start recording traffic from the primary instance (captured workload).
3428
+ */
3429
+ export interface Schema$SqlWorkloadCapturesStartRequest {
3430
+ /**
3431
+ * Optional. Contains details about the start workload capture operation.
3432
+ */
3433
+ startWorkloadCaptureContext?: Schema$StartWorkloadCaptureContext;
3434
+ }
3435
+ /**
3436
+ * Request to stop executing a captured workload on a replay instance.
3437
+ */
3438
+ export interface Schema$SqlWorkloadCapturesStopReplayRequest {
3439
+ /**
3440
+ * Required. Contains details about the stop workload replay operation.
3441
+ */
3442
+ stopWorkloadReplayContext?: Schema$StopWorkloadReplayContext;
3443
+ }
3444
+ /**
3445
+ * Request to stop recording traffic from the primary instance.
3446
+ */
3447
+ export interface Schema$SqlWorkloadCapturesStopRequest {
3448
+ /**
3449
+ * Optional. Contains details about the stop workload capture operation.
3450
+ */
3451
+ stopWorkloadCaptureContext?: Schema$StopWorkloadCaptureContext;
3452
+ }
3398
3453
  /**
3399
3454
  * SslCerts Resource
3400
3455
  */
@@ -3505,6 +3560,32 @@ export namespace sqladmin_v1 {
3505
3560
  */
3506
3561
  kind?: string | null;
3507
3562
  }
3563
+ /**
3564
+ * The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.
3565
+ */
3566
+ export interface Schema$StartWorkloadCaptureContext {
3567
+ /**
3568
+ * Optional. If true, the captured workload is simultaneously executed on a separate, ephemeral Cloud SQL instance. This "live replay" instance is automatically provisioned and is cloned from the source instance. If false (the default), the workload is only stored and no live replay occurs. It can be replayed later using a separate `StartWorkloadReplayRequest`. Note: The workload capture runs continuously until an explicit `StopWorkloadCaptureRequest` is issued.
3569
+ */
3570
+ enableLiveReplay?: boolean | null;
3571
+ /**
3572
+ * Optional. Required if `enable_live_replay` is true. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.
3573
+ */
3574
+ replayInstance?: string | null;
3575
+ }
3576
+ /**
3577
+ * The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).
3578
+ */
3579
+ export interface Schema$StartWorkloadReplayContext {
3580
+ /**
3581
+ * Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.
3582
+ */
3583
+ replayInstance?: string | null;
3584
+ /**
3585
+ * Output only. The ID of the workload to start executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to start executing the recorded SQL queries.
3586
+ */
3587
+ workloadId?: string | null;
3588
+ }
3508
3589
  /**
3509
3590
  * The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
3510
3591
  */
@@ -3522,6 +3603,28 @@ export namespace sqladmin_v1 {
3522
3603
  */
3523
3604
  message?: string | null;
3524
3605
  }
3606
+ /**
3607
+ * The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.
3608
+ */
3609
+ export interface Schema$StopWorkloadCaptureContext {
3610
+ /**
3611
+ * Optional. If true, immediately aborts the concurrent live replay and discards any un-replayed traffic alongside stopping the capture. If false (the default), the capture stops recording new traffic, but the live replay will continue executing until the entire backlog of captured traffic has been replayed.
3612
+ */
3613
+ abortLiveReplay?: boolean | null;
3614
+ }
3615
+ /**
3616
+ * The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.
3617
+ */
3618
+ export interface Schema$StopWorkloadReplayContext {
3619
+ /**
3620
+ * Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.
3621
+ */
3622
+ replayInstance?: string | null;
3623
+ /**
3624
+ * Output only. The ID of the workload to stop executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to stop executing the recorded SQL queries.
3625
+ */
3626
+ workloadId?: string | null;
3627
+ }
3525
3628
  /**
3526
3629
  * Request message for switching over a `BlueGreenDeployment` resource.
3527
3630
  */
@@ -3729,6 +3832,49 @@ export namespace sqladmin_v1 {
3729
3832
  */
3730
3833
  value?: string | null;
3731
3834
  }
3835
+ /**
3836
+ * Captured workload for an instance.
3837
+ */
3838
+ export interface Schema$WorkloadCapture {
3839
+ /**
3840
+ * Output only. The end time of the workload capture.
3841
+ */
3842
+ endTime?: string | null;
3843
+ /**
3844
+ * Output only. The name of the replay instance, if live replay was enabled.
3845
+ */
3846
+ replayInstance?: string | null;
3847
+ /**
3848
+ * Output only. The retention period in days for the captured workload.
3849
+ */
3850
+ retentionDays?: number | null;
3851
+ /**
3852
+ * Output only. The name of the source instance.
3853
+ */
3854
+ sourceInstance?: string | null;
3855
+ /**
3856
+ * Output only. The start time of the workload capture.
3857
+ */
3858
+ startTime?: string | null;
3859
+ /**
3860
+ * Output only. The state of the workload capture.
3861
+ */
3862
+ workloadCaptureState?: string | null;
3863
+ /**
3864
+ * Output only. The ID of the captured workload.
3865
+ */
3866
+ workloadId?: string | null;
3867
+ }
3868
+ export interface Schema$WorkloadCapturesListResponse {
3869
+ /**
3870
+ * This is always `sql#workloadCapturesList`.
3871
+ */
3872
+ kind?: string | null;
3873
+ /**
3874
+ * List of captured workloads for the instance.
3875
+ */
3876
+ workloadCaptures?: Schema$WorkloadCapture[];
3877
+ }
3732
3878
 
3733
3879
  export class Resource$Backupruns {
3734
3880
  context: APIRequestContext;
@@ -3795,7 +3941,11 @@ export namespace sqladmin_v1 {
3795
3941
  * // "preCheckMajorVersionUpgradeContext": {},
3796
3942
  * // "selfLink": "my_selfLink",
3797
3943
  * // "startTime": "my_startTime",
3944
+ * // "startWorkloadCaptureContext": {},
3945
+ * // "startWorkloadReplayContext": {},
3798
3946
  * // "status": "my_status",
3947
+ * // "stopWorkloadCaptureContext": {},
3948
+ * // "stopWorkloadReplayContext": {},
3799
3949
  * // "subOperationType": {},
3800
3950
  * // "targetId": "my_targetId",
3801
3951
  * // "targetLink": "my_targetLink",
@@ -4141,7 +4291,11 @@ export namespace sqladmin_v1 {
4141
4291
  * // "preCheckMajorVersionUpgradeContext": {},
4142
4292
  * // "selfLink": "my_selfLink",
4143
4293
  * // "startTime": "my_startTime",
4294
+ * // "startWorkloadCaptureContext": {},
4295
+ * // "startWorkloadReplayContext": {},
4144
4296
  * // "status": "my_status",
4297
+ * // "stopWorkloadCaptureContext": {},
4298
+ * // "stopWorkloadReplayContext": {},
4145
4299
  * // "subOperationType": {},
4146
4300
  * // "targetId": "my_targetId",
4147
4301
  * // "targetLink": "my_targetLink",
@@ -4544,7 +4698,11 @@ export namespace sqladmin_v1 {
4544
4698
  * // "preCheckMajorVersionUpgradeContext": {},
4545
4699
  * // "selfLink": "my_selfLink",
4546
4700
  * // "startTime": "my_startTime",
4701
+ * // "startWorkloadCaptureContext": {},
4702
+ * // "startWorkloadReplayContext": {},
4547
4703
  * // "status": "my_status",
4704
+ * // "stopWorkloadCaptureContext": {},
4705
+ * // "stopWorkloadReplayContext": {},
4548
4706
  * // "subOperationType": {},
4549
4707
  * // "targetId": "my_targetId",
4550
4708
  * // "targetLink": "my_targetLink",
@@ -4702,7 +4860,11 @@ export namespace sqladmin_v1 {
4702
4860
  * // "preCheckMajorVersionUpgradeContext": {},
4703
4861
  * // "selfLink": "my_selfLink",
4704
4862
  * // "startTime": "my_startTime",
4863
+ * // "startWorkloadCaptureContext": {},
4864
+ * // "startWorkloadReplayContext": {},
4705
4865
  * // "status": "my_status",
4866
+ * // "stopWorkloadCaptureContext": {},
4867
+ * // "stopWorkloadReplayContext": {},
4706
4868
  * // "subOperationType": {},
4707
4869
  * // "targetId": "my_targetId",
4708
4870
  * // "targetLink": "my_targetLink",
@@ -5197,7 +5359,11 @@ export namespace sqladmin_v1 {
5197
5359
  * // "preCheckMajorVersionUpgradeContext": {},
5198
5360
  * // "selfLink": "my_selfLink",
5199
5361
  * // "startTime": "my_startTime",
5362
+ * // "startWorkloadCaptureContext": {},
5363
+ * // "startWorkloadReplayContext": {},
5200
5364
  * // "status": "my_status",
5365
+ * // "stopWorkloadCaptureContext": {},
5366
+ * // "stopWorkloadReplayContext": {},
5201
5367
  * // "subOperationType": {},
5202
5368
  * // "targetId": "my_targetId",
5203
5369
  * // "targetLink": "my_targetLink",
@@ -5435,7 +5601,11 @@ export namespace sqladmin_v1 {
5435
5601
  * // "preCheckMajorVersionUpgradeContext": {},
5436
5602
  * // "selfLink": "my_selfLink",
5437
5603
  * // "startTime": "my_startTime",
5604
+ * // "startWorkloadCaptureContext": {},
5605
+ * // "startWorkloadReplayContext": {},
5438
5606
  * // "status": "my_status",
5607
+ * // "stopWorkloadCaptureContext": {},
5608
+ * // "stopWorkloadReplayContext": {},
5439
5609
  * // "subOperationType": {},
5440
5610
  * // "targetId": "my_targetId",
5441
5611
  * // "targetLink": "my_targetLink",
@@ -5595,7 +5765,11 @@ export namespace sqladmin_v1 {
5595
5765
  * // "preCheckMajorVersionUpgradeContext": {},
5596
5766
  * // "selfLink": "my_selfLink",
5597
5767
  * // "startTime": "my_startTime",
5768
+ * // "startWorkloadCaptureContext": {},
5769
+ * // "startWorkloadReplayContext": {},
5598
5770
  * // "status": "my_status",
5771
+ * // "stopWorkloadCaptureContext": {},
5772
+ * // "stopWorkloadReplayContext": {},
5599
5773
  * // "subOperationType": {},
5600
5774
  * // "targetId": "my_targetId",
5601
5775
  * // "targetLink": "my_targetLink",
@@ -6063,7 +6237,11 @@ export namespace sqladmin_v1 {
6063
6237
  * // "preCheckMajorVersionUpgradeContext": {},
6064
6238
  * // "selfLink": "my_selfLink",
6065
6239
  * // "startTime": "my_startTime",
6240
+ * // "startWorkloadCaptureContext": {},
6241
+ * // "startWorkloadReplayContext": {},
6066
6242
  * // "status": "my_status",
6243
+ * // "stopWorkloadCaptureContext": {},
6244
+ * // "stopWorkloadReplayContext": {},
6067
6245
  * // "subOperationType": {},
6068
6246
  * // "targetId": "my_targetId",
6069
6247
  * // "targetLink": "my_targetLink",
@@ -6821,7 +6999,11 @@ export namespace sqladmin_v1 {
6821
6999
  * // "preCheckMajorVersionUpgradeContext": {},
6822
7000
  * // "selfLink": "my_selfLink",
6823
7001
  * // "startTime": "my_startTime",
7002
+ * // "startWorkloadCaptureContext": {},
7003
+ * // "startWorkloadReplayContext": {},
6824
7004
  * // "status": "my_status",
7005
+ * // "stopWorkloadCaptureContext": {},
7006
+ * // "stopWorkloadReplayContext": {},
6825
7007
  * // "subOperationType": {},
6826
7008
  * // "targetId": "my_targetId",
6827
7009
  * // "targetLink": "my_targetLink",
@@ -7150,7 +7332,11 @@ export namespace sqladmin_v1 {
7150
7332
  * // "preCheckMajorVersionUpgradeContext": {},
7151
7333
  * // "selfLink": "my_selfLink",
7152
7334
  * // "startTime": "my_startTime",
7335
+ * // "startWorkloadCaptureContext": {},
7336
+ * // "startWorkloadReplayContext": {},
7153
7337
  * // "status": "my_status",
7338
+ * // "stopWorkloadCaptureContext": {},
7339
+ * // "stopWorkloadReplayContext": {},
7154
7340
  * // "subOperationType": {},
7155
7341
  * // "targetId": "my_targetId",
7156
7342
  * // "targetLink": "my_targetLink",
@@ -7472,7 +7658,11 @@ export namespace sqladmin_v1 {
7472
7658
  * // "preCheckMajorVersionUpgradeContext": {},
7473
7659
  * // "selfLink": "my_selfLink",
7474
7660
  * // "startTime": "my_startTime",
7661
+ * // "startWorkloadCaptureContext": {},
7662
+ * // "startWorkloadReplayContext": {},
7475
7663
  * // "status": "my_status",
7664
+ * // "stopWorkloadCaptureContext": {},
7665
+ * // "stopWorkloadReplayContext": {},
7476
7666
  * // "subOperationType": {},
7477
7667
  * // "targetId": "my_targetId",
7478
7668
  * // "targetLink": "my_targetLink",
@@ -7651,7 +7841,11 @@ export namespace sqladmin_v1 {
7651
7841
  * // "preCheckMajorVersionUpgradeContext": {},
7652
7842
  * // "selfLink": "my_selfLink",
7653
7843
  * // "startTime": "my_startTime",
7844
+ * // "startWorkloadCaptureContext": {},
7845
+ * // "startWorkloadReplayContext": {},
7654
7846
  * // "status": "my_status",
7847
+ * // "stopWorkloadCaptureContext": {},
7848
+ * // "stopWorkloadReplayContext": {},
7655
7849
  * // "subOperationType": {},
7656
7850
  * // "targetId": "my_targetId",
7657
7851
  * // "targetLink": "my_targetLink",
@@ -8254,7 +8448,11 @@ export namespace sqladmin_v1 {
8254
8448
  * // "preCheckMajorVersionUpgradeContext": {},
8255
8449
  * // "selfLink": "my_selfLink",
8256
8450
  * // "startTime": "my_startTime",
8451
+ * // "startWorkloadCaptureContext": {},
8452
+ * // "startWorkloadReplayContext": {},
8257
8453
  * // "status": "my_status",
8454
+ * // "stopWorkloadCaptureContext": {},
8455
+ * // "stopWorkloadReplayContext": {},
8258
8456
  * // "subOperationType": {},
8259
8457
  * // "targetId": "my_targetId",
8260
8458
  * // "targetLink": "my_targetLink",
@@ -8418,7 +8616,11 @@ export namespace sqladmin_v1 {
8418
8616
  * // "preCheckMajorVersionUpgradeContext": {},
8419
8617
  * // "selfLink": "my_selfLink",
8420
8618
  * // "startTime": "my_startTime",
8619
+ * // "startWorkloadCaptureContext": {},
8620
+ * // "startWorkloadReplayContext": {},
8421
8621
  * // "status": "my_status",
8622
+ * // "stopWorkloadCaptureContext": {},
8623
+ * // "stopWorkloadReplayContext": {},
8422
8624
  * // "subOperationType": {},
8423
8625
  * // "targetId": "my_targetId",
8424
8626
  * // "targetLink": "my_targetLink",
@@ -8580,7 +8782,11 @@ export namespace sqladmin_v1 {
8580
8782
  * // "preCheckMajorVersionUpgradeContext": {},
8581
8783
  * // "selfLink": "my_selfLink",
8582
8784
  * // "startTime": "my_startTime",
8785
+ * // "startWorkloadCaptureContext": {},
8786
+ * // "startWorkloadReplayContext": {},
8583
8787
  * // "status": "my_status",
8788
+ * // "stopWorkloadCaptureContext": {},
8789
+ * // "stopWorkloadReplayContext": {},
8584
8790
  * // "subOperationType": {},
8585
8791
  * // "targetId": "my_targetId",
8586
8792
  * // "targetLink": "my_targetLink",
@@ -8752,7 +8958,11 @@ export namespace sqladmin_v1 {
8752
8958
  * // "preCheckMajorVersionUpgradeContext": {},
8753
8959
  * // "selfLink": "my_selfLink",
8754
8960
  * // "startTime": "my_startTime",
8961
+ * // "startWorkloadCaptureContext": {},
8962
+ * // "startWorkloadReplayContext": {},
8755
8963
  * // "status": "my_status",
8964
+ * // "stopWorkloadCaptureContext": {},
8965
+ * // "stopWorkloadReplayContext": {},
8756
8966
  * // "subOperationType": {},
8757
8967
  * // "targetId": "my_targetId",
8758
8968
  * // "targetLink": "my_targetLink",
@@ -8920,7 +9130,11 @@ export namespace sqladmin_v1 {
8920
9130
  * // "preCheckMajorVersionUpgradeContext": {},
8921
9131
  * // "selfLink": "my_selfLink",
8922
9132
  * // "startTime": "my_startTime",
9133
+ * // "startWorkloadCaptureContext": {},
9134
+ * // "startWorkloadReplayContext": {},
8923
9135
  * // "status": "my_status",
9136
+ * // "stopWorkloadCaptureContext": {},
9137
+ * // "stopWorkloadReplayContext": {},
8924
9138
  * // "subOperationType": {},
8925
9139
  * // "targetId": "my_targetId",
8926
9140
  * // "targetLink": "my_targetLink",
@@ -9088,7 +9302,11 @@ export namespace sqladmin_v1 {
9088
9302
  * // "preCheckMajorVersionUpgradeContext": {},
9089
9303
  * // "selfLink": "my_selfLink",
9090
9304
  * // "startTime": "my_startTime",
9305
+ * // "startWorkloadCaptureContext": {},
9306
+ * // "startWorkloadReplayContext": {},
9091
9307
  * // "status": "my_status",
9308
+ * // "stopWorkloadCaptureContext": {},
9309
+ * // "stopWorkloadReplayContext": {},
9092
9310
  * // "subOperationType": {},
9093
9311
  * // "targetId": "my_targetId",
9094
9312
  * // "targetLink": "my_targetLink",
@@ -9256,7 +9474,11 @@ export namespace sqladmin_v1 {
9256
9474
  * // "preCheckMajorVersionUpgradeContext": {},
9257
9475
  * // "selfLink": "my_selfLink",
9258
9476
  * // "startTime": "my_startTime",
9477
+ * // "startWorkloadCaptureContext": {},
9478
+ * // "startWorkloadReplayContext": {},
9259
9479
  * // "status": "my_status",
9480
+ * // "stopWorkloadCaptureContext": {},
9481
+ * // "stopWorkloadReplayContext": {},
9260
9482
  * // "subOperationType": {},
9261
9483
  * // "targetId": "my_targetId",
9262
9484
  * // "targetLink": "my_targetLink",
@@ -9590,7 +9812,11 @@ export namespace sqladmin_v1 {
9590
9812
  * // "preCheckMajorVersionUpgradeContext": {},
9591
9813
  * // "selfLink": "my_selfLink",
9592
9814
  * // "startTime": "my_startTime",
9815
+ * // "startWorkloadCaptureContext": {},
9816
+ * // "startWorkloadReplayContext": {},
9593
9817
  * // "status": "my_status",
9818
+ * // "stopWorkloadCaptureContext": {},
9819
+ * // "stopWorkloadReplayContext": {},
9594
9820
  * // "subOperationType": {},
9595
9821
  * // "targetId": "my_targetId",
9596
9822
  * // "targetLink": "my_targetLink",
@@ -9758,7 +9984,11 @@ export namespace sqladmin_v1 {
9758
9984
  * // "preCheckMajorVersionUpgradeContext": {},
9759
9985
  * // "selfLink": "my_selfLink",
9760
9986
  * // "startTime": "my_startTime",
9987
+ * // "startWorkloadCaptureContext": {},
9988
+ * // "startWorkloadReplayContext": {},
9761
9989
  * // "status": "my_status",
9990
+ * // "stopWorkloadCaptureContext": {},
9991
+ * // "stopWorkloadReplayContext": {},
9762
9992
  * // "subOperationType": {},
9763
9993
  * // "targetId": "my_targetId",
9764
9994
  * // "targetLink": "my_targetLink",
@@ -10118,7 +10348,11 @@ export namespace sqladmin_v1 {
10118
10348
  * // "preCheckMajorVersionUpgradeContext": {},
10119
10349
  * // "selfLink": "my_selfLink",
10120
10350
  * // "startTime": "my_startTime",
10351
+ * // "startWorkloadCaptureContext": {},
10352
+ * // "startWorkloadReplayContext": {},
10121
10353
  * // "status": "my_status",
10354
+ * // "stopWorkloadCaptureContext": {},
10355
+ * // "stopWorkloadReplayContext": {},
10122
10356
  * // "subOperationType": {},
10123
10357
  * // "targetId": "my_targetId",
10124
10358
  * // "targetLink": "my_targetLink",
@@ -10336,7 +10570,11 @@ export namespace sqladmin_v1 {
10336
10570
  * // "preCheckMajorVersionUpgradeContext": {},
10337
10571
  * // "selfLink": "my_selfLink",
10338
10572
  * // "startTime": "my_startTime",
10573
+ * // "startWorkloadCaptureContext": {},
10574
+ * // "startWorkloadReplayContext": {},
10339
10575
  * // "status": "my_status",
10576
+ * // "stopWorkloadCaptureContext": {},
10577
+ * // "stopWorkloadReplayContext": {},
10340
10578
  * // "subOperationType": {},
10341
10579
  * // "targetId": "my_targetId",
10342
10580
  * // "targetLink": "my_targetLink",
@@ -11177,7 +11415,11 @@ export namespace sqladmin_v1 {
11177
11415
  * // "preCheckMajorVersionUpgradeContext": {},
11178
11416
  * // "selfLink": "my_selfLink",
11179
11417
  * // "startTime": "my_startTime",
11418
+ * // "startWorkloadCaptureContext": {},
11419
+ * // "startWorkloadReplayContext": {},
11180
11420
  * // "status": "my_status",
11421
+ * // "stopWorkloadCaptureContext": {},
11422
+ * // "stopWorkloadReplayContext": {},
11181
11423
  * // "subOperationType": {},
11182
11424
  * // "targetId": "my_targetId",
11183
11425
  * // "targetLink": "my_targetLink",
@@ -11350,7 +11592,11 @@ export namespace sqladmin_v1 {
11350
11592
  * // "preCheckMajorVersionUpgradeContext": {},
11351
11593
  * // "selfLink": "my_selfLink",
11352
11594
  * // "startTime": "my_startTime",
11595
+ * // "startWorkloadCaptureContext": {},
11596
+ * // "startWorkloadReplayContext": {},
11353
11597
  * // "status": "my_status",
11598
+ * // "stopWorkloadCaptureContext": {},
11599
+ * // "stopWorkloadReplayContext": {},
11354
11600
  * // "subOperationType": {},
11355
11601
  * // "targetId": "my_targetId",
11356
11602
  * // "targetLink": "my_targetLink",
@@ -11520,7 +11766,11 @@ export namespace sqladmin_v1 {
11520
11766
  * // "preCheckMajorVersionUpgradeContext": {},
11521
11767
  * // "selfLink": "my_selfLink",
11522
11768
  * // "startTime": "my_startTime",
11769
+ * // "startWorkloadCaptureContext": {},
11770
+ * // "startWorkloadReplayContext": {},
11523
11771
  * // "status": "my_status",
11772
+ * // "stopWorkloadCaptureContext": {},
11773
+ * // "stopWorkloadReplayContext": {},
11524
11774
  * // "subOperationType": {},
11525
11775
  * // "targetId": "my_targetId",
11526
11776
  * // "targetLink": "my_targetLink",
@@ -11686,7 +11936,11 @@ export namespace sqladmin_v1 {
11686
11936
  * // "preCheckMajorVersionUpgradeContext": {},
11687
11937
  * // "selfLink": "my_selfLink",
11688
11938
  * // "startTime": "my_startTime",
11939
+ * // "startWorkloadCaptureContext": {},
11940
+ * // "startWorkloadReplayContext": {},
11689
11941
  * // "status": "my_status",
11942
+ * // "stopWorkloadCaptureContext": {},
11943
+ * // "stopWorkloadReplayContext": {},
11690
11944
  * // "subOperationType": {},
11691
11945
  * // "targetId": "my_targetId",
11692
11946
  * // "targetLink": "my_targetLink",
@@ -11856,7 +12110,11 @@ export namespace sqladmin_v1 {
11856
12110
  * // "preCheckMajorVersionUpgradeContext": {},
11857
12111
  * // "selfLink": "my_selfLink",
11858
12112
  * // "startTime": "my_startTime",
12113
+ * // "startWorkloadCaptureContext": {},
12114
+ * // "startWorkloadReplayContext": {},
11859
12115
  * // "status": "my_status",
12116
+ * // "stopWorkloadCaptureContext": {},
12117
+ * // "stopWorkloadReplayContext": {},
11860
12118
  * // "subOperationType": {},
11861
12119
  * // "targetId": "my_targetId",
11862
12120
  * // "targetLink": "my_targetLink",
@@ -12173,7 +12431,11 @@ export namespace sqladmin_v1 {
12173
12431
  * // "preCheckMajorVersionUpgradeContext": {},
12174
12432
  * // "selfLink": "my_selfLink",
12175
12433
  * // "startTime": "my_startTime",
12434
+ * // "startWorkloadCaptureContext": {},
12435
+ * // "startWorkloadReplayContext": {},
12176
12436
  * // "status": "my_status",
12437
+ * // "stopWorkloadCaptureContext": {},
12438
+ * // "stopWorkloadReplayContext": {},
12177
12439
  * // "subOperationType": {},
12178
12440
  * // "targetId": "my_targetId",
12179
12441
  * // "targetLink": "my_targetLink",
@@ -12335,7 +12597,11 @@ export namespace sqladmin_v1 {
12335
12597
  * // "preCheckMajorVersionUpgradeContext": {},
12336
12598
  * // "selfLink": "my_selfLink",
12337
12599
  * // "startTime": "my_startTime",
12600
+ * // "startWorkloadCaptureContext": {},
12601
+ * // "startWorkloadReplayContext": {},
12338
12602
  * // "status": "my_status",
12603
+ * // "stopWorkloadCaptureContext": {},
12604
+ * // "stopWorkloadReplayContext": {},
12339
12605
  * // "subOperationType": {},
12340
12606
  * // "targetId": "my_targetId",
12341
12607
  * // "targetLink": "my_targetLink",
@@ -12509,7 +12775,11 @@ export namespace sqladmin_v1 {
12509
12775
  * // "preCheckMajorVersionUpgradeContext": {},
12510
12776
  * // "selfLink": "my_selfLink",
12511
12777
  * // "startTime": "my_startTime",
12778
+ * // "startWorkloadCaptureContext": {},
12779
+ * // "startWorkloadReplayContext": {},
12512
12780
  * // "status": "my_status",
12781
+ * // "stopWorkloadCaptureContext": {},
12782
+ * // "stopWorkloadReplayContext": {},
12513
12783
  * // "subOperationType": {},
12514
12784
  * // "targetId": "my_targetId",
12515
12785
  * // "targetLink": "my_targetLink",
@@ -12679,7 +12949,11 @@ export namespace sqladmin_v1 {
12679
12949
  * // "preCheckMajorVersionUpgradeContext": {},
12680
12950
  * // "selfLink": "my_selfLink",
12681
12951
  * // "startTime": "my_startTime",
12952
+ * // "startWorkloadCaptureContext": {},
12953
+ * // "startWorkloadReplayContext": {},
12682
12954
  * // "status": "my_status",
12955
+ * // "stopWorkloadCaptureContext": {},
12956
+ * // "stopWorkloadReplayContext": {},
12683
12957
  * // "subOperationType": {},
12684
12958
  * // "targetId": "my_targetId",
12685
12959
  * // "targetLink": "my_targetLink",
@@ -12851,7 +13125,11 @@ export namespace sqladmin_v1 {
12851
13125
  * // "preCheckMajorVersionUpgradeContext": {},
12852
13126
  * // "selfLink": "my_selfLink",
12853
13127
  * // "startTime": "my_startTime",
13128
+ * // "startWorkloadCaptureContext": {},
13129
+ * // "startWorkloadReplayContext": {},
12854
13130
  * // "status": "my_status",
13131
+ * // "stopWorkloadCaptureContext": {},
13132
+ * // "stopWorkloadReplayContext": {},
12855
13133
  * // "subOperationType": {},
12856
13134
  * // "targetId": "my_targetId",
12857
13135
  * // "targetLink": "my_targetLink",
@@ -13021,7 +13299,11 @@ export namespace sqladmin_v1 {
13021
13299
  * // "preCheckMajorVersionUpgradeContext": {},
13022
13300
  * // "selfLink": "my_selfLink",
13023
13301
  * // "startTime": "my_startTime",
13302
+ * // "startWorkloadCaptureContext": {},
13303
+ * // "startWorkloadReplayContext": {},
13024
13304
  * // "status": "my_status",
13305
+ * // "stopWorkloadCaptureContext": {},
13306
+ * // "stopWorkloadReplayContext": {},
13025
13307
  * // "subOperationType": {},
13026
13308
  * // "targetId": "my_targetId",
13027
13309
  * // "targetLink": "my_targetLink",
@@ -13185,7 +13467,11 @@ export namespace sqladmin_v1 {
13185
13467
  * // "preCheckMajorVersionUpgradeContext": {},
13186
13468
  * // "selfLink": "my_selfLink",
13187
13469
  * // "startTime": "my_startTime",
13470
+ * // "startWorkloadCaptureContext": {},
13471
+ * // "startWorkloadReplayContext": {},
13188
13472
  * // "status": "my_status",
13473
+ * // "stopWorkloadCaptureContext": {},
13474
+ * // "stopWorkloadReplayContext": {},
13189
13475
  * // "subOperationType": {},
13190
13476
  * // "targetId": "my_targetId",
13191
13477
  * // "targetLink": "my_targetLink",
@@ -13347,7 +13633,11 @@ export namespace sqladmin_v1 {
13347
13633
  * // "preCheckMajorVersionUpgradeContext": {},
13348
13634
  * // "selfLink": "my_selfLink",
13349
13635
  * // "startTime": "my_startTime",
13636
+ * // "startWorkloadCaptureContext": {},
13637
+ * // "startWorkloadReplayContext": {},
13350
13638
  * // "status": "my_status",
13639
+ * // "stopWorkloadCaptureContext": {},
13640
+ * // "stopWorkloadReplayContext": {},
13351
13641
  * // "subOperationType": {},
13352
13642
  * // "targetId": "my_targetId",
13353
13643
  * // "targetLink": "my_targetLink",
@@ -13511,7 +13801,11 @@ export namespace sqladmin_v1 {
13511
13801
  * // "preCheckMajorVersionUpgradeContext": {},
13512
13802
  * // "selfLink": "my_selfLink",
13513
13803
  * // "startTime": "my_startTime",
13804
+ * // "startWorkloadCaptureContext": {},
13805
+ * // "startWorkloadReplayContext": {},
13514
13806
  * // "status": "my_status",
13807
+ * // "stopWorkloadCaptureContext": {},
13808
+ * // "stopWorkloadReplayContext": {},
13515
13809
  * // "subOperationType": {},
13516
13810
  * // "targetId": "my_targetId",
13517
13811
  * // "targetLink": "my_targetLink",
@@ -13680,7 +13974,11 @@ export namespace sqladmin_v1 {
13680
13974
  * // "preCheckMajorVersionUpgradeContext": {},
13681
13975
  * // "selfLink": "my_selfLink",
13682
13976
  * // "startTime": "my_startTime",
13977
+ * // "startWorkloadCaptureContext": {},
13978
+ * // "startWorkloadReplayContext": {},
13683
13979
  * // "status": "my_status",
13980
+ * // "stopWorkloadCaptureContext": {},
13981
+ * // "stopWorkloadReplayContext": {},
13684
13982
  * // "subOperationType": {},
13685
13983
  * // "targetId": "my_targetId",
13686
13984
  * // "targetLink": "my_targetLink",
@@ -13902,7 +14200,11 @@ export namespace sqladmin_v1 {
13902
14200
  * // "preCheckMajorVersionUpgradeContext": {},
13903
14201
  * // "selfLink": "my_selfLink",
13904
14202
  * // "startTime": "my_startTime",
14203
+ * // "startWorkloadCaptureContext": {},
14204
+ * // "startWorkloadReplayContext": {},
13905
14205
  * // "status": "my_status",
14206
+ * // "stopWorkloadCaptureContext": {},
14207
+ * // "stopWorkloadReplayContext": {},
13906
14208
  * // "subOperationType": {},
13907
14209
  * // "targetId": "my_targetId",
13908
14210
  * // "targetLink": "my_targetLink",
@@ -14827,7 +15129,11 @@ export namespace sqladmin_v1 {
14827
15129
  * // "preCheckMajorVersionUpgradeContext": {},
14828
15130
  * // "selfLink": "my_selfLink",
14829
15131
  * // "startTime": "my_startTime",
15132
+ * // "startWorkloadCaptureContext": {},
15133
+ * // "startWorkloadReplayContext": {},
14830
15134
  * // "status": "my_status",
15135
+ * // "stopWorkloadCaptureContext": {},
15136
+ * // "stopWorkloadReplayContext": {},
14831
15137
  * // "subOperationType": {},
14832
15138
  * // "targetId": "my_targetId",
14833
15139
  * // "targetLink": "my_targetLink",
@@ -15526,7 +15832,11 @@ export namespace sqladmin_v1 {
15526
15832
  * // "preCheckMajorVersionUpgradeContext": {},
15527
15833
  * // "selfLink": "my_selfLink",
15528
15834
  * // "startTime": "my_startTime",
15835
+ * // "startWorkloadCaptureContext": {},
15836
+ * // "startWorkloadReplayContext": {},
15529
15837
  * // "status": "my_status",
15838
+ * // "stopWorkloadCaptureContext": {},
15839
+ * // "stopWorkloadReplayContext": {},
15530
15840
  * // "subOperationType": {},
15531
15841
  * // "targetId": "my_targetId",
15532
15842
  * // "targetLink": "my_targetLink",
@@ -15696,7 +16006,11 @@ export namespace sqladmin_v1 {
15696
16006
  * // "preCheckMajorVersionUpgradeContext": {},
15697
16007
  * // "selfLink": "my_selfLink",
15698
16008
  * // "startTime": "my_startTime",
16009
+ * // "startWorkloadCaptureContext": {},
16010
+ * // "startWorkloadReplayContext": {},
15699
16011
  * // "status": "my_status",
16012
+ * // "stopWorkloadCaptureContext": {},
16013
+ * // "stopWorkloadReplayContext": {},
15700
16014
  * // "subOperationType": {},
15701
16015
  * // "targetId": "my_targetId",
15702
16016
  * // "targetLink": "my_targetLink",
@@ -15866,7 +16180,11 @@ export namespace sqladmin_v1 {
15866
16180
  * // "preCheckMajorVersionUpgradeContext": {},
15867
16181
  * // "selfLink": "my_selfLink",
15868
16182
  * // "startTime": "my_startTime",
16183
+ * // "startWorkloadCaptureContext": {},
16184
+ * // "startWorkloadReplayContext": {},
15869
16185
  * // "status": "my_status",
16186
+ * // "stopWorkloadCaptureContext": {},
16187
+ * // "stopWorkloadReplayContext": {},
15870
16188
  * // "subOperationType": {},
15871
16189
  * // "targetId": "my_targetId",
15872
16190
  * // "targetLink": "my_targetLink",
@@ -16040,7 +16358,11 @@ export namespace sqladmin_v1 {
16040
16358
  * // "preCheckMajorVersionUpgradeContext": {},
16041
16359
  * // "selfLink": "my_selfLink",
16042
16360
  * // "startTime": "my_startTime",
16361
+ * // "startWorkloadCaptureContext": {},
16362
+ * // "startWorkloadReplayContext": {},
16043
16363
  * // "status": "my_status",
16364
+ * // "stopWorkloadCaptureContext": {},
16365
+ * // "stopWorkloadReplayContext": {},
16044
16366
  * // "subOperationType": {},
16045
16367
  * // "targetId": "my_targetId",
16046
16368
  * // "targetLink": "my_targetLink",
@@ -16655,7 +16977,11 @@ export namespace sqladmin_v1 {
16655
16977
  * // "preCheckMajorVersionUpgradeContext": {},
16656
16978
  * // "selfLink": "my_selfLink",
16657
16979
  * // "startTime": "my_startTime",
16980
+ * // "startWorkloadCaptureContext": {},
16981
+ * // "startWorkloadReplayContext": {},
16658
16982
  * // "status": "my_status",
16983
+ * // "stopWorkloadCaptureContext": {},
16984
+ * // "stopWorkloadReplayContext": {},
16659
16985
  * // "subOperationType": {},
16660
16986
  * // "targetId": "my_targetId",
16661
16987
  * // "targetLink": "my_targetLink",
@@ -17498,7 +17824,11 @@ export namespace sqladmin_v1 {
17498
17824
  * // "preCheckMajorVersionUpgradeContext": {},
17499
17825
  * // "selfLink": "my_selfLink",
17500
17826
  * // "startTime": "my_startTime",
17827
+ * // "startWorkloadCaptureContext": {},
17828
+ * // "startWorkloadReplayContext": {},
17501
17829
  * // "status": "my_status",
17830
+ * // "stopWorkloadCaptureContext": {},
17831
+ * // "stopWorkloadReplayContext": {},
17502
17832
  * // "subOperationType": {},
17503
17833
  * // "targetId": "my_targetId",
17504
17834
  * // "targetLink": "my_targetLink",
@@ -17840,7 +18170,11 @@ export namespace sqladmin_v1 {
17840
18170
  * // "preCheckMajorVersionUpgradeContext": {},
17841
18171
  * // "selfLink": "my_selfLink",
17842
18172
  * // "startTime": "my_startTime",
18173
+ * // "startWorkloadCaptureContext": {},
18174
+ * // "startWorkloadReplayContext": {},
17843
18175
  * // "status": "my_status",
18176
+ * // "stopWorkloadCaptureContext": {},
18177
+ * // "stopWorkloadReplayContext": {},
17844
18178
  * // "subOperationType": {},
17845
18179
  * // "targetId": "my_targetId",
17846
18180
  * // "targetLink": "my_targetLink",
@@ -18178,7 +18512,11 @@ export namespace sqladmin_v1 {
18178
18512
  * // "preCheckMajorVersionUpgradeContext": {},
18179
18513
  * // "selfLink": "my_selfLink",
18180
18514
  * // "startTime": "my_startTime",
18515
+ * // "startWorkloadCaptureContext": {},
18516
+ * // "startWorkloadReplayContext": {},
18181
18517
  * // "status": "my_status",
18518
+ * // "stopWorkloadCaptureContext": {},
18519
+ * // "stopWorkloadReplayContext": {},
18182
18520
  * // "subOperationType": {},
18183
18521
  * // "targetId": "my_targetId",
18184
18522
  * // "targetLink": "my_targetLink",
@@ -18400,4 +18738,931 @@ export namespace sqladmin_v1 {
18400
18738
  */
18401
18739
  requestBody?: Schema$User;
18402
18740
  }
18741
+
18742
+ export class Resource$Workloadcaptures {
18743
+ context: APIRequestContext;
18744
+ constructor(context: APIRequestContext) {
18745
+ this.context = context;
18746
+ }
18747
+
18748
+ /**
18749
+ * Lists all captured workloads associated with the instance.
18750
+ * @example
18751
+ * ```js
18752
+ * // Before running the sample:
18753
+ * // - Enable the API at:
18754
+ * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
18755
+ * // - Login into gcloud by running:
18756
+ * // ```sh
18757
+ * // $ gcloud auth application-default login
18758
+ * // ```
18759
+ * // - Install the npm module by running:
18760
+ * // ```sh
18761
+ * // $ npm install googleapis
18762
+ * // ```
18763
+ *
18764
+ * const {google} = require('googleapis');
18765
+ * const sqladmin = google.sqladmin('v1');
18766
+ *
18767
+ * async function main() {
18768
+ * const auth = new google.auth.GoogleAuth({
18769
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
18770
+ * scopes: [
18771
+ * 'https://www.googleapis.com/auth/cloud-platform',
18772
+ * 'https://www.googleapis.com/auth/sqlservice.admin',
18773
+ * ],
18774
+ * });
18775
+ *
18776
+ * // Acquire an auth client, and bind it to all future calls
18777
+ * const authClient = await auth.getClient();
18778
+ * google.options({auth: authClient});
18779
+ *
18780
+ * // Do the magic
18781
+ * const res = await sql.workloadCaptures.list({
18782
+ * // Required. Cloud SQL instance ID. This does not include the project ID.
18783
+ * instance: 'placeholder-value',
18784
+ * // Required. Project ID of the project that contains the instance.
18785
+ * project: 'placeholder-value',
18786
+ * });
18787
+ * console.log(res.data);
18788
+ *
18789
+ * // Example response
18790
+ * // {
18791
+ * // "kind": "my_kind",
18792
+ * // "workloadCaptures": []
18793
+ * // }
18794
+ * }
18795
+ *
18796
+ * main().catch(e => {
18797
+ * console.error(e);
18798
+ * throw e;
18799
+ * });
18800
+ *
18801
+ * ```
18802
+ *
18803
+ * @param params - Parameters for request
18804
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
18805
+ * @param callback - Optional callback that handles the response.
18806
+ * @returns A promise if used with async/await, or void if used with a callback.
18807
+ */
18808
+ list(
18809
+ params: Params$Resource$Workloadcaptures$List,
18810
+ options: StreamMethodOptions
18811
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
18812
+ list(
18813
+ params?: Params$Resource$Workloadcaptures$List,
18814
+ options?: MethodOptions
18815
+ ): Promise<GaxiosResponseWithHTTP2<Schema$WorkloadCapturesListResponse>>;
18816
+ list(
18817
+ params: Params$Resource$Workloadcaptures$List,
18818
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
18819
+ callback: BodyResponseCallback<Readable>
18820
+ ): void;
18821
+ list(
18822
+ params: Params$Resource$Workloadcaptures$List,
18823
+ options:
18824
+ | MethodOptions
18825
+ | BodyResponseCallback<Schema$WorkloadCapturesListResponse>,
18826
+ callback: BodyResponseCallback<Schema$WorkloadCapturesListResponse>
18827
+ ): void;
18828
+ list(
18829
+ params: Params$Resource$Workloadcaptures$List,
18830
+ callback: BodyResponseCallback<Schema$WorkloadCapturesListResponse>
18831
+ ): void;
18832
+ list(
18833
+ callback: BodyResponseCallback<Schema$WorkloadCapturesListResponse>
18834
+ ): void;
18835
+ list(
18836
+ paramsOrCallback?:
18837
+ | Params$Resource$Workloadcaptures$List
18838
+ | BodyResponseCallback<Schema$WorkloadCapturesListResponse>
18839
+ | BodyResponseCallback<Readable>,
18840
+ optionsOrCallback?:
18841
+ | MethodOptions
18842
+ | StreamMethodOptions
18843
+ | BodyResponseCallback<Schema$WorkloadCapturesListResponse>
18844
+ | BodyResponseCallback<Readable>,
18845
+ callback?:
18846
+ | BodyResponseCallback<Schema$WorkloadCapturesListResponse>
18847
+ | BodyResponseCallback<Readable>
18848
+ ):
18849
+ | void
18850
+ | Promise<GaxiosResponseWithHTTP2<Schema$WorkloadCapturesListResponse>>
18851
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
18852
+ let params = (paramsOrCallback ||
18853
+ {}) as Params$Resource$Workloadcaptures$List;
18854
+ let options = (optionsOrCallback || {}) as MethodOptions;
18855
+
18856
+ if (typeof paramsOrCallback === 'function') {
18857
+ callback = paramsOrCallback;
18858
+ params = {} as Params$Resource$Workloadcaptures$List;
18859
+ options = {};
18860
+ }
18861
+
18862
+ if (typeof optionsOrCallback === 'function') {
18863
+ callback = optionsOrCallback;
18864
+ options = {};
18865
+ }
18866
+
18867
+ const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
18868
+ const parameters = {
18869
+ options: Object.assign(
18870
+ {
18871
+ url: (
18872
+ rootUrl +
18873
+ '/v1/projects/{project}/instances/{instance}/workloadCaptures'
18874
+ ).replace(/([^:]\/)\/+/g, '$1'),
18875
+ method: 'GET',
18876
+ apiVersion: '',
18877
+ },
18878
+ options
18879
+ ),
18880
+ params,
18881
+ requiredParams: ['project', 'instance'],
18882
+ pathParams: ['instance', 'project'],
18883
+ context: this.context,
18884
+ };
18885
+ if (callback) {
18886
+ createAPIRequest<Schema$WorkloadCapturesListResponse>(
18887
+ parameters,
18888
+ callback as BodyResponseCallback<unknown>
18889
+ );
18890
+ } else {
18891
+ return createAPIRequest<Schema$WorkloadCapturesListResponse>(
18892
+ parameters
18893
+ );
18894
+ }
18895
+ }
18896
+
18897
+ /**
18898
+ * Starts capturing the SQL queries, transactions, and other operations executed on the primary instance. This traffic is securely stored and forms a "captured workload". This workload can be replayed later on a different instance to safely test performance impacts, database upgrades, configuration changes etc. before applying them to production.
18899
+ * @example
18900
+ * ```js
18901
+ * // Before running the sample:
18902
+ * // - Enable the API at:
18903
+ * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
18904
+ * // - Login into gcloud by running:
18905
+ * // ```sh
18906
+ * // $ gcloud auth application-default login
18907
+ * // ```
18908
+ * // - Install the npm module by running:
18909
+ * // ```sh
18910
+ * // $ npm install googleapis
18911
+ * // ```
18912
+ *
18913
+ * const {google} = require('googleapis');
18914
+ * const sqladmin = google.sqladmin('v1');
18915
+ *
18916
+ * async function main() {
18917
+ * const auth = new google.auth.GoogleAuth({
18918
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
18919
+ * scopes: [
18920
+ * 'https://www.googleapis.com/auth/cloud-platform',
18921
+ * 'https://www.googleapis.com/auth/sqlservice.admin',
18922
+ * ],
18923
+ * });
18924
+ *
18925
+ * // Acquire an auth client, and bind it to all future calls
18926
+ * const authClient = await auth.getClient();
18927
+ * google.options({auth: authClient});
18928
+ *
18929
+ * // Do the magic
18930
+ * const res = await sql.workloadCaptures.start({
18931
+ * // Required. Cloud SQL instance ID. This does not include the project ID.
18932
+ * instance: 'placeholder-value',
18933
+ * // Required. Project ID of the project that contains the instance.
18934
+ * project: 'placeholder-value',
18935
+ *
18936
+ * // Request body metadata
18937
+ * requestBody: {
18938
+ * // request body parameters
18939
+ * // {
18940
+ * // "startWorkloadCaptureContext": {}
18941
+ * // }
18942
+ * },
18943
+ * });
18944
+ * console.log(res.data);
18945
+ *
18946
+ * // Example response
18947
+ * // {
18948
+ * // "acquireSsrsLeaseContext": {},
18949
+ * // "apiWarning": {},
18950
+ * // "backupContext": {},
18951
+ * // "endTime": "my_endTime",
18952
+ * // "error": {},
18953
+ * // "exportContext": {},
18954
+ * // "importContext": {},
18955
+ * // "insertTime": "my_insertTime",
18956
+ * // "kind": "my_kind",
18957
+ * // "name": "my_name",
18958
+ * // "operationType": "my_operationType",
18959
+ * // "preCheckMajorVersionUpgradeContext": {},
18960
+ * // "selfLink": "my_selfLink",
18961
+ * // "startTime": "my_startTime",
18962
+ * // "startWorkloadCaptureContext": {},
18963
+ * // "startWorkloadReplayContext": {},
18964
+ * // "status": "my_status",
18965
+ * // "stopWorkloadCaptureContext": {},
18966
+ * // "stopWorkloadReplayContext": {},
18967
+ * // "subOperationType": {},
18968
+ * // "targetId": "my_targetId",
18969
+ * // "targetLink": "my_targetLink",
18970
+ * // "targetProject": "my_targetProject",
18971
+ * // "user": "my_user"
18972
+ * // }
18973
+ * }
18974
+ *
18975
+ * main().catch(e => {
18976
+ * console.error(e);
18977
+ * throw e;
18978
+ * });
18979
+ *
18980
+ * ```
18981
+ *
18982
+ * @param params - Parameters for request
18983
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
18984
+ * @param callback - Optional callback that handles the response.
18985
+ * @returns A promise if used with async/await, or void if used with a callback.
18986
+ */
18987
+ start(
18988
+ params: Params$Resource$Workloadcaptures$Start,
18989
+ options: StreamMethodOptions
18990
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
18991
+ start(
18992
+ params?: Params$Resource$Workloadcaptures$Start,
18993
+ options?: MethodOptions
18994
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
18995
+ start(
18996
+ params: Params$Resource$Workloadcaptures$Start,
18997
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
18998
+ callback: BodyResponseCallback<Readable>
18999
+ ): void;
19000
+ start(
19001
+ params: Params$Resource$Workloadcaptures$Start,
19002
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
19003
+ callback: BodyResponseCallback<Schema$Operation>
19004
+ ): void;
19005
+ start(
19006
+ params: Params$Resource$Workloadcaptures$Start,
19007
+ callback: BodyResponseCallback<Schema$Operation>
19008
+ ): void;
19009
+ start(callback: BodyResponseCallback<Schema$Operation>): void;
19010
+ start(
19011
+ paramsOrCallback?:
19012
+ | Params$Resource$Workloadcaptures$Start
19013
+ | BodyResponseCallback<Schema$Operation>
19014
+ | BodyResponseCallback<Readable>,
19015
+ optionsOrCallback?:
19016
+ | MethodOptions
19017
+ | StreamMethodOptions
19018
+ | BodyResponseCallback<Schema$Operation>
19019
+ | BodyResponseCallback<Readable>,
19020
+ callback?:
19021
+ BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
19022
+ ):
19023
+ | void
19024
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
19025
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
19026
+ let params = (paramsOrCallback ||
19027
+ {}) as Params$Resource$Workloadcaptures$Start;
19028
+ let options = (optionsOrCallback || {}) as MethodOptions;
19029
+
19030
+ if (typeof paramsOrCallback === 'function') {
19031
+ callback = paramsOrCallback;
19032
+ params = {} as Params$Resource$Workloadcaptures$Start;
19033
+ options = {};
19034
+ }
19035
+
19036
+ if (typeof optionsOrCallback === 'function') {
19037
+ callback = optionsOrCallback;
19038
+ options = {};
19039
+ }
19040
+
19041
+ const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
19042
+ const parameters = {
19043
+ options: Object.assign(
19044
+ {
19045
+ url: (
19046
+ rootUrl +
19047
+ '/v1/projects/{project}/instances/{instance}/workloadCaptures:start'
19048
+ ).replace(/([^:]\/)\/+/g, '$1'),
19049
+ method: 'POST',
19050
+ apiVersion: '',
19051
+ },
19052
+ options
19053
+ ),
19054
+ params,
19055
+ requiredParams: ['project', 'instance'],
19056
+ pathParams: ['instance', 'project'],
19057
+ context: this.context,
19058
+ };
19059
+ if (callback) {
19060
+ createAPIRequest<Schema$Operation>(
19061
+ parameters,
19062
+ callback as BodyResponseCallback<unknown>
19063
+ );
19064
+ } else {
19065
+ return createAPIRequest<Schema$Operation>(parameters);
19066
+ }
19067
+ }
19068
+
19069
+ /**
19070
+ * Starts executing a captured workload on a separate Cloud SQL instance provisioned for workload replay. This target instance simulates the production environment without affecting the primary instance.
19071
+ * @example
19072
+ * ```js
19073
+ * // Before running the sample:
19074
+ * // - Enable the API at:
19075
+ * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
19076
+ * // - Login into gcloud by running:
19077
+ * // ```sh
19078
+ * // $ gcloud auth application-default login
19079
+ * // ```
19080
+ * // - Install the npm module by running:
19081
+ * // ```sh
19082
+ * // $ npm install googleapis
19083
+ * // ```
19084
+ *
19085
+ * const {google} = require('googleapis');
19086
+ * const sqladmin = google.sqladmin('v1');
19087
+ *
19088
+ * async function main() {
19089
+ * const auth = new google.auth.GoogleAuth({
19090
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
19091
+ * scopes: [
19092
+ * 'https://www.googleapis.com/auth/cloud-platform',
19093
+ * 'https://www.googleapis.com/auth/sqlservice.admin',
19094
+ * ],
19095
+ * });
19096
+ *
19097
+ * // Acquire an auth client, and bind it to all future calls
19098
+ * const authClient = await auth.getClient();
19099
+ * google.options({auth: authClient});
19100
+ *
19101
+ * // Do the magic
19102
+ * const res = await sql.workloadCaptures.startReplay({
19103
+ * // Required. Cloud SQL instance ID. This does not include the project ID.
19104
+ * instance: 'placeholder-value',
19105
+ * // Required. Project ID of the project that contains the instance.
19106
+ * project: 'placeholder-value',
19107
+ * // Required. The ID of the workload to replay.
19108
+ * workloadId: 'placeholder-value',
19109
+ *
19110
+ * // Request body metadata
19111
+ * requestBody: {
19112
+ * // request body parameters
19113
+ * // {
19114
+ * // "startWorkloadReplayContext": {}
19115
+ * // }
19116
+ * },
19117
+ * });
19118
+ * console.log(res.data);
19119
+ *
19120
+ * // Example response
19121
+ * // {
19122
+ * // "acquireSsrsLeaseContext": {},
19123
+ * // "apiWarning": {},
19124
+ * // "backupContext": {},
19125
+ * // "endTime": "my_endTime",
19126
+ * // "error": {},
19127
+ * // "exportContext": {},
19128
+ * // "importContext": {},
19129
+ * // "insertTime": "my_insertTime",
19130
+ * // "kind": "my_kind",
19131
+ * // "name": "my_name",
19132
+ * // "operationType": "my_operationType",
19133
+ * // "preCheckMajorVersionUpgradeContext": {},
19134
+ * // "selfLink": "my_selfLink",
19135
+ * // "startTime": "my_startTime",
19136
+ * // "startWorkloadCaptureContext": {},
19137
+ * // "startWorkloadReplayContext": {},
19138
+ * // "status": "my_status",
19139
+ * // "stopWorkloadCaptureContext": {},
19140
+ * // "stopWorkloadReplayContext": {},
19141
+ * // "subOperationType": {},
19142
+ * // "targetId": "my_targetId",
19143
+ * // "targetLink": "my_targetLink",
19144
+ * // "targetProject": "my_targetProject",
19145
+ * // "user": "my_user"
19146
+ * // }
19147
+ * }
19148
+ *
19149
+ * main().catch(e => {
19150
+ * console.error(e);
19151
+ * throw e;
19152
+ * });
19153
+ *
19154
+ * ```
19155
+ *
19156
+ * @param params - Parameters for request
19157
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
19158
+ * @param callback - Optional callback that handles the response.
19159
+ * @returns A promise if used with async/await, or void if used with a callback.
19160
+ */
19161
+ startReplay(
19162
+ params: Params$Resource$Workloadcaptures$Startreplay,
19163
+ options: StreamMethodOptions
19164
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
19165
+ startReplay(
19166
+ params?: Params$Resource$Workloadcaptures$Startreplay,
19167
+ options?: MethodOptions
19168
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
19169
+ startReplay(
19170
+ params: Params$Resource$Workloadcaptures$Startreplay,
19171
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
19172
+ callback: BodyResponseCallback<Readable>
19173
+ ): void;
19174
+ startReplay(
19175
+ params: Params$Resource$Workloadcaptures$Startreplay,
19176
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
19177
+ callback: BodyResponseCallback<Schema$Operation>
19178
+ ): void;
19179
+ startReplay(
19180
+ params: Params$Resource$Workloadcaptures$Startreplay,
19181
+ callback: BodyResponseCallback<Schema$Operation>
19182
+ ): void;
19183
+ startReplay(callback: BodyResponseCallback<Schema$Operation>): void;
19184
+ startReplay(
19185
+ paramsOrCallback?:
19186
+ | Params$Resource$Workloadcaptures$Startreplay
19187
+ | BodyResponseCallback<Schema$Operation>
19188
+ | BodyResponseCallback<Readable>,
19189
+ optionsOrCallback?:
19190
+ | MethodOptions
19191
+ | StreamMethodOptions
19192
+ | BodyResponseCallback<Schema$Operation>
19193
+ | BodyResponseCallback<Readable>,
19194
+ callback?:
19195
+ BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
19196
+ ):
19197
+ | void
19198
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
19199
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
19200
+ let params = (paramsOrCallback ||
19201
+ {}) as Params$Resource$Workloadcaptures$Startreplay;
19202
+ let options = (optionsOrCallback || {}) as MethodOptions;
19203
+
19204
+ if (typeof paramsOrCallback === 'function') {
19205
+ callback = paramsOrCallback;
19206
+ params = {} as Params$Resource$Workloadcaptures$Startreplay;
19207
+ options = {};
19208
+ }
19209
+
19210
+ if (typeof optionsOrCallback === 'function') {
19211
+ callback = optionsOrCallback;
19212
+ options = {};
19213
+ }
19214
+
19215
+ const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
19216
+ const parameters = {
19217
+ options: Object.assign(
19218
+ {
19219
+ url: (
19220
+ rootUrl +
19221
+ '/v1/projects/{project}/instances/{instance}/workloadCaptures/{workloadId}:startReplay'
19222
+ ).replace(/([^:]\/)\/+/g, '$1'),
19223
+ method: 'POST',
19224
+ apiVersion: '',
19225
+ },
19226
+ options
19227
+ ),
19228
+ params,
19229
+ requiredParams: ['project', 'instance', 'workloadId'],
19230
+ pathParams: ['instance', 'project', 'workloadId'],
19231
+ context: this.context,
19232
+ };
19233
+ if (callback) {
19234
+ createAPIRequest<Schema$Operation>(
19235
+ parameters,
19236
+ callback as BodyResponseCallback<unknown>
19237
+ );
19238
+ } else {
19239
+ return createAPIRequest<Schema$Operation>(parameters);
19240
+ }
19241
+ }
19242
+
19243
+ /**
19244
+ * Stops capturing the query traffic and related operations executed on the primary instance.
19245
+ * @example
19246
+ * ```js
19247
+ * // Before running the sample:
19248
+ * // - Enable the API at:
19249
+ * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
19250
+ * // - Login into gcloud by running:
19251
+ * // ```sh
19252
+ * // $ gcloud auth application-default login
19253
+ * // ```
19254
+ * // - Install the npm module by running:
19255
+ * // ```sh
19256
+ * // $ npm install googleapis
19257
+ * // ```
19258
+ *
19259
+ * const {google} = require('googleapis');
19260
+ * const sqladmin = google.sqladmin('v1');
19261
+ *
19262
+ * async function main() {
19263
+ * const auth = new google.auth.GoogleAuth({
19264
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
19265
+ * scopes: [
19266
+ * 'https://www.googleapis.com/auth/cloud-platform',
19267
+ * 'https://www.googleapis.com/auth/sqlservice.admin',
19268
+ * ],
19269
+ * });
19270
+ *
19271
+ * // Acquire an auth client, and bind it to all future calls
19272
+ * const authClient = await auth.getClient();
19273
+ * google.options({auth: authClient});
19274
+ *
19275
+ * // Do the magic
19276
+ * const res = await sql.workloadCaptures.stop({
19277
+ * // Required. Cloud SQL instance ID. This does not include the project ID.
19278
+ * instance: 'placeholder-value',
19279
+ * // Required. Project ID of the project that contains the instance.
19280
+ * project: 'placeholder-value',
19281
+ *
19282
+ * // Request body metadata
19283
+ * requestBody: {
19284
+ * // request body parameters
19285
+ * // {
19286
+ * // "stopWorkloadCaptureContext": {}
19287
+ * // }
19288
+ * },
19289
+ * });
19290
+ * console.log(res.data);
19291
+ *
19292
+ * // Example response
19293
+ * // {
19294
+ * // "acquireSsrsLeaseContext": {},
19295
+ * // "apiWarning": {},
19296
+ * // "backupContext": {},
19297
+ * // "endTime": "my_endTime",
19298
+ * // "error": {},
19299
+ * // "exportContext": {},
19300
+ * // "importContext": {},
19301
+ * // "insertTime": "my_insertTime",
19302
+ * // "kind": "my_kind",
19303
+ * // "name": "my_name",
19304
+ * // "operationType": "my_operationType",
19305
+ * // "preCheckMajorVersionUpgradeContext": {},
19306
+ * // "selfLink": "my_selfLink",
19307
+ * // "startTime": "my_startTime",
19308
+ * // "startWorkloadCaptureContext": {},
19309
+ * // "startWorkloadReplayContext": {},
19310
+ * // "status": "my_status",
19311
+ * // "stopWorkloadCaptureContext": {},
19312
+ * // "stopWorkloadReplayContext": {},
19313
+ * // "subOperationType": {},
19314
+ * // "targetId": "my_targetId",
19315
+ * // "targetLink": "my_targetLink",
19316
+ * // "targetProject": "my_targetProject",
19317
+ * // "user": "my_user"
19318
+ * // }
19319
+ * }
19320
+ *
19321
+ * main().catch(e => {
19322
+ * console.error(e);
19323
+ * throw e;
19324
+ * });
19325
+ *
19326
+ * ```
19327
+ *
19328
+ * @param params - Parameters for request
19329
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
19330
+ * @param callback - Optional callback that handles the response.
19331
+ * @returns A promise if used with async/await, or void if used with a callback.
19332
+ */
19333
+ stop(
19334
+ params: Params$Resource$Workloadcaptures$Stop,
19335
+ options: StreamMethodOptions
19336
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
19337
+ stop(
19338
+ params?: Params$Resource$Workloadcaptures$Stop,
19339
+ options?: MethodOptions
19340
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
19341
+ stop(
19342
+ params: Params$Resource$Workloadcaptures$Stop,
19343
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
19344
+ callback: BodyResponseCallback<Readable>
19345
+ ): void;
19346
+ stop(
19347
+ params: Params$Resource$Workloadcaptures$Stop,
19348
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
19349
+ callback: BodyResponseCallback<Schema$Operation>
19350
+ ): void;
19351
+ stop(
19352
+ params: Params$Resource$Workloadcaptures$Stop,
19353
+ callback: BodyResponseCallback<Schema$Operation>
19354
+ ): void;
19355
+ stop(callback: BodyResponseCallback<Schema$Operation>): void;
19356
+ stop(
19357
+ paramsOrCallback?:
19358
+ | Params$Resource$Workloadcaptures$Stop
19359
+ | BodyResponseCallback<Schema$Operation>
19360
+ | BodyResponseCallback<Readable>,
19361
+ optionsOrCallback?:
19362
+ | MethodOptions
19363
+ | StreamMethodOptions
19364
+ | BodyResponseCallback<Schema$Operation>
19365
+ | BodyResponseCallback<Readable>,
19366
+ callback?:
19367
+ BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
19368
+ ):
19369
+ | void
19370
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
19371
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
19372
+ let params = (paramsOrCallback ||
19373
+ {}) as Params$Resource$Workloadcaptures$Stop;
19374
+ let options = (optionsOrCallback || {}) as MethodOptions;
19375
+
19376
+ if (typeof paramsOrCallback === 'function') {
19377
+ callback = paramsOrCallback;
19378
+ params = {} as Params$Resource$Workloadcaptures$Stop;
19379
+ options = {};
19380
+ }
19381
+
19382
+ if (typeof optionsOrCallback === 'function') {
19383
+ callback = optionsOrCallback;
19384
+ options = {};
19385
+ }
19386
+
19387
+ const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
19388
+ const parameters = {
19389
+ options: Object.assign(
19390
+ {
19391
+ url: (
19392
+ rootUrl +
19393
+ '/v1/projects/{project}/instances/{instance}/workloadCaptures:stop'
19394
+ ).replace(/([^:]\/)\/+/g, '$1'),
19395
+ method: 'POST',
19396
+ apiVersion: '',
19397
+ },
19398
+ options
19399
+ ),
19400
+ params,
19401
+ requiredParams: ['project', 'instance'],
19402
+ pathParams: ['instance', 'project'],
19403
+ context: this.context,
19404
+ };
19405
+ if (callback) {
19406
+ createAPIRequest<Schema$Operation>(
19407
+ parameters,
19408
+ callback as BodyResponseCallback<unknown>
19409
+ );
19410
+ } else {
19411
+ return createAPIRequest<Schema$Operation>(parameters);
19412
+ }
19413
+ }
19414
+
19415
+ /**
19416
+ * Stops executing a captured workload on the separate Cloud SQL instance.
19417
+ * @example
19418
+ * ```js
19419
+ * // Before running the sample:
19420
+ * // - Enable the API at:
19421
+ * // https://console.developers.google.com/apis/api/sqladmin.googleapis.com
19422
+ * // - Login into gcloud by running:
19423
+ * // ```sh
19424
+ * // $ gcloud auth application-default login
19425
+ * // ```
19426
+ * // - Install the npm module by running:
19427
+ * // ```sh
19428
+ * // $ npm install googleapis
19429
+ * // ```
19430
+ *
19431
+ * const {google} = require('googleapis');
19432
+ * const sqladmin = google.sqladmin('v1');
19433
+ *
19434
+ * async function main() {
19435
+ * const auth = new google.auth.GoogleAuth({
19436
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
19437
+ * scopes: [
19438
+ * 'https://www.googleapis.com/auth/cloud-platform',
19439
+ * 'https://www.googleapis.com/auth/sqlservice.admin',
19440
+ * ],
19441
+ * });
19442
+ *
19443
+ * // Acquire an auth client, and bind it to all future calls
19444
+ * const authClient = await auth.getClient();
19445
+ * google.options({auth: authClient});
19446
+ *
19447
+ * // Do the magic
19448
+ * const res = await sql.workloadCaptures.stopReplay({
19449
+ * // Required. Cloud SQL instance ID. This does not include the project ID.
19450
+ * instance: 'placeholder-value',
19451
+ * // Required. Project ID of the project that contains the instance.
19452
+ * project: 'placeholder-value',
19453
+ * // Required. The ID of the workload to replay.
19454
+ * workloadId: 'placeholder-value',
19455
+ *
19456
+ * // Request body metadata
19457
+ * requestBody: {
19458
+ * // request body parameters
19459
+ * // {
19460
+ * // "stopWorkloadReplayContext": {}
19461
+ * // }
19462
+ * },
19463
+ * });
19464
+ * console.log(res.data);
19465
+ *
19466
+ * // Example response
19467
+ * // {
19468
+ * // "acquireSsrsLeaseContext": {},
19469
+ * // "apiWarning": {},
19470
+ * // "backupContext": {},
19471
+ * // "endTime": "my_endTime",
19472
+ * // "error": {},
19473
+ * // "exportContext": {},
19474
+ * // "importContext": {},
19475
+ * // "insertTime": "my_insertTime",
19476
+ * // "kind": "my_kind",
19477
+ * // "name": "my_name",
19478
+ * // "operationType": "my_operationType",
19479
+ * // "preCheckMajorVersionUpgradeContext": {},
19480
+ * // "selfLink": "my_selfLink",
19481
+ * // "startTime": "my_startTime",
19482
+ * // "startWorkloadCaptureContext": {},
19483
+ * // "startWorkloadReplayContext": {},
19484
+ * // "status": "my_status",
19485
+ * // "stopWorkloadCaptureContext": {},
19486
+ * // "stopWorkloadReplayContext": {},
19487
+ * // "subOperationType": {},
19488
+ * // "targetId": "my_targetId",
19489
+ * // "targetLink": "my_targetLink",
19490
+ * // "targetProject": "my_targetProject",
19491
+ * // "user": "my_user"
19492
+ * // }
19493
+ * }
19494
+ *
19495
+ * main().catch(e => {
19496
+ * console.error(e);
19497
+ * throw e;
19498
+ * });
19499
+ *
19500
+ * ```
19501
+ *
19502
+ * @param params - Parameters for request
19503
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
19504
+ * @param callback - Optional callback that handles the response.
19505
+ * @returns A promise if used with async/await, or void if used with a callback.
19506
+ */
19507
+ stopReplay(
19508
+ params: Params$Resource$Workloadcaptures$Stopreplay,
19509
+ options: StreamMethodOptions
19510
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
19511
+ stopReplay(
19512
+ params?: Params$Resource$Workloadcaptures$Stopreplay,
19513
+ options?: MethodOptions
19514
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
19515
+ stopReplay(
19516
+ params: Params$Resource$Workloadcaptures$Stopreplay,
19517
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
19518
+ callback: BodyResponseCallback<Readable>
19519
+ ): void;
19520
+ stopReplay(
19521
+ params: Params$Resource$Workloadcaptures$Stopreplay,
19522
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
19523
+ callback: BodyResponseCallback<Schema$Operation>
19524
+ ): void;
19525
+ stopReplay(
19526
+ params: Params$Resource$Workloadcaptures$Stopreplay,
19527
+ callback: BodyResponseCallback<Schema$Operation>
19528
+ ): void;
19529
+ stopReplay(callback: BodyResponseCallback<Schema$Operation>): void;
19530
+ stopReplay(
19531
+ paramsOrCallback?:
19532
+ | Params$Resource$Workloadcaptures$Stopreplay
19533
+ | BodyResponseCallback<Schema$Operation>
19534
+ | BodyResponseCallback<Readable>,
19535
+ optionsOrCallback?:
19536
+ | MethodOptions
19537
+ | StreamMethodOptions
19538
+ | BodyResponseCallback<Schema$Operation>
19539
+ | BodyResponseCallback<Readable>,
19540
+ callback?:
19541
+ BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
19542
+ ):
19543
+ | void
19544
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
19545
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
19546
+ let params = (paramsOrCallback ||
19547
+ {}) as Params$Resource$Workloadcaptures$Stopreplay;
19548
+ let options = (optionsOrCallback || {}) as MethodOptions;
19549
+
19550
+ if (typeof paramsOrCallback === 'function') {
19551
+ callback = paramsOrCallback;
19552
+ params = {} as Params$Resource$Workloadcaptures$Stopreplay;
19553
+ options = {};
19554
+ }
19555
+
19556
+ if (typeof optionsOrCallback === 'function') {
19557
+ callback = optionsOrCallback;
19558
+ options = {};
19559
+ }
19560
+
19561
+ const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/';
19562
+ const parameters = {
19563
+ options: Object.assign(
19564
+ {
19565
+ url: (
19566
+ rootUrl +
19567
+ '/v1/projects/{project}/instances/{instance}/workloadCaptures/{workloadId}:stopReplay'
19568
+ ).replace(/([^:]\/)\/+/g, '$1'),
19569
+ method: 'POST',
19570
+ apiVersion: '',
19571
+ },
19572
+ options
19573
+ ),
19574
+ params,
19575
+ requiredParams: ['project', 'instance', 'workloadId'],
19576
+ pathParams: ['instance', 'project', 'workloadId'],
19577
+ context: this.context,
19578
+ };
19579
+ if (callback) {
19580
+ createAPIRequest<Schema$Operation>(
19581
+ parameters,
19582
+ callback as BodyResponseCallback<unknown>
19583
+ );
19584
+ } else {
19585
+ return createAPIRequest<Schema$Operation>(parameters);
19586
+ }
19587
+ }
19588
+ }
19589
+
19590
+ export interface Params$Resource$Workloadcaptures$List extends StandardParameters {
19591
+ /**
19592
+ * Required. Cloud SQL instance ID. This does not include the project ID.
19593
+ */
19594
+ instance?: string;
19595
+ /**
19596
+ * Required. Project ID of the project that contains the instance.
19597
+ */
19598
+ project?: string;
19599
+ }
19600
+ export interface Params$Resource$Workloadcaptures$Start extends StandardParameters {
19601
+ /**
19602
+ * Required. Cloud SQL instance ID. This does not include the project ID.
19603
+ */
19604
+ instance?: string;
19605
+ /**
19606
+ * Required. Project ID of the project that contains the instance.
19607
+ */
19608
+ project?: string;
19609
+
19610
+ /**
19611
+ * Request body metadata
19612
+ */
19613
+ requestBody?: Schema$SqlWorkloadCapturesStartRequest;
19614
+ }
19615
+ export interface Params$Resource$Workloadcaptures$Startreplay extends StandardParameters {
19616
+ /**
19617
+ * Required. Cloud SQL instance ID. This does not include the project ID.
19618
+ */
19619
+ instance?: string;
19620
+ /**
19621
+ * Required. Project ID of the project that contains the instance.
19622
+ */
19623
+ project?: string;
19624
+ /**
19625
+ * Required. The ID of the workload to replay.
19626
+ */
19627
+ workloadId?: string;
19628
+
19629
+ /**
19630
+ * Request body metadata
19631
+ */
19632
+ requestBody?: Schema$SqlWorkloadCapturesStartReplayRequest;
19633
+ }
19634
+ export interface Params$Resource$Workloadcaptures$Stop extends StandardParameters {
19635
+ /**
19636
+ * Required. Cloud SQL instance ID. This does not include the project ID.
19637
+ */
19638
+ instance?: string;
19639
+ /**
19640
+ * Required. Project ID of the project that contains the instance.
19641
+ */
19642
+ project?: string;
19643
+
19644
+ /**
19645
+ * Request body metadata
19646
+ */
19647
+ requestBody?: Schema$SqlWorkloadCapturesStopRequest;
19648
+ }
19649
+ export interface Params$Resource$Workloadcaptures$Stopreplay extends StandardParameters {
19650
+ /**
19651
+ * Required. Cloud SQL instance ID. This does not include the project ID.
19652
+ */
19653
+ instance?: string;
19654
+ /**
19655
+ * Required. Project ID of the project that contains the instance.
19656
+ */
19657
+ project?: string;
19658
+ /**
19659
+ * Required. The ID of the workload to replay.
19660
+ */
19661
+ workloadId?: string;
19662
+
19663
+ /**
19664
+ * Request body metadata
19665
+ */
19666
+ requestBody?: Schema$SqlWorkloadCapturesStopReplayRequest;
19667
+ }
18403
19668
  }