@googleapis/vmmigration 15.0.0 → 16.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/tsconfig.tsbuildinfo +1 -1
- package/build/v1.d.ts +939 -4
- package/build/v1.js +274 -0
- package/build/v1.js.map +1 -1
- package/build/v1alpha1.d.ts +939 -4
- package/build/v1alpha1.js +274 -0
- package/build/v1alpha1.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +1640 -75
- package/v1alpha1.ts +1645 -75
package/v1alpha1.ts
CHANGED
|
@@ -141,6 +141,19 @@ export namespace vmmigration_v1alpha1 {
|
|
|
141
141
|
*/
|
|
142
142
|
sessionToken?: string | null;
|
|
143
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* AdaptationModifier a modifier to be used for configuration of the OS adaptation process.
|
|
146
|
+
*/
|
|
147
|
+
export interface Schema$AdaptationModifier {
|
|
148
|
+
/**
|
|
149
|
+
* Optional. The modifier name.
|
|
150
|
+
*/
|
|
151
|
+
modifier?: string | null;
|
|
152
|
+
/**
|
|
153
|
+
* Optional. The value of the modifier. The actual value depends on the modifier and can also be empty.
|
|
154
|
+
*/
|
|
155
|
+
value?: string | null;
|
|
156
|
+
}
|
|
144
157
|
/**
|
|
145
158
|
* AdaptingOSStep contains specific step details.
|
|
146
159
|
*/
|
|
@@ -268,6 +281,27 @@ export namespace vmmigration_v1alpha1 {
|
|
|
268
281
|
*/
|
|
269
282
|
state?: string | null;
|
|
270
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Represents the source AWS Disk details.
|
|
286
|
+
*/
|
|
287
|
+
export interface Schema$AwsSourceDiskDetails {
|
|
288
|
+
/**
|
|
289
|
+
* Optional. Output only. Disk type.
|
|
290
|
+
*/
|
|
291
|
+
diskType?: string | null;
|
|
292
|
+
/**
|
|
293
|
+
* Output only. Size in GiB.
|
|
294
|
+
*/
|
|
295
|
+
sizeGib?: string | null;
|
|
296
|
+
/**
|
|
297
|
+
* Optional. Output only. A map of AWS volume tags.
|
|
298
|
+
*/
|
|
299
|
+
tags?: {[key: string]: string} | null;
|
|
300
|
+
/**
|
|
301
|
+
* Required. AWS volume ID.
|
|
302
|
+
*/
|
|
303
|
+
volumeId?: string | null;
|
|
304
|
+
}
|
|
271
305
|
/**
|
|
272
306
|
* Represent the source AWS VM details.
|
|
273
307
|
*/
|
|
@@ -561,6 +595,10 @@ export namespace vmmigration_v1alpha1 {
|
|
|
561
595
|
* Request message for 'CancelCutoverJob' request.
|
|
562
596
|
*/
|
|
563
597
|
export interface Schema$CancelCutoverJobRequest {}
|
|
598
|
+
/**
|
|
599
|
+
* Request message for 'CancelDiskMigrationJob' request.
|
|
600
|
+
*/
|
|
601
|
+
export interface Schema$CancelDiskMigrationJobRequest {}
|
|
564
602
|
/**
|
|
565
603
|
* Request message for 'CancelImageImportJob' request.
|
|
566
604
|
*/
|
|
@@ -660,6 +698,27 @@ export namespace vmmigration_v1alpha1 {
|
|
|
660
698
|
*/
|
|
661
699
|
startTime?: string | null;
|
|
662
700
|
}
|
|
701
|
+
/**
|
|
702
|
+
* Compute Engine disk target details.
|
|
703
|
+
*/
|
|
704
|
+
export interface Schema$ComputeEngineDisk {
|
|
705
|
+
/**
|
|
706
|
+
* Optional. Target Compute Engine Disk ID. This is the resource ID segment of the Compute Engine Disk to create. In the resource name compute/v1/projects/{project\}/zones/{zone\}/disks/disk1 "disk1" is the resource ID for the disk.
|
|
707
|
+
*/
|
|
708
|
+
diskId?: string | null;
|
|
709
|
+
/**
|
|
710
|
+
* Required. The disk type to use.
|
|
711
|
+
*/
|
|
712
|
+
diskType?: string | null;
|
|
713
|
+
/**
|
|
714
|
+
* Optional. Replication zones of the regional disk. Should be of the form: projects/{target-project\}/locations/{replica-zone\} Currently only one replica zone is supported.
|
|
715
|
+
*/
|
|
716
|
+
replicaZones?: string[] | null;
|
|
717
|
+
/**
|
|
718
|
+
* Required. The Compute Engine zone in which to create the disk. Should be of the form: projects/{target-project\}/locations/{zone\}
|
|
719
|
+
*/
|
|
720
|
+
zone?: string | null;
|
|
721
|
+
}
|
|
663
722
|
/**
|
|
664
723
|
* ComputeEngineDisksTargetDefaults is a collection of details for creating Persistent Disks in a target Compute Engine project.
|
|
665
724
|
*/
|
|
@@ -706,6 +765,10 @@ export namespace vmmigration_v1alpha1 {
|
|
|
706
765
|
* ComputeEngineTargetDefaults is a collection of details for creating a VM in a target Compute Engine project.
|
|
707
766
|
*/
|
|
708
767
|
export interface Schema$ComputeEngineTargetDefaults {
|
|
768
|
+
/**
|
|
769
|
+
* Optional. AdaptationModifiers are the set of modifiers used during OS adaptation.
|
|
770
|
+
*/
|
|
771
|
+
adaptationModifiers?: Schema$AdaptationModifier[];
|
|
709
772
|
/**
|
|
710
773
|
* Additional licenses to assign to the VM.
|
|
711
774
|
*/
|
|
@@ -803,6 +866,10 @@ export namespace vmmigration_v1alpha1 {
|
|
|
803
866
|
* ComputeEngineTargetDetails is a collection of details for creating a VM in a target Compute Engine project.
|
|
804
867
|
*/
|
|
805
868
|
export interface Schema$ComputeEngineTargetDetails {
|
|
869
|
+
/**
|
|
870
|
+
* Optional. Modifiers to be used as configuration of the OS adaptation process.
|
|
871
|
+
*/
|
|
872
|
+
adaptationModifiers?: Schema$AdaptationModifier[];
|
|
806
873
|
/**
|
|
807
874
|
* Additional licenses to assign to the VM.
|
|
808
875
|
*/
|
|
@@ -918,10 +985,18 @@ export namespace vmmigration_v1alpha1 {
|
|
|
918
985
|
*/
|
|
919
986
|
restartType?: string | null;
|
|
920
987
|
}
|
|
988
|
+
/**
|
|
989
|
+
* CopyingSourceDiskSnapshotStep contains specific step details.
|
|
990
|
+
*/
|
|
991
|
+
export interface Schema$CopyingSourceDiskSnapshotStep {}
|
|
921
992
|
/**
|
|
922
993
|
* CreatingImageStep contains specific step details.
|
|
923
994
|
*/
|
|
924
995
|
export interface Schema$CreatingImageStep {}
|
|
996
|
+
/**
|
|
997
|
+
* CreatingSourceDiskSnapshotStep contains specific step details.
|
|
998
|
+
*/
|
|
999
|
+
export interface Schema$CreatingSourceDiskSnapshotStep {}
|
|
925
1000
|
/**
|
|
926
1001
|
* CutoverForecast holds information about future CutoverJobs of a MigratingVm.
|
|
927
1002
|
*/
|
|
@@ -1186,6 +1261,89 @@ export namespace vmmigration_v1alpha1 {
|
|
|
1186
1261
|
*/
|
|
1187
1262
|
targetProject?: string | null;
|
|
1188
1263
|
}
|
|
1264
|
+
/**
|
|
1265
|
+
* Describes the disk which will be migrated from the source environment. The source disk has to be unattached.
|
|
1266
|
+
*/
|
|
1267
|
+
export interface Schema$DiskMigrationJob {
|
|
1268
|
+
/**
|
|
1269
|
+
* Details of the unattached AWS source disk.
|
|
1270
|
+
*/
|
|
1271
|
+
awsSourceDiskDetails?: Schema$AwsSourceDiskDetails;
|
|
1272
|
+
/**
|
|
1273
|
+
* Output only. The time the DiskMigrationJob resource was created.
|
|
1274
|
+
*/
|
|
1275
|
+
createTime?: string | null;
|
|
1276
|
+
/**
|
|
1277
|
+
* Output only. Provides details on the errors that led to the disk migration job's state in case of an error.
|
|
1278
|
+
*/
|
|
1279
|
+
errors?: Schema$Status[];
|
|
1280
|
+
/**
|
|
1281
|
+
* Output only. Identifier. The identifier of the DiskMigrationJob.
|
|
1282
|
+
*/
|
|
1283
|
+
name?: string | null;
|
|
1284
|
+
/**
|
|
1285
|
+
* Output only. State of the DiskMigrationJob.
|
|
1286
|
+
*/
|
|
1287
|
+
state?: string | null;
|
|
1288
|
+
/**
|
|
1289
|
+
* Output only. The disk migration steps list representing its progress.
|
|
1290
|
+
*/
|
|
1291
|
+
steps?: Schema$DiskMigrationStep[];
|
|
1292
|
+
/**
|
|
1293
|
+
* Required. Details of the target Disk in Compute Engine.
|
|
1294
|
+
*/
|
|
1295
|
+
targetDetails?: Schema$DiskMigrationJobTargetDetails;
|
|
1296
|
+
/**
|
|
1297
|
+
* Output only. The last time the DiskMigrationJob resource was updated.
|
|
1298
|
+
*/
|
|
1299
|
+
updateTime?: string | null;
|
|
1300
|
+
}
|
|
1301
|
+
/**
|
|
1302
|
+
* Details of the target disk in Compute Engine.
|
|
1303
|
+
*/
|
|
1304
|
+
export interface Schema$DiskMigrationJobTargetDetails {
|
|
1305
|
+
/**
|
|
1306
|
+
* Optional. The encryption to apply to the disk. If the DiskMigrationJob parent Source resource has an encryption, this field must be set to the same encryption key.
|
|
1307
|
+
*/
|
|
1308
|
+
encryption?: Schema$Encryption;
|
|
1309
|
+
/**
|
|
1310
|
+
* Optional. A map of labels to associate with the disk.
|
|
1311
|
+
*/
|
|
1312
|
+
labels?: {[key: string]: string} | null;
|
|
1313
|
+
/**
|
|
1314
|
+
* Required. The target disk.
|
|
1315
|
+
*/
|
|
1316
|
+
targetDisk?: Schema$ComputeEngineDisk;
|
|
1317
|
+
/**
|
|
1318
|
+
* Required. The name of the resource of type TargetProject which represents the Compute Engine project in which to create the disk. Should be of the form: projects/{project\}/locations/global/targetProjects/{target-project\}
|
|
1319
|
+
*/
|
|
1320
|
+
targetProject?: string | null;
|
|
1321
|
+
}
|
|
1322
|
+
/**
|
|
1323
|
+
* DiskMigrationStep holds information about the disk migration step progress.
|
|
1324
|
+
*/
|
|
1325
|
+
export interface Schema$DiskMigrationStep {
|
|
1326
|
+
/**
|
|
1327
|
+
* Copying source disk snapshot step.
|
|
1328
|
+
*/
|
|
1329
|
+
copyingSourceDiskSnapshot?: Schema$CopyingSourceDiskSnapshotStep;
|
|
1330
|
+
/**
|
|
1331
|
+
* Creating source disk snapshot step.
|
|
1332
|
+
*/
|
|
1333
|
+
creatingSourceDiskSnapshot?: Schema$CreatingSourceDiskSnapshotStep;
|
|
1334
|
+
/**
|
|
1335
|
+
* Output only. The time the step has ended.
|
|
1336
|
+
*/
|
|
1337
|
+
endTime?: string | null;
|
|
1338
|
+
/**
|
|
1339
|
+
* Creating target disk step.
|
|
1340
|
+
*/
|
|
1341
|
+
provisioningTargetDisk?: Schema$ProvisioningTargetDiskStep;
|
|
1342
|
+
/**
|
|
1343
|
+
* Output only. The time the step has started.
|
|
1344
|
+
*/
|
|
1345
|
+
startTime?: string | null;
|
|
1346
|
+
}
|
|
1189
1347
|
/**
|
|
1190
1348
|
* Details for a disk only migration.
|
|
1191
1349
|
*/
|
|
@@ -1331,6 +1489,23 @@ export namespace vmmigration_v1alpha1 {
|
|
|
1331
1489
|
*/
|
|
1332
1490
|
vmwareVms?: Schema$VmwareVmsDetails;
|
|
1333
1491
|
}
|
|
1492
|
+
/**
|
|
1493
|
+
* Response message for fetchStorageInventory.
|
|
1494
|
+
*/
|
|
1495
|
+
export interface Schema$FetchStorageInventoryResponse {
|
|
1496
|
+
/**
|
|
1497
|
+
* Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
|
|
1498
|
+
*/
|
|
1499
|
+
nextPageToken?: string | null;
|
|
1500
|
+
/**
|
|
1501
|
+
* The list of storage resources in the source.
|
|
1502
|
+
*/
|
|
1503
|
+
resources?: Schema$SourceStorageResource[];
|
|
1504
|
+
/**
|
|
1505
|
+
* Output only. The timestamp when the source was last queried (if the result is from the cache).
|
|
1506
|
+
*/
|
|
1507
|
+
updateTime?: string | null;
|
|
1508
|
+
}
|
|
1334
1509
|
/**
|
|
1335
1510
|
* Request message for 'FinalizeMigration' request.
|
|
1336
1511
|
*/
|
|
@@ -1450,6 +1625,10 @@ export namespace vmmigration_v1alpha1 {
|
|
|
1450
1625
|
* Parameters affecting the OS adaptation process.
|
|
1451
1626
|
*/
|
|
1452
1627
|
export interface Schema$ImageImportOsAdaptationParameters {
|
|
1628
|
+
/**
|
|
1629
|
+
* Optional. Modifiers to be used as configuration of the OS adaptation process.
|
|
1630
|
+
*/
|
|
1631
|
+
adaptationModifiers?: Schema$AdaptationModifier[];
|
|
1453
1632
|
/**
|
|
1454
1633
|
* Optional. By default the image will keep its existing boot option. Setting this property will trigger an internal process which will convert the image from using the existing boot option to another. The size of the boot disk might be increased to allow the conversion
|
|
1455
1634
|
*/
|
|
@@ -1568,6 +1747,23 @@ export namespace vmmigration_v1alpha1 {
|
|
|
1568
1747
|
*/
|
|
1569
1748
|
unreachable?: string[] | null;
|
|
1570
1749
|
}
|
|
1750
|
+
/**
|
|
1751
|
+
* Response message for 'ListDiskMigrationJobs' request.
|
|
1752
|
+
*/
|
|
1753
|
+
export interface Schema$ListDiskMigrationJobsResponse {
|
|
1754
|
+
/**
|
|
1755
|
+
* Output only. The list of the disk migration jobs.
|
|
1756
|
+
*/
|
|
1757
|
+
diskMigrationJobs?: Schema$DiskMigrationJob[];
|
|
1758
|
+
/**
|
|
1759
|
+
* Optional. Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
|
|
1760
|
+
*/
|
|
1761
|
+
nextPageToken?: string | null;
|
|
1762
|
+
/**
|
|
1763
|
+
* Output only. Locations that could not be reached.
|
|
1764
|
+
*/
|
|
1765
|
+
unreachable?: string[] | null;
|
|
1766
|
+
}
|
|
1571
1767
|
/**
|
|
1572
1768
|
* Response message for 'ListGroups' request.
|
|
1573
1769
|
*/
|
|
@@ -1661,6 +1857,10 @@ export namespace vmmigration_v1alpha1 {
|
|
|
1661
1857
|
* A list of operations that matches the specified filter in the request.
|
|
1662
1858
|
*/
|
|
1663
1859
|
operations?: Schema$Operation[];
|
|
1860
|
+
/**
|
|
1861
|
+
* Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.
|
|
1862
|
+
*/
|
|
1863
|
+
unreachable?: string[] | null;
|
|
1664
1864
|
}
|
|
1665
1865
|
/**
|
|
1666
1866
|
* Response message for 'ListReplicationCycles' request.
|
|
@@ -2176,6 +2376,10 @@ export namespace vmmigration_v1alpha1 {
|
|
|
2176
2376
|
* PreparingVMDisksStep contains specific step details.
|
|
2177
2377
|
*/
|
|
2178
2378
|
export interface Schema$PreparingVMDisksStep {}
|
|
2379
|
+
/**
|
|
2380
|
+
* ProvisioningTargetDiskStep contains specific step details.
|
|
2381
|
+
*/
|
|
2382
|
+
export interface Schema$ProvisioningTargetDiskStep {}
|
|
2179
2383
|
/**
|
|
2180
2384
|
* Request message for 'RemoveMigration' request.
|
|
2181
2385
|
*/
|
|
@@ -2268,6 +2472,10 @@ export namespace vmmigration_v1alpha1 {
|
|
|
2268
2472
|
* Request message for 'ResumeMigration' request.
|
|
2269
2473
|
*/
|
|
2270
2474
|
export interface Schema$ResumeMigrationRequest {}
|
|
2475
|
+
/**
|
|
2476
|
+
* Request message for 'RunDiskMigrationJobRequest' request.
|
|
2477
|
+
*/
|
|
2478
|
+
export interface Schema$RunDiskMigrationJobRequest {}
|
|
2271
2479
|
/**
|
|
2272
2480
|
* A policy for scheduling replications.
|
|
2273
2481
|
*/
|
|
@@ -2381,6 +2589,15 @@ export namespace vmmigration_v1alpha1 {
|
|
|
2381
2589
|
*/
|
|
2382
2590
|
vmware?: Schema$VmwareSourceDetails;
|
|
2383
2591
|
}
|
|
2592
|
+
/**
|
|
2593
|
+
* SourceStorageResource describes a storage resource in the source.
|
|
2594
|
+
*/
|
|
2595
|
+
export interface Schema$SourceStorageResource {
|
|
2596
|
+
/**
|
|
2597
|
+
* Source AWS volume details.
|
|
2598
|
+
*/
|
|
2599
|
+
awsDiskDetails?: Schema$AwsSourceDiskDetails;
|
|
2600
|
+
}
|
|
2384
2601
|
/**
|
|
2385
2602
|
* Request message for 'StartMigrationRequest' request.
|
|
2386
2603
|
*/
|
|
@@ -3058,7 +3275,7 @@ export namespace vmmigration_v1alpha1 {
|
|
|
3058
3275
|
*
|
|
3059
3276
|
* // Do the magic
|
|
3060
3277
|
* const res = await vmmigration.projects.locations.list({
|
|
3061
|
-
* // Optional.
|
|
3278
|
+
* // Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.
|
|
3062
3279
|
* extraLocationTypes: 'placeholder-value',
|
|
3063
3280
|
* // A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
|
|
3064
3281
|
* filter: 'placeholder-value',
|
|
@@ -3186,7 +3403,7 @@ export namespace vmmigration_v1alpha1 {
|
|
|
3186
3403
|
export interface Params$Resource$Projects$Locations$List
|
|
3187
3404
|
extends StandardParameters {
|
|
3188
3405
|
/**
|
|
3189
|
-
* Optional.
|
|
3406
|
+
* Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.
|
|
3190
3407
|
*/
|
|
3191
3408
|
extraLocationTypes?: string[];
|
|
3192
3409
|
/**
|
|
@@ -5030,7 +5247,7 @@ export namespace vmmigration_v1alpha1 {
|
|
|
5030
5247
|
}
|
|
5031
5248
|
|
|
5032
5249
|
/**
|
|
5033
|
-
* Initiates the cancellation of a running
|
|
5250
|
+
* Initiates the cancellation of a running ImageImportJob.
|
|
5034
5251
|
* @example
|
|
5035
5252
|
* ```js
|
|
5036
5253
|
* // Before running the sample:
|
|
@@ -5978,13 +6195,16 @@ export namespace vmmigration_v1alpha1 {
|
|
|
5978
6195
|
* pageSize: 'placeholder-value',
|
|
5979
6196
|
* // The standard list page token.
|
|
5980
6197
|
* pageToken: 'placeholder-value',
|
|
6198
|
+
* // When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `"projects/example/locations/-"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.
|
|
6199
|
+
* returnPartialSuccess: 'placeholder-value',
|
|
5981
6200
|
* });
|
|
5982
6201
|
* console.log(res.data);
|
|
5983
6202
|
*
|
|
5984
6203
|
* // Example response
|
|
5985
6204
|
* // {
|
|
5986
6205
|
* // "nextPageToken": "my_nextPageToken",
|
|
5987
|
-
* // "operations": []
|
|
6206
|
+
* // "operations": [],
|
|
6207
|
+
* // "unreachable": []
|
|
5988
6208
|
* // }
|
|
5989
6209
|
* }
|
|
5990
6210
|
*
|
|
@@ -6130,11 +6350,16 @@ export namespace vmmigration_v1alpha1 {
|
|
|
6130
6350
|
* The standard list page token.
|
|
6131
6351
|
*/
|
|
6132
6352
|
pageToken?: string;
|
|
6353
|
+
/**
|
|
6354
|
+
* When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `"projects/example/locations/-"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.
|
|
6355
|
+
*/
|
|
6356
|
+
returnPartialSuccess?: boolean;
|
|
6133
6357
|
}
|
|
6134
6358
|
|
|
6135
6359
|
export class Resource$Projects$Locations$Sources {
|
|
6136
6360
|
context: APIRequestContext;
|
|
6137
6361
|
datacenterConnectors: Resource$Projects$Locations$Sources$Datacenterconnectors;
|
|
6362
|
+
diskMigrationJobs: Resource$Projects$Locations$Sources$Diskmigrationjobs;
|
|
6138
6363
|
migratingVms: Resource$Projects$Locations$Sources$Migratingvms;
|
|
6139
6364
|
utilizationReports: Resource$Projects$Locations$Sources$Utilizationreports;
|
|
6140
6365
|
constructor(context: APIRequestContext) {
|
|
@@ -6143,6 +6368,8 @@ export namespace vmmigration_v1alpha1 {
|
|
|
6143
6368
|
new Resource$Projects$Locations$Sources$Datacenterconnectors(
|
|
6144
6369
|
this.context
|
|
6145
6370
|
);
|
|
6371
|
+
this.diskMigrationJobs =
|
|
6372
|
+
new Resource$Projects$Locations$Sources$Diskmigrationjobs(this.context);
|
|
6146
6373
|
this.migratingVms = new Resource$Projects$Locations$Sources$Migratingvms(
|
|
6147
6374
|
this.context
|
|
6148
6375
|
);
|
|
@@ -6607,7 +6834,7 @@ export namespace vmmigration_v1alpha1 {
|
|
|
6607
6834
|
}
|
|
6608
6835
|
|
|
6609
6836
|
/**
|
|
6610
|
-
*
|
|
6837
|
+
* List remote source's inventory of storage resources. The remote source is another cloud vendor (e.g. AWS, Azure). The inventory describes the list of existing storage resources in that source. Note that this operation lists the resources on the remote source, as opposed to listing the MigratingVms resources in the vmmigration service.
|
|
6611
6838
|
* @example
|
|
6612
6839
|
* ```js
|
|
6613
6840
|
* // Before running the sample:
|
|
@@ -6636,24 +6863,26 @@ export namespace vmmigration_v1alpha1 {
|
|
|
6636
6863
|
* google.options({auth: authClient});
|
|
6637
6864
|
*
|
|
6638
6865
|
* // Do the magic
|
|
6639
|
-
* const res =
|
|
6640
|
-
*
|
|
6641
|
-
*
|
|
6642
|
-
*
|
|
6866
|
+
* const res =
|
|
6867
|
+
* await vmmigration.projects.locations.sources.fetchStorageInventory({
|
|
6868
|
+
* // Optional. If this flag is set to true, the source will be queried instead of using cached results. Using this flag will make the call slower.
|
|
6869
|
+
* forceRefresh: 'placeholder-value',
|
|
6870
|
+
* // Optional. The maximum number of VMs to return. The service may return fewer than this value.
|
|
6871
|
+
* pageSize: 'placeholder-value',
|
|
6872
|
+
* // Optional. A page token, received from a previous `FetchStorageInventory` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchStorageInventory` must match the call that provided the page token.
|
|
6873
|
+
* pageToken: 'placeholder-value',
|
|
6874
|
+
* // Required. The name of the Source.
|
|
6875
|
+
* source: 'projects/my-project/locations/my-location/sources/my-source',
|
|
6876
|
+
* // Required. The type of the storage inventory to fetch.
|
|
6877
|
+
* type: 'placeholder-value',
|
|
6878
|
+
* });
|
|
6643
6879
|
* console.log(res.data);
|
|
6644
6880
|
*
|
|
6645
6881
|
* // Example response
|
|
6646
6882
|
* // {
|
|
6647
|
-
* // "
|
|
6648
|
-
* // "
|
|
6649
|
-
* // "
|
|
6650
|
-
* // "description": "my_description",
|
|
6651
|
-
* // "encryption": {},
|
|
6652
|
-
* // "error": {},
|
|
6653
|
-
* // "labels": {},
|
|
6654
|
-
* // "name": "my_name",
|
|
6655
|
-
* // "updateTime": "my_updateTime",
|
|
6656
|
-
* // "vmware": {}
|
|
6883
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
6884
|
+
* // "resources": [],
|
|
6885
|
+
* // "updateTime": "my_updateTime"
|
|
6657
6886
|
* // }
|
|
6658
6887
|
* }
|
|
6659
6888
|
*
|
|
@@ -6669,53 +6898,58 @@ export namespace vmmigration_v1alpha1 {
|
|
|
6669
6898
|
* @param callback - Optional callback that handles the response.
|
|
6670
6899
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6671
6900
|
*/
|
|
6672
|
-
|
|
6673
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
6901
|
+
fetchStorageInventory(
|
|
6902
|
+
params: Params$Resource$Projects$Locations$Sources$Fetchstorageinventory,
|
|
6674
6903
|
options: StreamMethodOptions
|
|
6675
6904
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
6676
|
-
|
|
6677
|
-
params?: Params$Resource$Projects$Locations$Sources$
|
|
6905
|
+
fetchStorageInventory(
|
|
6906
|
+
params?: Params$Resource$Projects$Locations$Sources$Fetchstorageinventory,
|
|
6678
6907
|
options?: MethodOptions
|
|
6679
|
-
): Promise<GaxiosResponseWithHTTP2<Schema$
|
|
6680
|
-
|
|
6681
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
6908
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$FetchStorageInventoryResponse>>;
|
|
6909
|
+
fetchStorageInventory(
|
|
6910
|
+
params: Params$Resource$Projects$Locations$Sources$Fetchstorageinventory,
|
|
6682
6911
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
6683
6912
|
callback: BodyResponseCallback<Readable>
|
|
6684
6913
|
): void;
|
|
6685
|
-
|
|
6686
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
6687
|
-
options:
|
|
6688
|
-
|
|
6914
|
+
fetchStorageInventory(
|
|
6915
|
+
params: Params$Resource$Projects$Locations$Sources$Fetchstorageinventory,
|
|
6916
|
+
options:
|
|
6917
|
+
| MethodOptions
|
|
6918
|
+
| BodyResponseCallback<Schema$FetchStorageInventoryResponse>,
|
|
6919
|
+
callback: BodyResponseCallback<Schema$FetchStorageInventoryResponse>
|
|
6689
6920
|
): void;
|
|
6690
|
-
|
|
6691
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
6692
|
-
callback: BodyResponseCallback<Schema$
|
|
6921
|
+
fetchStorageInventory(
|
|
6922
|
+
params: Params$Resource$Projects$Locations$Sources$Fetchstorageinventory,
|
|
6923
|
+
callback: BodyResponseCallback<Schema$FetchStorageInventoryResponse>
|
|
6693
6924
|
): void;
|
|
6694
|
-
|
|
6695
|
-
|
|
6925
|
+
fetchStorageInventory(
|
|
6926
|
+
callback: BodyResponseCallback<Schema$FetchStorageInventoryResponse>
|
|
6927
|
+
): void;
|
|
6928
|
+
fetchStorageInventory(
|
|
6696
6929
|
paramsOrCallback?:
|
|
6697
|
-
| Params$Resource$Projects$Locations$Sources$
|
|
6698
|
-
| BodyResponseCallback<Schema$
|
|
6930
|
+
| Params$Resource$Projects$Locations$Sources$Fetchstorageinventory
|
|
6931
|
+
| BodyResponseCallback<Schema$FetchStorageInventoryResponse>
|
|
6699
6932
|
| BodyResponseCallback<Readable>,
|
|
6700
6933
|
optionsOrCallback?:
|
|
6701
6934
|
| MethodOptions
|
|
6702
6935
|
| StreamMethodOptions
|
|
6703
|
-
| BodyResponseCallback<Schema$
|
|
6936
|
+
| BodyResponseCallback<Schema$FetchStorageInventoryResponse>
|
|
6704
6937
|
| BodyResponseCallback<Readable>,
|
|
6705
6938
|
callback?:
|
|
6706
|
-
| BodyResponseCallback<Schema$
|
|
6939
|
+
| BodyResponseCallback<Schema$FetchStorageInventoryResponse>
|
|
6707
6940
|
| BodyResponseCallback<Readable>
|
|
6708
6941
|
):
|
|
6709
6942
|
| void
|
|
6710
|
-
| Promise<GaxiosResponseWithHTTP2<Schema$
|
|
6943
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$FetchStorageInventoryResponse>>
|
|
6711
6944
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
6712
6945
|
let params = (paramsOrCallback ||
|
|
6713
|
-
{}) as Params$Resource$Projects$Locations$Sources$
|
|
6946
|
+
{}) as Params$Resource$Projects$Locations$Sources$Fetchstorageinventory;
|
|
6714
6947
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
6715
6948
|
|
|
6716
6949
|
if (typeof paramsOrCallback === 'function') {
|
|
6717
6950
|
callback = paramsOrCallback;
|
|
6718
|
-
params =
|
|
6951
|
+
params =
|
|
6952
|
+
{} as Params$Resource$Projects$Locations$Sources$Fetchstorageinventory;
|
|
6719
6953
|
options = {};
|
|
6720
6954
|
}
|
|
6721
6955
|
|
|
@@ -6728,29 +6962,33 @@ export namespace vmmigration_v1alpha1 {
|
|
|
6728
6962
|
const parameters = {
|
|
6729
6963
|
options: Object.assign(
|
|
6730
6964
|
{
|
|
6731
|
-
url: (
|
|
6965
|
+
url: (
|
|
6966
|
+
rootUrl + '/v1alpha1/{+source}:fetchStorageInventory'
|
|
6967
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
6732
6968
|
method: 'GET',
|
|
6733
6969
|
apiVersion: '',
|
|
6734
6970
|
},
|
|
6735
6971
|
options
|
|
6736
6972
|
),
|
|
6737
6973
|
params,
|
|
6738
|
-
requiredParams: ['
|
|
6739
|
-
pathParams: ['
|
|
6974
|
+
requiredParams: ['source'],
|
|
6975
|
+
pathParams: ['source'],
|
|
6740
6976
|
context: this.context,
|
|
6741
6977
|
};
|
|
6742
6978
|
if (callback) {
|
|
6743
|
-
createAPIRequest<Schema$
|
|
6979
|
+
createAPIRequest<Schema$FetchStorageInventoryResponse>(
|
|
6744
6980
|
parameters,
|
|
6745
6981
|
callback as BodyResponseCallback<unknown>
|
|
6746
6982
|
);
|
|
6747
6983
|
} else {
|
|
6748
|
-
return createAPIRequest<Schema$
|
|
6984
|
+
return createAPIRequest<Schema$FetchStorageInventoryResponse>(
|
|
6985
|
+
parameters
|
|
6986
|
+
);
|
|
6749
6987
|
}
|
|
6750
6988
|
}
|
|
6751
6989
|
|
|
6752
6990
|
/**
|
|
6753
|
-
*
|
|
6991
|
+
* Gets details of a single Source.
|
|
6754
6992
|
* @example
|
|
6755
6993
|
* ```js
|
|
6756
6994
|
* // Before running the sample:
|
|
@@ -6779,25 +7017,24 @@ export namespace vmmigration_v1alpha1 {
|
|
|
6779
7017
|
* google.options({auth: authClient});
|
|
6780
7018
|
*
|
|
6781
7019
|
* // Do the magic
|
|
6782
|
-
* const res = await vmmigration.projects.locations.sources.
|
|
6783
|
-
* //
|
|
6784
|
-
*
|
|
6785
|
-
* // Optional. the order by fields for the result.
|
|
6786
|
-
* orderBy: 'placeholder-value',
|
|
6787
|
-
* // Optional. The maximum number of sources to return. The service may return fewer than this value. If unspecified, at most 500 sources will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
6788
|
-
* pageSize: 'placeholder-value',
|
|
6789
|
-
* // Required. A page token, received from a previous `ListSources` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSources` must match the call that provided the page token.
|
|
6790
|
-
* pageToken: 'placeholder-value',
|
|
6791
|
-
* // Required. The parent, which owns this collection of sources.
|
|
6792
|
-
* parent: 'projects/my-project/locations/my-location',
|
|
7020
|
+
* const res = await vmmigration.projects.locations.sources.get({
|
|
7021
|
+
* // Required. The Source name.
|
|
7022
|
+
* name: 'projects/my-project/locations/my-location/sources/my-source',
|
|
6793
7023
|
* });
|
|
6794
7024
|
* console.log(res.data);
|
|
6795
7025
|
*
|
|
6796
7026
|
* // Example response
|
|
6797
7027
|
* // {
|
|
6798
|
-
* // "
|
|
6799
|
-
* // "
|
|
6800
|
-
* // "
|
|
7028
|
+
* // "aws": {},
|
|
7029
|
+
* // "azure": {},
|
|
7030
|
+
* // "createTime": "my_createTime",
|
|
7031
|
+
* // "description": "my_description",
|
|
7032
|
+
* // "encryption": {},
|
|
7033
|
+
* // "error": {},
|
|
7034
|
+
* // "labels": {},
|
|
7035
|
+
* // "name": "my_name",
|
|
7036
|
+
* // "updateTime": "my_updateTime",
|
|
7037
|
+
* // "vmware": {}
|
|
6801
7038
|
* // }
|
|
6802
7039
|
* }
|
|
6803
7040
|
*
|
|
@@ -6813,26 +7050,170 @@ export namespace vmmigration_v1alpha1 {
|
|
|
6813
7050
|
* @param callback - Optional callback that handles the response.
|
|
6814
7051
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6815
7052
|
*/
|
|
6816
|
-
|
|
6817
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
7053
|
+
get(
|
|
7054
|
+
params: Params$Resource$Projects$Locations$Sources$Get,
|
|
6818
7055
|
options: StreamMethodOptions
|
|
6819
7056
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
6820
|
-
|
|
6821
|
-
params?: Params$Resource$Projects$Locations$Sources$
|
|
7057
|
+
get(
|
|
7058
|
+
params?: Params$Resource$Projects$Locations$Sources$Get,
|
|
6822
7059
|
options?: MethodOptions
|
|
6823
|
-
): Promise<GaxiosResponseWithHTTP2<Schema$
|
|
6824
|
-
|
|
6825
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
7060
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Source>>;
|
|
7061
|
+
get(
|
|
7062
|
+
params: Params$Resource$Projects$Locations$Sources$Get,
|
|
6826
7063
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
6827
7064
|
callback: BodyResponseCallback<Readable>
|
|
6828
7065
|
): void;
|
|
6829
|
-
|
|
6830
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
6831
|
-
options: MethodOptions | BodyResponseCallback<Schema$
|
|
6832
|
-
callback: BodyResponseCallback<Schema$
|
|
7066
|
+
get(
|
|
7067
|
+
params: Params$Resource$Projects$Locations$Sources$Get,
|
|
7068
|
+
options: MethodOptions | BodyResponseCallback<Schema$Source>,
|
|
7069
|
+
callback: BodyResponseCallback<Schema$Source>
|
|
6833
7070
|
): void;
|
|
6834
|
-
|
|
6835
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
7071
|
+
get(
|
|
7072
|
+
params: Params$Resource$Projects$Locations$Sources$Get,
|
|
7073
|
+
callback: BodyResponseCallback<Schema$Source>
|
|
7074
|
+
): void;
|
|
7075
|
+
get(callback: BodyResponseCallback<Schema$Source>): void;
|
|
7076
|
+
get(
|
|
7077
|
+
paramsOrCallback?:
|
|
7078
|
+
| Params$Resource$Projects$Locations$Sources$Get
|
|
7079
|
+
| BodyResponseCallback<Schema$Source>
|
|
7080
|
+
| BodyResponseCallback<Readable>,
|
|
7081
|
+
optionsOrCallback?:
|
|
7082
|
+
| MethodOptions
|
|
7083
|
+
| StreamMethodOptions
|
|
7084
|
+
| BodyResponseCallback<Schema$Source>
|
|
7085
|
+
| BodyResponseCallback<Readable>,
|
|
7086
|
+
callback?:
|
|
7087
|
+
| BodyResponseCallback<Schema$Source>
|
|
7088
|
+
| BodyResponseCallback<Readable>
|
|
7089
|
+
):
|
|
7090
|
+
| void
|
|
7091
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Source>>
|
|
7092
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
7093
|
+
let params = (paramsOrCallback ||
|
|
7094
|
+
{}) as Params$Resource$Projects$Locations$Sources$Get;
|
|
7095
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
7096
|
+
|
|
7097
|
+
if (typeof paramsOrCallback === 'function') {
|
|
7098
|
+
callback = paramsOrCallback;
|
|
7099
|
+
params = {} as Params$Resource$Projects$Locations$Sources$Get;
|
|
7100
|
+
options = {};
|
|
7101
|
+
}
|
|
7102
|
+
|
|
7103
|
+
if (typeof optionsOrCallback === 'function') {
|
|
7104
|
+
callback = optionsOrCallback;
|
|
7105
|
+
options = {};
|
|
7106
|
+
}
|
|
7107
|
+
|
|
7108
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
7109
|
+
const parameters = {
|
|
7110
|
+
options: Object.assign(
|
|
7111
|
+
{
|
|
7112
|
+
url: (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
7113
|
+
method: 'GET',
|
|
7114
|
+
apiVersion: '',
|
|
7115
|
+
},
|
|
7116
|
+
options
|
|
7117
|
+
),
|
|
7118
|
+
params,
|
|
7119
|
+
requiredParams: ['name'],
|
|
7120
|
+
pathParams: ['name'],
|
|
7121
|
+
context: this.context,
|
|
7122
|
+
};
|
|
7123
|
+
if (callback) {
|
|
7124
|
+
createAPIRequest<Schema$Source>(
|
|
7125
|
+
parameters,
|
|
7126
|
+
callback as BodyResponseCallback<unknown>
|
|
7127
|
+
);
|
|
7128
|
+
} else {
|
|
7129
|
+
return createAPIRequest<Schema$Source>(parameters);
|
|
7130
|
+
}
|
|
7131
|
+
}
|
|
7132
|
+
|
|
7133
|
+
/**
|
|
7134
|
+
* Lists Sources in a given project and location.
|
|
7135
|
+
* @example
|
|
7136
|
+
* ```js
|
|
7137
|
+
* // Before running the sample:
|
|
7138
|
+
* // - Enable the API at:
|
|
7139
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
7140
|
+
* // - Login into gcloud by running:
|
|
7141
|
+
* // ```sh
|
|
7142
|
+
* // $ gcloud auth application-default login
|
|
7143
|
+
* // ```
|
|
7144
|
+
* // - Install the npm module by running:
|
|
7145
|
+
* // ```sh
|
|
7146
|
+
* // $ npm install googleapis
|
|
7147
|
+
* // ```
|
|
7148
|
+
*
|
|
7149
|
+
* const {google} = require('googleapis');
|
|
7150
|
+
* const vmmigration = google.vmmigration('v1alpha1');
|
|
7151
|
+
*
|
|
7152
|
+
* async function main() {
|
|
7153
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7154
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7155
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7156
|
+
* });
|
|
7157
|
+
*
|
|
7158
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7159
|
+
* const authClient = await auth.getClient();
|
|
7160
|
+
* google.options({auth: authClient});
|
|
7161
|
+
*
|
|
7162
|
+
* // Do the magic
|
|
7163
|
+
* const res = await vmmigration.projects.locations.sources.list({
|
|
7164
|
+
* // Optional. The filter request.
|
|
7165
|
+
* filter: 'placeholder-value',
|
|
7166
|
+
* // Optional. the order by fields for the result.
|
|
7167
|
+
* orderBy: 'placeholder-value',
|
|
7168
|
+
* // Optional. The maximum number of sources to return. The service may return fewer than this value. If unspecified, at most 500 sources will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
7169
|
+
* pageSize: 'placeholder-value',
|
|
7170
|
+
* // Required. A page token, received from a previous `ListSources` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSources` must match the call that provided the page token.
|
|
7171
|
+
* pageToken: 'placeholder-value',
|
|
7172
|
+
* // Required. The parent, which owns this collection of sources.
|
|
7173
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
7174
|
+
* });
|
|
7175
|
+
* console.log(res.data);
|
|
7176
|
+
*
|
|
7177
|
+
* // Example response
|
|
7178
|
+
* // {
|
|
7179
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
7180
|
+
* // "sources": [],
|
|
7181
|
+
* // "unreachable": []
|
|
7182
|
+
* // }
|
|
7183
|
+
* }
|
|
7184
|
+
*
|
|
7185
|
+
* main().catch(e => {
|
|
7186
|
+
* console.error(e);
|
|
7187
|
+
* throw e;
|
|
7188
|
+
* });
|
|
7189
|
+
*
|
|
7190
|
+
* ```
|
|
7191
|
+
*
|
|
7192
|
+
* @param params - Parameters for request
|
|
7193
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
7194
|
+
* @param callback - Optional callback that handles the response.
|
|
7195
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
7196
|
+
*/
|
|
7197
|
+
list(
|
|
7198
|
+
params: Params$Resource$Projects$Locations$Sources$List,
|
|
7199
|
+
options: StreamMethodOptions
|
|
7200
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
7201
|
+
list(
|
|
7202
|
+
params?: Params$Resource$Projects$Locations$Sources$List,
|
|
7203
|
+
options?: MethodOptions
|
|
7204
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListSourcesResponse>>;
|
|
7205
|
+
list(
|
|
7206
|
+
params: Params$Resource$Projects$Locations$Sources$List,
|
|
7207
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
7208
|
+
callback: BodyResponseCallback<Readable>
|
|
7209
|
+
): void;
|
|
7210
|
+
list(
|
|
7211
|
+
params: Params$Resource$Projects$Locations$Sources$List,
|
|
7212
|
+
options: MethodOptions | BodyResponseCallback<Schema$ListSourcesResponse>,
|
|
7213
|
+
callback: BodyResponseCallback<Schema$ListSourcesResponse>
|
|
7214
|
+
): void;
|
|
7215
|
+
list(
|
|
7216
|
+
params: Params$Resource$Projects$Locations$Sources$List,
|
|
6836
7217
|
callback: BodyResponseCallback<Schema$ListSourcesResponse>
|
|
6837
7218
|
): void;
|
|
6838
7219
|
list(callback: BodyResponseCallback<Schema$ListSourcesResponse>): void;
|
|
@@ -7106,6 +7487,29 @@ export namespace vmmigration_v1alpha1 {
|
|
|
7106
7487
|
*/
|
|
7107
7488
|
source?: string;
|
|
7108
7489
|
}
|
|
7490
|
+
export interface Params$Resource$Projects$Locations$Sources$Fetchstorageinventory
|
|
7491
|
+
extends StandardParameters {
|
|
7492
|
+
/**
|
|
7493
|
+
* Optional. If this flag is set to true, the source will be queried instead of using cached results. Using this flag will make the call slower.
|
|
7494
|
+
*/
|
|
7495
|
+
forceRefresh?: boolean;
|
|
7496
|
+
/**
|
|
7497
|
+
* Optional. The maximum number of VMs to return. The service may return fewer than this value.
|
|
7498
|
+
*/
|
|
7499
|
+
pageSize?: number;
|
|
7500
|
+
/**
|
|
7501
|
+
* Optional. A page token, received from a previous `FetchStorageInventory` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchStorageInventory` must match the call that provided the page token.
|
|
7502
|
+
*/
|
|
7503
|
+
pageToken?: string;
|
|
7504
|
+
/**
|
|
7505
|
+
* Required. The name of the Source.
|
|
7506
|
+
*/
|
|
7507
|
+
source?: string;
|
|
7508
|
+
/**
|
|
7509
|
+
* Required. The type of the storage inventory to fetch.
|
|
7510
|
+
*/
|
|
7511
|
+
type?: string;
|
|
7512
|
+
}
|
|
7109
7513
|
export interface Params$Resource$Projects$Locations$Sources$Get
|
|
7110
7514
|
extends StandardParameters {
|
|
7111
7515
|
/**
|
|
@@ -8009,6 +8413,1172 @@ export namespace vmmigration_v1alpha1 {
|
|
|
8009
8413
|
requestBody?: Schema$UpgradeApplianceRequest;
|
|
8010
8414
|
}
|
|
8011
8415
|
|
|
8416
|
+
export class Resource$Projects$Locations$Sources$Diskmigrationjobs {
|
|
8417
|
+
context: APIRequestContext;
|
|
8418
|
+
constructor(context: APIRequestContext) {
|
|
8419
|
+
this.context = context;
|
|
8420
|
+
}
|
|
8421
|
+
|
|
8422
|
+
/**
|
|
8423
|
+
* Cancels the disk migration job.
|
|
8424
|
+
* @example
|
|
8425
|
+
* ```js
|
|
8426
|
+
* // Before running the sample:
|
|
8427
|
+
* // - Enable the API at:
|
|
8428
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
8429
|
+
* // - Login into gcloud by running:
|
|
8430
|
+
* // ```sh
|
|
8431
|
+
* // $ gcloud auth application-default login
|
|
8432
|
+
* // ```
|
|
8433
|
+
* // - Install the npm module by running:
|
|
8434
|
+
* // ```sh
|
|
8435
|
+
* // $ npm install googleapis
|
|
8436
|
+
* // ```
|
|
8437
|
+
*
|
|
8438
|
+
* const {google} = require('googleapis');
|
|
8439
|
+
* const vmmigration = google.vmmigration('v1alpha1');
|
|
8440
|
+
*
|
|
8441
|
+
* async function main() {
|
|
8442
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8443
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8444
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8445
|
+
* });
|
|
8446
|
+
*
|
|
8447
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8448
|
+
* const authClient = await auth.getClient();
|
|
8449
|
+
* google.options({auth: authClient});
|
|
8450
|
+
*
|
|
8451
|
+
* // Do the magic
|
|
8452
|
+
* const res =
|
|
8453
|
+
* await vmmigration.projects.locations.sources.diskMigrationJobs.cancel({
|
|
8454
|
+
* // Required. The name of the DiskMigrationJob.
|
|
8455
|
+
* name: 'projects/my-project/locations/my-location/sources/my-source/diskMigrationJobs/my-diskMigrationJob',
|
|
8456
|
+
*
|
|
8457
|
+
* // Request body metadata
|
|
8458
|
+
* requestBody: {
|
|
8459
|
+
* // request body parameters
|
|
8460
|
+
* // {}
|
|
8461
|
+
* },
|
|
8462
|
+
* });
|
|
8463
|
+
* console.log(res.data);
|
|
8464
|
+
*
|
|
8465
|
+
* // Example response
|
|
8466
|
+
* // {
|
|
8467
|
+
* // "done": false,
|
|
8468
|
+
* // "error": {},
|
|
8469
|
+
* // "metadata": {},
|
|
8470
|
+
* // "name": "my_name",
|
|
8471
|
+
* // "response": {}
|
|
8472
|
+
* // }
|
|
8473
|
+
* }
|
|
8474
|
+
*
|
|
8475
|
+
* main().catch(e => {
|
|
8476
|
+
* console.error(e);
|
|
8477
|
+
* throw e;
|
|
8478
|
+
* });
|
|
8479
|
+
*
|
|
8480
|
+
* ```
|
|
8481
|
+
*
|
|
8482
|
+
* @param params - Parameters for request
|
|
8483
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8484
|
+
* @param callback - Optional callback that handles the response.
|
|
8485
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8486
|
+
*/
|
|
8487
|
+
cancel(
|
|
8488
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel,
|
|
8489
|
+
options: StreamMethodOptions
|
|
8490
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
8491
|
+
cancel(
|
|
8492
|
+
params?: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel,
|
|
8493
|
+
options?: MethodOptions
|
|
8494
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
8495
|
+
cancel(
|
|
8496
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel,
|
|
8497
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8498
|
+
callback: BodyResponseCallback<Readable>
|
|
8499
|
+
): void;
|
|
8500
|
+
cancel(
|
|
8501
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel,
|
|
8502
|
+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
|
|
8503
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8504
|
+
): void;
|
|
8505
|
+
cancel(
|
|
8506
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel,
|
|
8507
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8508
|
+
): void;
|
|
8509
|
+
cancel(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
8510
|
+
cancel(
|
|
8511
|
+
paramsOrCallback?:
|
|
8512
|
+
| Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel
|
|
8513
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8514
|
+
| BodyResponseCallback<Readable>,
|
|
8515
|
+
optionsOrCallback?:
|
|
8516
|
+
| MethodOptions
|
|
8517
|
+
| StreamMethodOptions
|
|
8518
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8519
|
+
| BodyResponseCallback<Readable>,
|
|
8520
|
+
callback?:
|
|
8521
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8522
|
+
| BodyResponseCallback<Readable>
|
|
8523
|
+
):
|
|
8524
|
+
| void
|
|
8525
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
8526
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
8527
|
+
let params = (paramsOrCallback ||
|
|
8528
|
+
{}) as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel;
|
|
8529
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8530
|
+
|
|
8531
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8532
|
+
callback = paramsOrCallback;
|
|
8533
|
+
params =
|
|
8534
|
+
{} as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel;
|
|
8535
|
+
options = {};
|
|
8536
|
+
}
|
|
8537
|
+
|
|
8538
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8539
|
+
callback = optionsOrCallback;
|
|
8540
|
+
options = {};
|
|
8541
|
+
}
|
|
8542
|
+
|
|
8543
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
8544
|
+
const parameters = {
|
|
8545
|
+
options: Object.assign(
|
|
8546
|
+
{
|
|
8547
|
+
url: (rootUrl + '/v1alpha1/{+name}:cancel').replace(
|
|
8548
|
+
/([^:]\/)\/+/g,
|
|
8549
|
+
'$1'
|
|
8550
|
+
),
|
|
8551
|
+
method: 'POST',
|
|
8552
|
+
apiVersion: '',
|
|
8553
|
+
},
|
|
8554
|
+
options
|
|
8555
|
+
),
|
|
8556
|
+
params,
|
|
8557
|
+
requiredParams: ['name'],
|
|
8558
|
+
pathParams: ['name'],
|
|
8559
|
+
context: this.context,
|
|
8560
|
+
};
|
|
8561
|
+
if (callback) {
|
|
8562
|
+
createAPIRequest<Schema$Operation>(
|
|
8563
|
+
parameters,
|
|
8564
|
+
callback as BodyResponseCallback<unknown>
|
|
8565
|
+
);
|
|
8566
|
+
} else {
|
|
8567
|
+
return createAPIRequest<Schema$Operation>(parameters);
|
|
8568
|
+
}
|
|
8569
|
+
}
|
|
8570
|
+
|
|
8571
|
+
/**
|
|
8572
|
+
* Creates a new disk migration job in a given Source.
|
|
8573
|
+
* @example
|
|
8574
|
+
* ```js
|
|
8575
|
+
* // Before running the sample:
|
|
8576
|
+
* // - Enable the API at:
|
|
8577
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
8578
|
+
* // - Login into gcloud by running:
|
|
8579
|
+
* // ```sh
|
|
8580
|
+
* // $ gcloud auth application-default login
|
|
8581
|
+
* // ```
|
|
8582
|
+
* // - Install the npm module by running:
|
|
8583
|
+
* // ```sh
|
|
8584
|
+
* // $ npm install googleapis
|
|
8585
|
+
* // ```
|
|
8586
|
+
*
|
|
8587
|
+
* const {google} = require('googleapis');
|
|
8588
|
+
* const vmmigration = google.vmmigration('v1alpha1');
|
|
8589
|
+
*
|
|
8590
|
+
* async function main() {
|
|
8591
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8592
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8593
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8594
|
+
* });
|
|
8595
|
+
*
|
|
8596
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8597
|
+
* const authClient = await auth.getClient();
|
|
8598
|
+
* google.options({auth: authClient});
|
|
8599
|
+
*
|
|
8600
|
+
* // Do the magic
|
|
8601
|
+
* const res =
|
|
8602
|
+
* await vmmigration.projects.locations.sources.diskMigrationJobs.create({
|
|
8603
|
+
* // Required. The DiskMigrationJob identifier. The maximum length of this value is 63 characters. Valid characters are lower case Latin letters, digits and hyphen. It must start with a Latin letter and must not end with a hyphen.
|
|
8604
|
+
* diskMigrationJobId: 'placeholder-value',
|
|
8605
|
+
* // Required. The DiskMigrationJob's parent.
|
|
8606
|
+
* parent: 'projects/my-project/locations/my-location/sources/my-source',
|
|
8607
|
+
* // Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request timed out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
8608
|
+
* requestId: 'placeholder-value',
|
|
8609
|
+
*
|
|
8610
|
+
* // Request body metadata
|
|
8611
|
+
* requestBody: {
|
|
8612
|
+
* // request body parameters
|
|
8613
|
+
* // {
|
|
8614
|
+
* // "awsSourceDiskDetails": {},
|
|
8615
|
+
* // "createTime": "my_createTime",
|
|
8616
|
+
* // "errors": [],
|
|
8617
|
+
* // "name": "my_name",
|
|
8618
|
+
* // "state": "my_state",
|
|
8619
|
+
* // "steps": [],
|
|
8620
|
+
* // "targetDetails": {},
|
|
8621
|
+
* // "updateTime": "my_updateTime"
|
|
8622
|
+
* // }
|
|
8623
|
+
* },
|
|
8624
|
+
* });
|
|
8625
|
+
* console.log(res.data);
|
|
8626
|
+
*
|
|
8627
|
+
* // Example response
|
|
8628
|
+
* // {
|
|
8629
|
+
* // "done": false,
|
|
8630
|
+
* // "error": {},
|
|
8631
|
+
* // "metadata": {},
|
|
8632
|
+
* // "name": "my_name",
|
|
8633
|
+
* // "response": {}
|
|
8634
|
+
* // }
|
|
8635
|
+
* }
|
|
8636
|
+
*
|
|
8637
|
+
* main().catch(e => {
|
|
8638
|
+
* console.error(e);
|
|
8639
|
+
* throw e;
|
|
8640
|
+
* });
|
|
8641
|
+
*
|
|
8642
|
+
* ```
|
|
8643
|
+
*
|
|
8644
|
+
* @param params - Parameters for request
|
|
8645
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8646
|
+
* @param callback - Optional callback that handles the response.
|
|
8647
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8648
|
+
*/
|
|
8649
|
+
create(
|
|
8650
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create,
|
|
8651
|
+
options: StreamMethodOptions
|
|
8652
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
8653
|
+
create(
|
|
8654
|
+
params?: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create,
|
|
8655
|
+
options?: MethodOptions
|
|
8656
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
8657
|
+
create(
|
|
8658
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create,
|
|
8659
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8660
|
+
callback: BodyResponseCallback<Readable>
|
|
8661
|
+
): void;
|
|
8662
|
+
create(
|
|
8663
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create,
|
|
8664
|
+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
|
|
8665
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8666
|
+
): void;
|
|
8667
|
+
create(
|
|
8668
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create,
|
|
8669
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8670
|
+
): void;
|
|
8671
|
+
create(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
8672
|
+
create(
|
|
8673
|
+
paramsOrCallback?:
|
|
8674
|
+
| Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create
|
|
8675
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8676
|
+
| BodyResponseCallback<Readable>,
|
|
8677
|
+
optionsOrCallback?:
|
|
8678
|
+
| MethodOptions
|
|
8679
|
+
| StreamMethodOptions
|
|
8680
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8681
|
+
| BodyResponseCallback<Readable>,
|
|
8682
|
+
callback?:
|
|
8683
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8684
|
+
| BodyResponseCallback<Readable>
|
|
8685
|
+
):
|
|
8686
|
+
| void
|
|
8687
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
8688
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
8689
|
+
let params = (paramsOrCallback ||
|
|
8690
|
+
{}) as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create;
|
|
8691
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8692
|
+
|
|
8693
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8694
|
+
callback = paramsOrCallback;
|
|
8695
|
+
params =
|
|
8696
|
+
{} as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create;
|
|
8697
|
+
options = {};
|
|
8698
|
+
}
|
|
8699
|
+
|
|
8700
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8701
|
+
callback = optionsOrCallback;
|
|
8702
|
+
options = {};
|
|
8703
|
+
}
|
|
8704
|
+
|
|
8705
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
8706
|
+
const parameters = {
|
|
8707
|
+
options: Object.assign(
|
|
8708
|
+
{
|
|
8709
|
+
url: (rootUrl + '/v1alpha1/{+parent}/diskMigrationJobs').replace(
|
|
8710
|
+
/([^:]\/)\/+/g,
|
|
8711
|
+
'$1'
|
|
8712
|
+
),
|
|
8713
|
+
method: 'POST',
|
|
8714
|
+
apiVersion: '',
|
|
8715
|
+
},
|
|
8716
|
+
options
|
|
8717
|
+
),
|
|
8718
|
+
params,
|
|
8719
|
+
requiredParams: ['parent'],
|
|
8720
|
+
pathParams: ['parent'],
|
|
8721
|
+
context: this.context,
|
|
8722
|
+
};
|
|
8723
|
+
if (callback) {
|
|
8724
|
+
createAPIRequest<Schema$Operation>(
|
|
8725
|
+
parameters,
|
|
8726
|
+
callback as BodyResponseCallback<unknown>
|
|
8727
|
+
);
|
|
8728
|
+
} else {
|
|
8729
|
+
return createAPIRequest<Schema$Operation>(parameters);
|
|
8730
|
+
}
|
|
8731
|
+
}
|
|
8732
|
+
|
|
8733
|
+
/**
|
|
8734
|
+
* Deletes a single DiskMigrationJob.
|
|
8735
|
+
* @example
|
|
8736
|
+
* ```js
|
|
8737
|
+
* // Before running the sample:
|
|
8738
|
+
* // - Enable the API at:
|
|
8739
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
8740
|
+
* // - Login into gcloud by running:
|
|
8741
|
+
* // ```sh
|
|
8742
|
+
* // $ gcloud auth application-default login
|
|
8743
|
+
* // ```
|
|
8744
|
+
* // - Install the npm module by running:
|
|
8745
|
+
* // ```sh
|
|
8746
|
+
* // $ npm install googleapis
|
|
8747
|
+
* // ```
|
|
8748
|
+
*
|
|
8749
|
+
* const {google} = require('googleapis');
|
|
8750
|
+
* const vmmigration = google.vmmigration('v1alpha1');
|
|
8751
|
+
*
|
|
8752
|
+
* async function main() {
|
|
8753
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8754
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8755
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8756
|
+
* });
|
|
8757
|
+
*
|
|
8758
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8759
|
+
* const authClient = await auth.getClient();
|
|
8760
|
+
* google.options({auth: authClient});
|
|
8761
|
+
*
|
|
8762
|
+
* // Do the magic
|
|
8763
|
+
* const res =
|
|
8764
|
+
* await vmmigration.projects.locations.sources.diskMigrationJobs.delete({
|
|
8765
|
+
* // Required. The name of the DiskMigrationJob.
|
|
8766
|
+
* name: 'projects/my-project/locations/my-location/sources/my-source/diskMigrationJobs/my-diskMigrationJob',
|
|
8767
|
+
* });
|
|
8768
|
+
* console.log(res.data);
|
|
8769
|
+
*
|
|
8770
|
+
* // Example response
|
|
8771
|
+
* // {
|
|
8772
|
+
* // "done": false,
|
|
8773
|
+
* // "error": {},
|
|
8774
|
+
* // "metadata": {},
|
|
8775
|
+
* // "name": "my_name",
|
|
8776
|
+
* // "response": {}
|
|
8777
|
+
* // }
|
|
8778
|
+
* }
|
|
8779
|
+
*
|
|
8780
|
+
* main().catch(e => {
|
|
8781
|
+
* console.error(e);
|
|
8782
|
+
* throw e;
|
|
8783
|
+
* });
|
|
8784
|
+
*
|
|
8785
|
+
* ```
|
|
8786
|
+
*
|
|
8787
|
+
* @param params - Parameters for request
|
|
8788
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8789
|
+
* @param callback - Optional callback that handles the response.
|
|
8790
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8791
|
+
*/
|
|
8792
|
+
delete(
|
|
8793
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete,
|
|
8794
|
+
options: StreamMethodOptions
|
|
8795
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
8796
|
+
delete(
|
|
8797
|
+
params?: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete,
|
|
8798
|
+
options?: MethodOptions
|
|
8799
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
8800
|
+
delete(
|
|
8801
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete,
|
|
8802
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8803
|
+
callback: BodyResponseCallback<Readable>
|
|
8804
|
+
): void;
|
|
8805
|
+
delete(
|
|
8806
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete,
|
|
8807
|
+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
|
|
8808
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8809
|
+
): void;
|
|
8810
|
+
delete(
|
|
8811
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete,
|
|
8812
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8813
|
+
): void;
|
|
8814
|
+
delete(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
8815
|
+
delete(
|
|
8816
|
+
paramsOrCallback?:
|
|
8817
|
+
| Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete
|
|
8818
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8819
|
+
| BodyResponseCallback<Readable>,
|
|
8820
|
+
optionsOrCallback?:
|
|
8821
|
+
| MethodOptions
|
|
8822
|
+
| StreamMethodOptions
|
|
8823
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8824
|
+
| BodyResponseCallback<Readable>,
|
|
8825
|
+
callback?:
|
|
8826
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8827
|
+
| BodyResponseCallback<Readable>
|
|
8828
|
+
):
|
|
8829
|
+
| void
|
|
8830
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
8831
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
8832
|
+
let params = (paramsOrCallback ||
|
|
8833
|
+
{}) as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete;
|
|
8834
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8835
|
+
|
|
8836
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8837
|
+
callback = paramsOrCallback;
|
|
8838
|
+
params =
|
|
8839
|
+
{} as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete;
|
|
8840
|
+
options = {};
|
|
8841
|
+
}
|
|
8842
|
+
|
|
8843
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8844
|
+
callback = optionsOrCallback;
|
|
8845
|
+
options = {};
|
|
8846
|
+
}
|
|
8847
|
+
|
|
8848
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
8849
|
+
const parameters = {
|
|
8850
|
+
options: Object.assign(
|
|
8851
|
+
{
|
|
8852
|
+
url: (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
8853
|
+
method: 'DELETE',
|
|
8854
|
+
apiVersion: '',
|
|
8855
|
+
},
|
|
8856
|
+
options
|
|
8857
|
+
),
|
|
8858
|
+
params,
|
|
8859
|
+
requiredParams: ['name'],
|
|
8860
|
+
pathParams: ['name'],
|
|
8861
|
+
context: this.context,
|
|
8862
|
+
};
|
|
8863
|
+
if (callback) {
|
|
8864
|
+
createAPIRequest<Schema$Operation>(
|
|
8865
|
+
parameters,
|
|
8866
|
+
callback as BodyResponseCallback<unknown>
|
|
8867
|
+
);
|
|
8868
|
+
} else {
|
|
8869
|
+
return createAPIRequest<Schema$Operation>(parameters);
|
|
8870
|
+
}
|
|
8871
|
+
}
|
|
8872
|
+
|
|
8873
|
+
/**
|
|
8874
|
+
* Gets details of a single DiskMigrationJob.
|
|
8875
|
+
* @example
|
|
8876
|
+
* ```js
|
|
8877
|
+
* // Before running the sample:
|
|
8878
|
+
* // - Enable the API at:
|
|
8879
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
8880
|
+
* // - Login into gcloud by running:
|
|
8881
|
+
* // ```sh
|
|
8882
|
+
* // $ gcloud auth application-default login
|
|
8883
|
+
* // ```
|
|
8884
|
+
* // - Install the npm module by running:
|
|
8885
|
+
* // ```sh
|
|
8886
|
+
* // $ npm install googleapis
|
|
8887
|
+
* // ```
|
|
8888
|
+
*
|
|
8889
|
+
* const {google} = require('googleapis');
|
|
8890
|
+
* const vmmigration = google.vmmigration('v1alpha1');
|
|
8891
|
+
*
|
|
8892
|
+
* async function main() {
|
|
8893
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8894
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8895
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8896
|
+
* });
|
|
8897
|
+
*
|
|
8898
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8899
|
+
* const authClient = await auth.getClient();
|
|
8900
|
+
* google.options({auth: authClient});
|
|
8901
|
+
*
|
|
8902
|
+
* // Do the magic
|
|
8903
|
+
* const res =
|
|
8904
|
+
* await vmmigration.projects.locations.sources.diskMigrationJobs.get({
|
|
8905
|
+
* // Required. The name of the DiskMigrationJob.
|
|
8906
|
+
* name: 'projects/my-project/locations/my-location/sources/my-source/diskMigrationJobs/my-diskMigrationJob',
|
|
8907
|
+
* });
|
|
8908
|
+
* console.log(res.data);
|
|
8909
|
+
*
|
|
8910
|
+
* // Example response
|
|
8911
|
+
* // {
|
|
8912
|
+
* // "awsSourceDiskDetails": {},
|
|
8913
|
+
* // "createTime": "my_createTime",
|
|
8914
|
+
* // "errors": [],
|
|
8915
|
+
* // "name": "my_name",
|
|
8916
|
+
* // "state": "my_state",
|
|
8917
|
+
* // "steps": [],
|
|
8918
|
+
* // "targetDetails": {},
|
|
8919
|
+
* // "updateTime": "my_updateTime"
|
|
8920
|
+
* // }
|
|
8921
|
+
* }
|
|
8922
|
+
*
|
|
8923
|
+
* main().catch(e => {
|
|
8924
|
+
* console.error(e);
|
|
8925
|
+
* throw e;
|
|
8926
|
+
* });
|
|
8927
|
+
*
|
|
8928
|
+
* ```
|
|
8929
|
+
*
|
|
8930
|
+
* @param params - Parameters for request
|
|
8931
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8932
|
+
* @param callback - Optional callback that handles the response.
|
|
8933
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8934
|
+
*/
|
|
8935
|
+
get(
|
|
8936
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get,
|
|
8937
|
+
options: StreamMethodOptions
|
|
8938
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
8939
|
+
get(
|
|
8940
|
+
params?: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get,
|
|
8941
|
+
options?: MethodOptions
|
|
8942
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$DiskMigrationJob>>;
|
|
8943
|
+
get(
|
|
8944
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get,
|
|
8945
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8946
|
+
callback: BodyResponseCallback<Readable>
|
|
8947
|
+
): void;
|
|
8948
|
+
get(
|
|
8949
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get,
|
|
8950
|
+
options: MethodOptions | BodyResponseCallback<Schema$DiskMigrationJob>,
|
|
8951
|
+
callback: BodyResponseCallback<Schema$DiskMigrationJob>
|
|
8952
|
+
): void;
|
|
8953
|
+
get(
|
|
8954
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get,
|
|
8955
|
+
callback: BodyResponseCallback<Schema$DiskMigrationJob>
|
|
8956
|
+
): void;
|
|
8957
|
+
get(callback: BodyResponseCallback<Schema$DiskMigrationJob>): void;
|
|
8958
|
+
get(
|
|
8959
|
+
paramsOrCallback?:
|
|
8960
|
+
| Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get
|
|
8961
|
+
| BodyResponseCallback<Schema$DiskMigrationJob>
|
|
8962
|
+
| BodyResponseCallback<Readable>,
|
|
8963
|
+
optionsOrCallback?:
|
|
8964
|
+
| MethodOptions
|
|
8965
|
+
| StreamMethodOptions
|
|
8966
|
+
| BodyResponseCallback<Schema$DiskMigrationJob>
|
|
8967
|
+
| BodyResponseCallback<Readable>,
|
|
8968
|
+
callback?:
|
|
8969
|
+
| BodyResponseCallback<Schema$DiskMigrationJob>
|
|
8970
|
+
| BodyResponseCallback<Readable>
|
|
8971
|
+
):
|
|
8972
|
+
| void
|
|
8973
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$DiskMigrationJob>>
|
|
8974
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
8975
|
+
let params = (paramsOrCallback ||
|
|
8976
|
+
{}) as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get;
|
|
8977
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8978
|
+
|
|
8979
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8980
|
+
callback = paramsOrCallback;
|
|
8981
|
+
params =
|
|
8982
|
+
{} as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get;
|
|
8983
|
+
options = {};
|
|
8984
|
+
}
|
|
8985
|
+
|
|
8986
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8987
|
+
callback = optionsOrCallback;
|
|
8988
|
+
options = {};
|
|
8989
|
+
}
|
|
8990
|
+
|
|
8991
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
8992
|
+
const parameters = {
|
|
8993
|
+
options: Object.assign(
|
|
8994
|
+
{
|
|
8995
|
+
url: (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
8996
|
+
method: 'GET',
|
|
8997
|
+
apiVersion: '',
|
|
8998
|
+
},
|
|
8999
|
+
options
|
|
9000
|
+
),
|
|
9001
|
+
params,
|
|
9002
|
+
requiredParams: ['name'],
|
|
9003
|
+
pathParams: ['name'],
|
|
9004
|
+
context: this.context,
|
|
9005
|
+
};
|
|
9006
|
+
if (callback) {
|
|
9007
|
+
createAPIRequest<Schema$DiskMigrationJob>(
|
|
9008
|
+
parameters,
|
|
9009
|
+
callback as BodyResponseCallback<unknown>
|
|
9010
|
+
);
|
|
9011
|
+
} else {
|
|
9012
|
+
return createAPIRequest<Schema$DiskMigrationJob>(parameters);
|
|
9013
|
+
}
|
|
9014
|
+
}
|
|
9015
|
+
|
|
9016
|
+
/**
|
|
9017
|
+
* Lists DiskMigrationJobs in a given Source.
|
|
9018
|
+
* @example
|
|
9019
|
+
* ```js
|
|
9020
|
+
* // Before running the sample:
|
|
9021
|
+
* // - Enable the API at:
|
|
9022
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
9023
|
+
* // - Login into gcloud by running:
|
|
9024
|
+
* // ```sh
|
|
9025
|
+
* // $ gcloud auth application-default login
|
|
9026
|
+
* // ```
|
|
9027
|
+
* // - Install the npm module by running:
|
|
9028
|
+
* // ```sh
|
|
9029
|
+
* // $ npm install googleapis
|
|
9030
|
+
* // ```
|
|
9031
|
+
*
|
|
9032
|
+
* const {google} = require('googleapis');
|
|
9033
|
+
* const vmmigration = google.vmmigration('v1alpha1');
|
|
9034
|
+
*
|
|
9035
|
+
* async function main() {
|
|
9036
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9037
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9038
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9039
|
+
* });
|
|
9040
|
+
*
|
|
9041
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9042
|
+
* const authClient = await auth.getClient();
|
|
9043
|
+
* google.options({auth: authClient});
|
|
9044
|
+
*
|
|
9045
|
+
* // Do the magic
|
|
9046
|
+
* const res =
|
|
9047
|
+
* await vmmigration.projects.locations.sources.diskMigrationJobs.list({
|
|
9048
|
+
* // Optional. The filter request (according to AIP-160).
|
|
9049
|
+
* filter: 'placeholder-value',
|
|
9050
|
+
* // Optional. Ordering of the result list.
|
|
9051
|
+
* orderBy: 'placeholder-value',
|
|
9052
|
+
* // Optional. The maximum number of disk migration jobs to return. The service may return fewer than this value. If unspecified, at most 500 disk migration jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
9053
|
+
* pageSize: 'placeholder-value',
|
|
9054
|
+
* // Optional. A page token, received from a previous `ListDiskMigrationJobs` call. Provide this to retrieve the subsequent page. When paginating, all parameters provided to `ListDiskMigrationJobs` except `page_size` must match the call that provided the page token.
|
|
9055
|
+
* pageToken: 'placeholder-value',
|
|
9056
|
+
* // Required. The parent, which owns this collection of DiskMigrationJobs.
|
|
9057
|
+
* parent: 'projects/my-project/locations/my-location/sources/my-source',
|
|
9058
|
+
* });
|
|
9059
|
+
* console.log(res.data);
|
|
9060
|
+
*
|
|
9061
|
+
* // Example response
|
|
9062
|
+
* // {
|
|
9063
|
+
* // "diskMigrationJobs": [],
|
|
9064
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
9065
|
+
* // "unreachable": []
|
|
9066
|
+
* // }
|
|
9067
|
+
* }
|
|
9068
|
+
*
|
|
9069
|
+
* main().catch(e => {
|
|
9070
|
+
* console.error(e);
|
|
9071
|
+
* throw e;
|
|
9072
|
+
* });
|
|
9073
|
+
*
|
|
9074
|
+
* ```
|
|
9075
|
+
*
|
|
9076
|
+
* @param params - Parameters for request
|
|
9077
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
9078
|
+
* @param callback - Optional callback that handles the response.
|
|
9079
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
9080
|
+
*/
|
|
9081
|
+
list(
|
|
9082
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List,
|
|
9083
|
+
options: StreamMethodOptions
|
|
9084
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
9085
|
+
list(
|
|
9086
|
+
params?: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List,
|
|
9087
|
+
options?: MethodOptions
|
|
9088
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListDiskMigrationJobsResponse>>;
|
|
9089
|
+
list(
|
|
9090
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List,
|
|
9091
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
9092
|
+
callback: BodyResponseCallback<Readable>
|
|
9093
|
+
): void;
|
|
9094
|
+
list(
|
|
9095
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List,
|
|
9096
|
+
options:
|
|
9097
|
+
| MethodOptions
|
|
9098
|
+
| BodyResponseCallback<Schema$ListDiskMigrationJobsResponse>,
|
|
9099
|
+
callback: BodyResponseCallback<Schema$ListDiskMigrationJobsResponse>
|
|
9100
|
+
): void;
|
|
9101
|
+
list(
|
|
9102
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List,
|
|
9103
|
+
callback: BodyResponseCallback<Schema$ListDiskMigrationJobsResponse>
|
|
9104
|
+
): void;
|
|
9105
|
+
list(
|
|
9106
|
+
callback: BodyResponseCallback<Schema$ListDiskMigrationJobsResponse>
|
|
9107
|
+
): void;
|
|
9108
|
+
list(
|
|
9109
|
+
paramsOrCallback?:
|
|
9110
|
+
| Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List
|
|
9111
|
+
| BodyResponseCallback<Schema$ListDiskMigrationJobsResponse>
|
|
9112
|
+
| BodyResponseCallback<Readable>,
|
|
9113
|
+
optionsOrCallback?:
|
|
9114
|
+
| MethodOptions
|
|
9115
|
+
| StreamMethodOptions
|
|
9116
|
+
| BodyResponseCallback<Schema$ListDiskMigrationJobsResponse>
|
|
9117
|
+
| BodyResponseCallback<Readable>,
|
|
9118
|
+
callback?:
|
|
9119
|
+
| BodyResponseCallback<Schema$ListDiskMigrationJobsResponse>
|
|
9120
|
+
| BodyResponseCallback<Readable>
|
|
9121
|
+
):
|
|
9122
|
+
| void
|
|
9123
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListDiskMigrationJobsResponse>>
|
|
9124
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
9125
|
+
let params = (paramsOrCallback ||
|
|
9126
|
+
{}) as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List;
|
|
9127
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
9128
|
+
|
|
9129
|
+
if (typeof paramsOrCallback === 'function') {
|
|
9130
|
+
callback = paramsOrCallback;
|
|
9131
|
+
params =
|
|
9132
|
+
{} as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List;
|
|
9133
|
+
options = {};
|
|
9134
|
+
}
|
|
9135
|
+
|
|
9136
|
+
if (typeof optionsOrCallback === 'function') {
|
|
9137
|
+
callback = optionsOrCallback;
|
|
9138
|
+
options = {};
|
|
9139
|
+
}
|
|
9140
|
+
|
|
9141
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
9142
|
+
const parameters = {
|
|
9143
|
+
options: Object.assign(
|
|
9144
|
+
{
|
|
9145
|
+
url: (rootUrl + '/v1alpha1/{+parent}/diskMigrationJobs').replace(
|
|
9146
|
+
/([^:]\/)\/+/g,
|
|
9147
|
+
'$1'
|
|
9148
|
+
),
|
|
9149
|
+
method: 'GET',
|
|
9150
|
+
apiVersion: '',
|
|
9151
|
+
},
|
|
9152
|
+
options
|
|
9153
|
+
),
|
|
9154
|
+
params,
|
|
9155
|
+
requiredParams: ['parent'],
|
|
9156
|
+
pathParams: ['parent'],
|
|
9157
|
+
context: this.context,
|
|
9158
|
+
};
|
|
9159
|
+
if (callback) {
|
|
9160
|
+
createAPIRequest<Schema$ListDiskMigrationJobsResponse>(
|
|
9161
|
+
parameters,
|
|
9162
|
+
callback as BodyResponseCallback<unknown>
|
|
9163
|
+
);
|
|
9164
|
+
} else {
|
|
9165
|
+
return createAPIRequest<Schema$ListDiskMigrationJobsResponse>(
|
|
9166
|
+
parameters
|
|
9167
|
+
);
|
|
9168
|
+
}
|
|
9169
|
+
}
|
|
9170
|
+
|
|
9171
|
+
/**
|
|
9172
|
+
* Updates the parameters of a single DiskMigrationJob.
|
|
9173
|
+
* @example
|
|
9174
|
+
* ```js
|
|
9175
|
+
* // Before running the sample:
|
|
9176
|
+
* // - Enable the API at:
|
|
9177
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
9178
|
+
* // - Login into gcloud by running:
|
|
9179
|
+
* // ```sh
|
|
9180
|
+
* // $ gcloud auth application-default login
|
|
9181
|
+
* // ```
|
|
9182
|
+
* // - Install the npm module by running:
|
|
9183
|
+
* // ```sh
|
|
9184
|
+
* // $ npm install googleapis
|
|
9185
|
+
* // ```
|
|
9186
|
+
*
|
|
9187
|
+
* const {google} = require('googleapis');
|
|
9188
|
+
* const vmmigration = google.vmmigration('v1alpha1');
|
|
9189
|
+
*
|
|
9190
|
+
* async function main() {
|
|
9191
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9192
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9193
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9194
|
+
* });
|
|
9195
|
+
*
|
|
9196
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9197
|
+
* const authClient = await auth.getClient();
|
|
9198
|
+
* google.options({auth: authClient});
|
|
9199
|
+
*
|
|
9200
|
+
* // Do the magic
|
|
9201
|
+
* const res =
|
|
9202
|
+
* await vmmigration.projects.locations.sources.diskMigrationJobs.patch({
|
|
9203
|
+
* // Output only. Identifier. The identifier of the DiskMigrationJob.
|
|
9204
|
+
* name: 'projects/my-project/locations/my-location/sources/my-source/diskMigrationJobs/my-diskMigrationJob',
|
|
9205
|
+
* // Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request timed out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
9206
|
+
* requestId: 'placeholder-value',
|
|
9207
|
+
* // Optional. Field mask is used to specify the fields to be overwritten in the DiskMigrationJob resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask, then a mask equivalent to all fields that are populated (have a non-empty value), will be implied.
|
|
9208
|
+
* updateMask: 'placeholder-value',
|
|
9209
|
+
*
|
|
9210
|
+
* // Request body metadata
|
|
9211
|
+
* requestBody: {
|
|
9212
|
+
* // request body parameters
|
|
9213
|
+
* // {
|
|
9214
|
+
* // "awsSourceDiskDetails": {},
|
|
9215
|
+
* // "createTime": "my_createTime",
|
|
9216
|
+
* // "errors": [],
|
|
9217
|
+
* // "name": "my_name",
|
|
9218
|
+
* // "state": "my_state",
|
|
9219
|
+
* // "steps": [],
|
|
9220
|
+
* // "targetDetails": {},
|
|
9221
|
+
* // "updateTime": "my_updateTime"
|
|
9222
|
+
* // }
|
|
9223
|
+
* },
|
|
9224
|
+
* });
|
|
9225
|
+
* console.log(res.data);
|
|
9226
|
+
*
|
|
9227
|
+
* // Example response
|
|
9228
|
+
* // {
|
|
9229
|
+
* // "done": false,
|
|
9230
|
+
* // "error": {},
|
|
9231
|
+
* // "metadata": {},
|
|
9232
|
+
* // "name": "my_name",
|
|
9233
|
+
* // "response": {}
|
|
9234
|
+
* // }
|
|
9235
|
+
* }
|
|
9236
|
+
*
|
|
9237
|
+
* main().catch(e => {
|
|
9238
|
+
* console.error(e);
|
|
9239
|
+
* throw e;
|
|
9240
|
+
* });
|
|
9241
|
+
*
|
|
9242
|
+
* ```
|
|
9243
|
+
*
|
|
9244
|
+
* @param params - Parameters for request
|
|
9245
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
9246
|
+
* @param callback - Optional callback that handles the response.
|
|
9247
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
9248
|
+
*/
|
|
9249
|
+
patch(
|
|
9250
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch,
|
|
9251
|
+
options: StreamMethodOptions
|
|
9252
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
9253
|
+
patch(
|
|
9254
|
+
params?: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch,
|
|
9255
|
+
options?: MethodOptions
|
|
9256
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
9257
|
+
patch(
|
|
9258
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch,
|
|
9259
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
9260
|
+
callback: BodyResponseCallback<Readable>
|
|
9261
|
+
): void;
|
|
9262
|
+
patch(
|
|
9263
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch,
|
|
9264
|
+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
|
|
9265
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
9266
|
+
): void;
|
|
9267
|
+
patch(
|
|
9268
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch,
|
|
9269
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
9270
|
+
): void;
|
|
9271
|
+
patch(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
9272
|
+
patch(
|
|
9273
|
+
paramsOrCallback?:
|
|
9274
|
+
| Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch
|
|
9275
|
+
| BodyResponseCallback<Schema$Operation>
|
|
9276
|
+
| BodyResponseCallback<Readable>,
|
|
9277
|
+
optionsOrCallback?:
|
|
9278
|
+
| MethodOptions
|
|
9279
|
+
| StreamMethodOptions
|
|
9280
|
+
| BodyResponseCallback<Schema$Operation>
|
|
9281
|
+
| BodyResponseCallback<Readable>,
|
|
9282
|
+
callback?:
|
|
9283
|
+
| BodyResponseCallback<Schema$Operation>
|
|
9284
|
+
| BodyResponseCallback<Readable>
|
|
9285
|
+
):
|
|
9286
|
+
| void
|
|
9287
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
9288
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
9289
|
+
let params = (paramsOrCallback ||
|
|
9290
|
+
{}) as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch;
|
|
9291
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
9292
|
+
|
|
9293
|
+
if (typeof paramsOrCallback === 'function') {
|
|
9294
|
+
callback = paramsOrCallback;
|
|
9295
|
+
params =
|
|
9296
|
+
{} as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch;
|
|
9297
|
+
options = {};
|
|
9298
|
+
}
|
|
9299
|
+
|
|
9300
|
+
if (typeof optionsOrCallback === 'function') {
|
|
9301
|
+
callback = optionsOrCallback;
|
|
9302
|
+
options = {};
|
|
9303
|
+
}
|
|
9304
|
+
|
|
9305
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
9306
|
+
const parameters = {
|
|
9307
|
+
options: Object.assign(
|
|
9308
|
+
{
|
|
9309
|
+
url: (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
9310
|
+
method: 'PATCH',
|
|
9311
|
+
apiVersion: '',
|
|
9312
|
+
},
|
|
9313
|
+
options
|
|
9314
|
+
),
|
|
9315
|
+
params,
|
|
9316
|
+
requiredParams: ['name'],
|
|
9317
|
+
pathParams: ['name'],
|
|
9318
|
+
context: this.context,
|
|
9319
|
+
};
|
|
9320
|
+
if (callback) {
|
|
9321
|
+
createAPIRequest<Schema$Operation>(
|
|
9322
|
+
parameters,
|
|
9323
|
+
callback as BodyResponseCallback<unknown>
|
|
9324
|
+
);
|
|
9325
|
+
} else {
|
|
9326
|
+
return createAPIRequest<Schema$Operation>(parameters);
|
|
9327
|
+
}
|
|
9328
|
+
}
|
|
9329
|
+
|
|
9330
|
+
/**
|
|
9331
|
+
* Runs the disk migration job.
|
|
9332
|
+
* @example
|
|
9333
|
+
* ```js
|
|
9334
|
+
* // Before running the sample:
|
|
9335
|
+
* // - Enable the API at:
|
|
9336
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
9337
|
+
* // - Login into gcloud by running:
|
|
9338
|
+
* // ```sh
|
|
9339
|
+
* // $ gcloud auth application-default login
|
|
9340
|
+
* // ```
|
|
9341
|
+
* // - Install the npm module by running:
|
|
9342
|
+
* // ```sh
|
|
9343
|
+
* // $ npm install googleapis
|
|
9344
|
+
* // ```
|
|
9345
|
+
*
|
|
9346
|
+
* const {google} = require('googleapis');
|
|
9347
|
+
* const vmmigration = google.vmmigration('v1alpha1');
|
|
9348
|
+
*
|
|
9349
|
+
* async function main() {
|
|
9350
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9351
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9352
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9353
|
+
* });
|
|
9354
|
+
*
|
|
9355
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9356
|
+
* const authClient = await auth.getClient();
|
|
9357
|
+
* google.options({auth: authClient});
|
|
9358
|
+
*
|
|
9359
|
+
* // Do the magic
|
|
9360
|
+
* const res =
|
|
9361
|
+
* await vmmigration.projects.locations.sources.diskMigrationJobs.run({
|
|
9362
|
+
* // Required. The name of the DiskMigrationJob.
|
|
9363
|
+
* name: 'projects/my-project/locations/my-location/sources/my-source/diskMigrationJobs/my-diskMigrationJob',
|
|
9364
|
+
*
|
|
9365
|
+
* // Request body metadata
|
|
9366
|
+
* requestBody: {
|
|
9367
|
+
* // request body parameters
|
|
9368
|
+
* // {}
|
|
9369
|
+
* },
|
|
9370
|
+
* });
|
|
9371
|
+
* console.log(res.data);
|
|
9372
|
+
*
|
|
9373
|
+
* // Example response
|
|
9374
|
+
* // {
|
|
9375
|
+
* // "done": false,
|
|
9376
|
+
* // "error": {},
|
|
9377
|
+
* // "metadata": {},
|
|
9378
|
+
* // "name": "my_name",
|
|
9379
|
+
* // "response": {}
|
|
9380
|
+
* // }
|
|
9381
|
+
* }
|
|
9382
|
+
*
|
|
9383
|
+
* main().catch(e => {
|
|
9384
|
+
* console.error(e);
|
|
9385
|
+
* throw e;
|
|
9386
|
+
* });
|
|
9387
|
+
*
|
|
9388
|
+
* ```
|
|
9389
|
+
*
|
|
9390
|
+
* @param params - Parameters for request
|
|
9391
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
9392
|
+
* @param callback - Optional callback that handles the response.
|
|
9393
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
9394
|
+
*/
|
|
9395
|
+
run(
|
|
9396
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run,
|
|
9397
|
+
options: StreamMethodOptions
|
|
9398
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
9399
|
+
run(
|
|
9400
|
+
params?: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run,
|
|
9401
|
+
options?: MethodOptions
|
|
9402
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
9403
|
+
run(
|
|
9404
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run,
|
|
9405
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
9406
|
+
callback: BodyResponseCallback<Readable>
|
|
9407
|
+
): void;
|
|
9408
|
+
run(
|
|
9409
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run,
|
|
9410
|
+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
|
|
9411
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
9412
|
+
): void;
|
|
9413
|
+
run(
|
|
9414
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run,
|
|
9415
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
9416
|
+
): void;
|
|
9417
|
+
run(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
9418
|
+
run(
|
|
9419
|
+
paramsOrCallback?:
|
|
9420
|
+
| Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run
|
|
9421
|
+
| BodyResponseCallback<Schema$Operation>
|
|
9422
|
+
| BodyResponseCallback<Readable>,
|
|
9423
|
+
optionsOrCallback?:
|
|
9424
|
+
| MethodOptions
|
|
9425
|
+
| StreamMethodOptions
|
|
9426
|
+
| BodyResponseCallback<Schema$Operation>
|
|
9427
|
+
| BodyResponseCallback<Readable>,
|
|
9428
|
+
callback?:
|
|
9429
|
+
| BodyResponseCallback<Schema$Operation>
|
|
9430
|
+
| BodyResponseCallback<Readable>
|
|
9431
|
+
):
|
|
9432
|
+
| void
|
|
9433
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
9434
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
9435
|
+
let params = (paramsOrCallback ||
|
|
9436
|
+
{}) as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run;
|
|
9437
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
9438
|
+
|
|
9439
|
+
if (typeof paramsOrCallback === 'function') {
|
|
9440
|
+
callback = paramsOrCallback;
|
|
9441
|
+
params =
|
|
9442
|
+
{} as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run;
|
|
9443
|
+
options = {};
|
|
9444
|
+
}
|
|
9445
|
+
|
|
9446
|
+
if (typeof optionsOrCallback === 'function') {
|
|
9447
|
+
callback = optionsOrCallback;
|
|
9448
|
+
options = {};
|
|
9449
|
+
}
|
|
9450
|
+
|
|
9451
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
9452
|
+
const parameters = {
|
|
9453
|
+
options: Object.assign(
|
|
9454
|
+
{
|
|
9455
|
+
url: (rootUrl + '/v1alpha1/{+name}:run').replace(
|
|
9456
|
+
/([^:]\/)\/+/g,
|
|
9457
|
+
'$1'
|
|
9458
|
+
),
|
|
9459
|
+
method: 'POST',
|
|
9460
|
+
apiVersion: '',
|
|
9461
|
+
},
|
|
9462
|
+
options
|
|
9463
|
+
),
|
|
9464
|
+
params,
|
|
9465
|
+
requiredParams: ['name'],
|
|
9466
|
+
pathParams: ['name'],
|
|
9467
|
+
context: this.context,
|
|
9468
|
+
};
|
|
9469
|
+
if (callback) {
|
|
9470
|
+
createAPIRequest<Schema$Operation>(
|
|
9471
|
+
parameters,
|
|
9472
|
+
callback as BodyResponseCallback<unknown>
|
|
9473
|
+
);
|
|
9474
|
+
} else {
|
|
9475
|
+
return createAPIRequest<Schema$Operation>(parameters);
|
|
9476
|
+
}
|
|
9477
|
+
}
|
|
9478
|
+
}
|
|
9479
|
+
|
|
9480
|
+
export interface Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel
|
|
9481
|
+
extends StandardParameters {
|
|
9482
|
+
/**
|
|
9483
|
+
* Required. The name of the DiskMigrationJob.
|
|
9484
|
+
*/
|
|
9485
|
+
name?: string;
|
|
9486
|
+
|
|
9487
|
+
/**
|
|
9488
|
+
* Request body metadata
|
|
9489
|
+
*/
|
|
9490
|
+
requestBody?: Schema$CancelDiskMigrationJobRequest;
|
|
9491
|
+
}
|
|
9492
|
+
export interface Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create
|
|
9493
|
+
extends StandardParameters {
|
|
9494
|
+
/**
|
|
9495
|
+
* Required. The DiskMigrationJob identifier. The maximum length of this value is 63 characters. Valid characters are lower case Latin letters, digits and hyphen. It must start with a Latin letter and must not end with a hyphen.
|
|
9496
|
+
*/
|
|
9497
|
+
diskMigrationJobId?: string;
|
|
9498
|
+
/**
|
|
9499
|
+
* Required. The DiskMigrationJob's parent.
|
|
9500
|
+
*/
|
|
9501
|
+
parent?: string;
|
|
9502
|
+
/**
|
|
9503
|
+
* Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request timed out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
9504
|
+
*/
|
|
9505
|
+
requestId?: string;
|
|
9506
|
+
|
|
9507
|
+
/**
|
|
9508
|
+
* Request body metadata
|
|
9509
|
+
*/
|
|
9510
|
+
requestBody?: Schema$DiskMigrationJob;
|
|
9511
|
+
}
|
|
9512
|
+
export interface Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete
|
|
9513
|
+
extends StandardParameters {
|
|
9514
|
+
/**
|
|
9515
|
+
* Required. The name of the DiskMigrationJob.
|
|
9516
|
+
*/
|
|
9517
|
+
name?: string;
|
|
9518
|
+
}
|
|
9519
|
+
export interface Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get
|
|
9520
|
+
extends StandardParameters {
|
|
9521
|
+
/**
|
|
9522
|
+
* Required. The name of the DiskMigrationJob.
|
|
9523
|
+
*/
|
|
9524
|
+
name?: string;
|
|
9525
|
+
}
|
|
9526
|
+
export interface Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List
|
|
9527
|
+
extends StandardParameters {
|
|
9528
|
+
/**
|
|
9529
|
+
* Optional. The filter request (according to AIP-160).
|
|
9530
|
+
*/
|
|
9531
|
+
filter?: string;
|
|
9532
|
+
/**
|
|
9533
|
+
* Optional. Ordering of the result list.
|
|
9534
|
+
*/
|
|
9535
|
+
orderBy?: string;
|
|
9536
|
+
/**
|
|
9537
|
+
* Optional. The maximum number of disk migration jobs to return. The service may return fewer than this value. If unspecified, at most 500 disk migration jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
9538
|
+
*/
|
|
9539
|
+
pageSize?: number;
|
|
9540
|
+
/**
|
|
9541
|
+
* Optional. A page token, received from a previous `ListDiskMigrationJobs` call. Provide this to retrieve the subsequent page. When paginating, all parameters provided to `ListDiskMigrationJobs` except `page_size` must match the call that provided the page token.
|
|
9542
|
+
*/
|
|
9543
|
+
pageToken?: string;
|
|
9544
|
+
/**
|
|
9545
|
+
* Required. The parent, which owns this collection of DiskMigrationJobs.
|
|
9546
|
+
*/
|
|
9547
|
+
parent?: string;
|
|
9548
|
+
}
|
|
9549
|
+
export interface Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch
|
|
9550
|
+
extends StandardParameters {
|
|
9551
|
+
/**
|
|
9552
|
+
* Output only. Identifier. The identifier of the DiskMigrationJob.
|
|
9553
|
+
*/
|
|
9554
|
+
name?: string;
|
|
9555
|
+
/**
|
|
9556
|
+
* Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request timed out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
9557
|
+
*/
|
|
9558
|
+
requestId?: string;
|
|
9559
|
+
/**
|
|
9560
|
+
* Optional. Field mask is used to specify the fields to be overwritten in the DiskMigrationJob resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask, then a mask equivalent to all fields that are populated (have a non-empty value), will be implied.
|
|
9561
|
+
*/
|
|
9562
|
+
updateMask?: string;
|
|
9563
|
+
|
|
9564
|
+
/**
|
|
9565
|
+
* Request body metadata
|
|
9566
|
+
*/
|
|
9567
|
+
requestBody?: Schema$DiskMigrationJob;
|
|
9568
|
+
}
|
|
9569
|
+
export interface Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run
|
|
9570
|
+
extends StandardParameters {
|
|
9571
|
+
/**
|
|
9572
|
+
* Required. The name of the DiskMigrationJob.
|
|
9573
|
+
*/
|
|
9574
|
+
name?: string;
|
|
9575
|
+
|
|
9576
|
+
/**
|
|
9577
|
+
* Request body metadata
|
|
9578
|
+
*/
|
|
9579
|
+
requestBody?: Schema$RunDiskMigrationJobRequest;
|
|
9580
|
+
}
|
|
9581
|
+
|
|
8012
9582
|
export class Resource$Projects$Locations$Sources$Migratingvms {
|
|
8013
9583
|
context: APIRequestContext;
|
|
8014
9584
|
cloneJobs: Resource$Projects$Locations$Sources$Migratingvms$Clonejobs;
|