@@ -166,17 +166,16 @@ pub struct UpdateList {
166166
167167impl DeviceUpdateClient {
168168 /// Import new update version.
169- /// `POST https://{endpoint}/deviceupdate /{instanceId}/updates?action= import& api-version=2021-06 -01-preview `
169+ /// `POST https://{endpoint}/deviceUpdate /{instanceId}/updates: import? api-version=2022-10 -01`
170170 pub async fn import_update (
171171 & self ,
172172 instance_id : & str ,
173173 import_json : String ,
174174 ) -> azure_core:: Result < UpdateOperation > {
175175 let mut uri = self . device_update_url . clone ( ) ;
176- let path = format ! ( "deviceupdate/{instance_id}/updates" ) ;
176+ let path = format ! ( "deviceupdate/{instance_id}/updates:import " ) ;
177177 uri. set_path ( & path) ;
178178 uri. set_query ( Some ( API_VERSION_PARAM ) ) ;
179- uri. query_pairs_mut ( ) . append_pair ( "action" , "import" ) ;
180179
181180 debug ! ( "Import request: {}" , & uri) ;
182181 let resp_body = self . post ( uri. to_string ( ) , Some ( import_json) ) . await ?;
@@ -215,7 +214,7 @@ impl DeviceUpdateClient {
215214 }
216215
217216 /// Delete a specific update version.
218- /// `DELETE https://{endpoint}/deviceupdate /{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}?api-version=2021-06 -01-preview `
217+ /// `DELETE https://{endpoint}/deviceUpdate /{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}?api-version=2022-10 -01`
219218 pub async fn delete_update (
220219 & self ,
221220 instance_id : & str ,
@@ -232,7 +231,7 @@ impl DeviceUpdateClient {
232231 }
233232
234233 /// Get a specific update file from the version.
235- /// `GET https://{endpoint}/deviceupdate /{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}/files/{fileId}?api-version=2021-06 -01-previe `
234+ /// `GET https://{endpoint}/deviceUpdate /{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}/files/{fileId}?api-version=2022-10 -01`
236235 pub async fn get_file (
237236 & self ,
238237 instance_id : & str ,
@@ -250,7 +249,7 @@ impl DeviceUpdateClient {
250249 }
251250
252251 /// Retrieve operation status.
253- /// `GET https://{endpoint}/deviceupdate /{instanceId}/updates/operations/{operationId}?api-version=2021-06 -01-preview `
252+ /// `GET https://{endpoint}/deviceUpdate /{instanceId}/updates/operations/{operationId}?api-version=2022-10 -01`
254253 pub async fn get_operation (
255254 & self ,
256255 instance_id : & str ,
@@ -265,7 +264,7 @@ impl DeviceUpdateClient {
265264 }
266265
267266 /// Get a specific update version.
268- /// `GET https://{endpoint}/deviceupdate /{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}?api-version=2021-06 -01-preview `
267+ /// `GET https://{endpoint}/deviceUpdate /{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}?api-version=2022-10 -01`
269268 pub async fn get_update (
270269 & self ,
271270 instance_id : & str ,
@@ -282,7 +281,7 @@ impl DeviceUpdateClient {
282281 }
283282
284283 /// Get a list of all update file identifiers for the specified version.
285- /// `GET https://{endpoint}/deviceupdate /{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}/files?api-version=2021-06 -01-preview `
284+ /// `GET https://{endpoint}/deviceUpdate /{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}/files?api-version=2022-10 -01`
286285 pub async fn list_files (
287286 & self ,
288287 instance_id : & str ,
@@ -317,7 +316,7 @@ impl DeviceUpdateClient {
317316 }
318317
319318 /// Get a list of all update names that match the specified provider.
320- /// `GET https://{endpoint}/deviceupdate /{instanceId}/updates/providers/{provider}/names?api-version=2021-06 -01-preview `
319+ /// `GET https://{endpoint}/deviceUpdate /{instanceId}/updates/providers/{provider}/names?api-version=2022-10 -01`
321320 pub async fn list_names (
322321 & self ,
323322 instance_id : & str ,
@@ -351,7 +350,7 @@ impl DeviceUpdateClient {
351350
352351 /// Get a list of all import update operations.
353352 /// Completed operations are kept for 7 days before auto-deleted. Delete operations are not returned by this API version.
354- /// `GET https://{endpoint}/deviceupdate /{instanceId}/updates/operations?$ filter={$ filter}&$ top={$ top}&api-version=2021-06 -01-preview `
353+ /// `GET https://{endpoint}/deviceUpdate /{instanceId}/updates/operations?filter={filter}&top={top}&api-version=2022-10 -01`
355354 pub async fn list_operations (
356355 & self ,
357356 instance_id : & str ,
@@ -392,7 +391,7 @@ impl DeviceUpdateClient {
392391 }
393392
394393 /// Get a list of all update providers that have been imported to Device Update for `IoT` Hub.
395- /// `GET https://{endpoint}/deviceupdate /{instanceId}/updates/providers?api-version=2021-06 -01-preview `
394+ /// `GET https://{endpoint}/deviceUpdate /{instanceId}/updates/providers?api-version=2022-10 -01`
396395 pub async fn list_providers ( & self , instance_id : & str ) -> azure_core:: Result < Vec < String > > {
397396 let mut uri = self . device_update_url . clone ( ) ;
398397 let path = format ! ( "deviceupdate/{instance_id}/updates/providers" ) ;
@@ -421,7 +420,7 @@ impl DeviceUpdateClient {
421420 }
422421
423422 /// Get a list of all updates that have been imported to Device Update for `IoT` Hub.
424- /// `GET https://{endpoint}/deviceupdate /{instanceId}/updates?api-version=2021-06 -01-preview&$ search={$ search}&$ filter={$ filter}`
423+ /// `GET https://{endpoint}/deviceUpdate /{instanceId}/updates?api-version=2022-10 -01& search={search}&filter={filter}`
425424 pub async fn list_updates (
426425 & self ,
427426 instance_id : & str ,
@@ -463,7 +462,7 @@ impl DeviceUpdateClient {
463462 }
464463
465464 /// Get a list of all update versions that match the specified provider and name.
466- /// `GET https://{endpoint}/deviceupdate /{instanceId}/updates/providers/{provider}/names/{name}/versions?api-version=2021-06 -01-preview&$ filter={$ filter}`
465+ /// `GET https://{endpoint}/deviceUpdate /{instanceId}/updates/providers/{provider}/names/{name}/versions?api-version=2022-10 -01& filter={filter}`
467466 pub async fn list_versions (
468467 & self ,
469468 instance_id : & str ,
@@ -516,7 +515,7 @@ mod tests {
516515 async fn can_import_update ( ) -> azure_core:: Result < ( ) > {
517516 let mut server = Server :: new_async ( ) . await ;
518517 let _m = server
519- . mock ( "POST" , "/deviceupdate/test-instance/updates" )
518+ . mock ( "POST" , "/deviceupdate/test-instance/updates:import " )
520519 . match_query ( Matcher :: UrlEncoded (
521520 "api-version" . into ( ) ,
522521 API_VERSION . into ( ) ,
@@ -533,7 +532,7 @@ mod tests {
533532 "lastActionDateTime" : "1999-09-10T03:05:07.3845533+01:00" ,
534533 "etag" : "\" some_tag\" " ,
535534 "operationId" : "some_op_id" ,
536- "resourceLocation" : "/deviceupdate/instance/updates/providers/xxx/names/yyy/versions/x.y.z?api-version=2021-06 -01-preview " ,
535+ "resourceLocation" : "/deviceupdate/instance/updates/providers/xxx/names/yyy/versions/x.y.z?api-version=2022-10 -01" ,
537536 "status" : "Succeeded" ,
538537 "traceId" : "zzzzzzzzzzzzzzzz" ,
539538 "updateId" : {
0 commit comments