Migrate DataBox Autorest v3 to v4#29593
Draft
JiaSeng-v wants to merge 1 commit into
Draft
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request migrates the Az.DataBox module from AutoRest PowerShell v3 to v4, updating the module’s AutoRest configuration, generated help/docs, and model helper cmdlets to align with the new generation patterns.
Changes:
- Updated AutoRest configuration (directives, no-inline, variant filtering) to support v4 generation.
- Regenerated/updated cmdlet help & docs to reflect new parameter sets (Expanded/JsonFilePath/JsonString) and updated type names.
- Updated module packaging metadata (Az.Accounts dependency, assembly versions, solution structure) and added a placeholder test.
Reviewed changes
Copilot reviewed 49 out of 49 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| src/DataBox/DataBox/help/Update-AzDataBoxJob.md | Updated cmdlet syntax and parameter docs for Update variants. |
| src/DataBox/DataBox/help/Stop-AzDataBoxJob.md | Updated cmdlet syntax to include JSON-based cancel variants. |
| src/DataBox/DataBox/help/New-AzDataBoxTransferConfigurationObject.md | Updated model helper help to flattened parameter shape. |
| src/DataBox/DataBox/help/New-AzDataBoxStorageAccountDetailsObject.md | Updated model helper help (removed DataAccountType param). |
| src/DataBox/DataBox/help/New-AzDataBoxShippingAddressObject.md | Updated model helper help (AddressType now string). |
| src/DataBox/DataBox/help/New-AzDataBoxManagedDiskDetailsObject.md | Updated model helper help (removed DataAccountType param). |
| src/DataBox/DataBox/help/New-AzDataBoxKeyEncryptionKeyObject.md | Updated model helper help (flattened identity-related fields). |
| src/DataBox/DataBox/help/New-AzDataBoxJobDetailsObject.md | Updated model helper help (flattened many nested properties). |
| src/DataBox/DataBox/help/New-AzDataBoxJob.md | Updated New cmdlet syntax and added JSON-based variants. |
| src/DataBox/DataBox/help/New-AzDataBoxHeavyJobDetailsObject.md | Updated heavy job details model helper help (flattened). |
| src/DataBox/DataBox/help/New-AzDataBoxCustomerDiskJobDetailsObject.md | Updated customer disk job details model helper help. |
| src/DataBox/DataBox/help/New-AzDataBoxContactDetailsObject.md | Updated contact details model helper help types/namespaces. |
| src/DataBox/DataBox/help/Get-AzDataBoxJobCredential.md | Updated output type namespace. |
| src/DataBox/DataBox/help/Get-AzDataBoxJob.md | Updated output type namespace. |
| src/DataBox/DataBox/help/Az.DataBox.md | Updated module-level help summaries. |
| src/DataBox/DataBox/ChangeLog.md | Added upcoming release entry about UX/consistency/breaking changes. |
| src/DataBox/DataBox/Az.DataBox.psd1 | Updated generation date, Az.Accounts minimum version, and manifest formatting. |
| src/DataBox/DataBox.sln | Updated solution structure/configurations and project GUIDs/folders. |
| src/DataBox/DataBox.Autorest/test/Remove-AzDataBoxJob.Tests.ps1 | Added a (currently skipped) Pester test scaffold for Remove-AzDataBoxJob. |
| src/DataBox/DataBox.Autorest/README.md | Updated AutoRest v4 configuration directives and added no-inline/variant filtering. |
| src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs | Bumped assembly version attributes. |
| src/DataBox/DataBox.Autorest/generate-info.json | Updated generation identifier. |
| src/DataBox/DataBox.Autorest/docs/Update-AzDataBoxJob.md | Updated docs syntax/parameters for Update variants. |
| src/DataBox/DataBox.Autorest/docs/Stop-AzDataBoxJob.md | Updated docs syntax to include JSON-based cancel variants. |
| src/DataBox/DataBox.Autorest/docs/New-AzDataBoxTransferConfigurationObject.md | Updated docs for flattened transfer configuration model helper. |
| src/DataBox/DataBox.Autorest/docs/New-AzDataBoxStorageAccountDetailsObject.md | Updated docs for storage account details model helper. |
| src/DataBox/DataBox.Autorest/docs/New-AzDataBoxShippingAddressObject.md | Updated docs for shipping address model helper. |
| src/DataBox/DataBox.Autorest/docs/New-AzDataBoxManagedDiskDetailsObject.md | Updated docs for managed disk details model helper. |
| src/DataBox/DataBox.Autorest/docs/New-AzDataBoxKeyEncryptionKeyObject.md | Updated docs for key encryption key model helper. |
| src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJobDetailsObject.md | Updated docs for job details model helper (flattened). |
| src/DataBox/DataBox.Autorest/docs/New-AzDataBoxJob.md | Updated docs syntax and added JSON-based create variants. |
| src/DataBox/DataBox.Autorest/docs/New-AzDataBoxHeavyJobDetailsObject.md | Updated docs for heavy job details model helper (flattened). |
| src/DataBox/DataBox.Autorest/docs/New-AzDataBoxCustomerDiskJobDetailsObject.md | Updated docs for customer disk job details model helper. |
| src/DataBox/DataBox.Autorest/docs/New-AzDataBoxContactDetailsObject.md | Updated docs for contact details model helper. |
| src/DataBox/DataBox.Autorest/docs/Get-AzDataBoxJobCredential.md | Updated output type namespace. |
| src/DataBox/DataBox.Autorest/docs/Get-AzDataBoxJob.md | Updated output type namespace. |
| src/DataBox/DataBox.Autorest/docs/Az.DataBox.md | Updated module-level docs summary and metadata. |
| src/DataBox/DataBox.Autorest/custom/AzDataBoxCustomerDiskJobDetailsObject.ps1 | Updated custom model cmdlet types/argument completers for v4. |
| src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxTransferConfigurationObject.ps1 | Updated autogenerated model cmdlet (flattened params, model cmdlet attribute). |
| src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxStorageAccountDetailsObject.ps1 | Updated autogenerated model cmdlet output type and parameters. |
| src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxShippingAddressObject.ps1 | Updated autogenerated model cmdlet argument completers/types. |
| src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxManagedDiskDetailsObject.ps1 | Updated autogenerated model cmdlet output type and parameters. |
| src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxKeyEncryptionKeyObject.ps1 | Updated autogenerated model cmdlet (identity shape changes). |
| src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxJobDetailsObject.ps1 | Updated autogenerated model cmdlet (major flattening). |
| src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxHeavyJobDetailsObject.ps1 | Updated autogenerated model cmdlet (major flattening). |
| src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxDiskJobDetailsObject.ps1 | Updated autogenerated model cmdlet (major flattening). |
| src/DataBox/DataBox.Autorest/custom/autogen-model-cmdlets/New-AzDataBoxContactDetailsObject.ps1 | Updated autogenerated model cmdlet output types and parameter types. |
Comment on lines
+11
to
+12
| Create a new job with the specified parameters. | ||
| Existing job cannot be updated with this API and should instead be updated with the create job API. |
Comment on lines
+16
to
+22
| ### CreateExpanded (Default) | ||
| ``` | ||
| New-AzDataBoxJob -Name <String> -ResourceGroupName <String> [-SubscriptionId <String>] -Location <String> | ||
| -SkuName <SkuName> -TransferType <TransferType> [-DeliveryInfoScheduledDateTime <DateTime>] | ||
| [-DeliveryType <JobDeliveryType>] [-Detail <IJobDetails>] [-IdentityType <String>] [-SkuDisplayName <String>] | ||
| [-SkuFamily <String>] [-SkuModel <ModelName>] [-Tag <Hashtable>] [-UserAssignedIdentity <Hashtable>] | ||
| -SkuName <String> -TransferType <String> [-DeliveryInfoScheduledDateTime <DateTime>] [-DeliveryType <String>] | ||
| [-Detail <IJobDetails>] [-EnableSystemAssignedIdentity] [-SkuDisplayName <String>] [-SkuFamily <String>] | ||
| [-SkuModel <String>] [-Tag <Hashtable>] [-UserAssignedIdentity <String[]>] [-DefaultProfile <PSObject>] | ||
| [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [<CommonParameters>] |
| ``` | ||
|
|
||
| Creates a databoxDisk job with your own Passkey. | ||
| Creates a databoxDisky job with your own Passkey. |
Comment on lines
+33
to
+34
| Create a new job with the specified parameters. | ||
| Existing job cannot be updated with this API and should instead be updated with the create job API. |
Comment on lines
+15
to
+20
| ### UpdateExpanded (Default) | ||
| ``` | ||
| Update-AzDataBoxJob -Name <String> -ResourceGroupName <String> [-SubscriptionId <String>] [-IfMatch <String>] | ||
| [-ContactDetail <IContactDetails>] [-ContactDetailContactName <String>] [-ContactDetailMobile <String>] | ||
| [-ContactDetailPhone <String>] [-ContactDetailPhoneExtension <String>] | ||
| [-EncryptionPreferenceDoubleEncryption <DoubleEncryption>] | ||
| [-EncryptionPreferenceHardwareEncryption <HardwareEncryption>] [-IdentityType <String>] | ||
| [-KeyEncryptionKey <IKeyEncryptionKey>] [-PreferencePreferredDataCenterRegion <String[]>] | ||
| [-ReturnToCustomerPackageDetailCarrierAccountNumber <String>] | ||
| [-ReturnToCustomerPackageDetailCarrierName <String>] [-ReturnToCustomerPackageDetailTrackingId <String>] | ||
| [-ReverseShippingDetail <IShippingAddress>] [-ReverseTransportPreferredShipmentType <TransportShipmentTypes>] | ||
| [-ShippingAddress <IShippingAddress>] [-StorageAccountAccessTierPreference <StorageAccountAccessTier[]>] | ||
| [-Tag <Hashtable>] [-TransportPreferredShipmentType <TransportShipmentTypes>] | ||
| [-UserAssignedIdentity <Hashtable>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] | ||
| [-Detail <IUpdateJobDetails>] [-IdentityType <String>] [-Tag <Hashtable>] [-UserAssignedIdentity <String[]>] | ||
| [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] | ||
| [<CommonParameters>] |
Comment on lines
24
to
+46
| @@ -36,27 +37,20 @@ function New-AzDataBoxManagedDiskDetailsObject { | |||
| [Parameter(Mandatory, HelpMessage="Resource Id of the storage account that can be used to copy the vhd for staging.")] | |||
| [string] | |||
| $StagingStorageAccountId, | |||
| [Parameter(Mandatory, HelpMessage="Account Type of the data to be transferred.")] | |||
| [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.DataAccountType])] | |||
| [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Support.DataAccountType] | |||
| $DataAccountType, | |||
| [Parameter(HelpMessage="Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+.")] | |||
| [string] | |||
| $SharePassword | |||
| ) | |||
|
|
|||
| process { | |||
| $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.ManagedDiskDetails]::New() | |||
| $Object = [Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.ManagedDiskDetails]::New() | |||
Comment on lines
+11
to
+12
| Create a new job with the specified parameters. | ||
| Existing job cannot be updated with this API and should instead be updated with the create job API. |
Comment on lines
+16
to
+23
| ### CreateExpanded (Default) | ||
| ``` | ||
| New-AzDataBoxJob -Name <String> -ResourceGroupName <String> -Location <String> -SkuName <SkuName> | ||
| -TransferType <TransferType> [-SubscriptionId <String>] [-DeliveryInfoScheduledDateTime <DateTime>] | ||
| [-DeliveryType <JobDeliveryType>] [-Detail <IJobDetails>] [-IdentityType <String>] [-SkuDisplayName <String>] | ||
| [-SkuFamily <String>] [-SkuModel <ModelName>] [-Tag <Hashtable>] [-UserAssignedIdentity <Hashtable>] | ||
| New-AzDataBoxJob -Name <String> -ResourceGroupName <String> -Location <String> -SkuName <String> | ||
| -TransferType <String> [-SubscriptionId <String>] [-DeliveryInfoScheduledDateTime <DateTime>] | ||
| [-DeliveryType <String>] [-Detail <IJobDetails>] [-EnableSystemAssignedIdentity] [-SkuDisplayName <String>] | ||
| [-SkuFamily <String>] [-SkuModel <String>] [-Tag <Hashtable>] [-UserAssignedIdentity <String[]>] | ||
| [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>] | ||
| ``` |
Comment on lines
+15
to
+20
| ### UpdateExpanded (Default) | ||
| ``` | ||
| Update-AzDataBoxJob -Name <String> -ResourceGroupName <String> [-SubscriptionId <String>] [-IfMatch <String>] | ||
| [-ContactDetail <IContactDetails>] [-ContactDetailContactName <String>] [-ContactDetailMobile <String>] | ||
| [-ContactDetailPhone <String>] [-ContactDetailPhoneExtension <String>] | ||
| [-EncryptionPreferenceDoubleEncryption <DoubleEncryption>] | ||
| [-EncryptionPreferenceHardwareEncryption <HardwareEncryption>] [-IdentityType <String>] | ||
| [-KeyEncryptionKey <IKeyEncryptionKey>] [-PreferencePreferredDataCenterRegion <String[]>] | ||
| [-ReturnToCustomerPackageDetailCarrierAccountNumber <String>] | ||
| [-ReturnToCustomerPackageDetailCarrierName <String>] [-ReturnToCustomerPackageDetailTrackingId <String>] | ||
| [-ReverseShippingDetail <IShippingAddress>] [-ReverseTransportPreferredShipmentType <TransportShipmentTypes>] | ||
| [-ShippingAddress <IShippingAddress>] [-StorageAccountAccessTierPreference <StorageAccountAccessTier[]>] | ||
| [-Tag <Hashtable>] [-TransportPreferredShipmentType <TransportShipmentTypes>] | ||
| [-UserAssignedIdentity <Hashtable>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] | ||
| [<CommonParameters>] | ||
| [-Detail <IUpdateJobDetails>] [-IdentityType <String>] [-Tag <Hashtable>] [-UserAssignedIdentity <String[]>] | ||
| [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>] | ||
| ``` |
| Creates a new job with the specified parameters. | ||
| Existing job cannot be updated with this API and should instead be updated with the Update job API. | ||
| Create a new job with the specified parameters. | ||
| Existing job cannot be updated with this API and should instead be updated with the create job API. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.