From a78f30b69c60bdbe4ec06cd055e664fbf28d169a Mon Sep 17 00:00:00 2001
From: azure-powershell-bot
<65331932+azure-powershell-bot@users.noreply.github.com>
Date: Fri, 18 Apr 2025 04:00:21 +0000
Subject: [PATCH] [skip ci] Archive 2939b9722f804407f6eb50832d3481093aa55630
---
.../Az.ImportExport.csproj | 2 +-
.../Az.ImportExport.format.ps1xml | 284 +-
.../Az.ImportExport.psd1 | 3 +-
.../Properties/AssemblyInfo.cs | 29 +-
.../check-dependencies.ps1 | 6 +-
.../exports/Get-AzImportExport.ps1 | 21 +-
.../Get-AzImportExportBitLockerKey.ps1 | 20 +-
.../exports/Get-AzImportExportLocation.ps1 | 17 +-
.../exports/New-AzImportExport.ps1 | 141 +-
.../New-AzImportExportDriveListObject.ps1 | 13 +-
.../exports/ProxyCmdletDefinitions.ps1 | 344 ++-
.../exports/Remove-AzImportExport.ps1 | 17 +-
.../exports/Update-AzImportExport.ps1 | 115 +-
.../ImportExport.Autorest/generate-info.json | 2 +-
.../ImportExport.Autorest/generated/Module.cs | 27 +-
.../generated/api/ImportExport.cs | 2511 ++++++++++++++---
.../generated/api/Models/Any.PowerShell.cs | 24 +-
.../generated/api/Models/Any.cs | 6 +-
.../generated/api/Models/Any.json.cs | 2 +-
.../Models/Api202101/JobDetails.PowerShell.cs | 560 ----
.../Api202101/JobResponse.PowerShell.cs | 696 -----
.../LocationProperties.PowerShell.cs | 224 --
.../Api202101/PutJobParameters.PowerShell.cs | 584 ----
...pdateJobParametersProperties.PowerShell.cs | 322 ---
.../DeliveryPackageInformation.PowerShell.cs | 58 +-
...eliveryPackageInformation.TypeConverter.cs | 6 +-
.../DeliveryPackageInformation.cs | 18 +-
.../DeliveryPackageInformation.json.cs | 16 +-
.../DriveBitLockerKey.PowerShell.cs | 48 +-
.../DriveBitLockerKey.TypeConverter.cs | 6 +-
.../{Api202101 => }/DriveBitLockerKey.cs | 12 +-
.../{Api202101 => }/DriveBitLockerKey.json.cs | 12 +-
.../{Api202101 => }/DriveStatus.PowerShell.cs | 88 +-
.../DriveStatus.TypeConverter.cs | 6 +-
.../api/Models/{Api202101 => }/DriveStatus.cs | 54 +-
.../{Api202101 => }/DriveStatus.json.cs | 32 +-
.../EncryptionKeyDetails.PowerShell.cs | 52 +-
.../EncryptionKeyDetails.TypeConverter.cs | 6 +-
.../{Api202101 => }/EncryptionKeyDetails.cs | 27 +-
.../EncryptionKeyDetails.json.cs | 14 +-
.../ErrorResponse.PowerShell.cs | 64 +-
.../ErrorResponse.TypeConverter.cs | 6 +-
.../Models/{Api202101 => }/ErrorResponse.cs | 45 +-
.../{Api202101 => }/ErrorResponse.json.cs | 10 +-
.../ErrorResponseError.PowerShell.cs | 60 +-
.../ErrorResponseError.TypeConverter.cs | 6 +-
.../{Api202101 => }/ErrorResponseError.cs | 31 +-
.../ErrorResponseError.json.cs | 18 +-
...rrorResponseErrorDetailsItem.PowerShell.cs | 54 +-
...rResponseErrorDetailsItem.TypeConverter.cs | 6 +-
.../ErrorResponseErrorDetailsItem.cs | 15 +-
.../ErrorResponseErrorDetailsItem.json.cs | 14 +-
.../{Api202101 => }/Export.PowerShell.cs | 56 +-
.../{Api202101 => }/Export.TypeConverter.cs | 6 +-
.../api/Models/{Api202101 => }/Export.cs | 35 +-
.../api/Models/{Api202101 => }/Export.json.cs | 14 +-
.../ExportBlobList.PowerShell.cs | 48 +-
.../ExportBlobList.TypeConverter.cs | 6 +-
.../Models/{Api202101 => }/ExportBlobList.cs | 28 +-
.../{Api202101 => }/ExportBlobList.json.cs | 12 +-
.../GetBitLockerKeysResponse.PowerShell.cs | 46 +-
.../GetBitLockerKeysResponse.TypeConverter.cs | 6 +-
.../GetBitLockerKeysResponse.cs | 19 +-
.../GetBitLockerKeysResponse.json.cs | 10 +-
.../IdentityDetails.PowerShell.cs | 52 +-
.../IdentityDetails.TypeConverter.cs | 6 +-
.../Models/{Api202101 => }/IdentityDetails.cs | 31 +-
.../{Api202101 => }/IdentityDetails.json.cs | 18 +-
.../Models/ImportExportIdentity.PowerShell.cs | 20 +
.../api/Models/ImportExportIdentity.cs | 15 +
.../api/Models/ImportExportIdentity.json.cs | 10 +-
.../api/Models/JobDetails.PowerShell.cs | 580 ++++
.../JobDetails.TypeConverter.cs | 6 +-
.../api/Models/{Api202101 => }/JobDetails.cs | 297 +-
.../Models/{Api202101 => }/JobDetails.json.cs | 44 +-
.../api/Models/JobResponse.PowerShell.cs | 716 +++++
.../JobResponse.TypeConverter.cs | 6 +-
.../api/Models/{Api202101 => }/JobResponse.cs | 447 ++-
.../{Api202101 => }/JobResponse.json.cs | 32 +-
.../ListJobsResponse.PowerShell.cs | 48 +-
.../ListJobsResponse.TypeConverter.cs | 6 +-
.../{Api202101 => }/ListJobsResponse.cs | 22 +-
.../{Api202101 => }/ListJobsResponse.json.cs | 12 +-
.../ListOperationsResponse.PowerShell.cs | 44 +-
.../ListOperationsResponse.TypeConverter.cs | 6 +-
.../{Api202101 => }/ListOperationsResponse.cs | 19 +-
.../ListOperationsResponse.json.cs | 10 +-
.../api/Models/Location.PowerShell.cs | 276 ++
.../{Api202101 => }/Location.TypeConverter.cs | 6 +-
.../api/Models/{Api202101 => }/Location.cs | 90 +-
.../Models/{Api202101 => }/Location.json.cs | 16 +-
...ll.cs => LocationProperties.PowerShell.cs} | 140 +-
.../LocationProperties.TypeConverter.cs | 6 +-
.../{Api202101 => }/LocationProperties.cs | 55 +-
.../LocationProperties.json.cs | 30 +-
.../LocationsResponse.PowerShell.cs | 44 +-
.../LocationsResponse.TypeConverter.cs | 6 +-
.../{Api202101 => }/LocationsResponse.cs | 19 +-
.../{Api202101 => }/LocationsResponse.json.cs | 10 +-
.../{Api202101 => }/Operation.PowerShell.cs | 64 +-
.../Operation.TypeConverter.cs | 6 +-
.../api/Models/{Api202101 => }/Operation.cs | 37 +-
.../Models/{Api202101 => }/Operation.json.cs | 12 +-
.../OperationDisplay.PowerShell.cs | 56 +-
.../OperationDisplay.TypeConverter.cs | 6 +-
.../{Api202101 => }/OperationDisplay.cs | 18 +-
.../{Api202101 => }/OperationDisplay.json.cs | 16 +-
.../PackageInformation.PowerShell.cs | 56 +-
.../PackageInformation.TypeConverter.cs | 6 +-
.../{Api202101 => }/PackageInformation.cs | 18 +-
.../PackageInformation.json.cs | 16 +-
.../api/Models/PutJobParameters.PowerShell.cs | 604 ++++
.../PutJobParameters.TypeConverter.cs | 6 +-
.../{Api202101 => }/PutJobParameters.cs | 311 +-
.../{Api202101 => }/PutJobParameters.json.cs | 14 +-
.../PutJobParametersTags.PowerShell.cs | 40 +-
.../PutJobParametersTags.TypeConverter.cs | 6 +-
.../{Api202101 => }/PutJobParametersTags.cs | 6 +-
.../PutJobParametersTags.dictionary.cs | 4 +-
.../PutJobParametersTags.json.cs | 8 +-
.../ReturnAddress.PowerShell.cs | 76 +-
.../ReturnAddress.TypeConverter.cs | 6 +-
.../Models/{Api202101 => }/ReturnAddress.cs | 33 +-
.../{Api202101 => }/ReturnAddress.json.cs | 26 +-
.../ReturnShipping.PowerShell.cs | 48 +-
.../ReturnShipping.TypeConverter.cs | 6 +-
.../Models/{Api202101 => }/ReturnShipping.cs | 12 +-
.../{Api202101 => }/ReturnShipping.json.cs | 12 +-
.../ShippingInformation.PowerShell.cs | 76 +-
.../ShippingInformation.TypeConverter.cs | 6 +-
.../{Api202101 => }/ShippingInformation.cs | 35 +-
.../ShippingInformation.json.cs | 28 +-
.../{Api20 => }/SystemData.PowerShell.cs | 64 +-
.../{Api20 => }/SystemData.TypeConverter.cs | 6 +-
.../api/Models/{Api20 => }/SystemData.cs | 48 +-
.../api/Models/{Api20 => }/SystemData.json.cs | 20 +-
.../Models/UpdateJobParameters.PowerShell.cs | 356 +++
.../UpdateJobParameters.TypeConverter.cs | 6 +-
.../{Api202101 => }/UpdateJobParameters.cs | 145 +-
.../UpdateJobParameters.json.cs | 12 +-
...dateJobParametersProperties.PowerShell.cs} | 172 +-
...teJobParametersProperties.TypeConverter.cs | 6 +-
.../UpdateJobParametersProperties.cs | 130 +-
.../UpdateJobParametersProperties.json.cs | 24 +-
.../UpdateJobParametersTags.PowerShell.cs | 40 +-
.../UpdateJobParametersTags.TypeConverter.cs | 6 +-
.../UpdateJobParametersTags.cs | 6 +-
.../UpdateJobParametersTags.dictionary.cs | 4 +-
.../UpdateJobParametersTags.json.cs | 8 +-
.../api/Support/CreatedByType.Completer.cs | 47 -
.../Support/CreatedByType.TypeConverter.cs | 59 -
.../generated/api/Support/CreatedByType.cs | 102 -
.../api/Support/DriveState.Completer.cs | 59 -
.../api/Support/DriveState.TypeConverter.cs | 59 -
.../generated/api/Support/DriveState.cs | 108 -
.../Support/EncryptionKekType.Completer.cs | 39 -
.../EncryptionKekType.TypeConverter.cs | 59 -
.../api/Support/EncryptionKekType.cs | 98 -
.../api/Support/IdentityType.Completer.cs | 43 -
.../api/Support/IdentityType.TypeConverter.cs | 59 -
.../generated/api/Support/IdentityType.cs | 100 -
.../GetAzImportExportBitLockerKey_List.cs | 118 +-
.../cmdlets/GetAzImportExportLocation_Get.cs | 109 +-
...etAzImportExportLocation_GetViaIdentity.cs | 109 +-
.../cmdlets/GetAzImportExportLocation_List.cs | 113 +-
.../cmdlets/GetAzImportExport_Get.cs | 114 +-
.../GetAzImportExport_GetViaIdentity.cs | 119 +-
.../cmdlets/GetAzImportExport_List.cs | 121 +-
.../cmdlets/GetAzImportExport_List1.cs | 121 +-
.../generated/cmdlets/GetAzOperation_List.cs | 113 +-
.../NewAzImportExport_CreateExpanded.cs | 168 +-
...NewAzImportExport_CreateViaJsonFilePath.cs | 608 ++++
.../NewAzImportExport_CreateViaJsonString.cs | 606 ++++
.../cmdlets/RemoveAzImportExport_Delete.cs | 82 +-
.../RemoveAzImportExport_DeleteViaIdentity.cs | 87 +-
.../UpdateAzImportExport_UpdateExpanded.cs | 128 +-
...zImportExport_UpdateViaIdentityExpanded.cs | 135 +-
...ateAzImportExport_UpdateViaJsonFilePath.cs | 544 ++++
...pdateAzImportExport_UpdateViaJsonString.cs | 542 ++++
.../Attributes/ExternalDocsAttribute.cs | 30 +
.../PSArgumentCompleterAttribute.cs | 52 +
.../BuildTime/Cmdlets/ExportFormatPs1xml.cs | 6 +-
.../BuildTime/Cmdlets/ExportModelSurface.cs | 2 +-
.../BuildTime/Cmdlets/ExportProxyCmdlet.cs | 4 +-
.../runtime/BuildTime/Cmdlets/ExportPsd1.cs | 8 +-
.../BuildTime/Cmdlets/ExportTestStub.cs | 211 +-
.../runtime/BuildTime/MarkdownRenderer.cs | 2 +-
.../BuildTime/Models/PsMarkdownTypes.cs | 43 +-
.../BuildTime/Models/PsProxyOutputs.cs | 60 +-
.../runtime/BuildTime/Models/PsProxyTypes.cs | 56 +-
.../runtime/BuildTime/PsAttributes.cs | 15 +
.../runtime/BuildTime/PsExtensions.cs | 7 +
.../generated/runtime/BuildTime/PsHelpers.cs | 4 +-
.../generated/runtime/Context.cs | 33 +
.../generated/runtime/Events.cs | 4 +-
.../generated/runtime/ISendAsync.cs | 113 +
.../generated/runtime/InfoAttribute.cs | 4 +
.../generated/runtime/InputHandler.cs | 22 +
.../runtime/Nodes/Collections/XNodeArray.cs | 5 +
.../generated/runtime/SerializationMode.cs | 8 +-
.../runtime/TypeConverterExtensions.cs | 50 +
.../Get-AzImportExportBitLockerKey.ps1 | 14 +-
.../internal/Get-AzOperation.ps1 | 10 +-
.../internal/ProxyCmdletDefinitions.ps1 | 24 +-
.../ImportExport.Autorest/resources/README.md | 11 +
.../ImportExport.Autorest/test-module.ps1 | 10 +-
206 files changed, 12534 insertions(+), 5955 deletions(-)
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Models/Api202101/JobDetails.PowerShell.cs
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Models/Api202101/JobResponse.PowerShell.cs
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Models/Api202101/LocationProperties.PowerShell.cs
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Models/Api202101/PutJobParameters.PowerShell.cs
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Models/Api202101/UpdateJobParametersProperties.PowerShell.cs
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/DeliveryPackageInformation.PowerShell.cs (68%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/DeliveryPackageInformation.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/DeliveryPackageInformation.cs (91%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/DeliveryPackageInformation.json.cs (94%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/DriveBitLockerKey.PowerShell.cs (74%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/DriveBitLockerKey.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/DriveBitLockerKey.cs (90%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/DriveBitLockerKey.json.cs (95%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/DriveStatus.PowerShell.cs (58%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/DriveStatus.TypeConverter.cs (98%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/DriveStatus.cs (89%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/DriveStatus.json.cs (94%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/EncryptionKeyDetails.PowerShell.cs (71%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/EncryptionKeyDetails.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/EncryptionKeyDetails.cs (80%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/EncryptionKeyDetails.json.cs (94%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ErrorResponse.PowerShell.cs (61%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ErrorResponse.TypeConverter.cs (98%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ErrorResponse.cs (66%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ErrorResponse.json.cs (95%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ErrorResponseError.PowerShell.cs (63%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ErrorResponseError.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ErrorResponseError.cs (82%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ErrorResponseError.json.cs (89%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ErrorResponseErrorDetailsItem.PowerShell.cs (70%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ErrorResponseErrorDetailsItem.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ErrorResponseErrorDetailsItem.cs (90%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ErrorResponseErrorDetailsItem.json.cs (93%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/Export.PowerShell.cs (67%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/Export.TypeConverter.cs (98%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/Export.cs (71%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/Export.json.cs (93%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ExportBlobList.PowerShell.cs (71%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ExportBlobList.TypeConverter.cs (98%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ExportBlobList.cs (70%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ExportBlobList.json.cs (89%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/GetBitLockerKeysResponse.PowerShell.cs (72%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/GetBitLockerKeysResponse.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/GetBitLockerKeysResponse.cs (64%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/GetBitLockerKeysResponse.json.cs (90%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/IdentityDetails.PowerShell.cs (72%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/IdentityDetails.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/IdentityDetails.cs (77%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/IdentityDetails.json.cs (93%)
create mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Models/JobDetails.PowerShell.cs
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/JobDetails.TypeConverter.cs (98%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/JobDetails.cs (72%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/JobDetails.json.cs (87%)
create mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Models/JobResponse.PowerShell.cs
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/JobResponse.TypeConverter.cs (98%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/JobResponse.cs (66%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/JobResponse.json.cs (90%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ListJobsResponse.PowerShell.cs (70%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ListJobsResponse.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ListJobsResponse.cs (72%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ListJobsResponse.json.cs (90%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ListOperationsResponse.PowerShell.cs (73%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ListOperationsResponse.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ListOperationsResponse.cs (65%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ListOperationsResponse.json.cs (91%)
create mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Models/Location.PowerShell.cs
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/Location.TypeConverter.cs (98%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/Location.cs (73%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/Location.json.cs (94%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101/Location.PowerShell.cs => LocationProperties.PowerShell.cs} (58%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/LocationProperties.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/LocationProperties.cs (89%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/LocationProperties.json.cs (90%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/LocationsResponse.PowerShell.cs (73%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/LocationsResponse.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/LocationsResponse.cs (65%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/LocationsResponse.json.cs (91%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/Operation.PowerShell.cs (65%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/Operation.TypeConverter.cs (98%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/Operation.cs (74%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/Operation.json.cs (94%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/OperationDisplay.PowerShell.cs (69%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/OperationDisplay.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/OperationDisplay.cs (91%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/OperationDisplay.json.cs (94%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/PackageInformation.PowerShell.cs (69%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/PackageInformation.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/PackageInformation.cs (91%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/PackageInformation.json.cs (94%)
create mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Models/PutJobParameters.PowerShell.cs
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/PutJobParameters.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/PutJobParameters.cs (69%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/PutJobParameters.json.cs (93%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/PutJobParametersTags.PowerShell.cs (81%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/PutJobParametersTags.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/PutJobParametersTags.cs (85%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/PutJobParametersTags.dictionary.cs (96%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/PutJobParametersTags.json.cs (96%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ReturnAddress.PowerShell.cs (61%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ReturnAddress.TypeConverter.cs (98%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ReturnAddress.cs (93%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ReturnAddress.json.cs (94%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ReturnShipping.PowerShell.cs (74%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ReturnShipping.TypeConverter.cs (98%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ReturnShipping.cs (90%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ReturnShipping.json.cs (95%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ShippingInformation.PowerShell.cs (60%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ShippingInformation.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ShippingInformation.cs (92%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/ShippingInformation.json.cs (93%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api20 => }/SystemData.PowerShell.cs (63%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api20 => }/SystemData.TypeConverter.cs (98%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api20 => }/SystemData.cs (80%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api20 => }/SystemData.json.cs (95%)
create mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Models/UpdateJobParameters.PowerShell.cs
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/UpdateJobParameters.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/UpdateJobParameters.cs (67%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/UpdateJobParameters.json.cs (93%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101/UpdateJobParameters.PowerShell.cs => UpdateJobParametersProperties.PowerShell.cs} (60%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/UpdateJobParametersProperties.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/UpdateJobParametersProperties.cs (73%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/UpdateJobParametersProperties.json.cs (88%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/UpdateJobParametersTags.PowerShell.cs (81%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/UpdateJobParametersTags.TypeConverter.cs (97%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/UpdateJobParametersTags.cs (84%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/UpdateJobParametersTags.dictionary.cs (96%)
rename generated/ImportExport/ImportExport.Autorest/generated/api/Models/{Api202101 => }/UpdateJobParametersTags.json.cs (96%)
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Support/CreatedByType.Completer.cs
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Support/CreatedByType.cs
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Support/DriveState.Completer.cs
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Support/DriveState.TypeConverter.cs
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Support/DriveState.cs
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Support/EncryptionKekType.Completer.cs
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Support/EncryptionKekType.TypeConverter.cs
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Support/EncryptionKekType.cs
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Support/IdentityType.Completer.cs
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Support/IdentityType.TypeConverter.cs
delete mode 100644 generated/ImportExport/ImportExport.Autorest/generated/api/Support/IdentityType.cs
create mode 100644 generated/ImportExport/ImportExport.Autorest/generated/cmdlets/NewAzImportExport_CreateViaJsonFilePath.cs
create mode 100644 generated/ImportExport/ImportExport.Autorest/generated/cmdlets/NewAzImportExport_CreateViaJsonString.cs
create mode 100644 generated/ImportExport/ImportExport.Autorest/generated/cmdlets/UpdateAzImportExport_UpdateViaJsonFilePath.cs
create mode 100644 generated/ImportExport/ImportExport.Autorest/generated/cmdlets/UpdateAzImportExport_UpdateViaJsonString.cs
create mode 100644 generated/ImportExport/ImportExport.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs
create mode 100644 generated/ImportExport/ImportExport.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs
create mode 100644 generated/ImportExport/ImportExport.Autorest/generated/runtime/Context.cs
create mode 100644 generated/ImportExport/ImportExport.Autorest/generated/runtime/InputHandler.cs
create mode 100644 generated/ImportExport/ImportExport.Autorest/resources/README.md
diff --git a/generated/ImportExport/ImportExport.Autorest/Az.ImportExport.csproj b/generated/ImportExport/ImportExport.Autorest/Az.ImportExport.csproj
index c88d1948a923..eb787e233fe4 100644
--- a/generated/ImportExport/ImportExport.Autorest/Az.ImportExport.csproj
+++ b/generated/ImportExport/ImportExport.Autorest/Az.ImportExport.csproj
@@ -2,9 +2,9 @@
ImportExport
ImportExport
+ ImportExport.Autorest
-
diff --git a/generated/ImportExport/ImportExport.Autorest/Az.ImportExport.format.ps1xml b/generated/ImportExport/ImportExport.Autorest/Az.ImportExport.format.ps1xml
index f9c7d897a689..7fccb4eae2a7 100644
--- a/generated/ImportExport/ImportExport.Autorest/Az.ImportExport.format.ps1xml
+++ b/generated/ImportExport/ImportExport.Autorest/Az.ImportExport.format.ps1xml
@@ -2,101 +2,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ImportExportIdentity
-
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ImportExportIdentity
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- JobName
-
-
- LocationName
-
-
- ResourceGroupName
-
-
- SubscriptionId
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api20.SystemData
-
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api20.SystemData
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CreatedAt
-
-
- CreatedBy
-
-
- CreatedByType
-
-
- LastModifiedAt
-
-
- LastModifiedBy
-
-
- LastModifiedByType
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.DeliveryPackageInformation
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.DeliveryPackageInformation
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.DeliveryPackageInformation
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.DeliveryPackageInformation#Multiple
@@ -134,9 +42,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.DriveBitLockerKey
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.DriveBitLockerKey
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.DriveBitLockerKey
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.DriveBitLockerKey#Multiple
@@ -162,9 +70,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.DriveStatus
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.DriveStatus
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.DriveStatus
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.DriveStatus#Multiple
@@ -250,9 +158,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.EncryptionKeyDetails
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.EncryptionKeyDetails
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.EncryptionKeyDetails
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.EncryptionKeyDetails#Multiple
@@ -284,9 +192,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ErrorResponseError
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponseError
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ErrorResponseError
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponseError#Multiple
@@ -318,9 +226,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ErrorResponseErrorDetailsItem
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponseErrorDetailsItem
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ErrorResponseErrorDetailsItem
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponseErrorDetailsItem#Multiple
@@ -352,9 +260,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.Export
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Export
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.Export
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Export#Multiple
@@ -374,27 +282,27 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ExportBlobList
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IdentityDetails
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ExportBlobList
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IdentityDetails#Multiple
-
+
-
+
- BlobPath
+ PrincipalId
- BlobPathPrefix
+ TenantId
@@ -402,27 +310,39 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IdentityDetails
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ImportExportIdentity
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IdentityDetails
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ImportExportIdentity#Multiple
-
+
-
+
+
+
+
+
+
+
- PrincipalId
+ JobName
- TenantId
+ LocationName
+
+
+ ResourceGroupName
+
+
+ SubscriptionId
@@ -430,9 +350,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.JobDetails
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.JobDetails
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.JobDetails
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.JobDetails#Multiple
@@ -506,9 +426,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.JobResponse
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.JobResponse
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.JobResponse
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.JobResponse#Multiple
@@ -518,6 +438,9 @@
+
+
+
@@ -528,15 +451,18 @@
Name
+
+ ResourceGroupName
+
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ListJobsResponse
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ListJobsResponse
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ListJobsResponse
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ListJobsResponse#Multiple
@@ -556,15 +482,18 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.Location
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Location
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.Location
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Location#Multiple
+
+
+
@@ -572,24 +501,24 @@
Name
+
+ ResourceGroupName
+
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.LocationProperties
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.LocationProperties
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.LocationProperties
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.LocationProperties#Multiple
-
-
-
@@ -614,9 +543,6 @@
-
-
-
@@ -624,9 +550,6 @@
AdditionalShippingInformation
-
- AlternateLocation
-
City
@@ -651,18 +574,15 @@
StreetAddress2
-
- SupportedCarrier
-
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Operation
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Operation#Multiple
@@ -682,9 +602,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.OperationDisplay
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.OperationDisplay#Multiple
@@ -722,9 +642,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.PackageInformation
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.PackageInformation
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.PackageInformation
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.PackageInformation#Multiple
@@ -762,9 +682,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.PutJobParameters
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.PutJobParameters
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.PutJobParameters
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.PutJobParameters#Multiple
@@ -784,9 +704,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ReturnAddress
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ReturnAddress
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ReturnAddress
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ReturnAddress#Multiple
@@ -854,9 +774,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ReturnShipping
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ReturnShipping
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ReturnShipping
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ReturnShipping#Multiple
@@ -882,9 +802,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ShippingInformation
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ShippingInformation
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ShippingInformation
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ShippingInformation#Multiple
@@ -952,9 +872,61 @@
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.UpdateJobParametersProperties
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.SystemData
+
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.SystemData#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CreatedAt
+
+
+ CreatedBy
+
+
+ CreatedByType
+
+
+ LastModifiedAt
+
+
+ LastModifiedBy
+
+
+ LastModifiedByType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.UpdateJobParametersProperties
- Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.UpdateJobParametersProperties
+ Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.UpdateJobParametersProperties#Multiple
diff --git a/generated/ImportExport/ImportExport.Autorest/Az.ImportExport.psd1 b/generated/ImportExport/ImportExport.Autorest/Az.ImportExport.psd1
index cfd94bd604ad..2a8351692081 100644
--- a/generated/ImportExport/ImportExport.Autorest/Az.ImportExport.psd1
+++ b/generated/ImportExport/ImportExport.Autorest/Az.ImportExport.psd1
@@ -11,8 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.ImportExport.private.dll'
FormatsToProcess = './Az.ImportExport.format.ps1xml'
- FunctionsToExport = 'Get-AzImportExport', 'Get-AzImportExportBitLockerKey', 'Get-AzImportExportLocation', 'New-AzImportExport', 'New-AzImportExportDriveListObject', 'Remove-AzImportExport', 'Update-AzImportExport', '*'
- AliasesToExport = '*'
+ FunctionsToExport = 'Get-AzImportExport', 'Get-AzImportExportBitLockerKey', 'Get-AzImportExportLocation', 'New-AzImportExport', 'New-AzImportExportDriveListObject', 'Remove-AzImportExport', 'Update-AzImportExport'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'ImportExport'
diff --git a/generated/ImportExport/ImportExport.Autorest/Properties/AssemblyInfo.cs b/generated/ImportExport/ImportExport.Autorest/Properties/AssemblyInfo.cs
index 548128ede7c5..c9369269aaf6 100644
--- a/generated/ImportExport/ImportExport.Autorest/Properties/AssemblyInfo.cs
+++ b/generated/ImportExport/ImportExport.Autorest/Properties/AssemblyInfo.cs
@@ -1,28 +1,27 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the Apache License, Version 2.0 (the ""License"");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
+// distributed under the License is distributed on an ""AS IS"" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-// ----------------------------------------------------------------------------------
+// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+// is regenerated.
using System;
using System.Reflection;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-[assembly: AssemblyTitle("Microsoft Azure Powershell - ImportExport")]
-[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
-[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
-[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
+[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
+[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
+[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
+[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - ImportExport")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("0.2.2")]
+[assembly: System.Reflection.AssemblyVersionAttribute("0.2.2")]
+[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
+[assembly: System.CLSCompliantAttribute(false)]
-[assembly: ComVisible(false)]
-[assembly: CLSCompliant(false)]
-[assembly: Guid("6e390e89-8428-4c00-b097-26582759130b")]
-[assembly: AssemblyVersion("0.2.2")]
-[assembly: AssemblyFileVersion("0.2.2")]
diff --git a/generated/ImportExport/ImportExport.Autorest/check-dependencies.ps1 b/generated/ImportExport/ImportExport.Autorest/check-dependencies.ps1
index c29591c7bfe1..90ca9867ae40 100644
--- a/generated/ImportExport/ImportExport.Autorest/check-dependencies.ps1
+++ b/generated/ImportExport/ImportExport.Autorest/check-dependencies.ps1
@@ -12,13 +12,13 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
-param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
+param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
$ErrorActionPreference = 'Stop'
-if(-not $Isolated) {
+if(-not $NotIsolated) {
Write-Host -ForegroundColor Green 'Creating isolated process...'
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
- & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
return
}
diff --git a/generated/ImportExport/ImportExport.Autorest/exports/Get-AzImportExport.ps1 b/generated/ImportExport/ImportExport.Autorest/exports/Get-AzImportExport.ps1
index 46beb1ec7c35..6193d88e6b60 100644
--- a/generated/ImportExport/ImportExport.Autorest/exports/Get-AzImportExport.ps1
+++ b/generated/ImportExport/ImportExport.Autorest/exports/Get-AzImportExport.ps1
@@ -32,7 +32,7 @@ Get-AzImportExport -InputObject $Id
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IImportExportIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IJobResponse
+Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IJobResponse
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -48,7 +48,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.importexport/get-azimportexport
#>
function Get-AzImportExport {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IJobResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IJobResponse])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -78,7 +78,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IImportExportIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter(ParameterSetName='List')]
@@ -158,6 +157,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -182,9 +190,7 @@ begin {
List = 'Az.ImportExport.private\Get-AzImportExport_List';
List1 = 'Az.ImportExport.private\Get-AzImportExport_List1';
}
- if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -198,6 +204,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/ImportExport/ImportExport.Autorest/exports/Get-AzImportExportBitLockerKey.ps1 b/generated/ImportExport/ImportExport.Autorest/exports/Get-AzImportExportBitLockerKey.ps1
index 1e9f9a7097a4..7a8a4b40f8a3 100644
--- a/generated/ImportExport/ImportExport.Autorest/exports/Get-AzImportExportBitLockerKey.ps1
+++ b/generated/ImportExport/ImportExport.Autorest/exports/Get-AzImportExportBitLockerKey.ps1
@@ -23,12 +23,12 @@ Returns the BitLocker Keys for all drives in the specified job.
Get-AzImportExportBitLockerKey -JobName test-job -ResourceGroupName ImportTestRG
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IDriveBitLockerKey
+Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IDriveBitLockerKey
.Link
https://learn.microsoft.com/powershell/module/az.importexport/get-azimportexportbitlockerkey
#>
function Get-AzImportExportBitLockerKey {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IDriveBitLockerKey])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IDriveBitLockerKey])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
@@ -111,6 +111,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -132,9 +141,7 @@ begin {
$mapping = @{
List = 'Az.ImportExport.custom\Get-AzImportExportBitLockerKey';
}
- if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -148,6 +155,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/ImportExport/ImportExport.Autorest/exports/Get-AzImportExportLocation.ps1 b/generated/ImportExport/ImportExport.Autorest/exports/Get-AzImportExportLocation.ps1
index e71175c6900d..b095da23683b 100644
--- a/generated/ImportExport/ImportExport.Autorest/exports/Get-AzImportExportLocation.ps1
+++ b/generated/ImportExport/ImportExport.Autorest/exports/Get-AzImportExportLocation.ps1
@@ -32,7 +32,7 @@ Get-AzImportExportLocation -InputObject $Id
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IImportExportIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ILocation
+Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ILocation
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -48,7 +48,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.importexport/get-azimportexportlocation
#>
function Get-AzImportExportLocation {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ILocation])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ILocation])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -63,7 +63,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IImportExportIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -128,6 +127,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -158,6 +166,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/ImportExport/ImportExport.Autorest/exports/New-AzImportExport.ps1 b/generated/ImportExport/ImportExport.Autorest/exports/New-AzImportExport.ps1
index 2a3fb700ea81..f08b3c9e649c 100644
--- a/generated/ImportExport/ImportExport.Autorest/exports/New-AzImportExport.ps1
+++ b/generated/ImportExport/ImportExport.Autorest/exports/New-AzImportExport.ps1
@@ -16,15 +16,15 @@
<#
.Synopsis
-Creates a new job or updates an existing job in the specified subscription.
+create a new job or create an existing job in the specified subscription.
.Description
-Creates a new job or updates an existing job in the specified subscription.
+create a new job or create an existing job in the specified subscription.
.Example
$driveList = @( @{ DriveId = "9CA995BA"; BitLockerKey = "238810-662376-448998-450120-652806-203390-606320-483076"; ManifestFile = "\\DriveManifest.xml"; ManifestHash = "109B21108597EF36D5785F08303F3638"; DriveHeaderHash = "" })
New-AzImportExport -Name test-job -ResourceGroupName ImportTestRG -Location eastus -StorageAccountId "/subscriptions//resourcegroups/ImportTestRG/providers/Microsoft.Storage/storageAccounts/teststorageforimport" -JobType Import -ReturnAddressRecipientName "Some name" -ReturnAddressStreetAddress1 "Street1" -ReturnAddressCity "Redmond" -ReturnAddressStateOrProvince "WA" -ReturnAddressPostalCode "98008" -ReturnAddressCountryOrRegion "USA" -ReturnAddressPhone "4250000000" -ReturnAddressEmail test@contoso.com -DiagnosticsPath "waimportexport" -BackupDriveManifest -DriveList $driveList
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IJobResponse
+Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IJobResponse
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -41,13 +41,13 @@ DRIVELIST : List of up to ten drives that comprise the job. The
[ManifestHash ]: The Base16-encoded MD5 hash of the manifest file on the drive.
[ManifestUri ]: A URI that points to the blob containing the drive manifest file.
[PercentComplete ]: Percentage completed for the drive.
- [State ]: The drive's current state.
+ [State ]: The drive's current state.
[VerboseLogUri ]: A URI that points to the blob containing the verbose log for the data transfer operation.
.Link
https://learn.microsoft.com/powershell/module/az.importexport/new-azimportexport
#>
function New-AzImportExport {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IJobResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IJobResponse])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -82,293 +82,304 @@ param(
# The tenant ID of the client making the request.
${ClientTenantId},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Management.Automation.SwitchParameter]
# Default value is false.
# Indicates whether the manifest files on the drives should be copied to block blobs.
${BackupDriveManifest},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String[]]
# A collection of blob-path strings.
${BlobListBlobPath},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String[]]
# A collection of blob-prefix strings.
${BlobListBlobPathPrefix},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Management.Automation.SwitchParameter]
# Indicates whether a request has been submitted to cancel the job.
${CancelRequested},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The name of the carrier that is used to ship the import or export drives.
${DeliveryPackageCarrierName},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Int64]
# The number of drives included in the package.
${DeliveryPackageDriveCount},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The date when the package is shipped.
${DeliveryPackageShipDate},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The tracking number of the package.
${DeliveryPackageTrackingNumber},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The virtual blob directory to which the copy logs and backups of drive manifest files (if enabled) will be stored.
${DiagnosticsPath},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IDriveStatus[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IDriveStatus[]]
# List of up to ten drives that comprise the job.
# The drive list is a required element for an import job; it is not specified for export jobs.
- # To construct, see NOTES section for DRIVELIST properties and create a hash table.
${DriveList},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Support.EncryptionKekType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.PSArgumentCompleterAttribute("MicrosoftManaged", "CustomerManaged")]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Support.EncryptionKekType]
+ [System.String]
# The type of kek encryption key
${EncryptionKeyKekType},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Specifies the url for kek encryption key.
${EncryptionKeyKekUrl},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Specifies the keyvault resource id for kek encryption key.
${EncryptionKeyKekVaultId},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The relative URI to the block blob that contains the list of blob paths or blob path prefixes as defined above, beginning with the container name.
# If the blob is in root container, the URI must begin with $root.
${ExportBlobListBlobPath},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# A blob path that points to a block blob containing a list of blob names that were not exported due to insufficient drive space.
# If all blobs were exported successfully, then this element is not included in the response.
${IncompleteBlobListUri},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The type of job
${JobType},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Specifies the supported Azure location where the job should be created
${Location},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Default value is Error.
# Indicates whether error logging or verbose logging will be enabled.
${LogLevel},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Int64]
# Overall percentage completed for the job.
${PercentComplete},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Specifies the provisioning state of the job.
${ProvisioningState},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The city name to use when returning the drives.
${ReturnAddressCity},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The country or region to use when returning the drives.
${ReturnAddressCountryOrRegion},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Email address of the recipient of the returned drives.
${ReturnAddressEmail},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Phone number of the recipient of the returned drives.
${ReturnAddressPhone},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The postal code to use when returning the drives.
${ReturnAddressPostalCode},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The name of the recipient who will receive the hard drives when they are returned.
${ReturnAddressRecipientName},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The state or province to use when returning the drives.
${ReturnAddressStateOrProvince},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The first line of the street address to use when returning the drives.
${ReturnAddressStreetAddress1},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The second line of the street address to use when returning the drives.
${ReturnAddressStreetAddress2},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The name of the carrier that is used to ship the import or export drives.
${ReturnPackageCarrierName},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Int64]
# The number of drives included in the package.
${ReturnPackageDriveCount},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The date when the package is shipped.
${ReturnPackageShipDate},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The tracking number of the package.
${ReturnPackageTrackingNumber},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The customer's account number with the carrier.
${ReturnShippingCarrierAccountNumber},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The carrier's name.
${ReturnShippingCarrierName},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The city name to use when returning the drives.
${ShippingInformationCity},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The country or region to use when returning the drives.
${ShippingInformationCountryOrRegion},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Phone number of the recipient of the returned drives.
${ShippingInformationPhone},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The postal code to use when returning the drives.
${ShippingInformationPostalCode},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The name of the recipient who will receive the hard drives when they are returned.
${ShippingInformationRecipientName},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The state or province to use when returning the drives.
${ShippingInformationStateOrProvince},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The first line of the street address to use when returning the drives.
${ShippingInformationStreetAddress1},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The second line of the street address to use when returning the drives.
${ShippingInformationStreetAddress2},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Current state of the job.
${State},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The resource identifier of the storage account where data will be imported to or exported from.
${StorageAccountId},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IPutJobParametersTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IPutJobParametersTags]))]
[System.Collections.Hashtable]
# Specifies the tags that will be assigned to the job.
${Tag},
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -425,6 +436,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -445,10 +465,10 @@ begin {
$mapping = @{
CreateExpanded = 'Az.ImportExport.private\New-AzImportExport_CreateExpanded';
+ CreateViaJsonFilePath = 'Az.ImportExport.private\New-AzImportExport_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.ImportExport.private\New-AzImportExport_CreateViaJsonString';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -462,6 +482,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/ImportExport/ImportExport.Autorest/exports/New-AzImportExportDriveListObject.ps1 b/generated/ImportExport/ImportExport.Autorest/exports/New-AzImportExportDriveListObject.ps1
index c396f7c8894b..2fb7f5897fc5 100644
--- a/generated/ImportExport/ImportExport.Autorest/exports/New-AzImportExportDriveListObject.ps1
+++ b/generated/ImportExport/ImportExport.Autorest/exports/New-AzImportExportDriveListObject.ps1
@@ -24,12 +24,12 @@ $driveList = New-AzImportExportDriveListObject -DriveId "9CA995BA" -BitLockerKey
New-AzImportExport -Name test-job -ResourceGroupName ImportTestRG -Location eastus -StorageAccountId "/subscriptions//resourcegroups/ImportTestRG/providers/Microsoft.Storage/storageAccounts/teststorageforimport" -JobType Import -ReturnAddressRecipientName "Some name" -ReturnAddressStreetAddress1 "Street1" -ReturnAddressCity "Redmond" -ReturnAddressStateOrProvince "WA" -ReturnAddressPostalCode "98008" -ReturnAddressCountryOrRegion "USA" -ReturnAddressPhone "4250000000" -ReturnAddressEmail test@contoso.com -DiagnosticsPath "waimportexport" -BackupDriveManifest -DriveList $driveList
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IDriveStatus
+Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IDriveStatus
.Link
https://learn.microsoft.com/powershell/module/az.importexport/new-AzImportExportDriveListObject
#>
function New-AzImportExportDriveListObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IDriveStatus])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IDriveStatus])]
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter()]
@@ -94,8 +94,9 @@ param(
${PercentComplete},
[Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.PSArgumentCompleterAttribute("Specified", "Received", "NeverReceived", "Transferring", "Completed", "CompletedMoreInfo", "ShippedBack")]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Support.DriveState]
+ [System.String]
# The drive's current state.
${State},
@@ -113,6 +114,9 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -141,6 +145,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/ImportExport/ImportExport.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/ImportExport/ImportExport.Autorest/exports/ProxyCmdletDefinitions.ps1
index b67dda3ab99b..7d4704c463d3 100644
--- a/generated/ImportExport/ImportExport.Autorest/exports/ProxyCmdletDefinitions.ps1
+++ b/generated/ImportExport/ImportExport.Autorest/exports/ProxyCmdletDefinitions.ps1
@@ -32,7 +32,7 @@ Get-AzImportExportLocation -InputObject $Id
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IImportExportIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ILocation
+Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ILocation
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -48,7 +48,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.importexport/get-azimportexportlocation
#>
function Get-AzImportExportLocation {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ILocation])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ILocation])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -63,7 +63,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IImportExportIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -128,6 +127,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -158,6 +166,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -219,7 +230,7 @@ Get-AzImportExport -InputObject $Id
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IImportExportIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IJobResponse
+Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IJobResponse
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -235,7 +246,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.importexport/get-azimportexport
#>
function Get-AzImportExport {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IJobResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IJobResponse])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -265,7 +276,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IImportExportIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter(ParameterSetName='List')]
@@ -345,6 +355,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -369,9 +388,7 @@ begin {
List = 'Az.ImportExport.private\Get-AzImportExport_List';
List1 = 'Az.ImportExport.private\Get-AzImportExport_List1';
}
- if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -385,6 +402,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -430,15 +450,15 @@ end {
<#
.Synopsis
-Creates a new job or updates an existing job in the specified subscription.
+create a new job or create an existing job in the specified subscription.
.Description
-Creates a new job or updates an existing job in the specified subscription.
+create a new job or create an existing job in the specified subscription.
.Example
$driveList = @( @{ DriveId = "9CA995BA"; BitLockerKey = "238810-662376-448998-450120-652806-203390-606320-483076"; ManifestFile = "\\DriveManifest.xml"; ManifestHash = "109B21108597EF36D5785F08303F3638"; DriveHeaderHash = "" })
New-AzImportExport -Name test-job -ResourceGroupName ImportTestRG -Location eastus -StorageAccountId "/subscriptions//resourcegroups/ImportTestRG/providers/Microsoft.Storage/storageAccounts/teststorageforimport" -JobType Import -ReturnAddressRecipientName "Some name" -ReturnAddressStreetAddress1 "Street1" -ReturnAddressCity "Redmond" -ReturnAddressStateOrProvince "WA" -ReturnAddressPostalCode "98008" -ReturnAddressCountryOrRegion "USA" -ReturnAddressPhone "4250000000" -ReturnAddressEmail test@contoso.com -DiagnosticsPath "waimportexport" -BackupDriveManifest -DriveList $driveList
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IJobResponse
+Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IJobResponse
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -455,13 +475,13 @@ DRIVELIST : List of up to ten drives that comprise the job. The
[ManifestHash ]: The Base16-encoded MD5 hash of the manifest file on the drive.
[ManifestUri ]: A URI that points to the blob containing the drive manifest file.
[PercentComplete ]: Percentage completed for the drive.
- [State ]: The drive's current state.
+ [State ]: The drive's current state.
[VerboseLogUri ]: A URI that points to the blob containing the verbose log for the data transfer operation.
.Link
https://learn.microsoft.com/powershell/module/az.importexport/new-azimportexport
#>
function New-AzImportExport {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IJobResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IJobResponse])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -496,293 +516,304 @@ param(
# The tenant ID of the client making the request.
${ClientTenantId},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Management.Automation.SwitchParameter]
# Default value is false.
# Indicates whether the manifest files on the drives should be copied to block blobs.
${BackupDriveManifest},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String[]]
# A collection of blob-path strings.
${BlobListBlobPath},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String[]]
# A collection of blob-prefix strings.
${BlobListBlobPathPrefix},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Management.Automation.SwitchParameter]
# Indicates whether a request has been submitted to cancel the job.
${CancelRequested},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The name of the carrier that is used to ship the import or export drives.
${DeliveryPackageCarrierName},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Int64]
# The number of drives included in the package.
${DeliveryPackageDriveCount},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The date when the package is shipped.
${DeliveryPackageShipDate},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The tracking number of the package.
${DeliveryPackageTrackingNumber},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The virtual blob directory to which the copy logs and backups of drive manifest files (if enabled) will be stored.
${DiagnosticsPath},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IDriveStatus[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IDriveStatus[]]
# List of up to ten drives that comprise the job.
# The drive list is a required element for an import job; it is not specified for export jobs.
- # To construct, see NOTES section for DRIVELIST properties and create a hash table.
${DriveList},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Support.EncryptionKekType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.PSArgumentCompleterAttribute("MicrosoftManaged", "CustomerManaged")]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Support.EncryptionKekType]
+ [System.String]
# The type of kek encryption key
${EncryptionKeyKekType},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Specifies the url for kek encryption key.
${EncryptionKeyKekUrl},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Specifies the keyvault resource id for kek encryption key.
${EncryptionKeyKekVaultId},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The relative URI to the block blob that contains the list of blob paths or blob path prefixes as defined above, beginning with the container name.
# If the blob is in root container, the URI must begin with $root.
${ExportBlobListBlobPath},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# A blob path that points to a block blob containing a list of blob names that were not exported due to insufficient drive space.
# If all blobs were exported successfully, then this element is not included in the response.
${IncompleteBlobListUri},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The type of job
${JobType},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Specifies the supported Azure location where the job should be created
${Location},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Default value is Error.
# Indicates whether error logging or verbose logging will be enabled.
${LogLevel},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Int64]
# Overall percentage completed for the job.
${PercentComplete},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Specifies the provisioning state of the job.
${ProvisioningState},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The city name to use when returning the drives.
${ReturnAddressCity},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The country or region to use when returning the drives.
${ReturnAddressCountryOrRegion},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Email address of the recipient of the returned drives.
${ReturnAddressEmail},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Phone number of the recipient of the returned drives.
${ReturnAddressPhone},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The postal code to use when returning the drives.
${ReturnAddressPostalCode},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The name of the recipient who will receive the hard drives when they are returned.
${ReturnAddressRecipientName},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The state or province to use when returning the drives.
${ReturnAddressStateOrProvince},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The first line of the street address to use when returning the drives.
${ReturnAddressStreetAddress1},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The second line of the street address to use when returning the drives.
${ReturnAddressStreetAddress2},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The name of the carrier that is used to ship the import or export drives.
${ReturnPackageCarrierName},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Int64]
# The number of drives included in the package.
${ReturnPackageDriveCount},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The date when the package is shipped.
${ReturnPackageShipDate},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The tracking number of the package.
${ReturnPackageTrackingNumber},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The customer's account number with the carrier.
${ReturnShippingCarrierAccountNumber},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The carrier's name.
${ReturnShippingCarrierName},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The city name to use when returning the drives.
${ShippingInformationCity},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The country or region to use when returning the drives.
${ShippingInformationCountryOrRegion},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Phone number of the recipient of the returned drives.
${ShippingInformationPhone},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The postal code to use when returning the drives.
${ShippingInformationPostalCode},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The name of the recipient who will receive the hard drives when they are returned.
${ShippingInformationRecipientName},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The state or province to use when returning the drives.
${ShippingInformationStateOrProvince},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The first line of the street address to use when returning the drives.
${ShippingInformationStreetAddress1},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The second line of the street address to use when returning the drives.
${ShippingInformationStreetAddress2},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Current state of the job.
${State},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The resource identifier of the storage account where data will be imported to or exported from.
${StorageAccountId},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IPutJobParametersTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IPutJobParametersTags]))]
[System.Collections.Hashtable]
# Specifies the tags that will be assigned to the job.
${Tag},
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -839,6 +870,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -859,10 +899,10 @@ begin {
$mapping = @{
CreateExpanded = 'Az.ImportExport.private\New-AzImportExport_CreateExpanded';
+ CreateViaJsonFilePath = 'Az.ImportExport.private\New-AzImportExport_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.ImportExport.private\New-AzImportExport_CreateViaJsonString';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -876,6 +916,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -977,7 +1020,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IImportExportIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -1048,6 +1090,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -1070,9 +1121,7 @@ begin {
Delete = 'Az.ImportExport.private\Remove-AzImportExport_Delete';
DeleteViaIdentity = 'Az.ImportExport.private\Remove-AzImportExport_DeleteViaIdentity';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -1086,6 +1135,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -1131,11 +1183,11 @@ end {
<#
.Synopsis
-Updates specific properties of a job.
+update specific properties of a job.
You can call this operation to notify the Import/Export service that the hard drives comprising the import or export job have been shipped to the Microsoft data center.
It can also be used to cancel an existing job.
.Description
-Updates specific properties of a job.
+update specific properties of a job.
You can call this operation to notify the Import/Export service that the hard drives comprising the import or export job have been shipped to the Microsoft data center.
It can also be used to cancel an existing job.
.Example
@@ -1146,7 +1198,7 @@ Get-AzImportExport -Name test-job -ResourceGroupName ImportTestRG | Update-AzImp
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IImportExportIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IJobResponse
+Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IJobResponse
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -1163,7 +1215,7 @@ DRIVELIST : List of drives that comprise the job.
[ManifestHash ]: The Base16-encoded MD5 hash of the manifest file on the drive.
[ManifestUri ]: A URI that points to the blob containing the drive manifest file.
[PercentComplete ]: Percentage completed for the drive.
- [State ]: The drive's current state.
+ [State ]: The drive's current state.
[VerboseLogUri ]: A URI that points to the blob containing the verbose log for the data transfer operation.
INPUTOBJECT : Identity Parameter
@@ -1176,10 +1228,12 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.importexport/update-azimportexport
#>
function Update-AzImportExport {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IJobResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IJobResponse])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
[Alias('JobName')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Path')]
[System.String]
@@ -1187,12 +1241,16 @@ param(
${Name},
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Path')]
[System.String]
# The resource group name uniquely identifies the resource group within the user subscription.
${ResourceGroupName},
[Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath')]
+ [Parameter(ParameterSetName='UpdateViaJsonString')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
@@ -1203,7 +1261,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IImportExportIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -1212,137 +1269,169 @@ param(
# Specifies the preferred language for the response.
${AcceptLanguage},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Management.Automation.SwitchParameter]
# Indicates whether the manifest files on the drives should be copied to block blobs.
${BackupDriveManifest},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Management.Automation.SwitchParameter]
# If specified, the value must be true.
# The service will attempt to cancel the job.
${CancelRequested},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The name of the carrier that is used to ship the import or export drives.
${DeliveryPackageCarrierName},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Int64]
# The number of drives included in the package.
${DeliveryPackageDriveCount},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The date when the package is shipped.
${DeliveryPackageShipDate},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The tracking number of the package.
${DeliveryPackageTrackingNumber},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IDriveStatus[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IDriveStatus[]]
# List of drives that comprise the job.
- # To construct, see NOTES section for DRIVELIST properties and create a hash table.
${DriveList},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Indicates whether error logging or verbose logging is enabled.
${LogLevel},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The city name to use when returning the drives.
${ReturnAddressCity},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The country or region to use when returning the drives.
${ReturnAddressCountryOrRegion},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Email address of the recipient of the returned drives.
${ReturnAddressEmail},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Phone number of the recipient of the returned drives.
${ReturnAddressPhone},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The postal code to use when returning the drives.
${ReturnAddressPostalCode},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The name of the recipient who will receive the hard drives when they are returned.
${ReturnAddressRecipientName},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The state or province to use when returning the drives.
${ReturnAddressStateOrProvince},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The first line of the street address to use when returning the drives.
${ReturnAddressStreetAddress1},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The second line of the street address to use when returning the drives.
${ReturnAddressStreetAddress2},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The customer's account number with the carrier.
${ReturnShippingCarrierAccountNumber},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The carrier's name.
${ReturnShippingCarrierName},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# If specified, the value must be Shipping, which tells the Import/Export service that the package for the job has been shipped.
# The ReturnAddress and DeliveryPackage properties must have been set either in this request or in a previous request, otherwise the request will fail.
${State},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IUpdateJobParametersTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IUpdateJobParametersTags]))]
[System.Collections.Hashtable]
# Specifies the tags that will be assigned to the job.
${Tag},
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Update operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
+ [System.String]
+ # Json string supplied to the Update operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -1399,6 +1488,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -1420,10 +1518,10 @@ begin {
$mapping = @{
UpdateExpanded = 'Az.ImportExport.private\Update-AzImportExport_UpdateExpanded';
UpdateViaIdentityExpanded = 'Az.ImportExport.private\Update-AzImportExport_UpdateViaIdentityExpanded';
+ UpdateViaJsonFilePath = 'Az.ImportExport.private\Update-AzImportExport_UpdateViaJsonFilePath';
+ UpdateViaJsonString = 'Az.ImportExport.private\Update-AzImportExport_UpdateViaJsonString';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -1437,6 +1535,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -1489,12 +1590,12 @@ Returns the BitLocker Keys for all drives in the specified job.
Get-AzImportExportBitLockerKey -JobName test-job -ResourceGroupName ImportTestRG
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IDriveBitLockerKey
+Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IDriveBitLockerKey
.Link
https://learn.microsoft.com/powershell/module/az.importexport/get-azimportexportbitlockerkey
#>
function Get-AzImportExportBitLockerKey {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IDriveBitLockerKey])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IDriveBitLockerKey])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
@@ -1577,6 +1678,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -1598,9 +1708,7 @@ begin {
$mapping = @{
List = 'Az.ImportExport.custom\Get-AzImportExportBitLockerKey';
}
- if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -1614,6 +1722,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -1667,12 +1778,12 @@ $driveList = New-AzImportExportDriveListObject -DriveId "9CA995BA" -BitLockerKey
New-AzImportExport -Name test-job -ResourceGroupName ImportTestRG -Location eastus -StorageAccountId "/subscriptions//resourcegroups/ImportTestRG/providers/Microsoft.Storage/storageAccounts/teststorageforimport" -JobType Import -ReturnAddressRecipientName "Some name" -ReturnAddressStreetAddress1 "Street1" -ReturnAddressCity "Redmond" -ReturnAddressStateOrProvince "WA" -ReturnAddressPostalCode "98008" -ReturnAddressCountryOrRegion "USA" -ReturnAddressPhone "4250000000" -ReturnAddressEmail test@contoso.com -DiagnosticsPath "waimportexport" -BackupDriveManifest -DriveList $driveList
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IDriveStatus
+Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IDriveStatus
.Link
https://learn.microsoft.com/powershell/module/az.importexport/new-AzImportExportDriveListObject
#>
function New-AzImportExportDriveListObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IDriveStatus])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IDriveStatus])]
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter()]
@@ -1737,8 +1848,9 @@ param(
${PercentComplete},
[Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.PSArgumentCompleterAttribute("Specified", "Received", "NeverReceived", "Transferring", "Completed", "CompletedMoreInfo", "ShippedBack")]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Support.DriveState]
+ [System.String]
# The drive's current state.
${State},
@@ -1756,6 +1868,9 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -1784,6 +1899,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/ImportExport/ImportExport.Autorest/exports/Remove-AzImportExport.ps1 b/generated/ImportExport/ImportExport.Autorest/exports/Remove-AzImportExport.ps1
index 3e2a7cd2ee58..d29e05b76919 100644
--- a/generated/ImportExport/ImportExport.Autorest/exports/Remove-AzImportExport.ps1
+++ b/generated/ImportExport/ImportExport.Autorest/exports/Remove-AzImportExport.ps1
@@ -72,7 +72,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IImportExportIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -143,6 +142,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -165,9 +173,7 @@ begin {
Delete = 'Az.ImportExport.private\Remove-AzImportExport_Delete';
DeleteViaIdentity = 'Az.ImportExport.private\Remove-AzImportExport_DeleteViaIdentity';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -181,6 +187,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/ImportExport/ImportExport.Autorest/exports/Update-AzImportExport.ps1 b/generated/ImportExport/ImportExport.Autorest/exports/Update-AzImportExport.ps1
index 7cd1a157763d..2cb801dadddc 100644
--- a/generated/ImportExport/ImportExport.Autorest/exports/Update-AzImportExport.ps1
+++ b/generated/ImportExport/ImportExport.Autorest/exports/Update-AzImportExport.ps1
@@ -16,11 +16,11 @@
<#
.Synopsis
-Updates specific properties of a job.
+update specific properties of a job.
You can call this operation to notify the Import/Export service that the hard drives comprising the import or export job have been shipped to the Microsoft data center.
It can also be used to cancel an existing job.
.Description
-Updates specific properties of a job.
+update specific properties of a job.
You can call this operation to notify the Import/Export service that the hard drives comprising the import or export job have been shipped to the Microsoft data center.
It can also be used to cancel an existing job.
.Example
@@ -31,7 +31,7 @@ Get-AzImportExport -Name test-job -ResourceGroupName ImportTestRG | Update-AzImp
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IImportExportIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IJobResponse
+Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IJobResponse
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -48,7 +48,7 @@ DRIVELIST : List of drives that comprise the job.
[ManifestHash ]: The Base16-encoded MD5 hash of the manifest file on the drive.
[ManifestUri ]: A URI that points to the blob containing the drive manifest file.
[PercentComplete ]: Percentage completed for the drive.
- [State ]: The drive's current state.
+ [State ]: The drive's current state.
[VerboseLogUri ]: A URI that points to the blob containing the verbose log for the data transfer operation.
INPUTOBJECT : Identity Parameter
@@ -61,10 +61,12 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.importexport/update-azimportexport
#>
function Update-AzImportExport {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IJobResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IJobResponse])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
[Alias('JobName')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Path')]
[System.String]
@@ -72,12 +74,16 @@ param(
${Name},
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Path')]
[System.String]
# The resource group name uniquely identifies the resource group within the user subscription.
${ResourceGroupName},
[Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath')]
+ [Parameter(ParameterSetName='UpdateViaJsonString')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
@@ -88,7 +94,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IImportExportIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -97,137 +102,169 @@ param(
# Specifies the preferred language for the response.
${AcceptLanguage},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Management.Automation.SwitchParameter]
# Indicates whether the manifest files on the drives should be copied to block blobs.
${BackupDriveManifest},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Management.Automation.SwitchParameter]
# If specified, the value must be true.
# The service will attempt to cancel the job.
${CancelRequested},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The name of the carrier that is used to ship the import or export drives.
${DeliveryPackageCarrierName},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.Int64]
# The number of drives included in the package.
${DeliveryPackageDriveCount},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The date when the package is shipped.
${DeliveryPackageShipDate},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The tracking number of the package.
${DeliveryPackageTrackingNumber},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IDriveStatus[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IDriveStatus[]]
# List of drives that comprise the job.
- # To construct, see NOTES section for DRIVELIST properties and create a hash table.
${DriveList},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Indicates whether error logging or verbose logging is enabled.
${LogLevel},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The city name to use when returning the drives.
${ReturnAddressCity},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The country or region to use when returning the drives.
${ReturnAddressCountryOrRegion},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Email address of the recipient of the returned drives.
${ReturnAddressEmail},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# Phone number of the recipient of the returned drives.
${ReturnAddressPhone},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The postal code to use when returning the drives.
${ReturnAddressPostalCode},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The name of the recipient who will receive the hard drives when they are returned.
${ReturnAddressRecipientName},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The state or province to use when returning the drives.
${ReturnAddressStateOrProvince},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The first line of the street address to use when returning the drives.
${ReturnAddressStreetAddress1},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The second line of the street address to use when returning the drives.
${ReturnAddressStreetAddress2},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The customer's account number with the carrier.
${ReturnShippingCarrierAccountNumber},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# The carrier's name.
${ReturnShippingCarrierName},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
[System.String]
# If specified, the value must be Shipping, which tells the Import/Export service that the package for the job has been shipped.
# The ReturnAddress and DeliveryPackage properties must have been set either in this request or in a previous request, otherwise the request will fail.
${State},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IUpdateJobParametersTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IUpdateJobParametersTags]))]
[System.Collections.Hashtable]
# Specifies the tags that will be assigned to the job.
${Tag},
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Update operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Category('Body')]
+ [System.String]
+ # Json string supplied to the Update operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -284,6 +321,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -305,10 +351,10 @@ begin {
$mapping = @{
UpdateExpanded = 'Az.ImportExport.private\Update-AzImportExport_UpdateExpanded';
UpdateViaIdentityExpanded = 'Az.ImportExport.private\Update-AzImportExport_UpdateViaIdentityExpanded';
+ UpdateViaJsonFilePath = 'Az.ImportExport.private\Update-AzImportExport_UpdateViaJsonFilePath';
+ UpdateViaJsonString = 'Az.ImportExport.private\Update-AzImportExport_UpdateViaJsonString';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -322,6 +368,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/ImportExport/ImportExport.Autorest/generate-info.json b/generated/ImportExport/ImportExport.Autorest/generate-info.json
index 567a41ef612f..ab1339ec7dde 100644
--- a/generated/ImportExport/ImportExport.Autorest/generate-info.json
+++ b/generated/ImportExport/ImportExport.Autorest/generate-info.json
@@ -1,3 +1,3 @@
{
- "generate_Id": "06d7154f-2591-42eb-bdc3-621a56048b36"
+ "generate_Id": "615b1d44-2fd3-4aa6-a4ef-b0b79b4f5f5a"
}
diff --git a/generated/ImportExport/ImportExport.Autorest/generated/Module.cs b/generated/ImportExport/ImportExport.Autorest/generated/Module.cs
index 0c398f55ecfc..85c9af185c7d 100644
--- a/generated/ImportExport/ImportExport.Autorest/generated/Module.cs
+++ b/generated/ImportExport/ImportExport.Autorest/generated/Module.cs
@@ -28,12 +28,20 @@ public partial class Module
public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler();
+ private static bool _init = false;
+
+ private static readonly global::System.Object _initLock = new global::System.Object();
+
+ private static Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Module _instance;
+
/// the ISendAsync pipeline instance
private Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.HttpPipeline _pipeline;
/// the ISendAsync pipeline instance (when proxy is enabled)
private Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.HttpPipeline _pipelineWithProxy;
+ private static readonly global::System.Object _singletonLock = new global::System.Object();
+
public bool _useProxy = false;
public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy();
@@ -56,11 +64,8 @@ public partial class Module
/// The delegate to get the telemetry info.
public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; }
- /// Backing field for property.
- private static Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Module _instance;
-
/// the singleton of this module class
- public static Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Module());
+ public static Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } }
/// The Name of this module
public string Name => @"Az.ImportExport";
@@ -125,9 +130,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.HttpPipeline Crea
/// Initialization steps performed after the module is loaded.
public void Init()
{
- OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } );
- OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } );
- CustomInit();
+ if (_init == false)
+ {
+ lock (_initLock) {
+ if (_init == false) {
+ OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } );
+ OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } );
+ CustomInit();
+ _init = true;
+ }
+ }
+ }
}
/// Creates the module instance.
diff --git a/generated/ImportExport/ImportExport.Autorest/generated/api/ImportExport.cs b/generated/ImportExport/ImportExport.Autorest/generated/api/ImportExport.cs
index 0f69315ad7ac..070eab3012db 100644
--- a/generated/ImportExport/ImportExport.Autorest/generated/api/ImportExport.cs
+++ b/generated/ImportExport/ImportExport.Autorest/generated/api/ImportExport.cs
@@ -15,9 +15,9 @@ public partial class ImportExport
{
/// Returns the BitLocker Keys for all drives in the specified job.
- /// The name of the import/export job.
/// The subscription ID for the Azure user.
/// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
/// Specifies the preferred language for the response.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -27,7 +27,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BitLockerKeysList(string jobName, string subscriptionId, string resourceGroupName, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BitLockerKeysList(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -61,7 +61,7 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.BitLockerKeysList_Call(request,onOk,onDefault,eventListener,sender);
+ await this.BitLockerKeysList_Call (request, onOk,onDefault,eventListener,sender);
}
}
@@ -76,7 +76,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BitLockerKeysListViaIdentity(global::System.String viaIdentity, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BitLockerKeysListViaIdentity(global::System.String viaIdentity, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -84,16 +84,16 @@ public partial class ImportExport
{
// verify that Identity format is an exact match for uri
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ImportExport/jobs/(?[^/]+)/listBitLockerKeys$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ImportExport/jobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
if (!_match.Success)
{
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}/listBitLockerKeys'");
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}'");
}
// replace URI parameters with values from identity
- var jobName = _match.Groups["jobName"].Value;
var subscriptionId = _match.Groups["subscriptionId"].Value;
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var jobName = _match.Groups["jobName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
@@ -122,11 +122,179 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.BitLockerKeysList_Call(request,onOk,onDefault,eventListener,sender);
+ await this.BitLockerKeysList_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Returns the BitLocker Keys for all drives in the specified job.
+ ///
+ /// Specifies the preferred language for the response.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task BitLockerKeysListViaIdentityWithResult(global::System.String viaIdentity, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ImportExport/jobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var jobName = _match.Groups["jobName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.ImportExport/jobs/"
+ + jobName
+ + "/listBitLockerKeys"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Post, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.BitLockerKeysListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Returns the BitLocker Keys for all drives in the specified job.
+ /// The subscription ID for the Azure user.
+ /// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
+ /// Specifies the preferred language for the response.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task BitLockerKeysListWithResult(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.ImportExport/jobs/"
+ + global::System.Uri.EscapeDataString(jobName)
+ + "/listBitLockerKeys"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Post, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.BitLockerKeysListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task BitLockerKeysListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.GetBitLockerKeysResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -136,7 +304,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BitLockerKeysList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task BitLockerKeysList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -147,6 +315,7 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -154,13 +323,13 @@ public partial class ImportExport
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.GetBitLockerKeysResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.GetBitLockerKeysResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -179,29 +348,29 @@ public partial class ImportExport
/// Validation method for method. Call this like the actual call, but you will get validation
/// events back.
///
- /// The name of the import/export job.
/// The subscription ID for the Azure user.
/// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
/// Specifies the preferred language for the response.
/// an instance that will receive events.
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BitLockerKeysList_Validate(string jobName, string subscriptionId, string resourceGroupName, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task BitLockerKeysList_Validate(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
- await eventListener.AssertNotNull(nameof(jobName),jobName);
await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertNotNull(nameof(jobName),jobName);
await eventListener.AssertNotNull(nameof(acceptLanguage),acceptLanguage);
}
}
- /// Creates a new job or updates an existing job in the specified subscription.
- /// The name of the import/export job.
+ /// create a new job or create an existing job in the specified subscription.
/// The subscription ID for the Azure user.
/// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
/// Specifies the preferred language for the response.
/// The tenant ID of the client making the request.
/// The parameters used for creating the job
@@ -211,10 +380,11 @@ public partial class ImportExport
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task JobsCreate(string jobName, string subscriptionId, string resourceGroupName, string acceptLanguage, string xMSClientTenantId, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IPutJobParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task JobsCreate(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, string xMSClientTenantId, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IPutJobParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -251,15 +421,15 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.JobsCreate_Call(request,onOk,onCreated,onDefault,eventListener,sender);
+ await this.JobsCreate_Call (request, onOk,onCreated,onDefault,eventListener,sender);
}
}
- /// Creates a new job or updates an existing job in the specified subscription.
+ /// create a new job or create an existing job in the specified subscription.
///
/// Specifies the preferred language for the response.
/// The tenant ID of the client making the request.
@@ -270,10 +440,11 @@ public partial class ImportExport
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task JobsCreateViaIdentity(global::System.String viaIdentity, string acceptLanguage, string xMSClientTenantId, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IPutJobParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task JobsCreateViaIdentity(global::System.String viaIdentity, string acceptLanguage, string xMSClientTenantId, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IPutJobParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -288,9 +459,9 @@ public partial class ImportExport
}
// replace URI parameters with values from identity
- var jobName = _match.Groups["jobName"].Value;
var subscriptionId = _match.Groups["subscriptionId"].Value;
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var jobName = _match.Groups["jobName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
@@ -322,106 +493,92 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.JobsCreate_Call(request,onOk,onCreated,onDefault,eventListener,sender);
+ await this.JobsCreate_Call (request, onOk,onCreated,onDefault,eventListener,sender);
}
}
- /// Actual wire call for method.
- /// the prepared HttpRequestMessage to send.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 201 (Created).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// create a new job or create an existing job in the specified subscription.
+ ///
+ /// Specifies the preferred language for the response.
+ /// The tenant ID of the client making the request.
+ /// The parameters used for creating the job
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task JobsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task JobsCreateViaIdentityWithResult(global::System.String viaIdentity, string acceptLanguage, string xMSClientTenantId, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IPutJobParameters body, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeUpdate)
{
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
using( NoSynchronizationContext )
{
- global::System.Net.Http.HttpResponseMessage _response = null;
- try
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ImportExport/jobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
{
- var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- var _contentType = _response.Content.Headers.ContentType?.MediaType;
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}'");
+ }
- switch ( _response.StatusCode )
- {
- case global::System.Net.HttpStatusCode.OK:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.JobResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- case global::System.Net.HttpStatusCode.Created:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.JobResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- default:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- }
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var jobName = _match.Groups["jobName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.ImportExport/jobs/"
+ + jobName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
}
- finally
+ if (null != xMSClientTenantId)
{
- // finally statements
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Finally, request, _response);
- _response?.Dispose();
- request?.Dispose();
+ request.Headers.Add("x-ms-client-tenant-id",xMSClientTenantId);
}
- }
- }
- ///
- /// Validation method for method. Call this like the actual call, but you will get validation events
- /// back.
- ///
- /// The name of the import/export job.
- /// The subscription ID for the Azure user.
- /// The resource group name uniquely identifies the resource group within the user subscription.
- /// Specifies the preferred language for the response.
- /// The tenant ID of the client making the request.
- /// The parameters used for creating the job
- /// an instance that will receive events.
- ///
- /// A that will be complete when handling of the response is completed.
- ///
- internal async global::System.Threading.Tasks.Task JobsCreate_Validate(string jobName, string subscriptionId, string resourceGroupName, string acceptLanguage, string xMSClientTenantId, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IPutJobParameters body, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener)
- {
- using( NoSynchronizationContext )
- {
- await eventListener.AssertNotNull(nameof(jobName),jobName);
- await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
- await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
- await eventListener.AssertNotNull(nameof(acceptLanguage),acceptLanguage);
- await eventListener.AssertNotNull(nameof(xMSClientTenantId),xMSClientTenantId);
- await eventListener.AssertNotNull(nameof(body), body);
- await eventListener.AssertObjectIsValid(nameof(body), body);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.JobsCreateWithResult_Call (request, eventListener,sender);
}
}
- ///
- /// Deletes an existing job. Only jobs in the Creating or Completed states can be deleted.
- ///
- /// The name of the import/export job.
+ /// create a new job or create an existing job in the specified subscription.
/// The subscription ID for the Azure user.
/// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
/// Specifies the preferred language for the response.
+ /// The tenant ID of the client making the request.
+ /// Json string supplied to the JobsCreate operation
/// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 201 (Created).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -429,7 +586,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task JobsDelete(string jobName, string subscriptionId, string resourceGroupName, string acceptLanguage, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task JobsCreateViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, string xMSClientTenantId, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -451,7 +608,7 @@ public partial class ImportExport
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Delete, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Put, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// add headers parameters
@@ -459,78 +616,208 @@ public partial class ImportExport
{
request.Headers.Add("Accept-Language",acceptLanguage);
}
+ if (null != xMSClientTenantId)
+ {
+ request.Headers.Add("x-ms-client-tenant-id",xMSClientTenantId);
+ }
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.JobsDelete_Call(request,onOk,onDefault,eventListener,sender);
+ await this.JobsCreate_Call (request, onOk,onCreated,onDefault,eventListener,sender);
}
}
- ///
- /// Deletes an existing job. Only jobs in the Creating or Completed states can be deleted.
- ///
- ///
+ /// create a new job or create an existing job in the specified subscription.
+ /// The subscription ID for the Azure user.
+ /// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
/// Specifies the preferred language for the response.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// The tenant ID of the client making the request.
+ /// Json string supplied to the JobsCreate operation
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task JobsDeleteViaIdentity(global::System.String viaIdentity, string acceptLanguage, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task JobsCreateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, string xMSClientTenantId, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
using( NoSynchronizationContext )
{
- // verify that Identity format is an exact match for uri
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.ImportExport/jobs/"
+ + global::System.Uri.EscapeDataString(jobName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ImportExport/jobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
- if (!_match.Success)
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
{
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}'");
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+ if (null != xMSClientTenantId)
+ {
+ request.Headers.Add("x-ms-client-tenant-id",xMSClientTenantId);
}
- // replace URI parameters with values from identity
- var jobName = _match.Groups["jobName"].Value;
- var subscriptionId = _match.Groups["subscriptionId"].Value;
- var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.JobsCreateWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// create a new job or create an existing job in the specified subscription.
+ /// The subscription ID for the Azure user.
+ /// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
+ /// Specifies the preferred language for the response.
+ /// The tenant ID of the client making the request.
+ /// The parameters used for creating the job
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task JobsCreateWithResult(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, string xMSClientTenantId, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IPutJobParameters body, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeUpdate)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + subscriptionId
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
- + resourceGroupName
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ "/providers/Microsoft.ImportExport/jobs/"
- + jobName
+ + global::System.Uri.EscapeDataString(jobName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// add headers parameters
if (null != acceptLanguage)
{
request.Headers.Add("Accept-Language",acceptLanguage);
}
+ if (null != xMSClientTenantId)
+ {
+ request.Headers.Add("x-ms-client-tenant-id",xMSClientTenantId);
+ }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.JobsDelete_Call(request,onOk,onDefault,eventListener,sender);
+ return await this.JobsCreateWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task JobsCreateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.JobResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ case global::System.Net.HttpStatusCode.Created:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.JobResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 201 (Created).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -538,7 +825,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task JobsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task JobsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -549,6 +836,7 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -556,13 +844,19 @@ public partial class ImportExport
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response);
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.JobResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ case global::System.Net.HttpStatusCode.Created:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.JobResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -578,32 +872,39 @@ public partial class ImportExport
}
///
- /// Validation method for method. Call this like the actual call, but you will get validation events
+ /// Validation method for method. Call this like the actual call, but you will get validation events
/// back.
///
- /// The name of the import/export job.
/// The subscription ID for the Azure user.
/// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
/// Specifies the preferred language for the response.
+ /// The tenant ID of the client making the request.
+ /// The parameters used for creating the job
/// an instance that will receive events.
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task JobsDelete_Validate(string jobName, string subscriptionId, string resourceGroupName, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task JobsCreate_Validate(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, string xMSClientTenantId, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IPutJobParameters body, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
- await eventListener.AssertNotNull(nameof(jobName),jobName);
await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertNotNull(nameof(jobName),jobName);
await eventListener.AssertNotNull(nameof(acceptLanguage),acceptLanguage);
+ await eventListener.AssertNotNull(nameof(xMSClientTenantId),xMSClientTenantId);
+ await eventListener.AssertNotNull(nameof(body), body);
+ await eventListener.AssertObjectIsValid(nameof(body), body);
}
}
- /// Gets information about an existing job.
- /// The name of the import/export job.
+ ///
+ /// Deletes an existing job. Only jobs in the Creating or Completed states can be deleted.
+ ///
/// The subscription ID for the Azure user.
/// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
/// Specifies the preferred language for the response.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -613,7 +914,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task JobsGet(string jobName, string subscriptionId, string resourceGroupName, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task JobsDelete(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -635,7 +936,7 @@ public partial class ImportExport
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Delete, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// add headers parameters
@@ -646,11 +947,13 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.JobsGet_Call(request,onOk,onDefault,eventListener,sender);
+ await this.JobsDelete_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Gets information about an existing job.
+ ///
+ /// Deletes an existing job. Only jobs in the Creating or Completed states can be deleted.
+ ///
///
/// Specifies the preferred language for the response.
/// a delegate that is called when the remote service returns 200 (OK).
@@ -661,7 +964,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task JobsGetViaIdentity(global::System.String viaIdentity, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task JobsDeleteViaIdentity(global::System.String viaIdentity, string acceptLanguage, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -676,9 +979,9 @@ public partial class ImportExport
}
// replace URI parameters with values from identity
- var jobName = _match.Groups["jobName"].Value;
var subscriptionId = _match.Groups["subscriptionId"].Value;
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var jobName = _match.Groups["jobName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
@@ -695,7 +998,7 @@ public partial class ImportExport
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Delete, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// add headers parameters
@@ -706,11 +1009,11 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.JobsGet_Call(request,onOk,onDefault,eventListener,sender);
+ await this.JobsDelete_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -720,7 +1023,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task JobsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task JobsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -731,6 +1034,7 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -738,13 +1042,13 @@ public partial class ImportExport
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.JobResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response);
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -760,33 +1064,32 @@ public partial class ImportExport
}
///
- /// Validation method for method. Call this like the actual call, but you will get validation events
+ /// Validation method for method. Call this like the actual call, but you will get validation events
/// back.
///
- /// The name of the import/export job.
/// The subscription ID for the Azure user.
/// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
/// Specifies the preferred language for the response.
/// an instance that will receive events.
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task JobsGet_Validate(string jobName, string subscriptionId, string resourceGroupName, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task JobsDelete_Validate(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
- await eventListener.AssertNotNull(nameof(jobName),jobName);
await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertNotNull(nameof(jobName),jobName);
await eventListener.AssertNotNull(nameof(acceptLanguage),acceptLanguage);
}
}
- /// Returns all active and completed jobs in a resource group.
- /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
- /// Can be used to restrict the results to certain conditions.
+ /// Gets information about an existing job.
/// The subscription ID for the Azure user.
/// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
/// Specifies the preferred language for the response.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -796,7 +1099,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task JobsListByResourceGroup(long? Top, string Filter, string subscriptionId, string resourceGroupName, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task JobsGet(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -808,12 +1111,9 @@ public partial class ImportExport
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
- + "/providers/Microsoft.ImportExport/jobs"
+ + "/providers/Microsoft.ImportExport/jobs/"
+ + global::System.Uri.EscapeDataString(jobName)
+ "?"
- + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
- + "&"
- + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
- + "&"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -832,14 +1132,12 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.JobsListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
+ await this.JobsGet_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Returns all active and completed jobs in a resource group.
+ /// Gets information about an existing job.
///
- /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
- /// Can be used to restrict the results to certain conditions.
/// Specifies the preferred language for the response.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -849,7 +1147,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task JobsListByResourceGroupViaIdentity(global::System.String viaIdentity, long? Top, string Filter, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task JobsGetViaIdentity(global::System.String viaIdentity, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -857,27 +1155,25 @@ public partial class ImportExport
{
// verify that Identity format is an exact match for uri
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ImportExport/jobs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ImportExport/jobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
if (!_match.Success)
{
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs'");
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}'");
}
// replace URI parameters with values from identity
var subscriptionId = _match.Groups["subscriptionId"].Value;
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var jobName = _match.Groups["jobName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
- + "/providers/Microsoft.ImportExport/jobs"
+ + "/providers/Microsoft.ImportExport/jobs/"
+ + jobName
+ "?"
- + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
- + "&"
- + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
- + "&"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -896,88 +1192,255 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.JobsListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
+ await this.JobsGet_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Actual wire call for method.
- /// the prepared HttpRequestMessage to send.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// Gets information about an existing job.
+ ///
+ /// Specifies the preferred language for the response.
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task JobsListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task JobsGetViaIdentityWithResult(global::System.String viaIdentity, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
using( NoSynchronizationContext )
{
- global::System.Net.Http.HttpResponseMessage _response = null;
- try
- {
- var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- var _contentType = _response.Content.Headers.ContentType?.MediaType;
+ // verify that Identity format is an exact match for uri
- switch ( _response.StatusCode )
- {
- case global::System.Net.HttpStatusCode.OK:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ListJobsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- default:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- }
- }
- finally
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ImportExport/jobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
{
- // finally statements
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Finally, request, _response);
- _response?.Dispose();
- request?.Dispose();
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}'");
}
- }
- }
- ///
- /// Validation method for method. Call this like the actual call, but you will get
- /// validation events back.
- ///
- /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
- /// Can be used to restrict the results to certain conditions.
- /// The subscription ID for the Azure user.
- /// The resource group name uniquely identifies the resource group within the user subscription.
- /// Specifies the preferred language for the response.
- /// an instance that will receive events.
- ///
- /// A that will be complete when handling of the response is completed.
- ///
- internal async global::System.Threading.Tasks.Task JobsListByResourceGroup_Validate(long? Top, string Filter, string subscriptionId, string resourceGroupName, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener)
- {
- using( NoSynchronizationContext )
- {
- await eventListener.AssertNotNull(nameof(Filter),Filter);
- await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var jobName = _match.Groups["jobName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.ImportExport/jobs/"
+ + jobName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.JobsGetWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Gets information about an existing job.
+ /// The subscription ID for the Azure user.
+ /// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
+ /// Specifies the preferred language for the response.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task JobsGetWithResult(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.ImportExport/jobs/"
+ + global::System.Uri.EscapeDataString(jobName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.JobsGetWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task JobsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.JobResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task JobsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.JobResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will get validation events
+ /// back.
+ ///
+ /// The subscription ID for the Azure user.
+ /// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
+ /// Specifies the preferred language for the response.
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task JobsGet_Validate(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertNotNull(nameof(jobName),jobName);
await eventListener.AssertNotNull(nameof(acceptLanguage),acceptLanguage);
}
}
- /// Returns all active and completed jobs in a subscription.
- /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
- /// Can be used to restrict the results to certain conditions.
+ /// Returns all active and completed jobs in a resource group.
/// The subscription ID for the Azure user.
+ /// The resource group name uniquely identifies the resource group within the user subscription.
/// Specifies the preferred language for the response.
+ /// Can be used to restrict the results to certain conditions.
+ /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
@@ -986,7 +1449,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task JobsListBySubscription(long? Top, string Filter, string subscriptionId, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task JobsListByResourceGroup(string subscriptionId, string resourceGroupName, string acceptLanguage, string Filter, long? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -996,12 +1459,14 @@ public partial class ImportExport
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ "/providers/Microsoft.ImportExport/jobs"
+ "?"
- + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
- + "&"
+ (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ "&"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -1020,15 +1485,15 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.JobsListBySubscription_Call(request,onOk,onDefault,eventListener,sender);
+ await this.JobsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Returns all active and completed jobs in a subscription.
+ /// Returns all active and completed jobs in a resource group.
///
- /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
- /// Can be used to restrict the results to certain conditions.
/// Specifies the preferred language for the response.
+ /// Can be used to restrict the results to certain conditions.
+ /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
@@ -1037,7 +1502,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task JobsListBySubscriptionViaIdentity(global::System.String viaIdentity, long? Top, string Filter, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task JobsListByResourceGroupViaIdentity(global::System.String viaIdentity, string acceptLanguage, string Filter, long? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -1045,24 +1510,27 @@ public partial class ImportExport
{
// verify that Identity format is an exact match for uri
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ImportExport/jobs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ImportExport/jobs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
if (!_match.Success)
{
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ImportExport/jobs'");
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs'");
}
// replace URI parameters with values from identity
var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
+ subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ "/providers/Microsoft.ImportExport/jobs"
+ "?"
- + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
- + "&"
+ (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ "&"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -1081,100 +1549,884 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.JobsListBySubscription_Call(request,onOk,onDefault,eventListener,sender);
+ await this.JobsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Actual wire call for method.
- /// the prepared HttpRequestMessage to send.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// Returns all active and completed jobs in a resource group.
+ ///
+ /// Specifies the preferred language for the response.
+ /// Can be used to restrict the results to certain conditions.
+ /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task JobsListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task JobsListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, string acceptLanguage, string Filter, long? Top, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
using( NoSynchronizationContext )
{
- global::System.Net.Http.HttpResponseMessage _response = null;
- try
- {
- var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- var _contentType = _response.Content.Headers.ContentType?.MediaType;
+ // verify that Identity format is an exact match for uri
- switch ( _response.StatusCode )
- {
- case global::System.Net.HttpStatusCode.OK:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ListJobsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- default:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- }
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ImportExport/jobs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs'");
}
- finally
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.ImportExport/jobs"
+ + "?"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ + "&"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.JobsListByResourceGroupWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Returns all active and completed jobs in a resource group.
+ /// The subscription ID for the Azure user.
+ /// The resource group name uniquely identifies the resource group within the user subscription.
+ /// Specifies the preferred language for the response.
+ /// Can be used to restrict the results to certain conditions.
+ /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task JobsListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, string acceptLanguage, string Filter, long? Top, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.ImportExport/jobs"
+ + "?"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ + "&"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.JobsListByResourceGroupWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task JobsListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ListJobsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task JobsListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ListJobsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will get
+ /// validation events back.
+ ///
+ /// The subscription ID for the Azure user.
+ /// The resource group name uniquely identifies the resource group within the user subscription.
+ /// Can be used to restrict the results to certain conditions.
+ /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
+ /// Specifies the preferred language for the response.
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task JobsListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, string Filter, long? Top, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertNotNull(nameof(Filter),Filter);
+ await eventListener.AssertNotNull(nameof(acceptLanguage),acceptLanguage);
+ }
+ }
+
+ /// Returns all active and completed jobs in a subscription.
+ /// The subscription ID for the Azure user.
+ /// Specifies the preferred language for the response.
+ /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
+ /// Can be used to restrict the results to certain conditions.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task JobsListBySubscription(string subscriptionId, string acceptLanguage, long? Top, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/providers/Microsoft.ImportExport/jobs"
+ + "?"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ + "&"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.JobsListBySubscription_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Returns all active and completed jobs in a subscription.
+ ///
+ /// Specifies the preferred language for the response.
+ /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
+ /// Can be used to restrict the results to certain conditions.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task JobsListBySubscriptionViaIdentity(global::System.String viaIdentity, string acceptLanguage, long? Top, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ImportExport/jobs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ImportExport/jobs'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/providers/Microsoft.ImportExport/jobs"
+ + "?"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ + "&"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.JobsListBySubscription_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Returns all active and completed jobs in a subscription.
+ ///
+ /// Specifies the preferred language for the response.
+ /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
+ /// Can be used to restrict the results to certain conditions.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task JobsListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, string acceptLanguage, long? Top, string Filter, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ImportExport/jobs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ImportExport/jobs'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/providers/Microsoft.ImportExport/jobs"
+ + "?"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ + "&"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.JobsListBySubscriptionWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Returns all active and completed jobs in a subscription.
+ /// The subscription ID for the Azure user.
+ /// Specifies the preferred language for the response.
+ /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
+ /// Can be used to restrict the results to certain conditions.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task JobsListBySubscriptionWithResult(string subscriptionId, string acceptLanguage, long? Top, string Filter, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/providers/Microsoft.ImportExport/jobs"
+ + "?"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ + "&"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.JobsListBySubscriptionWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task JobsListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ListJobsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task JobsListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ListJobsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will get validation
+ /// events back.
+ ///
+ /// The subscription ID for the Azure user.
+ /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
+ /// Can be used to restrict the results to certain conditions.
+ /// Specifies the preferred language for the response.
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task JobsListBySubscription_Validate(string subscriptionId, long? Top, string Filter, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(Filter),Filter);
+ await eventListener.AssertNotNull(nameof(acceptLanguage),acceptLanguage);
+ }
+ }
+
+ ///
+ /// update specific properties of a job. You can call this operation to notify the Import/Export service that the hard drives
+ /// comprising the import or export job have been shipped to the Microsoft data center. It can also be used to cancel an existing
+ /// job.
+ ///
+ /// The subscription ID for the Azure user.
+ /// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
+ /// Specifies the preferred language for the response.
+ /// The parameters to update in the job
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task JobsUpdate(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IUpdateJobParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeUpdate)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.ImportExport/jobs/"
+ + global::System.Uri.EscapeDataString(jobName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Patch, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.JobsUpdate_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// update specific properties of a job. You can call this operation to notify the Import/Export service that the hard drives
+ /// comprising the import or export job have been shipped to the Microsoft data center. It can also be used to cancel an existing
+ /// job.
+ ///
+ ///
+ /// Specifies the preferred language for the response.
+ /// The parameters to update in the job
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task JobsUpdateViaIdentity(global::System.String viaIdentity, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IUpdateJobParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeUpdate)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ImportExport/jobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var jobName = _match.Groups["jobName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.ImportExport/jobs/"
+ + jobName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Patch, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.JobsUpdate_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// update specific properties of a job. You can call this operation to notify the Import/Export service that the hard drives
+ /// comprising the import or export job have been shipped to the Microsoft data center. It can also be used to cancel an existing
+ /// job.
+ ///
+ ///
+ /// Specifies the preferred language for the response.
+ /// The parameters to update in the job
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task JobsUpdateViaIdentityWithResult(global::System.String viaIdentity, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IUpdateJobParameters body, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeUpdate)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ImportExport/jobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var jobName = _match.Groups["jobName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.ImportExport/jobs/"
+ + jobName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Patch, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
{
- // finally statements
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Finally, request, _response);
- _response?.Dispose();
- request?.Dispose();
+ request.Headers.Add("Accept-Language",acceptLanguage);
}
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.JobsUpdateWithResult_Call (request, eventListener,sender);
}
}
///
- /// Validation method for method. Call this like the actual call, but you will get validation
- /// events back.
+ /// update specific properties of a job. You can call this operation to notify the Import/Export service that the hard drives
+ /// comprising the import or export job have been shipped to the Microsoft data center. It can also be used to cancel an existing
+ /// job.
///
- /// An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100.
- /// Can be used to restrict the results to certain conditions.
/// The subscription ID for the Azure user.
+ /// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
/// Specifies the preferred language for the response.
+ /// Json string supplied to the JobsUpdate operation
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
/// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task JobsListBySubscription_Validate(long? Top, string Filter, string subscriptionId, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener)
+ public async global::System.Threading.Tasks.Task JobsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
using( NoSynchronizationContext )
{
- await eventListener.AssertNotNull(nameof(Filter),Filter);
- await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
- await eventListener.AssertNotNull(nameof(acceptLanguage),acceptLanguage);
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.ImportExport/jobs/"
+ + global::System.Uri.EscapeDataString(jobName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Patch, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.JobsUpdate_Call (request, onOk,onDefault,eventListener,sender);
}
}
///
- /// Updates specific properties of a job. You can call this operation to notify the Import/Export service that the hard drives
+ /// update specific properties of a job. You can call this operation to notify the Import/Export service that the hard drives
/// comprising the import or export job have been shipped to the Microsoft data center. It can also be used to cancel an existing
/// job.
///
- /// The name of the import/export job.
/// The subscription ID for the Azure user.
/// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
/// Specifies the preferred language for the response.
- /// The parameters to update in the job
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// Json string supplied to the JobsUpdate operation
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task JobsUpdate(string jobName, string subscriptionId, string resourceGroupName, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IUpdateJobParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task JobsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -1192,12 +2444,12 @@ public partial class ImportExport
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Patch, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// add headers parameters
if (null != acceptLanguage)
@@ -1205,68 +2457,57 @@ public partial class ImportExport
request.Headers.Add("Accept-Language",acceptLanguage);
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.JobsUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ return await this.JobsUpdateWithResult_Call (request, eventListener,sender);
}
}
///
- /// Updates specific properties of a job. You can call this operation to notify the Import/Export service that the hard drives
+ /// update specific properties of a job. You can call this operation to notify the Import/Export service that the hard drives
/// comprising the import or export job have been shipped to the Microsoft data center. It can also be used to cancel an existing
/// job.
///
- ///
+ /// The subscription ID for the Azure user.
+ /// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
/// Specifies the preferred language for the response.
/// The parameters to update in the job
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task JobsUpdateViaIdentity(global::System.String viaIdentity, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IUpdateJobParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task JobsUpdateWithResult(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IUpdateJobParameters body, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
using( NoSynchronizationContext )
{
- // verify that Identity format is an exact match for uri
-
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ImportExport/jobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
- if (!_match.Success)
- {
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}'");
- }
-
- // replace URI parameters with values from identity
- var jobName = _match.Groups["jobName"].Value;
- var subscriptionId = _match.Groups["subscriptionId"].Value;
- var resourceGroupName = _match.Groups["resourceGroupName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + subscriptionId
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
- + resourceGroupName
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ "/providers/Microsoft.ImportExport/jobs/"
- + jobName
+ + global::System.Uri.EscapeDataString(jobName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Patch, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// add headers parameters
if (null != acceptLanguage)
@@ -1274,17 +2515,77 @@ public partial class ImportExport
request.Headers.Add("Accept-Language",acceptLanguage);
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.JobsUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ return await this.JobsUpdateWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task JobsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.JobResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -1294,7 +2595,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task JobsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task JobsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -1305,6 +2606,7 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -1312,13 +2614,13 @@ public partial class ImportExport
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.JobResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.JobResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -1337,22 +2639,22 @@ public partial class ImportExport
/// Validation method for method. Call this like the actual call, but you will get validation events
/// back.
///
- /// The name of the import/export job.
/// The subscription ID for the Azure user.
/// The resource group name uniquely identifies the resource group within the user subscription.
+ /// The name of the import/export job.
/// Specifies the preferred language for the response.
/// The parameters to update in the job
/// an instance that will receive events.
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task JobsUpdate_Validate(string jobName, string subscriptionId, string resourceGroupName, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.IUpdateJobParameters body, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task JobsUpdate_Validate(string subscriptionId, string resourceGroupName, string jobName, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.IUpdateJobParameters body, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
- await eventListener.AssertNotNull(nameof(jobName),jobName);
await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertNotNull(nameof(jobName),jobName);
await eventListener.AssertNotNull(nameof(acceptLanguage),acceptLanguage);
await eventListener.AssertNotNull(nameof(body), body);
await eventListener.AssertObjectIsValid(nameof(body), body);
@@ -1373,7 +2675,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task LocationsGet(string locationName, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task LocationsGet(string locationName, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -1402,7 +2704,7 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.LocationsGet_Call(request,onOk,onDefault,eventListener,sender);
+ await this.LocationsGet_Call (request, onOk,onDefault,eventListener,sender);
}
}
@@ -1420,7 +2722,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task LocationsGetViaIdentity(global::System.String viaIdentity, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task LocationsGetViaIdentity(global::System.String viaIdentity, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -1451,19 +2753,179 @@ public partial class ImportExport
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- // add headers parameters
- if (null != acceptLanguage)
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.LocationsGet_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Returns the details about a location to which you can ship the disks associated with an import or export job. A location
+ /// is an Azure region.
+ ///
+ ///
+ /// Specifies the preferred language for the response.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A
+ /// that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task LocationsGetViaIdentityWithResult(global::System.String viaIdentity, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.ImportExport/locations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.ImportExport/locations/{locationName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var locationName = _match.Groups["locationName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.ImportExport/locations/"
+ + locationName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.LocationsGetWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ ///
+ /// Returns the details about a location to which you can ship the disks associated with an import or export job. A location
+ /// is an Azure region.
+ ///
+ /// The name of the location. For example, West US or westus.
+ /// Specifies the preferred language for the response.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A
+ /// that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task LocationsGetWithResult(string locationName, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.ImportExport/locations/"
+ + global::System.Uri.EscapeDataString(locationName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.LocationsGetWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A
+ /// that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task LocationsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Location.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
{
- request.Headers.Add("Accept-Language",acceptLanguage);
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
}
-
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
- // make the call
- await this.LocationsGet_Call(request,onOk,onDefault,eventListener,sender);
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -1473,7 +2935,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task LocationsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task LocationsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -1484,6 +2946,7 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -1491,13 +2954,13 @@ public partial class ImportExport
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.Location.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Location.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -1544,7 +3007,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task LocationsList(string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task LocationsList(string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -1572,7 +3035,7 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.LocationsList_Call(request,onOk,onDefault,eventListener,sender);
+ await this.LocationsList_Call (request, onOk,onDefault,eventListener,sender);
}
}
@@ -1590,7 +3053,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task LocationsListViaIdentity(global::System.String viaIdentity, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task LocationsListViaIdentity(global::System.String viaIdentity, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -1627,11 +3090,167 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.LocationsList_Call(request,onOk,onDefault,eventListener,sender);
+ await this.LocationsList_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Returns a list of locations to which you can ship the disks associated with an import or export job. A location is a Microsoft
+ /// data center region.
+ ///
+ ///
+ /// Specifies the preferred language for the response.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task LocationsListViaIdentityWithResult(global::System.String viaIdentity, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.ImportExport/locations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.ImportExport/locations'");
+ }
+
+ // replace URI parameters with values from identity
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.ImportExport/locations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.LocationsListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ ///
+ /// Returns a list of locations to which you can ship the disks associated with an import or export job. A location is a Microsoft
+ /// data center region.
+ ///
+ /// Specifies the preferred language for the response.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task LocationsListWithResult(string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.ImportExport/locations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.LocationsListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task LocationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.LocationsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -1641,7 +3260,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task LocationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task LocationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -1652,6 +3271,7 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -1659,13 +3279,13 @@ public partial class ImportExport
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.LocationsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.LocationsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -1709,7 +3329,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task OperationsList(string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task OperationsList(string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -1737,7 +3357,7 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender);
+ await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender);
}
}
@@ -1754,7 +3374,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, string acceptLanguage, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-01-01";
// Constant Parameters
@@ -1791,11 +3411,165 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender);
+ await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Returns the list of operations supported by the import/export resource provider.
+ ///
+ ///
+ /// Specifies the preferred language for the response.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task OperationsListViaIdentityWithResult(global::System.String viaIdentity, string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.ImportExport/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.ImportExport/operations'");
+ }
+
+ // replace URI parameters with values from identity
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.ImportExport/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.OperationsListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ ///
+ /// Returns the list of operations supported by the import/export resource provider.
+ ///
+ /// Specifies the preferred language for the response.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task OperationsListWithResult(string acceptLanguage, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.ImportExport/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // add headers parameters
+ if (null != acceptLanguage)
+ {
+ request.Headers.Add("Accept-Language",acceptLanguage);
+ }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.OperationsListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ListOperationsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -1805,7 +3579,7 @@ public partial class ImportExport
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -1816,6 +3590,7 @@ public partial class ImportExport
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -1823,13 +3598,13 @@ public partial class ImportExport
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ListOperationsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ListOperationsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.Api202101.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
diff --git a/generated/ImportExport/ImportExport.Autorest/generated/api/Models/Any.PowerShell.cs b/generated/ImportExport/ImportExport.Autorest/generated/api/Models/Any.PowerShell.cs
index 6fad6e924012..43ccdcfec73d 100644
--- a/generated/ImportExport/ImportExport.Autorest/generated/api/Models/Any.PowerShell.cs
+++ b/generated/ImportExport/ImportExport.Autorest/generated/api/Models/Any.PowerShell.cs
@@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.ImportExport.Runtime.PowerShell;
- ///