Skip to content

Commit c8230ac

Browse files
feat(vmmigration): update the API
#### vmmigration:v1alpha1 The following keys were added: - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.description - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.flatPath - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.httpMethod - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.id - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.parameterOrder - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.parameters.migratingVm.description - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.parameters.migratingVm.location - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.parameters.migratingVm.pattern - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.parameters.migratingVm.required - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.parameters.migratingVm.type - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.path - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.request.$ref - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.response.$ref - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.scopes - schemas.Expiration.description - schemas.Expiration.id - schemas.Expiration.properties.expireTime.description - schemas.Expiration.properties.expireTime.format - schemas.Expiration.properties.expireTime.readOnly - schemas.Expiration.properties.expireTime.type - schemas.Expiration.properties.extendable.description - schemas.Expiration.properties.extendable.readOnly - schemas.Expiration.properties.extendable.type - schemas.Expiration.properties.extensionCount.description - schemas.Expiration.properties.extensionCount.format - schemas.Expiration.properties.extensionCount.readOnly - schemas.Expiration.properties.extensionCount.type - schemas.Expiration.type - schemas.ExtendMigrationRequest.description - schemas.ExtendMigrationRequest.id - schemas.ExtendMigrationRequest.type - schemas.MigratingVm.properties.expiration.$ref - schemas.MigratingVm.properties.expiration.description - schemas.MigratingVm.properties.expiration.readOnly The following keys were changed: - schemas.MigratingVm.properties.state.enum - schemas.MigratingVm.properties.state.enumDescriptions #### vmmigration:v1 The following keys were added: - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.description - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.flatPath - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.httpMethod - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.id - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.parameterOrder - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.parameters.migratingVm.description - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.parameters.migratingVm.location - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.parameters.migratingVm.pattern - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.parameters.migratingVm.required - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.parameters.migratingVm.type - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.path - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.request.$ref - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.response.$ref - resources.projects.resources.locations.resources.sources.resources.migratingVms.methods.extendMigration.scopes - schemas.Expiration.description - schemas.Expiration.id - schemas.Expiration.properties.expireTime.description - schemas.Expiration.properties.expireTime.format - schemas.Expiration.properties.expireTime.readOnly - schemas.Expiration.properties.expireTime.type - schemas.Expiration.properties.extendable.description - schemas.Expiration.properties.extendable.readOnly - schemas.Expiration.properties.extendable.type - schemas.Expiration.properties.extensionCount.description - schemas.Expiration.properties.extensionCount.format - schemas.Expiration.properties.extensionCount.readOnly - schemas.Expiration.properties.extensionCount.type - schemas.Expiration.type - schemas.ExtendMigrationRequest.description - schemas.ExtendMigrationRequest.id - schemas.ExtendMigrationRequest.type - schemas.MigratingVm.properties.expiration.$ref - schemas.MigratingVm.properties.expiration.description - schemas.MigratingVm.properties.expiration.readOnly The following keys were changed: - schemas.MigratingVm.properties.state.enum - schemas.MigratingVm.properties.state.enumDescriptions
1 parent 6c65142 commit c8230ac

File tree

4 files changed

+392
-6
lines changed

4 files changed

+392
-6
lines changed

