Skip to content

Migrate DataBox Autorest v3 to v4#29593

Draft
JiaSeng-v wants to merge 1 commit into
Azure:mainfrom
JiaSeng-v:jiaseng/main/DataBox-v4
Draft

Migrate DataBox Autorest v3 to v4#29593
JiaSeng-v wants to merge 1 commit into
Azure:mainfrom
JiaSeng-v:jiaseng/main/DataBox-v4

Conversation

@JiaSeng-v
Copy link
Copy Markdown
Contributor

@JiaSeng-v JiaSeng-v commented May 14, 2026

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copilot AI review requested due to automatic review settings May 14, 2026 06:13
@JiaSeng-v JiaSeng-v added the autorest v4 migration pr migrating module from generated by autorest.powershell v3 to v4 label May 14, 2026
@azure-client-tools-bot-prd
Copy link
Copy Markdown

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@JiaSeng-v JiaSeng-v marked this pull request as draft May 14, 2026 06:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autorest v4 migration pr migrating module from generated by autorest.powershell v3 to v4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants