Storage mover api version 2025-12-01#29446
Storage mover api version 2025-12-01#29446DrNykterstein10 wants to merge 20 commits intoAzure:mainfrom
Conversation
- Regenerate StorageMover.Autorest module against api-version 2025-12-01 - Add Connection cmdlets (Get/New/Update/Remove-AzStorageMoverConnection) - Add real test bodies for Connection cmdlets and UploadLimitWeeklyRecurrenceObject - Update existing recording files to new API version - Fix examples for AzNfsFileShareEndpoint and MultiCloudConnectorEndpoint
The Connection resource has no PATCH operation in the API spec (only PUT/GET/DELETE), so the auto-generated Update-AzStorageMoverConnection was redundant with New-AzStorageMoverConnection. Hiding it via a directive matches the actual API contract. - Add hide directive for Update Connection in README.md - Remove orphaned examples, docs, help, and test files for Update-AzStorageMoverConnection
- Add Get/New/Remove-AzStorageMoverConnection test implementations - Add recording files for all 11 Connection tests - Fix setupEnv: use REST API for destination-IP PLS creation, correct VNet RG - Add cleanupEnv logic to delete PEs then PLS - Wrap job definition creation in try/catch (agent may not exist) - Clean up connections after each New test to avoid quota limits
…y meaningful new parameter docs
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This PR updates the Az.StorageMover module to target the 2025-12-01 Storage Mover REST API and adds new cmdlet surface (Connection resources and S3-with-HMAC endpoints), alongside regenerated models/docs and expanded test coverage/recordings.
Changes:
- Updated Storage Mover API version references to
2025-12-01and refreshed generated docs/help accordingly. - Added Connection cmdlet documentation/tests and custom S3WithHMAC endpoint cmdlets (docs/examples/tests).
- Updated module metadata/manifests and multiple test recordings to reflect the new API version.
Reviewed changes
Copilot reviewed 78 out of 80 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/StorageMover/StorageMover/help/Remove-AzStorageMoverConnection.md | New reference help markdown for Connection removal cmdlet. |
| src/StorageMover/StorageMover/help/New-AzStorageMoverJobDefinition.md | Updated help to include new job definition parameters (schedule/integrity/etc.). |
| src/StorageMover/StorageMover/help/New-AzStorageMoverConnection.md | New reference help markdown for Connection creation cmdlet. |
| src/StorageMover/StorageMover/help/Get-AzStorageMoverConnection.md | New reference help markdown for Connection get/list cmdlet. |
| src/StorageMover/StorageMover/ChangeLog.md | Added upcoming release notes for API version bump and new capabilities. |
| src/StorageMover/StorageMover/Az.StorageMover.psd1 | Updated module manifest exports and dependency versions. |
| src/StorageMover/StorageMover.sln | Updated solution content and Az.StorageMover project reference. |
| src/StorageMover/StorageMover.Autorest/test/utils.ps1 | Updated test environment setup/cleanup (incl. PLS creation for connection tests). |
| src/StorageMover/StorageMover.Autorest/test/env.json | Added new test environment fields for Connection/PLS scenario. |
| src/StorageMover/StorageMover.Autorest/test/Update-AzStorageMoverS3WithHmacEndpoint.Tests.ps1 | Added Pester tests for Update-AzStorageMoverS3WithHmacEndpoint. |
| src/StorageMover/StorageMover.Autorest/test/Update-AzStorageMoverProject.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Update-AzStorageMoverNfsEndpoint.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Update-AzStorageMoverMultiCloudConnectorEndpoint.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Update-AzStorageMoverJobDefinition.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Update-AzStorageMoverAzStorageContainerEndpoint.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Update-AzStorageMoverAzNfsFileShareEndpoint.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Update-AzStorageMoverAgent.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Update-AzStorageMover.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Unregister-AzStorageMoverAgent.Recording.json | Updated async operation URLs API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Remove-AzStorageMoverJobDefinition.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Remove-AzStorageMoverEndpoint.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Remove-AzStorageMoverConnection.Tests.ps1 | Added Pester tests for Remove-AzStorageMoverConnection. |
| src/StorageMover/StorageMover.Autorest/test/New-AzStorageMoverUploadLimitWeeklyRecurrenceObject.Tests.ps1 | Replaced skipped placeholder with real assertions for recurrence object creation. |
| src/StorageMover/StorageMover.Autorest/test/New-AzStorageMoverSmbEndpoint.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/New-AzStorageMoverS3WithHmacEndpoint.Tests.ps1 | Added Pester tests for New-AzStorageMoverS3WithHmacEndpoint. |
| src/StorageMover/StorageMover.Autorest/test/New-AzStorageMoverProject.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/New-AzStorageMoverNfsEndpoint.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/New-AzStorageMoverMultiCloudConnectorEndpoint.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/New-AzStorageMoverJobDefinition.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/New-AzStorageMoverConnection.Tests.ps1 | Added Pester tests for New-AzStorageMoverConnection. |
| src/StorageMover/StorageMover.Autorest/test/New-AzStorageMoverAzStorageContainerEndpoint.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/New-AzStorageMoverAzNfsFileShareEndpoint.Recording.json | Updated example/recording-related content for new API version surface. |
| src/StorageMover/StorageMover.Autorest/test/New-AzStorageMover.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Get-AzStorageMoverProject.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Get-AzStorageMoverJobRun.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Get-AzStorageMoverJobDefinition.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Get-AzStorageMoverEndpoint.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Get-AzStorageMoverConnection.Tests.ps1 | Added Pester tests for Get-AzStorageMoverConnection. |
| src/StorageMover/StorageMover.Autorest/test/Get-AzStorageMoverAgent.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/test/Get-AzStorageMover.Recording.json | Updated recording API version to 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/generate-info.json | Removed generate-info metadata file. |
| src/StorageMover/StorageMover.Autorest/examples/Update-AzStorageMoverS3WithHmacEndpoint.md | Added example markdown for updating S3WithHMAC endpoints. |
| src/StorageMover/StorageMover.Autorest/examples/Remove-AzStorageMoverConnection.md | Added example markdown for removing connections. |
| src/StorageMover/StorageMover.Autorest/examples/New-AzStorageMoverS3WithHmacEndpoint.md | Added example markdown for creating S3WithHMAC endpoints. |
| src/StorageMover/StorageMover.Autorest/examples/New-AzStorageMoverMultiCloudConnectorEndpoint.md | Updated example to use resource IDs for required parameters. |
| src/StorageMover/StorageMover.Autorest/examples/New-AzStorageMoverConnection.md | Added example markdown for creating connections. |
| src/StorageMover/StorageMover.Autorest/examples/New-AzStorageMoverAzNfsFileShareEndpoint.md | Updated example parameter values to correct resource ID patterns. |
| src/StorageMover/StorageMover.Autorest/examples/Get-AzStorageMoverConnection.md | Added example markdown for getting/listing connections. |
| src/StorageMover/StorageMover.Autorest/examples/Get-AzStorageMover.md | Renumbered example heading. |
| src/StorageMover/StorageMover.Autorest/docs/Update-AzStorageMoverS3WithHmacEndpoint.md | Added reference doc for Update-AzStorageMoverS3WithHmacEndpoint. |
| src/StorageMover/StorageMover.Autorest/docs/Update-AzStorageMoverJobDefinition.md | Updated reference doc with new job definition update parameters. |
| src/StorageMover/StorageMover.Autorest/docs/Remove-AzStorageMoverConnection.md | Added reference doc for Remove-AzStorageMoverConnection. |
| src/StorageMover/StorageMover.Autorest/docs/New-AzStorageMoverS3WithHmacEndpoint.md | Added reference doc for New-AzStorageMoverS3WithHmacEndpoint. |
| src/StorageMover/StorageMover.Autorest/docs/New-AzStorageMoverMultiCloudConnectorEndpoint.md | Updated example in reference doc to use resource IDs. |
| src/StorageMover/StorageMover.Autorest/docs/New-AzStorageMoverJobDefinition.md | Updated reference doc with new job definition create parameters. |
| src/StorageMover/StorageMover.Autorest/docs/New-AzStorageMoverConnection.md | Added reference doc for New-AzStorageMoverConnection. |
| src/StorageMover/StorageMover.Autorest/docs/New-AzStorageMoverAzNfsFileShareEndpoint.md | Updated example in reference doc to correct parameter usage. |
| src/StorageMover/StorageMover.Autorest/docs/Get-AzStorageMoverConnection.md | Added reference doc for Get-AzStorageMoverConnection. |
| src/StorageMover/StorageMover.Autorest/docs/Get-AzStorageMover.md | Renumbered example heading. |
| src/StorageMover/StorageMover.Autorest/docs/Az.StorageMover.md | Updated module landing page with new cmdlets listed. |
| src/StorageMover/StorageMover.Autorest/custom/UpdateAzStorageMoverS3WithHmacEndpoint.ps1 | Added custom implementation for Update-AzStorageMoverS3WithHmacEndpoint. |
| src/StorageMover/StorageMover.Autorest/custom/NewAzStorageMoverS3WithHmacEndpoint.ps1 | Added custom implementation for New-AzStorageMoverS3WithHmacEndpoint. |
| src/StorageMover/StorageMover.Autorest/UX/Microsoft.StorageMover/storageMovers.json | Updated UX metadata to apiVersion 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/UX/Microsoft.StorageMover/storageMovers-projects.json | Updated UX metadata to apiVersion 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/UX/Microsoft.StorageMover/storageMovers-projects-jobDefinitions.json | Updated UX metadata to apiVersion 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/UX/Microsoft.StorageMover/storageMovers-projects-jobDefinitions-jobRuns.json | Updated UX metadata to apiVersion 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/UX/Microsoft.StorageMover/storageMovers-endpoints.json | Updated UX metadata to apiVersion 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/UX/Microsoft.StorageMover/storageMovers-connections.json | Added UX metadata for Connection resources and cmdlets. |
| src/StorageMover/StorageMover.Autorest/UX/Microsoft.StorageMover/storageMovers-agents.json | Updated UX metadata to apiVersion 2025-12-01. |
| src/StorageMover/StorageMover.Autorest/README.md | Updated AutoRest config (commit, input-file version) and directives. |
| src/StorageMover/StorageMover.Autorest/Properties/AssemblyInfo.cs | Updated assembly version attributes. |
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.StorageMover", "StorageMover.Autorest\Az.StorageMover.csproj", "{672A8F09-3A54-45DD-87C3-183EA4B03113}" | ||
| EndProject |
There was a problem hiding this comment.
The solution file now references StorageMover.Autorest\Az.StorageMover.csproj, but that file does not exist in the repo (the existing project is under generated/StorageMover/StorageMover.Autorest/Az.StorageMover.csproj). This makes the solution unload the Az.StorageMover project and breaks local builds in Visual Studio.
|
|
||
| # For new RP, the version is 0.1.0 | ||
| module-version: 1.6.0 | ||
| module-version: 1.7.0 |
There was a problem hiding this comment.
module-version in this AutoRest README is set to 1.7.0, but the module manifest (src/StorageMover/StorageMover/Az.StorageMover.psd1) declares ModuleVersion = '2.0.0' (and AssemblyInfo is also 2.0.0). These should be kept in sync; otherwise regeneration/packaging can produce inconsistent versioning.
| module-version: 1.7.0 | |
| module-version: 2.0.0 |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.StorageMover", "StorageMover.Autorest\Az.StorageMover.csproj", "{672A8F09-3A54-45DD-87C3-183EA4B03113}" | ||
| EndProject |
There was a problem hiding this comment.
The solution now references StorageMover.Autorest\Az.StorageMover.csproj, but there is no Az.StorageMover.csproj under src/StorageMover/StorageMover.Autorest/ (the only Az.StorageMover.csproj appears to live under generated/StorageMover/StorageMover.Autorest/). This will break opening/building the StorageMover solution unless the project is added/moved accordingly. Consider reverting to the previous relative path to the generated project or adding the missing project file at the new location.
… changelog wording
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| $connection = New-AzStorageMoverConnection -Name $connectionName -ResourceGroupName $env.ResourceGroupName -StorageMoverName $env.InitialStoMoverName -PrivateLinkServiceId $env.PrivateLinkServiceId -Description $description | ||
| $connection.Name | Should -Be $connectionName | ||
| $connection.Description | Should -Be $description | ||
| $connection.PrivateLinkServiceId | Should -Be $env.PrivateLinkServiceId |
There was a problem hiding this comment.
These assertions use $connection.Description and $connection.PrivateLinkServiceId, but the connection examples/help output show these values under the nested Property bag (e.g., Property.description, Property.privateLinkServiceId). If the cmdlet returns the same shape as shown in help, these checks will always be null and the test will fail/flake. Please validate the returned object shape and assert against the correct property path.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
…ailure, use Property path in Connection test assertions
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
af45a6a to
f931f96
Compare
| ### Example 1: Create a Multi-Cloud Connector endpoint | ||
| ```powershell | ||
| New-AzStorageMoverMultiCloudConnectorEndpoint -Name "my-mc-endpoint" -ResourceGroupName "my-resource-group" -StorageMoverName "my-storage-mover" -AWSS3BucketId "my-s3-bucket" -Description "My Multi-Cloud endpoint" | ||
| New-AzStorageMoverMultiCloudConnectorEndpoint -Name "my-mc-endpoint" -ResourceGroupName "my-resource-group" -StorageMoverName "my-storage-mover" -AWSS3BucketId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.AwsConnector/s3Buckets/testBucket" -MultiCloudConnectorId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.HybridConnectivity/publicCloudConnectors/TestConnector" -Description "Example multi cloud connector resource id" |
There was a problem hiding this comment.
This example uses provider namespace Microsoft.AwsConnector in the -AWSS3BucketId ARM ID, but the AWS connector resource provider is typically Microsoft.AWSConnector (as also used in this repo's test env.json). Using the wrong provider namespace will cause the example to fail if copied. Please update the example ARM ID to the correct provider namespace/casing.
| New-AzStorageMoverMultiCloudConnectorEndpoint -Name "my-mc-endpoint" -ResourceGroupName "my-resource-group" -StorageMoverName "my-storage-mover" -AWSS3BucketId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.AwsConnector/s3Buckets/testBucket" -MultiCloudConnectorId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.HybridConnectivity/publicCloudConnectors/TestConnector" -Description "Example multi cloud connector resource id" | |
| New-AzStorageMoverMultiCloudConnectorEndpoint -Name "my-mc-endpoint" -ResourceGroupName "my-resource-group" -StorageMoverName "my-storage-mover" -AWSS3BucketId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.AWSConnector/s3Buckets/testBucket" -MultiCloudConnectorId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.HybridConnectivity/publicCloudConnectors/TestConnector" -Description "Example multi cloud connector resource id" |
| ### Example 1: Create a Multi-Cloud Connector endpoint | ||
| ```powershell | ||
| New-AzStorageMoverMultiCloudConnectorEndpoint -Name "my-mc-endpoint" -ResourceGroupName "my-resource-group" -StorageMoverName "my-storage-mover" -AWSS3BucketId "my-s3-bucket" -Description "My Multi-Cloud endpoint" | ||
| New-AzStorageMoverMultiCloudConnectorEndpoint -Name "my-mc-endpoint" -ResourceGroupName "my-resource-group" -StorageMoverName "my-storage-mover" -AWSS3BucketId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.AwsConnector/s3Buckets/testBucket" -MultiCloudConnectorId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.HybridConnectivity/publicCloudConnectors/TestConnector" -Description "Example multi cloud connector resource id" |
There was a problem hiding this comment.
This example uses provider namespace Microsoft.AwsConnector in the -AWSS3BucketId ARM ID, but the AWS connector resource provider is typically Microsoft.AWSConnector (as also used in this repo's test env.json). Using the wrong provider namespace will cause the example to fail if copied. Please update the example ARM ID to the correct provider namespace/casing.
| New-AzStorageMoverMultiCloudConnectorEndpoint -Name "my-mc-endpoint" -ResourceGroupName "my-resource-group" -StorageMoverName "my-storage-mover" -AWSS3BucketId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.AwsConnector/s3Buckets/testBucket" -MultiCloudConnectorId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.HybridConnectivity/publicCloudConnectors/TestConnector" -Description "Example multi cloud connector resource id" | |
| New-AzStorageMoverMultiCloudConnectorEndpoint -Name "my-mc-endpoint" -ResourceGroupName "my-resource-group" -StorageMoverName "my-storage-mover" -AWSS3BucketId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.AWSConnector/s3Buckets/testBucket" -MultiCloudConnectorId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.HybridConnectivity/publicCloudConnectors/TestConnector" -Description "Example multi cloud connector resource id" |
| $env.JobDefinitionName = "testJob" + $env.RandomString | ||
| $jobDefinition = New-AzStorageMoverJobDefinition -Name $env.JobDefinitionName -ProjectName $env.ProjectName -ResourceGroupName $env.ResourceGroupName -StorageMoverName $env.StorageMoverNameWithAgent -AgentName $env.AgentName -CopyMode "Additive" -SourceName $env.NfsEndpointName -TargetName $env.ContainerEndpointName | ||
| try { | ||
| $jobDefinition = New-AzStorageMoverJobDefinition -Name $env.JobDefinitionName -ProjectName $env.ProjectName -ResourceGroupName $env.ResourceGroupName -StorageMoverName $env.StorageMoverNameWithAgent -AgentName $env.AgentName -CopyMode "Additive" -SourceName $env.NfsEndpointName -TargetName $env.ContainerEndpointName | ||
| } catch { | ||
| Write-Host "Warning: Could not create job definition (agent may not exist): $_" -ForegroundColor Yellow | ||
| $env.JobDefinitionName = $null | ||
| } |
There was a problem hiding this comment.
Catching failures when creating the job definition and continuing (by setting $env.JobDefinitionName = $null) can lead to confusing downstream test failures, because many tests assume JobDefinitionName is present. It would be better to fail fast here (rethrow) or explicitly skip/guard the job-definition-dependent tests when the job definition can't be created.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
| ### -ScheduleCronExpression | ||
| Optional CRON expression for advanced scheduling | ||
|
|
||
| ```yaml | ||
| Type: System.String | ||
| Parameter Sets: UpdateExpanded, UpdateViaIdentityStorageMoverExpanded, UpdateViaIdentityProjectExpanded, UpdateViaIdentityExpanded | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: None | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### -ScheduleDaysOfMonth | ||
| Days of the month for monthly schedules | ||
|
|
||
| ```yaml | ||
| Type: System.Int32[] | ||
| Parameter Sets: UpdateExpanded, UpdateViaIdentityStorageMoverExpanded, UpdateViaIdentityProjectExpanded, UpdateViaIdentityExpanded | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: None | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### -ScheduleDaysOfWeek | ||
| Days of the week for weekly schedules | ||
|
|
||
| ```yaml | ||
| Type: System.String[] | ||
| Parameter Sets: UpdateExpanded, UpdateViaIdentityStorageMoverExpanded, UpdateViaIdentityProjectExpanded, UpdateViaIdentityExpanded | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: None | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### -ScheduleEndDate | ||
| End time of the schedule (in UTC) | ||
|
|
||
| ```yaml | ||
| Type: System.DateTime | ||
| Parameter Sets: UpdateExpanded, UpdateViaIdentityStorageMoverExpanded, UpdateViaIdentityProjectExpanded, UpdateViaIdentityExpanded | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: None | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### -ScheduleFrequency | ||
| Type of schedule — Monthly, Weekly, or Daily | ||
|
|
||
| ```yaml | ||
| Type: System.String | ||
| Parameter Sets: UpdateExpanded, UpdateViaIdentityStorageMoverExpanded, UpdateViaIdentityProjectExpanded, UpdateViaIdentityExpanded | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: None | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### -ScheduleIsActive | ||
| Whether the schedule is currently active | ||
|
|
||
| ```yaml | ||
| Type: System.Management.Automation.SwitchParameter | ||
| Parameter Sets: UpdateExpanded, UpdateViaIdentityStorageMoverExpanded, UpdateViaIdentityProjectExpanded, UpdateViaIdentityExpanded | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: None | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### -ScheduleStartDate | ||
| Specific one-time execution date and time | ||
|
|
||
| ```yaml | ||
| Type: System.DateTime | ||
| Parameter Sets: UpdateExpanded, UpdateViaIdentityStorageMoverExpanded, UpdateViaIdentityProjectExpanded, UpdateViaIdentityExpanded | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: None | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` |
There was a problem hiding this comment.
The Schedule* parameter documentation is duplicated: the blocks for -ScheduleCronExpression/-ScheduleDaysOfMonth/-ScheduleDaysOfWeek/-ScheduleEndDate/-ScheduleFrequency/-ScheduleIsActive/-ScheduleStartDate appear twice. This makes the help harder to read and can confuse users; please remove the duplicate parameter section (keep a single set of Schedule* entries).
| # Pre-create a connection on the initial Storage Mover so Get-AzStorageMoverConnection tests can find it. | ||
| New-AzStorageMoverConnection -Name $env.ConnectionName -ResourceGroupName $env.ResourceGroupName -StorageMoverName $env.InitialStoMoverName -PrivateLinkServiceId $env.PrivateLinkServiceId -Description "setupEnv connection" | Out-Null | ||
|
|
||
| set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) | ||
| } | ||
| function cleanupEnv() { | ||
| # Clean resources you create for testing | ||
| # Remove-AzResourceGroup -Name $env.ResourceGroupName | ||
| # Delete the Private Link Service created by setupEnv. The PLS cannot be | ||
| # deleted while it has Private Endpoint Connections referencing it, so we | ||
| # first delete each linked private endpoint, then the PLS itself. | ||
| if ($env.PrivateLinkServiceName) { | ||
| $plsRg = if ($env.VNetResourceGroupName) { $env.VNetResourceGroupName } else { $env.ResourceGroupName } | ||
| $pls = Get-AzPrivateLinkService -Name $env.PrivateLinkServiceName -ResourceGroupName $plsRg -ErrorAction SilentlyContinue | ||
| if ($pls) { | ||
| foreach ($pec in $pls.PrivateEndpointConnections) { | ||
| # PrivateEndpoint.Id format: | ||
| # /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Network/privateEndpoints/{name} | ||
| if ($pec.PrivateEndpoint -and $pec.PrivateEndpoint.Id) { | ||
| $peSegments = $pec.PrivateEndpoint.Id -split '/' | ||
| $peRg = $peSegments[4] | ||
| $peName = $peSegments[-1] | ||
| Remove-AzPrivateEndpoint -Name $peName -ResourceGroupName $peRg -Force -ErrorAction SilentlyContinue | ||
| } | ||
| } | ||
| Remove-AzPrivateLinkService -Name $env.PrivateLinkServiceName -ResourceGroupName $plsRg -Force -ErrorAction SilentlyContinue |
There was a problem hiding this comment.
setupEnv creates a Storage Mover Connection (via New-AzStorageMoverConnection), but cleanupEnv only deletes the Private Link Service and related Private Endpoints. This can leave orphaned Connection resources in the Storage Mover (and potentially interfere with subsequent record/live runs). Please delete the Connection resource(s) created by setupEnv/tests as part of cleanupEnv as well.
…hedule params and add Connection cleanup
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
| $plsResponse = Invoke-AzRestMethod -Method PUT -Path $plsPath -Payload $plsBody | ||
| if ($plsResponse.StatusCode -ne 200 -and $plsResponse.StatusCode -ne 201) { | ||
| throw "Failed to create PLS: $($plsResponse.Content)" | ||
| } | ||
| $plsResult = $plsResponse.Content | ConvertFrom-Json | ||
| $env.PrivateLinkServiceId = $plsResult.id | ||
|
|
||
| # Pre-create a connection on the initial Storage Mover so Get-AzStorageMoverConnection tests can find it. | ||
| New-AzStorageMoverConnection -Name $env.ConnectionName -ResourceGroupName $env.ResourceGroupName -StorageMoverName $env.InitialStoMoverName -PrivateLinkServiceId $env.PrivateLinkServiceId -Description "setupEnv connection" | Out-Null | ||
|
|
There was a problem hiding this comment.
After creating the Private Link Service via Invoke-AzRestMethod, setupEnv immediately uses the returned resource id to create a Storage Mover connection. ARM resources can return 200/201 while still provisioning, so this can intermittently fail/flap in live/record runs. Consider polling the PLS provisioning state (or using -NoWait plus wait) until it reaches Succeeded before creating the connection.
| RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.3.4'; }) | ||
|
|
There was a problem hiding this comment.
RequiredModules now requires Az.Accounts >= 5.3.4. This raises the minimum dependency version for the module and can be a breaking change for users who have older Az.Accounts installed. If 5.3.4 is not strictly required by the generated/cust cmdlets, consider keeping the previous minimum; otherwise, please call out the new minimum Az.Accounts requirement in the module ChangeLog/release notes so users understand the upgrade requirement.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 79 out of 81 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (7)
src/StorageMover/StorageMover/Az.StorageMover.psd1:1
- Changing
VariablesToExportfrom being omitted/commented-out to an explicit empty array can be a breaking behavioral change: when not specified, module manifest fields may default to exporting everything ('*'), whereas@()exports none. If the intent is to preserve prior behavior, keep it omitted or setVariablesToExport = '*'; if the intent is to stop exporting variables, please call that out explicitly in release notes since it can break scripts relying on exported variables.
src/StorageMover/StorageMover.Autorest/test/New-AzStorageMoverS3WithHmacEndpoint.Tests.ps1:1 - These tests create endpoint resources but don’t delete them afterward. In live/record runs, this can leak resources in the test resource group and cause flaky failures due to quotas/name collisions over time. Consider adding teardown (e.g.,
Remove-AzStorageMoverEndpointinFinally/AfterEachorAfterAll) for each endpoint created by the test.
src/StorageMover/StorageMover.Autorest/test/New-AzStorageMoverS3WithHmacEndpoint.Tests.ps1:1 - These tests create endpoint resources but don’t delete them afterward. In live/record runs, this can leak resources in the test resource group and cause flaky failures due to quotas/name collisions over time. Consider adding teardown (e.g.,
Remove-AzStorageMoverEndpointinFinally/AfterEachorAfterAll) for each endpoint created by the test.
src/StorageMover/StorageMover.Autorest/test/Update-AzStorageMoverS3WithHmacEndpoint.Tests.ps1:1 - Similar to the New cmdlet tests, this test creates an endpoint but never removes it. Please add cleanup for the created endpoint to avoid leaking resources during live/record test runs (use
Remove-AzStorageMoverEndpointwith the generated name in teardown).
src/StorageMover/StorageMover.Autorest/test/utils.ps1:1 - Parsing the resource group name from a resource ID by fixed index (
$peSegments[4]) is brittle (it relies on a specific segment layout and leading slash behavior). A more robust approach is to locate the"resourceGroups"segment and take the next element, or to use an ARM ID parser helper if available in the repo’s test utilities.
src/StorageMover/StorageMover/help/Update-AzStorageMoverS3WithHmacEndpoint.md:1 - The custom cmdlet implementation includes help messaging that an empty string can be used to clear an existing Key Vault URI value, but this markdown help doesn’t mention that behavior. To avoid surprises for users, please reflect the “use empty string to clean-up existing value” behavior in the parameter descriptions here (and in the corresponding generated docs page if applicable).
src/StorageMover/StorageMover/help/Update-AzStorageMoverS3WithHmacEndpoint.md:1 - The custom cmdlet implementation includes help messaging that an empty string can be used to clear an existing Key Vault URI value, but this markdown help doesn’t mention that behavior. To avoid surprises for users, please reflect the “use empty string to clean-up existing value” behavior in the parameter descriptions here (and in the corresponding generated docs page if applicable).
| This command gets all the Storage movers in a resource group. | ||
|
|
||
| ### Example 2: Get a specific Storage mover | ||
| ### Example 3: Get a specific Storage mover |
There was a problem hiding this comment.
This renumbers “Example 2” to “Example 3” without adding a new Example 2 in the shown diff, which can leave the page with skipped numbering. Please either keep the original numbering or add the missing Example 2 so numbering is sequential (same issue also appears in src/StorageMover/StorageMover.Autorest/docs/Get-AzStorageMover.md).
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Description
Key changes:
Module regeneration: Regenerated the module from the 2025-12-01 OpenAPI spec via AutoRest, picking up new models, parameters, and API surface.
Connection cmdlets: Added new Get-AzStorageMoverConnection, New-AzStorageMoverConnection, Remove-AzStorageMoverConnection cmdlets for managing private endpoint connections to storage movers.
S3WithHMAC endpoint cmdlets: Added custom New-AzStorageMoverS3WithHmacEndpoint and Update-AzStorageMoverS3WithHmacEndpoint cmdlets for creating and managing S3-compatible endpoints with HMAC (Key Vault-based) credentials. Supports source types: MINIO, IBM, GCS, ALIBABA, DELL_EMC, and OTHER.
New API capabilities: Data integrity validation, schedule information, and job run warning properties are now available in the generated models.
Tests: Added tests with recordings for all new Connection cmdlets and S3WithHMAC endpoint cmdlets (35+ tests total pass in playback).
Docs & examples: Added reference docs and example files for S3WithHMAC endpoint cmdlets. Updated module doc ([Az.StorageMover.md] with new cmdlet entries.
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.