@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/v1.ts
CHANGED
|
@@ -141,6 +141,19 @@ export namespace vmmigration_v1 {
|
|
|
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_v1 {
|
|
|
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_v1 {
|
|
|
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
|
*/
|
|
@@ -652,6 +690,27 @@ export namespace vmmigration_v1 {
|
|
|
652
690
|
*/
|
|
653
691
|
startTime?: string | null;
|
|
654
692
|
}
|
|
693
|
+
/**
|
|
694
|
+
* Compute Engine disk target details.
|
|
695
|
+
*/
|
|
696
|
+
export interface Schema$ComputeEngineDisk {
|
|
697
|
+
/**
|
|
698
|
+
* 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.
|
|
699
|
+
*/
|
|
700
|
+
diskId?: string | null;
|
|
701
|
+
/**
|
|
702
|
+
* Required. The disk type to use.
|
|
703
|
+
*/
|
|
704
|
+
diskType?: string | null;
|
|
705
|
+
/**
|
|
706
|
+
* 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.
|
|
707
|
+
*/
|
|
708
|
+
replicaZones?: string[] | null;
|
|
709
|
+
/**
|
|
710
|
+
* Required. The Compute Engine zone in which to create the disk. Should be of the form: projects/{target-project\}/locations/{zone\}
|
|
711
|
+
*/
|
|
712
|
+
zone?: string | null;
|
|
713
|
+
}
|
|
655
714
|
/**
|
|
656
715
|
* ComputeEngineDisksTargetDefaults is a collection of details for creating Persistent Disks in a target Compute Engine project.
|
|
657
716
|
*/
|
|
@@ -698,6 +757,10 @@ export namespace vmmigration_v1 {
|
|
|
698
757
|
* ComputeEngineTargetDefaults is a collection of details for creating a VM in a target Compute Engine project.
|
|
699
758
|
*/
|
|
700
759
|
export interface Schema$ComputeEngineTargetDefaults {
|
|
760
|
+
/**
|
|
761
|
+
* Optional. AdaptationModifiers are the set of modifiers used during OS adaptation.
|
|
762
|
+
*/
|
|
763
|
+
adaptationModifiers?: Schema$AdaptationModifier[];
|
|
701
764
|
/**
|
|
702
765
|
* Additional licenses to assign to the VM.
|
|
703
766
|
*/
|
|
@@ -795,6 +858,10 @@ export namespace vmmigration_v1 {
|
|
|
795
858
|
* ComputeEngineTargetDetails is a collection of details for creating a VM in a target Compute Engine project.
|
|
796
859
|
*/
|
|
797
860
|
export interface Schema$ComputeEngineTargetDetails {
|
|
861
|
+
/**
|
|
862
|
+
* Optional. Modifiers to be used as configuration of the OS adaptation process.
|
|
863
|
+
*/
|
|
864
|
+
adaptationModifiers?: Schema$AdaptationModifier[];
|
|
798
865
|
/**
|
|
799
866
|
* Additional licenses to assign to the VM.
|
|
800
867
|
*/
|
|
@@ -909,10 +976,18 @@ export namespace vmmigration_v1 {
|
|
|
909
976
|
*/
|
|
910
977
|
restartType?: string | null;
|
|
911
978
|
}
|
|
979
|
+
/**
|
|
980
|
+
* CopyingSourceDiskSnapshotStep contains specific step details.
|
|
981
|
+
*/
|
|
982
|
+
export interface Schema$CopyingSourceDiskSnapshotStep {}
|
|
912
983
|
/**
|
|
913
984
|
* CreatingImageStep contains specific step details.
|
|
914
985
|
*/
|
|
915
986
|
export interface Schema$CreatingImageStep {}
|
|
987
|
+
/**
|
|
988
|
+
* CreatingSourceDiskSnapshotStep contains specific step details.
|
|
989
|
+
*/
|
|
990
|
+
export interface Schema$CreatingSourceDiskSnapshotStep {}
|
|
916
991
|
/**
|
|
917
992
|
* CutoverForecast holds information about future CutoverJobs of a MigratingVm.
|
|
918
993
|
*/
|
|
@@ -1165,6 +1240,89 @@ export namespace vmmigration_v1 {
|
|
|
1165
1240
|
*/
|
|
1166
1241
|
targetProject?: string | null;
|
|
1167
1242
|
}
|
|
1243
|
+
/**
|
|
1244
|
+
* Describes the disk which will be migrated from the source environment. The source disk has to be unattached.
|
|
1245
|
+
*/
|
|
1246
|
+
export interface Schema$DiskMigrationJob {
|
|
1247
|
+
/**
|
|
1248
|
+
* Details of the unattached AWS source disk.
|
|
1249
|
+
*/
|
|
1250
|
+
awsSourceDiskDetails?: Schema$AwsSourceDiskDetails;
|
|
1251
|
+
/**
|
|
1252
|
+
* Output only. The time the DiskMigrationJob resource was created.
|
|
1253
|
+
*/
|
|
1254
|
+
createTime?: string | null;
|
|
1255
|
+
/**
|
|
1256
|
+
* Output only. Provides details on the errors that led to the disk migration job's state in case of an error.
|
|
1257
|
+
*/
|
|
1258
|
+
errors?: Schema$Status[];
|
|
1259
|
+
/**
|
|
1260
|
+
* Output only. Identifier. The identifier of the DiskMigrationJob.
|
|
1261
|
+
*/
|
|
1262
|
+
name?: string | null;
|
|
1263
|
+
/**
|
|
1264
|
+
* Output only. State of the DiskMigrationJob.
|
|
1265
|
+
*/
|
|
1266
|
+
state?: string | null;
|
|
1267
|
+
/**
|
|
1268
|
+
* Output only. The disk migration steps list representing its progress.
|
|
1269
|
+
*/
|
|
1270
|
+
steps?: Schema$DiskMigrationStep[];
|
|
1271
|
+
/**
|
|
1272
|
+
* Required. Details of the target Disk in Compute Engine.
|
|
1273
|
+
*/
|
|
1274
|
+
targetDetails?: Schema$DiskMigrationJobTargetDetails;
|
|
1275
|
+
/**
|
|
1276
|
+
* Output only. The last time the DiskMigrationJob resource was updated.
|
|
1277
|
+
*/
|
|
1278
|
+
updateTime?: string | null;
|
|
1279
|
+
}
|
|
1280
|
+
/**
|
|
1281
|
+
* Details of the target disk in Compute Engine.
|
|
1282
|
+
*/
|
|
1283
|
+
export interface Schema$DiskMigrationJobTargetDetails {
|
|
1284
|
+
/**
|
|
1285
|
+
* 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.
|
|
1286
|
+
*/
|
|
1287
|
+
encryption?: Schema$Encryption;
|
|
1288
|
+
/**
|
|
1289
|
+
* Optional. A map of labels to associate with the disk.
|
|
1290
|
+
*/
|
|
1291
|
+
labels?: {[key: string]: string} | null;
|
|
1292
|
+
/**
|
|
1293
|
+
* Required. The target disk.
|
|
1294
|
+
*/
|
|
1295
|
+
targetDisk?: Schema$ComputeEngineDisk;
|
|
1296
|
+
/**
|
|
1297
|
+
* 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\}
|
|
1298
|
+
*/
|
|
1299
|
+
targetProject?: string | null;
|
|
1300
|
+
}
|
|
1301
|
+
/**
|
|
1302
|
+
* DiskMigrationStep holds information about the disk migration step progress.
|
|
1303
|
+
*/
|
|
1304
|
+
export interface Schema$DiskMigrationStep {
|
|
1305
|
+
/**
|
|
1306
|
+
* Copying source disk snapshot step.
|
|
1307
|
+
*/
|
|
1308
|
+
copyingSourceDiskSnapshot?: Schema$CopyingSourceDiskSnapshotStep;
|
|
1309
|
+
/**
|
|
1310
|
+
* Creating source disk snapshot step.
|
|
1311
|
+
*/
|
|
1312
|
+
creatingSourceDiskSnapshot?: Schema$CreatingSourceDiskSnapshotStep;
|
|
1313
|
+
/**
|
|
1314
|
+
* Output only. The time the step has ended.
|
|
1315
|
+
*/
|
|
1316
|
+
endTime?: string | null;
|
|
1317
|
+
/**
|
|
1318
|
+
* Creating target disk step.
|
|
1319
|
+
*/
|
|
1320
|
+
provisioningTargetDisk?: Schema$ProvisioningTargetDiskStep;
|
|
1321
|
+
/**
|
|
1322
|
+
* Output only. The time the step has started.
|
|
1323
|
+
*/
|
|
1324
|
+
startTime?: string | null;
|
|
1325
|
+
}
|
|
1168
1326
|
/**
|
|
1169
1327
|
* Details for a disk only migration.
|
|
1170
1328
|
*/
|
|
@@ -1310,6 +1468,23 @@ export namespace vmmigration_v1 {
|
|
|
1310
1468
|
*/
|
|
1311
1469
|
vmwareVms?: Schema$VmwareVmsDetails;
|
|
1312
1470
|
}
|
|
1471
|
+
/**
|
|
1472
|
+
* Response message for fetchStorageInventory.
|
|
1473
|
+
*/
|
|
1474
|
+
export interface Schema$FetchStorageInventoryResponse {
|
|
1475
|
+
/**
|
|
1476
|
+
* 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.
|
|
1477
|
+
*/
|
|
1478
|
+
nextPageToken?: string | null;
|
|
1479
|
+
/**
|
|
1480
|
+
* The list of storage resources in the source.
|
|
1481
|
+
*/
|
|
1482
|
+
resources?: Schema$SourceStorageResource[];
|
|
1483
|
+
/**
|
|
1484
|
+
* Output only. The timestamp when the source was last queried (if the result is from the cache).
|
|
1485
|
+
*/
|
|
1486
|
+
updateTime?: string | null;
|
|
1487
|
+
}
|
|
1313
1488
|
/**
|
|
1314
1489
|
* Request message for 'FinalizeMigration' request.
|
|
1315
1490
|
*/
|
|
@@ -1429,6 +1604,10 @@ export namespace vmmigration_v1 {
|
|
|
1429
1604
|
* Parameters affecting the OS adaptation process.
|
|
1430
1605
|
*/
|
|
1431
1606
|
export interface Schema$ImageImportOsAdaptationParameters {
|
|
1607
|
+
/**
|
|
1608
|
+
* Optional. Modifiers to be used as configuration of the OS adaptation process.
|
|
1609
|
+
*/
|
|
1610
|
+
adaptationModifiers?: Schema$AdaptationModifier[];
|
|
1432
1611
|
/**
|
|
1433
1612
|
* 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
|
|
1434
1613
|
*/
|
|
@@ -1547,6 +1726,23 @@ export namespace vmmigration_v1 {
|
|
|
1547
1726
|
*/
|
|
1548
1727
|
unreachable?: string[] | null;
|
|
1549
1728
|
}
|
|
1729
|
+
/**
|
|
1730
|
+
* Response message for 'ListDiskMigrationJobs' request.
|
|
1731
|
+
*/
|
|
1732
|
+
export interface Schema$ListDiskMigrationJobsResponse {
|
|
1733
|
+
/**
|
|
1734
|
+
* Output only. The list of the disk migration jobs.
|
|
1735
|
+
*/
|
|
1736
|
+
diskMigrationJobs?: Schema$DiskMigrationJob[];
|
|
1737
|
+
/**
|
|
1738
|
+
* 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.
|
|
1739
|
+
*/
|
|
1740
|
+
nextPageToken?: string | null;
|
|
1741
|
+
/**
|
|
1742
|
+
* Output only. Locations that could not be reached.
|
|
1743
|
+
*/
|
|
1744
|
+
unreachable?: string[] | null;
|
|
1745
|
+
}
|
|
1550
1746
|
/**
|
|
1551
1747
|
* Response message for 'ListGroups' request.
|
|
1552
1748
|
*/
|
|
@@ -1640,6 +1836,10 @@ export namespace vmmigration_v1 {
|
|
|
1640
1836
|
* A list of operations that matches the specified filter in the request.
|
|
1641
1837
|
*/
|
|
1642
1838
|
operations?: Schema$Operation[];
|
|
1839
|
+
/**
|
|
1840
|
+
* 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.
|
|
1841
|
+
*/
|
|
1842
|
+
unreachable?: string[] | null;
|
|
1643
1843
|
}
|
|
1644
1844
|
/**
|
|
1645
1845
|
* Response message for 'ListReplicationCycles' request.
|
|
@@ -2147,6 +2347,10 @@ export namespace vmmigration_v1 {
|
|
|
2147
2347
|
* PreparingVMDisksStep contains specific step details.
|
|
2148
2348
|
*/
|
|
2149
2349
|
export interface Schema$PreparingVMDisksStep {}
|
|
2350
|
+
/**
|
|
2351
|
+
* ProvisioningTargetDiskStep contains specific step details.
|
|
2352
|
+
*/
|
|
2353
|
+
export interface Schema$ProvisioningTargetDiskStep {}
|
|
2150
2354
|
/**
|
|
2151
2355
|
* Request message for 'RemoveMigration' request.
|
|
2152
2356
|
*/
|
|
@@ -2235,6 +2439,10 @@ export namespace vmmigration_v1 {
|
|
|
2235
2439
|
* Request message for 'ResumeMigration' request.
|
|
2236
2440
|
*/
|
|
2237
2441
|
export interface Schema$ResumeMigrationRequest {}
|
|
2442
|
+
/**
|
|
2443
|
+
* Request message for 'RunDiskMigrationJobRequest' request.
|
|
2444
|
+
*/
|
|
2445
|
+
export interface Schema$RunDiskMigrationJobRequest {}
|
|
2238
2446
|
/**
|
|
2239
2447
|
* A policy for scheduling replications.
|
|
2240
2448
|
*/
|
|
@@ -2344,6 +2552,15 @@ export namespace vmmigration_v1 {
|
|
|
2344
2552
|
*/
|
|
2345
2553
|
vmware?: Schema$VmwareSourceDetails;
|
|
2346
2554
|
}
|
|
2555
|
+
/**
|
|
2556
|
+
* SourceStorageResource describes a storage resource in the source.
|
|
2557
|
+
*/
|
|
2558
|
+
export interface Schema$SourceStorageResource {
|
|
2559
|
+
/**
|
|
2560
|
+
* Source AWS volume details.
|
|
2561
|
+
*/
|
|
2562
|
+
awsDiskDetails?: Schema$AwsSourceDiskDetails;
|
|
2563
|
+
}
|
|
2347
2564
|
/**
|
|
2348
2565
|
* Request message for 'StartMigrationRequest' request.
|
|
2349
2566
|
*/
|
|
@@ -2892,7 +3109,7 @@ export namespace vmmigration_v1 {
|
|
|
2892
3109
|
*
|
|
2893
3110
|
* // Do the magic
|
|
2894
3111
|
* const res = await vmmigration.projects.locations.list({
|
|
2895
|
-
* // Optional.
|
|
3112
|
+
* // Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.
|
|
2896
3113
|
* extraLocationTypes: 'placeholder-value',
|
|
2897
3114
|
* // 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).
|
|
2898
3115
|
* filter: 'placeholder-value',
|
|
@@ -3020,7 +3237,7 @@ export namespace vmmigration_v1 {
|
|
|
3020
3237
|
export interface Params$Resource$Projects$Locations$List
|
|
3021
3238
|
extends StandardParameters {
|
|
3022
3239
|
/**
|
|
3023
|
-
* Optional.
|
|
3240
|
+
* Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.
|
|
3024
3241
|
*/
|
|
3025
3242
|
extraLocationTypes?: string[];
|
|
3026
3243
|
/**
|
|
@@ -4864,7 +5081,7 @@ export namespace vmmigration_v1 {
|
|
|
4864
5081
|
}
|
|
4865
5082
|
|
|
4866
5083
|
/**
|
|
4867
|
-
* Initiates the cancellation of a running
|
|
5084
|
+
* Initiates the cancellation of a running ImageImportJob.
|
|
4868
5085
|
* @example
|
|
4869
5086
|
* ```js
|
|
4870
5087
|
* // Before running the sample:
|
|
@@ -5806,13 +6023,16 @@ export namespace vmmigration_v1 {
|
|
|
5806
6023
|
* pageSize: 'placeholder-value',
|
|
5807
6024
|
* // The standard list page token.
|
|
5808
6025
|
* pageToken: 'placeholder-value',
|
|
6026
|
+
* // 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.
|
|
6027
|
+
* returnPartialSuccess: 'placeholder-value',
|
|
5809
6028
|
* });
|
|
5810
6029
|
* console.log(res.data);
|
|
5811
6030
|
*
|
|
5812
6031
|
* // Example response
|
|
5813
6032
|
* // {
|
|
5814
6033
|
* // "nextPageToken": "my_nextPageToken",
|
|
5815
|
-
* // "operations": []
|
|
6034
|
+
* // "operations": [],
|
|
6035
|
+
* // "unreachable": []
|
|
5816
6036
|
* // }
|
|
5817
6037
|
* }
|
|
5818
6038
|
*
|
|
@@ -5958,11 +6178,16 @@ export namespace vmmigration_v1 {
|
|
|
5958
6178
|
* The standard list page token.
|
|
5959
6179
|
*/
|
|
5960
6180
|
pageToken?: string;
|
|
6181
|
+
/**
|
|
6182
|
+
* 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.
|
|
6183
|
+
*/
|
|
6184
|
+
returnPartialSuccess?: boolean;
|
|
5961
6185
|
}
|
|
5962
6186
|
|
|
5963
6187
|
export class Resource$Projects$Locations$Sources {
|
|
5964
6188
|
context: APIRequestContext;
|
|
5965
6189
|
datacenterConnectors: Resource$Projects$Locations$Sources$Datacenterconnectors;
|
|
6190
|
+
diskMigrationJobs: Resource$Projects$Locations$Sources$Diskmigrationjobs;
|
|
5966
6191
|
migratingVms: Resource$Projects$Locations$Sources$Migratingvms;
|
|
5967
6192
|
utilizationReports: Resource$Projects$Locations$Sources$Utilizationreports;
|
|
5968
6193
|
constructor(context: APIRequestContext) {
|
|
@@ -5971,6 +6196,8 @@ export namespace vmmigration_v1 {
|
|
|
5971
6196
|
new Resource$Projects$Locations$Sources$Datacenterconnectors(
|
|
5972
6197
|
this.context
|
|
5973
6198
|
);
|
|
6199
|
+
this.diskMigrationJobs =
|
|
6200
|
+
new Resource$Projects$Locations$Sources$Diskmigrationjobs(this.context);
|
|
5974
6201
|
this.migratingVms = new Resource$Projects$Locations$Sources$Migratingvms(
|
|
5975
6202
|
this.context
|
|
5976
6203
|
);
|
|
@@ -6434,7 +6661,7 @@ export namespace vmmigration_v1 {
|
|
|
6434
6661
|
}
|
|
6435
6662
|
|
|
6436
6663
|
/**
|
|
6437
|
-
*
|
|
6664
|
+
* 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.
|
|
6438
6665
|
* @example
|
|
6439
6666
|
* ```js
|
|
6440
6667
|
* // Before running the sample:
|
|
@@ -6463,23 +6690,26 @@ export namespace vmmigration_v1 {
|
|
|
6463
6690
|
* google.options({auth: authClient});
|
|
6464
6691
|
*
|
|
6465
6692
|
* // Do the magic
|
|
6466
|
-
* const res =
|
|
6467
|
-
*
|
|
6468
|
-
*
|
|
6469
|
-
*
|
|
6693
|
+
* const res =
|
|
6694
|
+
* await vmmigration.projects.locations.sources.fetchStorageInventory({
|
|
6695
|
+
* // 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.
|
|
6696
|
+
* forceRefresh: 'placeholder-value',
|
|
6697
|
+
* // Optional. The maximum number of VMs to return. The service may return fewer than this value.
|
|
6698
|
+
* pageSize: 'placeholder-value',
|
|
6699
|
+
* // 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.
|
|
6700
|
+
* pageToken: 'placeholder-value',
|
|
6701
|
+
* // Required. The name of the Source.
|
|
6702
|
+
* source: 'projects/my-project/locations/my-location/sources/my-source',
|
|
6703
|
+
* // Required. The type of the storage inventory to fetch.
|
|
6704
|
+
* type: 'placeholder-value',
|
|
6705
|
+
* });
|
|
6470
6706
|
* console.log(res.data);
|
|
6471
6707
|
*
|
|
6472
6708
|
* // Example response
|
|
6473
6709
|
* // {
|
|
6474
|
-
* // "
|
|
6475
|
-
* // "
|
|
6476
|
-
* // "
|
|
6477
|
-
* // "description": "my_description",
|
|
6478
|
-
* // "encryption": {},
|
|
6479
|
-
* // "labels": {},
|
|
6480
|
-
* // "name": "my_name",
|
|
6481
|
-
* // "updateTime": "my_updateTime",
|
|
6482
|
-
* // "vmware": {}
|
|
6710
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
6711
|
+
* // "resources": [],
|
|
6712
|
+
* // "updateTime": "my_updateTime"
|
|
6483
6713
|
* // }
|
|
6484
6714
|
* }
|
|
6485
6715
|
*
|
|
@@ -6495,53 +6725,58 @@ export namespace vmmigration_v1 {
|
|
|
6495
6725
|
* @param callback - Optional callback that handles the response.
|
|
6496
6726
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6497
6727
|
*/
|
|
6498
|
-
|
|
6499
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
6728
|
+
fetchStorageInventory(
|
|
6729
|
+
params: Params$Resource$Projects$Locations$Sources$Fetchstorageinventory,
|
|
6500
6730
|
options: StreamMethodOptions
|
|
6501
6731
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
6502
|
-
|
|
6503
|
-
params?: Params$Resource$Projects$Locations$Sources$
|
|
6732
|
+
fetchStorageInventory(
|
|
6733
|
+
params?: Params$Resource$Projects$Locations$Sources$Fetchstorageinventory,
|
|
6504
6734
|
options?: MethodOptions
|
|
6505
|
-
): Promise<GaxiosResponseWithHTTP2<Schema$
|
|
6506
|
-
|
|
6507
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
6735
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$FetchStorageInventoryResponse>>;
|
|
6736
|
+
fetchStorageInventory(
|
|
6737
|
+
params: Params$Resource$Projects$Locations$Sources$Fetchstorageinventory,
|
|
6508
6738
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
6509
6739
|
callback: BodyResponseCallback<Readable>
|
|
6510
6740
|
): void;
|
|
6511
|
-
|
|
6512
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
6513
|
-
options:
|
|
6514
|
-
|
|
6741
|
+
fetchStorageInventory(
|
|
6742
|
+
params: Params$Resource$Projects$Locations$Sources$Fetchstorageinventory,
|
|
6743
|
+
options:
|
|
6744
|
+
| MethodOptions
|
|
6745
|
+
| BodyResponseCallback<Schema$FetchStorageInventoryResponse>,
|
|
6746
|
+
callback: BodyResponseCallback<Schema$FetchStorageInventoryResponse>
|
|
6515
6747
|
): void;
|
|
6516
|
-
|
|
6517
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
6518
|
-
callback: BodyResponseCallback<Schema$
|
|
6748
|
+
fetchStorageInventory(
|
|
6749
|
+
params: Params$Resource$Projects$Locations$Sources$Fetchstorageinventory,
|
|
6750
|
+
callback: BodyResponseCallback<Schema$FetchStorageInventoryResponse>
|
|
6519
6751
|
): void;
|
|
6520
|
-
|
|
6521
|
-
|
|
6752
|
+
fetchStorageInventory(
|
|
6753
|
+
callback: BodyResponseCallback<Schema$FetchStorageInventoryResponse>
|
|
6754
|
+
): void;
|
|
6755
|
+
fetchStorageInventory(
|
|
6522
6756
|
paramsOrCallback?:
|
|
6523
|
-
| Params$Resource$Projects$Locations$Sources$
|
|
6524
|
-
| BodyResponseCallback<Schema$
|
|
6757
|
+
| Params$Resource$Projects$Locations$Sources$Fetchstorageinventory
|
|
6758
|
+
| BodyResponseCallback<Schema$FetchStorageInventoryResponse>
|
|
6525
6759
|
| BodyResponseCallback<Readable>,
|
|
6526
6760
|
optionsOrCallback?:
|
|
6527
6761
|
| MethodOptions
|
|
6528
6762
|
| StreamMethodOptions
|
|
6529
|
-
| BodyResponseCallback<Schema$
|
|
6763
|
+
| BodyResponseCallback<Schema$FetchStorageInventoryResponse>
|
|
6530
6764
|
| BodyResponseCallback<Readable>,
|
|
6531
6765
|
callback?:
|
|
6532
|
-
| BodyResponseCallback<Schema$
|
|
6766
|
+
| BodyResponseCallback<Schema$FetchStorageInventoryResponse>
|
|
6533
6767
|
| BodyResponseCallback<Readable>
|
|
6534
6768
|
):
|
|
6535
6769
|
| void
|
|
6536
|
-
| Promise<GaxiosResponseWithHTTP2<Schema$
|
|
6770
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$FetchStorageInventoryResponse>>
|
|
6537
6771
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
6538
6772
|
let params = (paramsOrCallback ||
|
|
6539
|
-
{}) as Params$Resource$Projects$Locations$Sources$
|
|
6773
|
+
{}) as Params$Resource$Projects$Locations$Sources$Fetchstorageinventory;
|
|
6540
6774
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
6541
6775
|
|
|
6542
6776
|
if (typeof paramsOrCallback === 'function') {
|
|
6543
6777
|
callback = paramsOrCallback;
|
|
6544
|
-
params =
|
|
6778
|
+
params =
|
|
6779
|
+
{} as Params$Resource$Projects$Locations$Sources$Fetchstorageinventory;
|
|
6545
6780
|
options = {};
|
|
6546
6781
|
}
|
|
6547
6782
|
|
|
@@ -6554,29 +6789,34 @@ export namespace vmmigration_v1 {
|
|
|
6554
6789
|
const parameters = {
|
|
6555
6790
|
options: Object.assign(
|
|
6556
6791
|
{
|
|
6557
|
-
url: (rootUrl + '/v1/{+
|
|
6792
|
+
url: (rootUrl + '/v1/{+source}:fetchStorageInventory').replace(
|
|
6793
|
+
/([^:]\/)\/+/g,
|
|
6794
|
+
'$1'
|
|
6795
|
+
),
|
|
6558
6796
|
method: 'GET',
|
|
6559
6797
|
apiVersion: '',
|
|
6560
6798
|
},
|
|
6561
6799
|
options
|
|
6562
6800
|
),
|
|
6563
6801
|
params,
|
|
6564
|
-
requiredParams: ['
|
|
6565
|
-
pathParams: ['
|
|
6802
|
+
requiredParams: ['source'],
|
|
6803
|
+
pathParams: ['source'],
|
|
6566
6804
|
context: this.context,
|
|
6567
6805
|
};
|
|
6568
6806
|
if (callback) {
|
|
6569
|
-
createAPIRequest<Schema$
|
|
6807
|
+
createAPIRequest<Schema$FetchStorageInventoryResponse>(
|
|
6570
6808
|
parameters,
|
|
6571
6809
|
callback as BodyResponseCallback<unknown>
|
|
6572
6810
|
);
|
|
6573
6811
|
} else {
|
|
6574
|
-
return createAPIRequest<Schema$
|
|
6812
|
+
return createAPIRequest<Schema$FetchStorageInventoryResponse>(
|
|
6813
|
+
parameters
|
|
6814
|
+
);
|
|
6575
6815
|
}
|
|
6576
6816
|
}
|
|
6577
6817
|
|
|
6578
6818
|
/**
|
|
6579
|
-
*
|
|
6819
|
+
* Gets details of a single Source.
|
|
6580
6820
|
* @example
|
|
6581
6821
|
* ```js
|
|
6582
6822
|
* // Before running the sample:
|
|
@@ -6605,25 +6845,23 @@ export namespace vmmigration_v1 {
|
|
|
6605
6845
|
* google.options({auth: authClient});
|
|
6606
6846
|
*
|
|
6607
6847
|
* // Do the magic
|
|
6608
|
-
* const res = await vmmigration.projects.locations.sources.
|
|
6609
|
-
* //
|
|
6610
|
-
*
|
|
6611
|
-
* // Optional. the order by fields for the result.
|
|
6612
|
-
* orderBy: 'placeholder-value',
|
|
6613
|
-
* // 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.
|
|
6614
|
-
* pageSize: 'placeholder-value',
|
|
6615
|
-
* // 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.
|
|
6616
|
-
* pageToken: 'placeholder-value',
|
|
6617
|
-
* // Required. The parent, which owns this collection of sources.
|
|
6618
|
-
* parent: 'projects/my-project/locations/my-location',
|
|
6848
|
+
* const res = await vmmigration.projects.locations.sources.get({
|
|
6849
|
+
* // Required. The Source name.
|
|
6850
|
+
* name: 'projects/my-project/locations/my-location/sources/my-source',
|
|
6619
6851
|
* });
|
|
6620
6852
|
* console.log(res.data);
|
|
6621
6853
|
*
|
|
6622
6854
|
* // Example response
|
|
6623
6855
|
* // {
|
|
6624
|
-
* // "
|
|
6625
|
-
* // "
|
|
6626
|
-
* // "
|
|
6856
|
+
* // "aws": {},
|
|
6857
|
+
* // "azure": {},
|
|
6858
|
+
* // "createTime": "my_createTime",
|
|
6859
|
+
* // "description": "my_description",
|
|
6860
|
+
* // "encryption": {},
|
|
6861
|
+
* // "labels": {},
|
|
6862
|
+
* // "name": "my_name",
|
|
6863
|
+
* // "updateTime": "my_updateTime",
|
|
6864
|
+
* // "vmware": {}
|
|
6627
6865
|
* // }
|
|
6628
6866
|
* }
|
|
6629
6867
|
*
|
|
@@ -6639,27 +6877,171 @@ export namespace vmmigration_v1 {
|
|
|
6639
6877
|
* @param callback - Optional callback that handles the response.
|
|
6640
6878
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6641
6879
|
*/
|
|
6642
|
-
|
|
6643
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
6880
|
+
get(
|
|
6881
|
+
params: Params$Resource$Projects$Locations$Sources$Get,
|
|
6644
6882
|
options: StreamMethodOptions
|
|
6645
6883
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
6646
|
-
|
|
6647
|
-
params?: Params$Resource$Projects$Locations$Sources$
|
|
6884
|
+
get(
|
|
6885
|
+
params?: Params$Resource$Projects$Locations$Sources$Get,
|
|
6648
6886
|
options?: MethodOptions
|
|
6649
|
-
): Promise<GaxiosResponseWithHTTP2<Schema$
|
|
6650
|
-
|
|
6651
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
6887
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Source>>;
|
|
6888
|
+
get(
|
|
6889
|
+
params: Params$Resource$Projects$Locations$Sources$Get,
|
|
6652
6890
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
6653
6891
|
callback: BodyResponseCallback<Readable>
|
|
6654
6892
|
): void;
|
|
6655
|
-
|
|
6656
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
6657
|
-
options: MethodOptions | BodyResponseCallback<Schema$
|
|
6658
|
-
callback: BodyResponseCallback<Schema$
|
|
6893
|
+
get(
|
|
6894
|
+
params: Params$Resource$Projects$Locations$Sources$Get,
|
|
6895
|
+
options: MethodOptions | BodyResponseCallback<Schema$Source>,
|
|
6896
|
+
callback: BodyResponseCallback<Schema$Source>
|
|
6659
6897
|
): void;
|
|
6660
|
-
|
|
6661
|
-
params: Params$Resource$Projects$Locations$Sources$
|
|
6662
|
-
callback: BodyResponseCallback<Schema$
|
|
6898
|
+
get(
|
|
6899
|
+
params: Params$Resource$Projects$Locations$Sources$Get,
|
|
6900
|
+
callback: BodyResponseCallback<Schema$Source>
|
|
6901
|
+
): void;
|
|
6902
|
+
get(callback: BodyResponseCallback<Schema$Source>): void;
|
|
6903
|
+
get(
|
|
6904
|
+
paramsOrCallback?:
|
|
6905
|
+
| Params$Resource$Projects$Locations$Sources$Get
|
|
6906
|
+
| BodyResponseCallback<Schema$Source>
|
|
6907
|
+
| BodyResponseCallback<Readable>,
|
|
6908
|
+
optionsOrCallback?:
|
|
6909
|
+
| MethodOptions
|
|
6910
|
+
| StreamMethodOptions
|
|
6911
|
+
| BodyResponseCallback<Schema$Source>
|
|
6912
|
+
| BodyResponseCallback<Readable>,
|
|
6913
|
+
callback?:
|
|
6914
|
+
| BodyResponseCallback<Schema$Source>
|
|
6915
|
+
| BodyResponseCallback<Readable>
|
|
6916
|
+
):
|
|
6917
|
+
| void
|
|
6918
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Source>>
|
|
6919
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
6920
|
+
let params = (paramsOrCallback ||
|
|
6921
|
+
{}) as Params$Resource$Projects$Locations$Sources$Get;
|
|
6922
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
6923
|
+
|
|
6924
|
+
if (typeof paramsOrCallback === 'function') {
|
|
6925
|
+
callback = paramsOrCallback;
|
|
6926
|
+
params = {} as Params$Resource$Projects$Locations$Sources$Get;
|
|
6927
|
+
options = {};
|
|
6928
|
+
}
|
|
6929
|
+
|
|
6930
|
+
if (typeof optionsOrCallback === 'function') {
|
|
6931
|
+
callback = optionsOrCallback;
|
|
6932
|
+
options = {};
|
|
6933
|
+
}
|
|
6934
|
+
|
|
6935
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
6936
|
+
const parameters = {
|
|
6937
|
+
options: Object.assign(
|
|
6938
|
+
{
|
|
6939
|
+
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
6940
|
+
method: 'GET',
|
|
6941
|
+
apiVersion: '',
|
|
6942
|
+
},
|
|
6943
|
+
options
|
|
6944
|
+
),
|
|
6945
|
+
params,
|
|
6946
|
+
requiredParams: ['name'],
|
|
6947
|
+
pathParams: ['name'],
|
|
6948
|
+
context: this.context,
|
|
6949
|
+
};
|
|
6950
|
+
if (callback) {
|
|
6951
|
+
createAPIRequest<Schema$Source>(
|
|
6952
|
+
parameters,
|
|
6953
|
+
callback as BodyResponseCallback<unknown>
|
|
6954
|
+
);
|
|
6955
|
+
} else {
|
|
6956
|
+
return createAPIRequest<Schema$Source>(parameters);
|
|
6957
|
+
}
|
|
6958
|
+
}
|
|
6959
|
+
|
|
6960
|
+
/**
|
|
6961
|
+
* Lists Sources in a given project and location.
|
|
6962
|
+
* @example
|
|
6963
|
+
* ```js
|
|
6964
|
+
* // Before running the sample:
|
|
6965
|
+
* // - Enable the API at:
|
|
6966
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
6967
|
+
* // - Login into gcloud by running:
|
|
6968
|
+
* // ```sh
|
|
6969
|
+
* // $ gcloud auth application-default login
|
|
6970
|
+
* // ```
|
|
6971
|
+
* // - Install the npm module by running:
|
|
6972
|
+
* // ```sh
|
|
6973
|
+
* // $ npm install googleapis
|
|
6974
|
+
* // ```
|
|
6975
|
+
*
|
|
6976
|
+
* const {google} = require('googleapis');
|
|
6977
|
+
* const vmmigration = google.vmmigration('v1');
|
|
6978
|
+
*
|
|
6979
|
+
* async function main() {
|
|
6980
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6981
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6982
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6983
|
+
* });
|
|
6984
|
+
*
|
|
6985
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6986
|
+
* const authClient = await auth.getClient();
|
|
6987
|
+
* google.options({auth: authClient});
|
|
6988
|
+
*
|
|
6989
|
+
* // Do the magic
|
|
6990
|
+
* const res = await vmmigration.projects.locations.sources.list({
|
|
6991
|
+
* // Optional. The filter request.
|
|
6992
|
+
* filter: 'placeholder-value',
|
|
6993
|
+
* // Optional. the order by fields for the result.
|
|
6994
|
+
* orderBy: 'placeholder-value',
|
|
6995
|
+
* // 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.
|
|
6996
|
+
* pageSize: 'placeholder-value',
|
|
6997
|
+
* // 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.
|
|
6998
|
+
* pageToken: 'placeholder-value',
|
|
6999
|
+
* // Required. The parent, which owns this collection of sources.
|
|
7000
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
7001
|
+
* });
|
|
7002
|
+
* console.log(res.data);
|
|
7003
|
+
*
|
|
7004
|
+
* // Example response
|
|
7005
|
+
* // {
|
|
7006
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
7007
|
+
* // "sources": [],
|
|
7008
|
+
* // "unreachable": []
|
|
7009
|
+
* // }
|
|
7010
|
+
* }
|
|
7011
|
+
*
|
|
7012
|
+
* main().catch(e => {
|
|
7013
|
+
* console.error(e);
|
|
7014
|
+
* throw e;
|
|
7015
|
+
* });
|
|
7016
|
+
*
|
|
7017
|
+
* ```
|
|
7018
|
+
*
|
|
7019
|
+
* @param params - Parameters for request
|
|
7020
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
7021
|
+
* @param callback - Optional callback that handles the response.
|
|
7022
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
7023
|
+
*/
|
|
7024
|
+
list(
|
|
7025
|
+
params: Params$Resource$Projects$Locations$Sources$List,
|
|
7026
|
+
options: StreamMethodOptions
|
|
7027
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
7028
|
+
list(
|
|
7029
|
+
params?: Params$Resource$Projects$Locations$Sources$List,
|
|
7030
|
+
options?: MethodOptions
|
|
7031
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListSourcesResponse>>;
|
|
7032
|
+
list(
|
|
7033
|
+
params: Params$Resource$Projects$Locations$Sources$List,
|
|
7034
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
7035
|
+
callback: BodyResponseCallback<Readable>
|
|
7036
|
+
): void;
|
|
7037
|
+
list(
|
|
7038
|
+
params: Params$Resource$Projects$Locations$Sources$List,
|
|
7039
|
+
options: MethodOptions | BodyResponseCallback<Schema$ListSourcesResponse>,
|
|
7040
|
+
callback: BodyResponseCallback<Schema$ListSourcesResponse>
|
|
7041
|
+
): void;
|
|
7042
|
+
list(
|
|
7043
|
+
params: Params$Resource$Projects$Locations$Sources$List,
|
|
7044
|
+
callback: BodyResponseCallback<Schema$ListSourcesResponse>
|
|
6663
7045
|
): void;
|
|
6664
7046
|
list(callback: BodyResponseCallback<Schema$ListSourcesResponse>): void;
|
|
6665
7047
|
list(
|
|
@@ -6931,6 +7313,29 @@ export namespace vmmigration_v1 {
|
|
|
6931
7313
|
*/
|
|
6932
7314
|
source?: string;
|
|
6933
7315
|
}
|
|
7316
|
+
export interface Params$Resource$Projects$Locations$Sources$Fetchstorageinventory
|
|
7317
|
+
extends StandardParameters {
|
|
7318
|
+
/**
|
|
7319
|
+
* 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.
|
|
7320
|
+
*/
|
|
7321
|
+
forceRefresh?: boolean;
|
|
7322
|
+
/**
|
|
7323
|
+
* Optional. The maximum number of VMs to return. The service may return fewer than this value.
|
|
7324
|
+
*/
|
|
7325
|
+
pageSize?: number;
|
|
7326
|
+
/**
|
|
7327
|
+
* 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.
|
|
7328
|
+
*/
|
|
7329
|
+
pageToken?: string;
|
|
7330
|
+
/**
|
|
7331
|
+
* Required. The name of the Source.
|
|
7332
|
+
*/
|
|
7333
|
+
source?: string;
|
|
7334
|
+
/**
|
|
7335
|
+
* Required. The type of the storage inventory to fetch.
|
|
7336
|
+
*/
|
|
7337
|
+
type?: string;
|
|
7338
|
+
}
|
|
6934
7339
|
export interface Params$Resource$Projects$Locations$Sources$Get
|
|
6935
7340
|
extends StandardParameters {
|
|
6936
7341
|
/**
|
|
@@ -7834,6 +8239,1166 @@ export namespace vmmigration_v1 {
|
|
|
7834
8239
|
requestBody?: Schema$UpgradeApplianceRequest;
|
|
7835
8240
|
}
|
|
7836
8241
|
|
|
8242
|
+
export class Resource$Projects$Locations$Sources$Diskmigrationjobs {
|
|
8243
|
+
context: APIRequestContext;
|
|
8244
|
+
constructor(context: APIRequestContext) {
|
|
8245
|
+
this.context = context;
|
|
8246
|
+
}
|
|
8247
|
+
|
|
8248
|
+
/**
|
|
8249
|
+
* Cancels the disk migration job.
|
|
8250
|
+
* @example
|
|
8251
|
+
* ```js
|
|
8252
|
+
* // Before running the sample:
|
|
8253
|
+
* // - Enable the API at:
|
|
8254
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
8255
|
+
* // - Login into gcloud by running:
|
|
8256
|
+
* // ```sh
|
|
8257
|
+
* // $ gcloud auth application-default login
|
|
8258
|
+
* // ```
|
|
8259
|
+
* // - Install the npm module by running:
|
|
8260
|
+
* // ```sh
|
|
8261
|
+
* // $ npm install googleapis
|
|
8262
|
+
* // ```
|
|
8263
|
+
*
|
|
8264
|
+
* const {google} = require('googleapis');
|
|
8265
|
+
* const vmmigration = google.vmmigration('v1');
|
|
8266
|
+
*
|
|
8267
|
+
* async function main() {
|
|
8268
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8269
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8270
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8271
|
+
* });
|
|
8272
|
+
*
|
|
8273
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8274
|
+
* const authClient = await auth.getClient();
|
|
8275
|
+
* google.options({auth: authClient});
|
|
8276
|
+
*
|
|
8277
|
+
* // Do the magic
|
|
8278
|
+
* const res =
|
|
8279
|
+
* await vmmigration.projects.locations.sources.diskMigrationJobs.cancel({
|
|
8280
|
+
* // Required. The name of the DiskMigrationJob.
|
|
8281
|
+
* name: 'projects/my-project/locations/my-location/sources/my-source/diskMigrationJobs/my-diskMigrationJob',
|
|
8282
|
+
*
|
|
8283
|
+
* // Request body metadata
|
|
8284
|
+
* requestBody: {
|
|
8285
|
+
* // request body parameters
|
|
8286
|
+
* // {}
|
|
8287
|
+
* },
|
|
8288
|
+
* });
|
|
8289
|
+
* console.log(res.data);
|
|
8290
|
+
*
|
|
8291
|
+
* // Example response
|
|
8292
|
+
* // {
|
|
8293
|
+
* // "done": false,
|
|
8294
|
+
* // "error": {},
|
|
8295
|
+
* // "metadata": {},
|
|
8296
|
+
* // "name": "my_name",
|
|
8297
|
+
* // "response": {}
|
|
8298
|
+
* // }
|
|
8299
|
+
* }
|
|
8300
|
+
*
|
|
8301
|
+
* main().catch(e => {
|
|
8302
|
+
* console.error(e);
|
|
8303
|
+
* throw e;
|
|
8304
|
+
* });
|
|
8305
|
+
*
|
|
8306
|
+
* ```
|
|
8307
|
+
*
|
|
8308
|
+
* @param params - Parameters for request
|
|
8309
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8310
|
+
* @param callback - Optional callback that handles the response.
|
|
8311
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8312
|
+
*/
|
|
8313
|
+
cancel(
|
|
8314
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel,
|
|
8315
|
+
options: StreamMethodOptions
|
|
8316
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
8317
|
+
cancel(
|
|
8318
|
+
params?: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel,
|
|
8319
|
+
options?: MethodOptions
|
|
8320
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
8321
|
+
cancel(
|
|
8322
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel,
|
|
8323
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8324
|
+
callback: BodyResponseCallback<Readable>
|
|
8325
|
+
): void;
|
|
8326
|
+
cancel(
|
|
8327
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel,
|
|
8328
|
+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
|
|
8329
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8330
|
+
): void;
|
|
8331
|
+
cancel(
|
|
8332
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel,
|
|
8333
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8334
|
+
): void;
|
|
8335
|
+
cancel(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
8336
|
+
cancel(
|
|
8337
|
+
paramsOrCallback?:
|
|
8338
|
+
| Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel
|
|
8339
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8340
|
+
| BodyResponseCallback<Readable>,
|
|
8341
|
+
optionsOrCallback?:
|
|
8342
|
+
| MethodOptions
|
|
8343
|
+
| StreamMethodOptions
|
|
8344
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8345
|
+
| BodyResponseCallback<Readable>,
|
|
8346
|
+
callback?:
|
|
8347
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8348
|
+
| BodyResponseCallback<Readable>
|
|
8349
|
+
):
|
|
8350
|
+
| void
|
|
8351
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
8352
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
8353
|
+
let params = (paramsOrCallback ||
|
|
8354
|
+
{}) as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel;
|
|
8355
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8356
|
+
|
|
8357
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8358
|
+
callback = paramsOrCallback;
|
|
8359
|
+
params =
|
|
8360
|
+
{} as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel;
|
|
8361
|
+
options = {};
|
|
8362
|
+
}
|
|
8363
|
+
|
|
8364
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8365
|
+
callback = optionsOrCallback;
|
|
8366
|
+
options = {};
|
|
8367
|
+
}
|
|
8368
|
+
|
|
8369
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
8370
|
+
const parameters = {
|
|
8371
|
+
options: Object.assign(
|
|
8372
|
+
{
|
|
8373
|
+
url: (rootUrl + '/v1/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'),
|
|
8374
|
+
method: 'POST',
|
|
8375
|
+
apiVersion: '',
|
|
8376
|
+
},
|
|
8377
|
+
options
|
|
8378
|
+
),
|
|
8379
|
+
params,
|
|
8380
|
+
requiredParams: ['name'],
|
|
8381
|
+
pathParams: ['name'],
|
|
8382
|
+
context: this.context,
|
|
8383
|
+
};
|
|
8384
|
+
if (callback) {
|
|
8385
|
+
createAPIRequest<Schema$Operation>(
|
|
8386
|
+
parameters,
|
|
8387
|
+
callback as BodyResponseCallback<unknown>
|
|
8388
|
+
);
|
|
8389
|
+
} else {
|
|
8390
|
+
return createAPIRequest<Schema$Operation>(parameters);
|
|
8391
|
+
}
|
|
8392
|
+
}
|
|
8393
|
+
|
|
8394
|
+
/**
|
|
8395
|
+
* Creates a new disk migration job in a given Source.
|
|
8396
|
+
* @example
|
|
8397
|
+
* ```js
|
|
8398
|
+
* // Before running the sample:
|
|
8399
|
+
* // - Enable the API at:
|
|
8400
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
8401
|
+
* // - Login into gcloud by running:
|
|
8402
|
+
* // ```sh
|
|
8403
|
+
* // $ gcloud auth application-default login
|
|
8404
|
+
* // ```
|
|
8405
|
+
* // - Install the npm module by running:
|
|
8406
|
+
* // ```sh
|
|
8407
|
+
* // $ npm install googleapis
|
|
8408
|
+
* // ```
|
|
8409
|
+
*
|
|
8410
|
+
* const {google} = require('googleapis');
|
|
8411
|
+
* const vmmigration = google.vmmigration('v1');
|
|
8412
|
+
*
|
|
8413
|
+
* async function main() {
|
|
8414
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8415
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8416
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8417
|
+
* });
|
|
8418
|
+
*
|
|
8419
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8420
|
+
* const authClient = await auth.getClient();
|
|
8421
|
+
* google.options({auth: authClient});
|
|
8422
|
+
*
|
|
8423
|
+
* // Do the magic
|
|
8424
|
+
* const res =
|
|
8425
|
+
* await vmmigration.projects.locations.sources.diskMigrationJobs.create({
|
|
8426
|
+
* // 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.
|
|
8427
|
+
* diskMigrationJobId: 'placeholder-value',
|
|
8428
|
+
* // Required. The DiskMigrationJob's parent.
|
|
8429
|
+
* parent: 'projects/my-project/locations/my-location/sources/my-source',
|
|
8430
|
+
* // 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).
|
|
8431
|
+
* requestId: 'placeholder-value',
|
|
8432
|
+
*
|
|
8433
|
+
* // Request body metadata
|
|
8434
|
+
* requestBody: {
|
|
8435
|
+
* // request body parameters
|
|
8436
|
+
* // {
|
|
8437
|
+
* // "awsSourceDiskDetails": {},
|
|
8438
|
+
* // "createTime": "my_createTime",
|
|
8439
|
+
* // "errors": [],
|
|
8440
|
+
* // "name": "my_name",
|
|
8441
|
+
* // "state": "my_state",
|
|
8442
|
+
* // "steps": [],
|
|
8443
|
+
* // "targetDetails": {},
|
|
8444
|
+
* // "updateTime": "my_updateTime"
|
|
8445
|
+
* // }
|
|
8446
|
+
* },
|
|
8447
|
+
* });
|
|
8448
|
+
* console.log(res.data);
|
|
8449
|
+
*
|
|
8450
|
+
* // Example response
|
|
8451
|
+
* // {
|
|
8452
|
+
* // "done": false,
|
|
8453
|
+
* // "error": {},
|
|
8454
|
+
* // "metadata": {},
|
|
8455
|
+
* // "name": "my_name",
|
|
8456
|
+
* // "response": {}
|
|
8457
|
+
* // }
|
|
8458
|
+
* }
|
|
8459
|
+
*
|
|
8460
|
+
* main().catch(e => {
|
|
8461
|
+
* console.error(e);
|
|
8462
|
+
* throw e;
|
|
8463
|
+
* });
|
|
8464
|
+
*
|
|
8465
|
+
* ```
|
|
8466
|
+
*
|
|
8467
|
+
* @param params - Parameters for request
|
|
8468
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8469
|
+
* @param callback - Optional callback that handles the response.
|
|
8470
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8471
|
+
*/
|
|
8472
|
+
create(
|
|
8473
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create,
|
|
8474
|
+
options: StreamMethodOptions
|
|
8475
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
8476
|
+
create(
|
|
8477
|
+
params?: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create,
|
|
8478
|
+
options?: MethodOptions
|
|
8479
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
8480
|
+
create(
|
|
8481
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create,
|
|
8482
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8483
|
+
callback: BodyResponseCallback<Readable>
|
|
8484
|
+
): void;
|
|
8485
|
+
create(
|
|
8486
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create,
|
|
8487
|
+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
|
|
8488
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8489
|
+
): void;
|
|
8490
|
+
create(
|
|
8491
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create,
|
|
8492
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8493
|
+
): void;
|
|
8494
|
+
create(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
8495
|
+
create(
|
|
8496
|
+
paramsOrCallback?:
|
|
8497
|
+
| Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create
|
|
8498
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8499
|
+
| BodyResponseCallback<Readable>,
|
|
8500
|
+
optionsOrCallback?:
|
|
8501
|
+
| MethodOptions
|
|
8502
|
+
| StreamMethodOptions
|
|
8503
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8504
|
+
| BodyResponseCallback<Readable>,
|
|
8505
|
+
callback?:
|
|
8506
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8507
|
+
| BodyResponseCallback<Readable>
|
|
8508
|
+
):
|
|
8509
|
+
| void
|
|
8510
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
8511
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
8512
|
+
let params = (paramsOrCallback ||
|
|
8513
|
+
{}) as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create;
|
|
8514
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8515
|
+
|
|
8516
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8517
|
+
callback = paramsOrCallback;
|
|
8518
|
+
params =
|
|
8519
|
+
{} as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create;
|
|
8520
|
+
options = {};
|
|
8521
|
+
}
|
|
8522
|
+
|
|
8523
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8524
|
+
callback = optionsOrCallback;
|
|
8525
|
+
options = {};
|
|
8526
|
+
}
|
|
8527
|
+
|
|
8528
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
8529
|
+
const parameters = {
|
|
8530
|
+
options: Object.assign(
|
|
8531
|
+
{
|
|
8532
|
+
url: (rootUrl + '/v1/{+parent}/diskMigrationJobs').replace(
|
|
8533
|
+
/([^:]\/)\/+/g,
|
|
8534
|
+
'$1'
|
|
8535
|
+
),
|
|
8536
|
+
method: 'POST',
|
|
8537
|
+
apiVersion: '',
|
|
8538
|
+
},
|
|
8539
|
+
options
|
|
8540
|
+
),
|
|
8541
|
+
params,
|
|
8542
|
+
requiredParams: ['parent'],
|
|
8543
|
+
pathParams: ['parent'],
|
|
8544
|
+
context: this.context,
|
|
8545
|
+
};
|
|
8546
|
+
if (callback) {
|
|
8547
|
+
createAPIRequest<Schema$Operation>(
|
|
8548
|
+
parameters,
|
|
8549
|
+
callback as BodyResponseCallback<unknown>
|
|
8550
|
+
);
|
|
8551
|
+
} else {
|
|
8552
|
+
return createAPIRequest<Schema$Operation>(parameters);
|
|
8553
|
+
}
|
|
8554
|
+
}
|
|
8555
|
+
|
|
8556
|
+
/**
|
|
8557
|
+
* Deletes a single DiskMigrationJob.
|
|
8558
|
+
* @example
|
|
8559
|
+
* ```js
|
|
8560
|
+
* // Before running the sample:
|
|
8561
|
+
* // - Enable the API at:
|
|
8562
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
8563
|
+
* // - Login into gcloud by running:
|
|
8564
|
+
* // ```sh
|
|
8565
|
+
* // $ gcloud auth application-default login
|
|
8566
|
+
* // ```
|
|
8567
|
+
* // - Install the npm module by running:
|
|
8568
|
+
* // ```sh
|
|
8569
|
+
* // $ npm install googleapis
|
|
8570
|
+
* // ```
|
|
8571
|
+
*
|
|
8572
|
+
* const {google} = require('googleapis');
|
|
8573
|
+
* const vmmigration = google.vmmigration('v1');
|
|
8574
|
+
*
|
|
8575
|
+
* async function main() {
|
|
8576
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8577
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8578
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8579
|
+
* });
|
|
8580
|
+
*
|
|
8581
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8582
|
+
* const authClient = await auth.getClient();
|
|
8583
|
+
* google.options({auth: authClient});
|
|
8584
|
+
*
|
|
8585
|
+
* // Do the magic
|
|
8586
|
+
* const res =
|
|
8587
|
+
* await vmmigration.projects.locations.sources.diskMigrationJobs.delete({
|
|
8588
|
+
* // Required. The name of the DiskMigrationJob.
|
|
8589
|
+
* name: 'projects/my-project/locations/my-location/sources/my-source/diskMigrationJobs/my-diskMigrationJob',
|
|
8590
|
+
* });
|
|
8591
|
+
* console.log(res.data);
|
|
8592
|
+
*
|
|
8593
|
+
* // Example response
|
|
8594
|
+
* // {
|
|
8595
|
+
* // "done": false,
|
|
8596
|
+
* // "error": {},
|
|
8597
|
+
* // "metadata": {},
|
|
8598
|
+
* // "name": "my_name",
|
|
8599
|
+
* // "response": {}
|
|
8600
|
+
* // }
|
|
8601
|
+
* }
|
|
8602
|
+
*
|
|
8603
|
+
* main().catch(e => {
|
|
8604
|
+
* console.error(e);
|
|
8605
|
+
* throw e;
|
|
8606
|
+
* });
|
|
8607
|
+
*
|
|
8608
|
+
* ```
|
|
8609
|
+
*
|
|
8610
|
+
* @param params - Parameters for request
|
|
8611
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8612
|
+
* @param callback - Optional callback that handles the response.
|
|
8613
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8614
|
+
*/
|
|
8615
|
+
delete(
|
|
8616
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete,
|
|
8617
|
+
options: StreamMethodOptions
|
|
8618
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
8619
|
+
delete(
|
|
8620
|
+
params?: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete,
|
|
8621
|
+
options?: MethodOptions
|
|
8622
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
8623
|
+
delete(
|
|
8624
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete,
|
|
8625
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8626
|
+
callback: BodyResponseCallback<Readable>
|
|
8627
|
+
): void;
|
|
8628
|
+
delete(
|
|
8629
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete,
|
|
8630
|
+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
|
|
8631
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8632
|
+
): void;
|
|
8633
|
+
delete(
|
|
8634
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete,
|
|
8635
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
8636
|
+
): void;
|
|
8637
|
+
delete(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
8638
|
+
delete(
|
|
8639
|
+
paramsOrCallback?:
|
|
8640
|
+
| Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete
|
|
8641
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8642
|
+
| BodyResponseCallback<Readable>,
|
|
8643
|
+
optionsOrCallback?:
|
|
8644
|
+
| MethodOptions
|
|
8645
|
+
| StreamMethodOptions
|
|
8646
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8647
|
+
| BodyResponseCallback<Readable>,
|
|
8648
|
+
callback?:
|
|
8649
|
+
| BodyResponseCallback<Schema$Operation>
|
|
8650
|
+
| BodyResponseCallback<Readable>
|
|
8651
|
+
):
|
|
8652
|
+
| void
|
|
8653
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
8654
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
8655
|
+
let params = (paramsOrCallback ||
|
|
8656
|
+
{}) as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete;
|
|
8657
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8658
|
+
|
|
8659
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8660
|
+
callback = paramsOrCallback;
|
|
8661
|
+
params =
|
|
8662
|
+
{} as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete;
|
|
8663
|
+
options = {};
|
|
8664
|
+
}
|
|
8665
|
+
|
|
8666
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8667
|
+
callback = optionsOrCallback;
|
|
8668
|
+
options = {};
|
|
8669
|
+
}
|
|
8670
|
+
|
|
8671
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
8672
|
+
const parameters = {
|
|
8673
|
+
options: Object.assign(
|
|
8674
|
+
{
|
|
8675
|
+
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
8676
|
+
method: 'DELETE',
|
|
8677
|
+
apiVersion: '',
|
|
8678
|
+
},
|
|
8679
|
+
options
|
|
8680
|
+
),
|
|
8681
|
+
params,
|
|
8682
|
+
requiredParams: ['name'],
|
|
8683
|
+
pathParams: ['name'],
|
|
8684
|
+
context: this.context,
|
|
8685
|
+
};
|
|
8686
|
+
if (callback) {
|
|
8687
|
+
createAPIRequest<Schema$Operation>(
|
|
8688
|
+
parameters,
|
|
8689
|
+
callback as BodyResponseCallback<unknown>
|
|
8690
|
+
);
|
|
8691
|
+
} else {
|
|
8692
|
+
return createAPIRequest<Schema$Operation>(parameters);
|
|
8693
|
+
}
|
|
8694
|
+
}
|
|
8695
|
+
|
|
8696
|
+
/**
|
|
8697
|
+
* Gets details of a single DiskMigrationJob.
|
|
8698
|
+
* @example
|
|
8699
|
+
* ```js
|
|
8700
|
+
* // Before running the sample:
|
|
8701
|
+
* // - Enable the API at:
|
|
8702
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
8703
|
+
* // - Login into gcloud by running:
|
|
8704
|
+
* // ```sh
|
|
8705
|
+
* // $ gcloud auth application-default login
|
|
8706
|
+
* // ```
|
|
8707
|
+
* // - Install the npm module by running:
|
|
8708
|
+
* // ```sh
|
|
8709
|
+
* // $ npm install googleapis
|
|
8710
|
+
* // ```
|
|
8711
|
+
*
|
|
8712
|
+
* const {google} = require('googleapis');
|
|
8713
|
+
* const vmmigration = google.vmmigration('v1');
|
|
8714
|
+
*
|
|
8715
|
+
* async function main() {
|
|
8716
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8717
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8718
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8719
|
+
* });
|
|
8720
|
+
*
|
|
8721
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8722
|
+
* const authClient = await auth.getClient();
|
|
8723
|
+
* google.options({auth: authClient});
|
|
8724
|
+
*
|
|
8725
|
+
* // Do the magic
|
|
8726
|
+
* const res =
|
|
8727
|
+
* await vmmigration.projects.locations.sources.diskMigrationJobs.get({
|
|
8728
|
+
* // Required. The name of the DiskMigrationJob.
|
|
8729
|
+
* name: 'projects/my-project/locations/my-location/sources/my-source/diskMigrationJobs/my-diskMigrationJob',
|
|
8730
|
+
* });
|
|
8731
|
+
* console.log(res.data);
|
|
8732
|
+
*
|
|
8733
|
+
* // Example response
|
|
8734
|
+
* // {
|
|
8735
|
+
* // "awsSourceDiskDetails": {},
|
|
8736
|
+
* // "createTime": "my_createTime",
|
|
8737
|
+
* // "errors": [],
|
|
8738
|
+
* // "name": "my_name",
|
|
8739
|
+
* // "state": "my_state",
|
|
8740
|
+
* // "steps": [],
|
|
8741
|
+
* // "targetDetails": {},
|
|
8742
|
+
* // "updateTime": "my_updateTime"
|
|
8743
|
+
* // }
|
|
8744
|
+
* }
|
|
8745
|
+
*
|
|
8746
|
+
* main().catch(e => {
|
|
8747
|
+
* console.error(e);
|
|
8748
|
+
* throw e;
|
|
8749
|
+
* });
|
|
8750
|
+
*
|
|
8751
|
+
* ```
|
|
8752
|
+
*
|
|
8753
|
+
* @param params - Parameters for request
|
|
8754
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8755
|
+
* @param callback - Optional callback that handles the response.
|
|
8756
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8757
|
+
*/
|
|
8758
|
+
get(
|
|
8759
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get,
|
|
8760
|
+
options: StreamMethodOptions
|
|
8761
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
8762
|
+
get(
|
|
8763
|
+
params?: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get,
|
|
8764
|
+
options?: MethodOptions
|
|
8765
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$DiskMigrationJob>>;
|
|
8766
|
+
get(
|
|
8767
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get,
|
|
8768
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8769
|
+
callback: BodyResponseCallback<Readable>
|
|
8770
|
+
): void;
|
|
8771
|
+
get(
|
|
8772
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get,
|
|
8773
|
+
options: MethodOptions | BodyResponseCallback<Schema$DiskMigrationJob>,
|
|
8774
|
+
callback: BodyResponseCallback<Schema$DiskMigrationJob>
|
|
8775
|
+
): void;
|
|
8776
|
+
get(
|
|
8777
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get,
|
|
8778
|
+
callback: BodyResponseCallback<Schema$DiskMigrationJob>
|
|
8779
|
+
): void;
|
|
8780
|
+
get(callback: BodyResponseCallback<Schema$DiskMigrationJob>): void;
|
|
8781
|
+
get(
|
|
8782
|
+
paramsOrCallback?:
|
|
8783
|
+
| Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get
|
|
8784
|
+
| BodyResponseCallback<Schema$DiskMigrationJob>
|
|
8785
|
+
| BodyResponseCallback<Readable>,
|
|
8786
|
+
optionsOrCallback?:
|
|
8787
|
+
| MethodOptions
|
|
8788
|
+
| StreamMethodOptions
|
|
8789
|
+
| BodyResponseCallback<Schema$DiskMigrationJob>
|
|
8790
|
+
| BodyResponseCallback<Readable>,
|
|
8791
|
+
callback?:
|
|
8792
|
+
| BodyResponseCallback<Schema$DiskMigrationJob>
|
|
8793
|
+
| BodyResponseCallback<Readable>
|
|
8794
|
+
):
|
|
8795
|
+
| void
|
|
8796
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$DiskMigrationJob>>
|
|
8797
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
8798
|
+
let params = (paramsOrCallback ||
|
|
8799
|
+
{}) as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get;
|
|
8800
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8801
|
+
|
|
8802
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8803
|
+
callback = paramsOrCallback;
|
|
8804
|
+
params =
|
|
8805
|
+
{} as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get;
|
|
8806
|
+
options = {};
|
|
8807
|
+
}
|
|
8808
|
+
|
|
8809
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8810
|
+
callback = optionsOrCallback;
|
|
8811
|
+
options = {};
|
|
8812
|
+
}
|
|
8813
|
+
|
|
8814
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
8815
|
+
const parameters = {
|
|
8816
|
+
options: Object.assign(
|
|
8817
|
+
{
|
|
8818
|
+
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
8819
|
+
method: 'GET',
|
|
8820
|
+
apiVersion: '',
|
|
8821
|
+
},
|
|
8822
|
+
options
|
|
8823
|
+
),
|
|
8824
|
+
params,
|
|
8825
|
+
requiredParams: ['name'],
|
|
8826
|
+
pathParams: ['name'],
|
|
8827
|
+
context: this.context,
|
|
8828
|
+
};
|
|
8829
|
+
if (callback) {
|
|
8830
|
+
createAPIRequest<Schema$DiskMigrationJob>(
|
|
8831
|
+
parameters,
|
|
8832
|
+
callback as BodyResponseCallback<unknown>
|
|
8833
|
+
);
|
|
8834
|
+
} else {
|
|
8835
|
+
return createAPIRequest<Schema$DiskMigrationJob>(parameters);
|
|
8836
|
+
}
|
|
8837
|
+
}
|
|
8838
|
+
|
|
8839
|
+
/**
|
|
8840
|
+
* Lists DiskMigrationJobs in a given Source.
|
|
8841
|
+
* @example
|
|
8842
|
+
* ```js
|
|
8843
|
+
* // Before running the sample:
|
|
8844
|
+
* // - Enable the API at:
|
|
8845
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
8846
|
+
* // - Login into gcloud by running:
|
|
8847
|
+
* // ```sh
|
|
8848
|
+
* // $ gcloud auth application-default login
|
|
8849
|
+
* // ```
|
|
8850
|
+
* // - Install the npm module by running:
|
|
8851
|
+
* // ```sh
|
|
8852
|
+
* // $ npm install googleapis
|
|
8853
|
+
* // ```
|
|
8854
|
+
*
|
|
8855
|
+
* const {google} = require('googleapis');
|
|
8856
|
+
* const vmmigration = google.vmmigration('v1');
|
|
8857
|
+
*
|
|
8858
|
+
* async function main() {
|
|
8859
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8860
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8861
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8862
|
+
* });
|
|
8863
|
+
*
|
|
8864
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8865
|
+
* const authClient = await auth.getClient();
|
|
8866
|
+
* google.options({auth: authClient});
|
|
8867
|
+
*
|
|
8868
|
+
* // Do the magic
|
|
8869
|
+
* const res =
|
|
8870
|
+
* await vmmigration.projects.locations.sources.diskMigrationJobs.list({
|
|
8871
|
+
* // Optional. The filter request (according to AIP-160).
|
|
8872
|
+
* filter: 'placeholder-value',
|
|
8873
|
+
* // Optional. Ordering of the result list.
|
|
8874
|
+
* orderBy: 'placeholder-value',
|
|
8875
|
+
* // 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.
|
|
8876
|
+
* pageSize: 'placeholder-value',
|
|
8877
|
+
* // 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.
|
|
8878
|
+
* pageToken: 'placeholder-value',
|
|
8879
|
+
* // Required. The parent, which owns this collection of DiskMigrationJobs.
|
|
8880
|
+
* parent: 'projects/my-project/locations/my-location/sources/my-source',
|
|
8881
|
+
* });
|
|
8882
|
+
* console.log(res.data);
|
|
8883
|
+
*
|
|
8884
|
+
* // Example response
|
|
8885
|
+
* // {
|
|
8886
|
+
* // "diskMigrationJobs": [],
|
|
8887
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
8888
|
+
* // "unreachable": []
|
|
8889
|
+
* // }
|
|
8890
|
+
* }
|
|
8891
|
+
*
|
|
8892
|
+
* main().catch(e => {
|
|
8893
|
+
* console.error(e);
|
|
8894
|
+
* throw e;
|
|
8895
|
+
* });
|
|
8896
|
+
*
|
|
8897
|
+
* ```
|
|
8898
|
+
*
|
|
8899
|
+
* @param params - Parameters for request
|
|
8900
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8901
|
+
* @param callback - Optional callback that handles the response.
|
|
8902
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8903
|
+
*/
|
|
8904
|
+
list(
|
|
8905
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List,
|
|
8906
|
+
options: StreamMethodOptions
|
|
8907
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
8908
|
+
list(
|
|
8909
|
+
params?: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List,
|
|
8910
|
+
options?: MethodOptions
|
|
8911
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListDiskMigrationJobsResponse>>;
|
|
8912
|
+
list(
|
|
8913
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List,
|
|
8914
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8915
|
+
callback: BodyResponseCallback<Readable>
|
|
8916
|
+
): void;
|
|
8917
|
+
list(
|
|
8918
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List,
|
|
8919
|
+
options:
|
|
8920
|
+
| MethodOptions
|
|
8921
|
+
| BodyResponseCallback<Schema$ListDiskMigrationJobsResponse>,
|
|
8922
|
+
callback: BodyResponseCallback<Schema$ListDiskMigrationJobsResponse>
|
|
8923
|
+
): void;
|
|
8924
|
+
list(
|
|
8925
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List,
|
|
8926
|
+
callback: BodyResponseCallback<Schema$ListDiskMigrationJobsResponse>
|
|
8927
|
+
): void;
|
|
8928
|
+
list(
|
|
8929
|
+
callback: BodyResponseCallback<Schema$ListDiskMigrationJobsResponse>
|
|
8930
|
+
): void;
|
|
8931
|
+
list(
|
|
8932
|
+
paramsOrCallback?:
|
|
8933
|
+
| Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List
|
|
8934
|
+
| BodyResponseCallback<Schema$ListDiskMigrationJobsResponse>
|
|
8935
|
+
| BodyResponseCallback<Readable>,
|
|
8936
|
+
optionsOrCallback?:
|
|
8937
|
+
| MethodOptions
|
|
8938
|
+
| StreamMethodOptions
|
|
8939
|
+
| BodyResponseCallback<Schema$ListDiskMigrationJobsResponse>
|
|
8940
|
+
| BodyResponseCallback<Readable>,
|
|
8941
|
+
callback?:
|
|
8942
|
+
| BodyResponseCallback<Schema$ListDiskMigrationJobsResponse>
|
|
8943
|
+
| BodyResponseCallback<Readable>
|
|
8944
|
+
):
|
|
8945
|
+
| void
|
|
8946
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListDiskMigrationJobsResponse>>
|
|
8947
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
8948
|
+
let params = (paramsOrCallback ||
|
|
8949
|
+
{}) as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List;
|
|
8950
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8951
|
+
|
|
8952
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8953
|
+
callback = paramsOrCallback;
|
|
8954
|
+
params =
|
|
8955
|
+
{} as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List;
|
|
8956
|
+
options = {};
|
|
8957
|
+
}
|
|
8958
|
+
|
|
8959
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8960
|
+
callback = optionsOrCallback;
|
|
8961
|
+
options = {};
|
|
8962
|
+
}
|
|
8963
|
+
|
|
8964
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
8965
|
+
const parameters = {
|
|
8966
|
+
options: Object.assign(
|
|
8967
|
+
{
|
|
8968
|
+
url: (rootUrl + '/v1/{+parent}/diskMigrationJobs').replace(
|
|
8969
|
+
/([^:]\/)\/+/g,
|
|
8970
|
+
'$1'
|
|
8971
|
+
),
|
|
8972
|
+
method: 'GET',
|
|
8973
|
+
apiVersion: '',
|
|
8974
|
+
},
|
|
8975
|
+
options
|
|
8976
|
+
),
|
|
8977
|
+
params,
|
|
8978
|
+
requiredParams: ['parent'],
|
|
8979
|
+
pathParams: ['parent'],
|
|
8980
|
+
context: this.context,
|
|
8981
|
+
};
|
|
8982
|
+
if (callback) {
|
|
8983
|
+
createAPIRequest<Schema$ListDiskMigrationJobsResponse>(
|
|
8984
|
+
parameters,
|
|
8985
|
+
callback as BodyResponseCallback<unknown>
|
|
8986
|
+
);
|
|
8987
|
+
} else {
|
|
8988
|
+
return createAPIRequest<Schema$ListDiskMigrationJobsResponse>(
|
|
8989
|
+
parameters
|
|
8990
|
+
);
|
|
8991
|
+
}
|
|
8992
|
+
}
|
|
8993
|
+
|
|
8994
|
+
/**
|
|
8995
|
+
* Updates the parameters of a single DiskMigrationJob.
|
|
8996
|
+
* @example
|
|
8997
|
+
* ```js
|
|
8998
|
+
* // Before running the sample:
|
|
8999
|
+
* // - Enable the API at:
|
|
9000
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
9001
|
+
* // - Login into gcloud by running:
|
|
9002
|
+
* // ```sh
|
|
9003
|
+
* // $ gcloud auth application-default login
|
|
9004
|
+
* // ```
|
|
9005
|
+
* // - Install the npm module by running:
|
|
9006
|
+
* // ```sh
|
|
9007
|
+
* // $ npm install googleapis
|
|
9008
|
+
* // ```
|
|
9009
|
+
*
|
|
9010
|
+
* const {google} = require('googleapis');
|
|
9011
|
+
* const vmmigration = google.vmmigration('v1');
|
|
9012
|
+
*
|
|
9013
|
+
* async function main() {
|
|
9014
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9015
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9016
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9017
|
+
* });
|
|
9018
|
+
*
|
|
9019
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9020
|
+
* const authClient = await auth.getClient();
|
|
9021
|
+
* google.options({auth: authClient});
|
|
9022
|
+
*
|
|
9023
|
+
* // Do the magic
|
|
9024
|
+
* const res =
|
|
9025
|
+
* await vmmigration.projects.locations.sources.diskMigrationJobs.patch({
|
|
9026
|
+
* // Output only. Identifier. The identifier of the DiskMigrationJob.
|
|
9027
|
+
* name: 'projects/my-project/locations/my-location/sources/my-source/diskMigrationJobs/my-diskMigrationJob',
|
|
9028
|
+
* // 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).
|
|
9029
|
+
* requestId: 'placeholder-value',
|
|
9030
|
+
* // 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.
|
|
9031
|
+
* updateMask: 'placeholder-value',
|
|
9032
|
+
*
|
|
9033
|
+
* // Request body metadata
|
|
9034
|
+
* requestBody: {
|
|
9035
|
+
* // request body parameters
|
|
9036
|
+
* // {
|
|
9037
|
+
* // "awsSourceDiskDetails": {},
|
|
9038
|
+
* // "createTime": "my_createTime",
|
|
9039
|
+
* // "errors": [],
|
|
9040
|
+
* // "name": "my_name",
|
|
9041
|
+
* // "state": "my_state",
|
|
9042
|
+
* // "steps": [],
|
|
9043
|
+
* // "targetDetails": {},
|
|
9044
|
+
* // "updateTime": "my_updateTime"
|
|
9045
|
+
* // }
|
|
9046
|
+
* },
|
|
9047
|
+
* });
|
|
9048
|
+
* console.log(res.data);
|
|
9049
|
+
*
|
|
9050
|
+
* // Example response
|
|
9051
|
+
* // {
|
|
9052
|
+
* // "done": false,
|
|
9053
|
+
* // "error": {},
|
|
9054
|
+
* // "metadata": {},
|
|
9055
|
+
* // "name": "my_name",
|
|
9056
|
+
* // "response": {}
|
|
9057
|
+
* // }
|
|
9058
|
+
* }
|
|
9059
|
+
*
|
|
9060
|
+
* main().catch(e => {
|
|
9061
|
+
* console.error(e);
|
|
9062
|
+
* throw e;
|
|
9063
|
+
* });
|
|
9064
|
+
*
|
|
9065
|
+
* ```
|
|
9066
|
+
*
|
|
9067
|
+
* @param params - Parameters for request
|
|
9068
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
9069
|
+
* @param callback - Optional callback that handles the response.
|
|
9070
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
9071
|
+
*/
|
|
9072
|
+
patch(
|
|
9073
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch,
|
|
9074
|
+
options: StreamMethodOptions
|
|
9075
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
9076
|
+
patch(
|
|
9077
|
+
params?: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch,
|
|
9078
|
+
options?: MethodOptions
|
|
9079
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
9080
|
+
patch(
|
|
9081
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch,
|
|
9082
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
9083
|
+
callback: BodyResponseCallback<Readable>
|
|
9084
|
+
): void;
|
|
9085
|
+
patch(
|
|
9086
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch,
|
|
9087
|
+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
|
|
9088
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
9089
|
+
): void;
|
|
9090
|
+
patch(
|
|
9091
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch,
|
|
9092
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
9093
|
+
): void;
|
|
9094
|
+
patch(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
9095
|
+
patch(
|
|
9096
|
+
paramsOrCallback?:
|
|
9097
|
+
| Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch
|
|
9098
|
+
| BodyResponseCallback<Schema$Operation>
|
|
9099
|
+
| BodyResponseCallback<Readable>,
|
|
9100
|
+
optionsOrCallback?:
|
|
9101
|
+
| MethodOptions
|
|
9102
|
+
| StreamMethodOptions
|
|
9103
|
+
| BodyResponseCallback<Schema$Operation>
|
|
9104
|
+
| BodyResponseCallback<Readable>,
|
|
9105
|
+
callback?:
|
|
9106
|
+
| BodyResponseCallback<Schema$Operation>
|
|
9107
|
+
| BodyResponseCallback<Readable>
|
|
9108
|
+
):
|
|
9109
|
+
| void
|
|
9110
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
9111
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
9112
|
+
let params = (paramsOrCallback ||
|
|
9113
|
+
{}) as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch;
|
|
9114
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
9115
|
+
|
|
9116
|
+
if (typeof paramsOrCallback === 'function') {
|
|
9117
|
+
callback = paramsOrCallback;
|
|
9118
|
+
params =
|
|
9119
|
+
{} as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch;
|
|
9120
|
+
options = {};
|
|
9121
|
+
}
|
|
9122
|
+
|
|
9123
|
+
if (typeof optionsOrCallback === 'function') {
|
|
9124
|
+
callback = optionsOrCallback;
|
|
9125
|
+
options = {};
|
|
9126
|
+
}
|
|
9127
|
+
|
|
9128
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
9129
|
+
const parameters = {
|
|
9130
|
+
options: Object.assign(
|
|
9131
|
+
{
|
|
9132
|
+
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
9133
|
+
method: 'PATCH',
|
|
9134
|
+
apiVersion: '',
|
|
9135
|
+
},
|
|
9136
|
+
options
|
|
9137
|
+
),
|
|
9138
|
+
params,
|
|
9139
|
+
requiredParams: ['name'],
|
|
9140
|
+
pathParams: ['name'],
|
|
9141
|
+
context: this.context,
|
|
9142
|
+
};
|
|
9143
|
+
if (callback) {
|
|
9144
|
+
createAPIRequest<Schema$Operation>(
|
|
9145
|
+
parameters,
|
|
9146
|
+
callback as BodyResponseCallback<unknown>
|
|
9147
|
+
);
|
|
9148
|
+
} else {
|
|
9149
|
+
return createAPIRequest<Schema$Operation>(parameters);
|
|
9150
|
+
}
|
|
9151
|
+
}
|
|
9152
|
+
|
|
9153
|
+
/**
|
|
9154
|
+
* Runs the disk migration job.
|
|
9155
|
+
* @example
|
|
9156
|
+
* ```js
|
|
9157
|
+
* // Before running the sample:
|
|
9158
|
+
* // - Enable the API at:
|
|
9159
|
+
* // https://console.developers.google.com/apis/api/vmmigration.googleapis.com
|
|
9160
|
+
* // - Login into gcloud by running:
|
|
9161
|
+
* // ```sh
|
|
9162
|
+
* // $ gcloud auth application-default login
|
|
9163
|
+
* // ```
|
|
9164
|
+
* // - Install the npm module by running:
|
|
9165
|
+
* // ```sh
|
|
9166
|
+
* // $ npm install googleapis
|
|
9167
|
+
* // ```
|
|
9168
|
+
*
|
|
9169
|
+
* const {google} = require('googleapis');
|
|
9170
|
+
* const vmmigration = google.vmmigration('v1');
|
|
9171
|
+
*
|
|
9172
|
+
* async function main() {
|
|
9173
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9174
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9175
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9176
|
+
* });
|
|
9177
|
+
*
|
|
9178
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9179
|
+
* const authClient = await auth.getClient();
|
|
9180
|
+
* google.options({auth: authClient});
|
|
9181
|
+
*
|
|
9182
|
+
* // Do the magic
|
|
9183
|
+
* const res =
|
|
9184
|
+
* await vmmigration.projects.locations.sources.diskMigrationJobs.run({
|
|
9185
|
+
* // Required. The name of the DiskMigrationJob.
|
|
9186
|
+
* name: 'projects/my-project/locations/my-location/sources/my-source/diskMigrationJobs/my-diskMigrationJob',
|
|
9187
|
+
*
|
|
9188
|
+
* // Request body metadata
|
|
9189
|
+
* requestBody: {
|
|
9190
|
+
* // request body parameters
|
|
9191
|
+
* // {}
|
|
9192
|
+
* },
|
|
9193
|
+
* });
|
|
9194
|
+
* console.log(res.data);
|
|
9195
|
+
*
|
|
9196
|
+
* // Example response
|
|
9197
|
+
* // {
|
|
9198
|
+
* // "done": false,
|
|
9199
|
+
* // "error": {},
|
|
9200
|
+
* // "metadata": {},
|
|
9201
|
+
* // "name": "my_name",
|
|
9202
|
+
* // "response": {}
|
|
9203
|
+
* // }
|
|
9204
|
+
* }
|
|
9205
|
+
*
|
|
9206
|
+
* main().catch(e => {
|
|
9207
|
+
* console.error(e);
|
|
9208
|
+
* throw e;
|
|
9209
|
+
* });
|
|
9210
|
+
*
|
|
9211
|
+
* ```
|
|
9212
|
+
*
|
|
9213
|
+
* @param params - Parameters for request
|
|
9214
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
9215
|
+
* @param callback - Optional callback that handles the response.
|
|
9216
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
9217
|
+
*/
|
|
9218
|
+
run(
|
|
9219
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run,
|
|
9220
|
+
options: StreamMethodOptions
|
|
9221
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
9222
|
+
run(
|
|
9223
|
+
params?: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run,
|
|
9224
|
+
options?: MethodOptions
|
|
9225
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
9226
|
+
run(
|
|
9227
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run,
|
|
9228
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
9229
|
+
callback: BodyResponseCallback<Readable>
|
|
9230
|
+
): void;
|
|
9231
|
+
run(
|
|
9232
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run,
|
|
9233
|
+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
|
|
9234
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
9235
|
+
): void;
|
|
9236
|
+
run(
|
|
9237
|
+
params: Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run,
|
|
9238
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
9239
|
+
): void;
|
|
9240
|
+
run(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
9241
|
+
run(
|
|
9242
|
+
paramsOrCallback?:
|
|
9243
|
+
| Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run
|
|
9244
|
+
| BodyResponseCallback<Schema$Operation>
|
|
9245
|
+
| BodyResponseCallback<Readable>,
|
|
9246
|
+
optionsOrCallback?:
|
|
9247
|
+
| MethodOptions
|
|
9248
|
+
| StreamMethodOptions
|
|
9249
|
+
| BodyResponseCallback<Schema$Operation>
|
|
9250
|
+
| BodyResponseCallback<Readable>,
|
|
9251
|
+
callback?:
|
|
9252
|
+
| BodyResponseCallback<Schema$Operation>
|
|
9253
|
+
| BodyResponseCallback<Readable>
|
|
9254
|
+
):
|
|
9255
|
+
| void
|
|
9256
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
9257
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
9258
|
+
let params = (paramsOrCallback ||
|
|
9259
|
+
{}) as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run;
|
|
9260
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
9261
|
+
|
|
9262
|
+
if (typeof paramsOrCallback === 'function') {
|
|
9263
|
+
callback = paramsOrCallback;
|
|
9264
|
+
params =
|
|
9265
|
+
{} as Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run;
|
|
9266
|
+
options = {};
|
|
9267
|
+
}
|
|
9268
|
+
|
|
9269
|
+
if (typeof optionsOrCallback === 'function') {
|
|
9270
|
+
callback = optionsOrCallback;
|
|
9271
|
+
options = {};
|
|
9272
|
+
}
|
|
9273
|
+
|
|
9274
|
+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
|
|
9275
|
+
const parameters = {
|
|
9276
|
+
options: Object.assign(
|
|
9277
|
+
{
|
|
9278
|
+
url: (rootUrl + '/v1/{+name}:run').replace(/([^:]\/)\/+/g, '$1'),
|
|
9279
|
+
method: 'POST',
|
|
9280
|
+
apiVersion: '',
|
|
9281
|
+
},
|
|
9282
|
+
options
|
|
9283
|
+
),
|
|
9284
|
+
params,
|
|
9285
|
+
requiredParams: ['name'],
|
|
9286
|
+
pathParams: ['name'],
|
|
9287
|
+
context: this.context,
|
|
9288
|
+
};
|
|
9289
|
+
if (callback) {
|
|
9290
|
+
createAPIRequest<Schema$Operation>(
|
|
9291
|
+
parameters,
|
|
9292
|
+
callback as BodyResponseCallback<unknown>
|
|
9293
|
+
);
|
|
9294
|
+
} else {
|
|
9295
|
+
return createAPIRequest<Schema$Operation>(parameters);
|
|
9296
|
+
}
|
|
9297
|
+
}
|
|
9298
|
+
}
|
|
9299
|
+
|
|
9300
|
+
export interface Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Cancel
|
|
9301
|
+
extends StandardParameters {
|
|
9302
|
+
/**
|
|
9303
|
+
* Required. The name of the DiskMigrationJob.
|
|
9304
|
+
*/
|
|
9305
|
+
name?: string;
|
|
9306
|
+
|
|
9307
|
+
/**
|
|
9308
|
+
* Request body metadata
|
|
9309
|
+
*/
|
|
9310
|
+
requestBody?: Schema$CancelDiskMigrationJobRequest;
|
|
9311
|
+
}
|
|
9312
|
+
export interface Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Create
|
|
9313
|
+
extends StandardParameters {
|
|
9314
|
+
/**
|
|
9315
|
+
* 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.
|
|
9316
|
+
*/
|
|
9317
|
+
diskMigrationJobId?: string;
|
|
9318
|
+
/**
|
|
9319
|
+
* Required. The DiskMigrationJob's parent.
|
|
9320
|
+
*/
|
|
9321
|
+
parent?: string;
|
|
9322
|
+
/**
|
|
9323
|
+
* 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).
|
|
9324
|
+
*/
|
|
9325
|
+
requestId?: string;
|
|
9326
|
+
|
|
9327
|
+
/**
|
|
9328
|
+
* Request body metadata
|
|
9329
|
+
*/
|
|
9330
|
+
requestBody?: Schema$DiskMigrationJob;
|
|
9331
|
+
}
|
|
9332
|
+
export interface Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Delete
|
|
9333
|
+
extends StandardParameters {
|
|
9334
|
+
/**
|
|
9335
|
+
* Required. The name of the DiskMigrationJob.
|
|
9336
|
+
*/
|
|
9337
|
+
name?: string;
|
|
9338
|
+
}
|
|
9339
|
+
export interface Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Get
|
|
9340
|
+
extends StandardParameters {
|
|
9341
|
+
/**
|
|
9342
|
+
* Required. The name of the DiskMigrationJob.
|
|
9343
|
+
*/
|
|
9344
|
+
name?: string;
|
|
9345
|
+
}
|
|
9346
|
+
export interface Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$List
|
|
9347
|
+
extends StandardParameters {
|
|
9348
|
+
/**
|
|
9349
|
+
* Optional. The filter request (according to AIP-160).
|
|
9350
|
+
*/
|
|
9351
|
+
filter?: string;
|
|
9352
|
+
/**
|
|
9353
|
+
* Optional. Ordering of the result list.
|
|
9354
|
+
*/
|
|
9355
|
+
orderBy?: string;
|
|
9356
|
+
/**
|
|
9357
|
+
* 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.
|
|
9358
|
+
*/
|
|
9359
|
+
pageSize?: number;
|
|
9360
|
+
/**
|
|
9361
|
+
* 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.
|
|
9362
|
+
*/
|
|
9363
|
+
pageToken?: string;
|
|
9364
|
+
/**
|
|
9365
|
+
* Required. The parent, which owns this collection of DiskMigrationJobs.
|
|
9366
|
+
*/
|
|
9367
|
+
parent?: string;
|
|
9368
|
+
}
|
|
9369
|
+
export interface Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Patch
|
|
9370
|
+
extends StandardParameters {
|
|
9371
|
+
/**
|
|
9372
|
+
* Output only. Identifier. The identifier of the DiskMigrationJob.
|
|
9373
|
+
*/
|
|
9374
|
+
name?: string;
|
|
9375
|
+
/**
|
|
9376
|
+
* 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).
|
|
9377
|
+
*/
|
|
9378
|
+
requestId?: string;
|
|
9379
|
+
/**
|
|
9380
|
+
* 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.
|
|
9381
|
+
*/
|
|
9382
|
+
updateMask?: string;
|
|
9383
|
+
|
|
9384
|
+
/**
|
|
9385
|
+
* Request body metadata
|
|
9386
|
+
*/
|
|
9387
|
+
requestBody?: Schema$DiskMigrationJob;
|
|
9388
|
+
}
|
|
9389
|
+
export interface Params$Resource$Projects$Locations$Sources$Diskmigrationjobs$Run
|
|
9390
|
+
extends StandardParameters {
|
|
9391
|
+
/**
|
|
9392
|
+
* Required. The name of the DiskMigrationJob.
|
|
9393
|
+
*/
|
|
9394
|
+
name?: string;
|
|
9395
|
+
|
|
9396
|
+
/**
|
|
9397
|
+
* Request body metadata
|
|
9398
|
+
*/
|
|
9399
|
+
requestBody?: Schema$RunDiskMigrationJobRequest;
|
|
9400
|
+
}
|
|
9401
|
+
|
|
7837
9402
|
export class Resource$Projects$Locations$Sources$Migratingvms {
|
|
7838
9403
|
context: APIRequestContext;
|
|
7839
9404
|
cloneJobs: Resource$Projects$Locations$Sources$Migratingvms$Clonejobs;
|