discovery/vmmigration-v1.json

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,34 @@
12511251
"https://www.googleapis.com/auth/cloud-platform"
12521252
]
12531253
},
1254+
"extendMigration": {
1255+
"description": "Extend the migrating VM time to live.",
1256+
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:extendMigration",
1257+
"httpMethod": "POST",
1258+
"id": "vmmigration.projects.locations.sources.migratingVms.extendMigration",
1259+
"parameterOrder": [
1260+
"migratingVm"
1261+
],
1262+
"parameters": {
1263+
"migratingVm": {
1264+
"description": "Required. The name of the MigratingVm.",
1265+
"location": "path",
1266+
"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
1267+
"required": true,
1268+
"type": "string"
1269+
}
1270+
},
1271+
"path": "v1/{+migratingVm}:extendMigration",
1272+
"request": {
1273+
"$ref": "ExtendMigrationRequest"
1274+
},
1275+
"response": {
1276+
"$ref": "Operation"
1277+
},
1278+
"scopes": [
1279+
"https://www.googleapis.com/auth/cloud-platform"
1280+
]
1281+
},
12541282
"finalizeMigration": {
12551283
"description": "Marks a migration as completed, deleting migration resources that are no longer being used. Only applicable after cutover is done.",
12561284
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:finalizeMigration",
@@ -2226,7 +2254,7 @@
22262254
}
22272255
}
22282256
},
2229-
"revision": "20250321",
2257+
"revision": "20250521",
22302258
"rootUrl": "https://vmmigration.googleapis.com/",
22312259
"schemas": {
22322260
"AccessKeyCredentials": {
@@ -3983,6 +4011,36 @@
39834011
},
39844012
"type": "object"
39854013
},
4014+
"Expiration": {
4015+
"description": "Expiration holds information about the expiration of a MigratingVm.",
4016+
"id": "Expiration",
4017+
"properties": {
4018+
"expireTime": {
4019+
"description": "Output only. Timestamp of when this resource is considered expired.",
4020+
"format": "google-datetime",
4021+
"readOnly": true,
4022+
"type": "string"
4023+
},
4024+
"extendable": {
4025+
"description": "Output only. Describes whether the expiration can be extended.",
4026+
"readOnly": true,
4027+
"type": "boolean"
4028+
},
4029+
"extensionCount": {
4030+
"description": "Output only. The number of times expiration was extended.",
4031+
"format": "int32",
4032+
"readOnly": true,
4033+
"type": "integer"
4034+
}
4035+
},
4036+
"type": "object"
4037+
},
4038+
"ExtendMigrationRequest": {
4039+
"description": "Request message for 'ExtendMigrationRequest' request.",
4040+
"id": "ExtendMigrationRequest",
4041+
"properties": {},
4042+
"type": "object"
4043+
},
39864044
"FetchInventoryResponse": {
39874045
"description": "Response message for fetchInventory.",
39884046
"id": "FetchInventoryResponse",
@@ -4844,6 +4902,11 @@
48444902
"description": "Output only. Provides details on the state of the Migrating VM in case of an error in replication.",
48454903
"readOnly": true
48464904
},
4905+
"expiration": {
4906+
"$ref": "Expiration",
4907+
"description": "Output only. Provides details about the expiration state of the migrating VM.",
4908+
"readOnly": true
4909+
},
48474910
"group": {
48484911
"description": "Output only. The group this migrating vm is included in, if any. The group is represented by the full path of the appropriate Group resource.",
48494912
"readOnly": true,
@@ -4909,7 +4972,9 @@
49094972
"PAUSED",
49104973
"FINALIZING",
49114974
"FINALIZED",
4912-
"ERROR"
4975+
"ERROR",
4976+
"EXPIRED",
4977+
"FINALIZED_EXPIRED"
49134978
],
49144979
"enumDescriptions": [
49154980
"The state was not sampled by the health checks yet.",
@@ -4923,7 +4988,9 @@
49234988
"The replication was paused by the user and no cycles are scheduled to run.",
49244989
"The migrating VM is being finalized and migration resources are being removed.",
49254990
"The replication process is done. The migrating VM is finalized and no longer consumes billable resources.",
4926-
"The replication process encountered an unrecoverable error and was aborted."
4991+
"The replication process encountered an unrecoverable error and was aborted.",
4992+
"The migrating VM has passed its expiration date. It might be possible to bring it back to \"Active\" state by updating the TTL field. For more information, see the documentation.",
4993+
"The migrating VM's has been finalized and migration resources have been removed."
49274994
],
49284995
"readOnly": true,
49294996
"type": "string"

discovery/vmmigration-v1alpha1.json

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,34 @@
12511251
"https://www.googleapis.com/auth/cloud-platform"
12521252
]
12531253
},
1254+
"extendMigration": {
1255+
"description": "Extend the migrating VM time to live.",
1256+
"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:extendMigration",
1257+
"httpMethod": "POST",
1258+
"id": "vmmigration.projects.locations.sources.migratingVms.extendMigration",
1259+
"parameterOrder": [
1260+
"migratingVm"
1261+
],
1262+
"parameters": {
1263+
"migratingVm": {
1264+
"description": "Required. The name of the MigratingVm.",
1265+
"location": "path",
1266+
"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
1267+
"required": true,
1268+
"type": "string"
1269+
}
1270+
},
1271+
"path": "v1alpha1/{+migratingVm}:extendMigration",
1272+
"request": {
1273+
"$ref": "ExtendMigrationRequest"
1274+
},
1275+
"response": {
1276+
"$ref": "Operation"
1277+
},
1278+
"scopes": [
1279+
"https://www.googleapis.com/auth/cloud-platform"
1280+
]
1281+
},
12541282
"finalizeMigration": {
12551283
"description": "Marks a migration as completed, deleting migration resources that are no longer being used. Only applicable after cutover is done.",
12561284
"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:finalizeMigration",
@@ -2226,7 +2254,7 @@
22262254
}
22272255
}
22282256
},
2229-
"revision": "20250321",
2257+
"revision": "20250521",
22302258
"rootUrl": "https://vmmigration.googleapis.com/",
22312259
"schemas": {
22322260
"AccessKeyCredentials": {
@@ -4018,6 +4046,36 @@
40184046
},
40194047
"type": "object"
40204048
},
4049+
"Expiration": {
4050+
"description": "Expiration holds information about the expiration of a MigratingVm.",
4051+
"id": "Expiration",
4052+
"properties": {
4053+
"expireTime": {
4054+
"description": "Output only. Timestamp of when this resource is considered expired.",
4055+
"format": "google-datetime",
4056+
"readOnly": true,
4057+
"type": "string"
4058+
},
4059+
"extendable": {
4060+
"description": "Output only. Describes whether the expiration can be extended.",
4061+
"readOnly": true,
4062+
"type": "boolean"
4063+
},
4064+
"extensionCount": {
4065+
"description": "Output only. The number of times expiration was extended.",
4066+
"format": "int32",
4067+
"readOnly": true,
4068+
"type": "integer"
4069+
}
4070+
},
4071+
"type": "object"
4072+
},
4073+
"ExtendMigrationRequest": {
4074+
"description": "Request message for 'ExtendMigrationRequest' request.",
4075+
"id": "ExtendMigrationRequest",
4076+
"properties": {},
4077+
"type": "object"
4078+
},
40214079
"FetchInventoryResponse": {
40224080
"description": "Response message for fetchInventory.",
40234081
"id": "FetchInventoryResponse",
@@ -4884,6 +4942,11 @@
48844942
"description": "Output only. Provides details on the state of the Migrating VM in case of an error in replication.",
48854943
"readOnly": true
48864944
},
4945+
"expiration": {
4946+
"$ref": "Expiration",
4947+
"description": "Output only. Provides details about the expiration state of the migrating VM.",
4948+
"readOnly": true
4949+
},
48874950
"group": {
48884951
"description": "Output only. The group this migrating vm is included in, if any. The group is represented by the full path of the appropriate Group resource.",
48894952
"readOnly": true,
@@ -4949,7 +5012,9 @@
49495012
"PAUSED",
49505013
"FINALIZING",
49515014
"FINALIZED",
4952-
"ERROR"
5015+
"ERROR",
5016+
"EXPIRED",
5017+
"FINALIZED_EXPIRED"
49535018
],
49545019
"enumDescriptions": [
49555020
"The state was not sampled by the health checks yet.",
@@ -4963,7 +5028,9 @@
49635028
"The replication was paused by the user and no cycles are scheduled to run.",
49645029
"The migrating VM is being finalized and migration resources are being removed.",
49655030
"The replication process is done. The migrating VM is finalized and no longer consumes billable resources.",
4966-
"The replication process encountered an unrecoverable error and was aborted."
5031+
"The replication process encountered an unrecoverable error and was aborted.",
5032+
"The migrating VM has passed its expiration date. It might be possible to bring it back to \"Active\" state by updating the TTL field. For more information, see the documentation.",
5033+
"The migrating VM's has been finalized and migration resources have been removed."
49675034
],
49685035
"readOnly": true,
49695036
"type": "string"

src/apis/vmmigration/v1.ts

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,6 +1252,27 @@ export namespace vmmigration_v1 {
12521252
*/
12531253
kmsKey?: string | null;
12541254
}
1255+
/**
1256+
* Expiration holds information about the expiration of a MigratingVm.
1257+
*/
1258+
export interface Schema$Expiration {
1259+
/**
1260+
* Output only. Timestamp of when this resource is considered expired.
1261+
*/
1262+
expireTime?: string | null;
1263+
/**
1264+
* Output only. Describes whether the expiration can be extended.
1265+
*/
1266+
extendable?: boolean | null;
1267+
/**
1268+
* Output only. The number of times expiration was extended.
1269+
*/
1270+
extensionCount?: number | null;
1271+
}
1272+
/**
1273+
* Request message for 'ExtendMigrationRequest' request.
1274+
*/
1275+
export interface Schema$ExtendMigrationRequest {}
12551276
/**
12561277
* Response message for fetchInventory.
12571278
*/
@@ -1832,6 +1853,10 @@ export namespace vmmigration_v1 {
18321853
* Output only. Provides details on the state of the Migrating VM in case of an error in replication.
18331854
*/
18341855
error?: Schema$Status;
1856+
/**
1857+
* Output only. Provides details about the expiration state of the migrating VM.
1858+
*/
1859+
expiration?: Schema$Expiration;
18351860
/**
18361861
* Output only. The group this migrating vm is included in, if any. The group is represented by the full path of the appropriate Group resource.
18371862
*/
@@ -6146,6 +6171,95 @@ export namespace vmmigration_v1 {
61466171
}
61476172
}
61486173

6174+
/**
6175+
* Extend the migrating VM time to live.
6176+
*
6177+
* @param params - Parameters for request
6178+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
6179+
* @param callback - Optional callback that handles the response.
6180+
* @returns A promise if used with async/await, or void if used with a callback.
6181+
*/
6182+
extendMigration(
6183+
params: Params$Resource$Projects$Locations$Sources$Migratingvms$Extendmigration,
6184+
options: StreamMethodOptions
6185+
): GaxiosPromise<Readable>;
6186+
extendMigration(
6187+
params?: Params$Resource$Projects$Locations$Sources$Migratingvms$Extendmigration,
6188+
options?: MethodOptions
6189+
): GaxiosPromise<Schema$Operation>;
6190+
extendMigration(
6191+
params: Params$Resource$Projects$Locations$Sources$Migratingvms$Extendmigration,
6192+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
6193+
callback: BodyResponseCallback<Readable>
6194+
): void;
6195+
extendMigration(
6196+
params: Params$Resource$Projects$Locations$Sources$Migratingvms$Extendmigration,
6197+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
6198+
callback: BodyResponseCallback<Schema$Operation>
6199+
): void;
6200+
extendMigration(
6201+
params: Params$Resource$Projects$Locations$Sources$Migratingvms$Extendmigration,
6202+
callback: BodyResponseCallback<Schema$Operation>
6203+
): void;
6204+
extendMigration(callback: BodyResponseCallback<Schema$Operation>): void;
6205+
extendMigration(
6206+
paramsOrCallback?:
6207+
| Params$Resource$Projects$Locations$Sources$Migratingvms$Extendmigration
6208+
| BodyResponseCallback<Schema$Operation>
6209+
| BodyResponseCallback<Readable>,
6210+
optionsOrCallback?:
6211+
| MethodOptions
6212+
| StreamMethodOptions
6213+
| BodyResponseCallback<Schema$Operation>
6214+
| BodyResponseCallback<Readable>,
6215+
callback?:
6216+
| BodyResponseCallback<Schema$Operation>
6217+
| BodyResponseCallback<Readable>
6218+
): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
6219+
let params = (paramsOrCallback ||
6220+
{}) as Params$Resource$Projects$Locations$Sources$Migratingvms$Extendmigration;
6221+
let options = (optionsOrCallback || {}) as MethodOptions;
6222+
6223+
if (typeof paramsOrCallback === 'function') {
6224+
callback = paramsOrCallback;
6225+
params =
6226+
{} as Params$Resource$Projects$Locations$Sources$Migratingvms$Extendmigration;
6227+
options = {};
6228+
}
6229+
6230+
if (typeof optionsOrCallback === 'function') {
6231+
callback = optionsOrCallback;
6232+
options = {};
6233+
}
6234+
6235+
const rootUrl = options.rootUrl || 'https://vmmigration.googleapis.com/';
6236+
const parameters = {
6237+
options: Object.assign(
6238+
{
6239+
url: (rootUrl + '/v1/{+migratingVm}:extendMigration').replace(
6240+
/([^:]\/)\/+/g,
6241+
'$1'
6242+
),
6243+
method: 'POST',
6244+
apiVersion: '',
6245+
},
6246+
options
6247+
),
6248+
params,
6249+
requiredParams: ['migratingVm'],
6250+
pathParams: ['migratingVm'],
6251+
context: this.context,
6252+
};
6253+
if (callback) {
6254+
createAPIRequest<Schema$Operation>(
6255+
parameters,
6256+
callback as BodyResponseCallback<unknown>
6257+
);
6258+
} else {
6259+
return createAPIRequest<Schema$Operation>(parameters);
6260+
}
6261+
}
6262+
61496263
/**
61506264
* Marks a migration as completed, deleting migration resources that are no longer being used. Only applicable after cutover is done.
61516265
*
@@ -6796,6 +6910,18 @@ export namespace vmmigration_v1 {
67966910
*/
67976911
name?: string;
67986912
}
6913+
export interface Params$Resource$Projects$Locations$Sources$Migratingvms$Extendmigration
6914+
extends StandardParameters {
6915+
/**
6916+
* Required. The name of the MigratingVm.
6917+
*/
6918+
migratingVm?: string;
6919+
6920+
/**
6921+
* Request body metadata
6922+
*/
6923+
requestBody?: Schema$ExtendMigrationRequest;
6924+
}
67996925
export interface Params$Resource$Projects$Locations$Sources$Migratingvms$Finalizemigration
68006926
extends StandardParameters {
68016927
/**

0 commit comments

Comments
 (0)