Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - StorageMover")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.5.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.5.1")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.6.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.6.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]


114 changes: 14 additions & 100 deletions src/StorageMover/StorageMover.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,8 @@ module-version: 1.6.0
# Normally, title is the service name
title: StorageMover
subject-prefix: $(service-name)
nested-object-to-string: true
identity-correction-for-post: true

# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
use-extension:
"@autorest/powershell": "3.x"
# flatten-userassignedidentity: false
disable-transform-identity-type: true

directive:
- from: swagger-document
Expand All @@ -61,6 +57,15 @@ directive:
],
"default": 0
}
- from: swagger-document
where: $.definitions.EndpointBaseUpdateProperties.properties.endpointType
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.Credentials.properties.type
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- where:
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))|^CreateViaIdentityExpanded$
remove: true
- where:
verb: Set
remove: true
Expand All @@ -70,7 +75,6 @@ directive:
suppress-format: true
- no-inline:
- EndpointBaseProperties
- no-inline:
- EndpointBaseUpdateProperties
# Rename Start-AzDataMoverJobDefinitionJob -> Start-AzDataMoverJobDefinition
- where:
Expand Down Expand Up @@ -101,18 +105,6 @@ directive:
verb: Remove
subject: Agent
hide: true
# Remove parameter sets Create and CreateViaIdentity
- where:
verb: New
subject: Endpoint
variant: ^Create$|^CreateViaIdentity$
remove: true
# Remove parameter set Update and UpdateViaIdentity
- where:
verb: Update
subject: Endpoint
variant: ^Update$|^UpdateViaIdentity$
remove: true
# Hide New-AzStorageMoverEndpoint
- where:
verb: New
Expand Down Expand Up @@ -150,92 +142,14 @@ directive:
property-name: Message
set:
property-name: ErrorMessage
- where:
verb: New
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$
remove: true
# Delete the original ShouldProcess as a ShouldProcess and ShouldContinue are added in the custom cmdlets
- from: source-file-csharp
where: $
transform: $ = $.replace('ShouldProcess($\"Call remote \'StorageMoversDelete\' operation\")', 'true');
- from: source-file-csharp
where: $
transform: $ = $.replace('ShouldProcess($\"Call remote \'AgentsDelete\' operation\")', 'true');
- from: source-file-csharp
where: $
transform: $ = $.replace('public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData', 'private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData');

- where:
verb: Get|Update
subject: Agent
set:
breaking-change:
deprecated-output-properties:
- UploadLimitScheduleWeeklyRecurrence
new-output-properties:
- UploadLimitScheduleWeeklyRecurrence
change-description: The type of the property UploadLimitScheduleWeeklyRecurrence will be changed from fixed array to 'List'.
deprecated-by-version: 2.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
- where:
verb: New
subject: JobDefinition
variant: Create
set:
breaking-change:
change-description: The parameter set Create will be removed. Suggest to use CreateExpanded and CreateViaJsonString instead.
deprecated-by-version: 2.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
- where:
verb: New
subject: Project
variant: Create
set:
breaking-change:
change-description: The parameter set Create will be removed. Suggest to use CreateExpanded and CreateViaJsonString instead.
deprecated-by-version: 2.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
- where:
verb: Update
subject: StorageMover
variant: Update$|UpdateViaIdentity$
set:
breaking-change:
change-description: The parameter set Update and UpdateViaIdentity will be removed. Suggest to use UpdateExpanded, UpdateViaIdentityExpanded and UpdateViaJsonString instead.
deprecated-by-version: 2.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
- where:
verb: Update
subject: Agent
variant: Update$|UpdateViaIdentity$
set:
breaking-change:
change-description: The parameter set Update and UpdateViaIdentity will be removed. Suggest to use UpdateExpanded, UpdateViaIdentityExpanded and UpdateViaJsonString instead.
deprecated-by-version: 2.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
- where:
verb: Update
subject: JobDefinition
variant: Update$|UpdateViaIdentity$
set:
breaking-change:
change-description: The parameter set Update and UpdateViaIdentity will be removed. Suggest to use UpdateExpanded, UpdateViaIdentityExpanded and UpdateViaJsonString instead.
deprecated-by-version: 2.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
- where:
verb: Update
subject: Project
variant: Update$|UpdateViaIdentity$
set:
breaking-change:
change-description: The parameter set Update and UpdateViaIdentity will be removed. Suggest to use UpdateExpanded, UpdateViaIdentityExpanded and UpdateViaJsonString instead.
deprecated-by-version: 2.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
# Customize add validate
# - model-cmdlet:
# - model-name: UploadLimitWeeklyRecurrence
```
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
},
{
"name": "Start-AzStorageMoverJobDefinition",
"description": "Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution.",
"description": "Start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/startJob",
"help": {
"learnMore": {
Expand All @@ -123,7 +123,7 @@
},
"examples": [
{
"description": "Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution.",
"description": "start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution.",
"parameters": [
{
"name": "-JobDefinitionName",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ Creates a Nfs file share endpoint resource, which represents a data transfer sou
New-AzStorageMoverAzNfsFileShareEndpoint -Name $endpointName -ResourceGroupName $rgname -StorageMoverName $storagemovername -StorageAccountResourceId $accountresourceid -FileShareName $fileshareName -Description "Description"

.Inputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint
.Notes
COMPLEX PARAMETER PROPERTIES

Expand All @@ -37,7 +37,7 @@ To create the parameters described below, construct a hash table containing the
https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoveraznfsfileshareendpoint
#>
function New-AzStorageMoverAzNfsFileShareEndpoint {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])]
[CmdletBinding(DefaultParameterSetName = 'CreateExpanded', PositionalBinding =$false, SupportsShouldProcess, ConfirmImpact = 'Medium')]
param(
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
Expand Down Expand Up @@ -131,7 +131,7 @@ function New-AzStorageMoverAzNfsFileShareEndpoint {
)

process {
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureStorageSmbFileShareEndpointProperties]::New()
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureStorageNfsFileShareEndpointProperties]::New()

if ($PSBoundParameters.ContainsKey('FileShareName')) {
$Properties.FileShareName = $FileShareName
Expand All @@ -146,7 +146,6 @@ function New-AzStorageMoverAzNfsFileShareEndpoint {
$null = $PSBoundParameters.Remove("Description")
}

$Properties.EndpointType = "AzureStorageNfsFileShare"
$PSBoundParameters.Add("Property", $Properties)

Az.StorageMover.internal\New-AzStorageMoverEndpoint @PSBoundParameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ Creates a Smb file share endpoint resource, which represents a data transfer sou
New-AzStorageMoverAzSmbFileShareEndpoint -Name $endpointName -ResourceGroupName $rgname -StorageMoverName $storagemovername -StorageAccountResourceId $accountresourceid -FileShareName $fileshareName -Description "Description"

.Inputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint
.Notes
COMPLEX PARAMETER PROPERTIES

Expand All @@ -37,7 +37,7 @@ To create the parameters described below, construct a hash table containing the
https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoverazsmbfileshareendpoint
#>
function New-AzStorageMoverAzSmbFileShareEndpoint {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])]
[CmdletBinding(DefaultParameterSetName = 'CreateExpanded', PositionalBinding =$false, SupportsShouldProcess, ConfirmImpact = 'Medium')]
[Alias("New-AzStorageMoverSmbFileShareEndpoint")]
param(
Expand Down Expand Up @@ -132,7 +132,7 @@ function New-AzStorageMoverAzSmbFileShareEndpoint {
)

process {
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureStorageSmbFileShareEndpointProperties]::New()
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureStorageSmbFileShareEndpointProperties]::New()

if ($PSBoundParameters.ContainsKey('FileShareName')) {
$Properties.FileShareName = $FileShareName
Expand All @@ -147,7 +147,6 @@ function New-AzStorageMoverAzSmbFileShareEndpoint {
$null = $PSBoundParameters.Remove("Description")
}

$Properties.EndpointType = "AzureStorageSmbFileShare"
$PSBoundParameters.Add("Property", $Properties)

Az.StorageMover.internal\New-AzStorageMoverEndpoint @PSBoundParameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ Creates an AzStorageContainer endpoint resource, which represents a data transfe
New-AzStorageMoverAzStorageContainerEndpoint -Name myendpointName -ResourceGroupName myResourceGroup -BlobContainerName myContainer -StorageMoverName myStorageMover -StorageAccountResourceId myAccountResourceId

.Inputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint
.Notes
COMPLEX PARAMETER PROPERTIES

Expand All @@ -37,7 +37,7 @@ To create the parameters described below, construct a hash table containing the
https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoverazstoragecontainerendpoint
#>
function New-AzStorageMoverAzStorageContainerEndpoint {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])]
[CmdletBinding(DefaultParameterSetName = 'CreateExpanded', PositionalBinding =$false, SupportsShouldProcess, ConfirmImpact = 'Medium')]
param(
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
Expand Down Expand Up @@ -131,7 +131,7 @@ function New-AzStorageMoverAzStorageContainerEndpoint {
)

process {
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureStorageBlobContainerEndpointProperties]::New()
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureStorageBlobContainerEndpointProperties]::New()

if ($PSBoundParameters.ContainsKey('BlobContainerName')) {
$Properties.BlobContainerName = $BlobContainerName
Expand All @@ -146,9 +146,7 @@ function New-AzStorageMoverAzStorageContainerEndpoint {
$null = $PSBoundParameters.Remove("Description")
}

$Properties.EndpointType = "AzureStorageBlobContainer"
$PSBoundParameters.Add("Property", $Properties)

$Identity = "SystemAssigned"
$PSBoundParameters.Add("IdentityType", $Identity)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ Creates a Multi-Cloud Connector endpoint resource, which represents a data trans
.Example
New-AzStorageMoverMultiCloudConnectorEndpoint -Name $endpointName -ResourceGroupName $rgname -StorageMoverName $storagemovername -MultiCloudConnectorId $multiCloudConnectorId -AwsS3BucketId $awsS3BucketId -Description "Description"
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint
.Notes
COMPLEX PARAMETER PROPERTIES

Expand All @@ -36,7 +36,7 @@ To create the parameters described below, construct a hash table containing the
https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemovermulticloudconnectorendpoint
#>
function New-AzStorageMoverMultiCloudConnectorEndpoint {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])]
[CmdletBinding(DefaultParameterSetName = 'CreateExpanded', PositionalBinding =$false, SupportsShouldProcess, ConfirmImpact = 'Medium')]
param(
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
Expand Down Expand Up @@ -130,8 +130,7 @@ function New-AzStorageMoverMultiCloudConnectorEndpoint {
)

process {
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureMultiCloudConnectorEndpointProperties]::New()
$Identity = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType]::New()
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureMultiCloudConnectorEndpointProperties]::New()

if ($PSBoundParameters.ContainsKey('MultiCloudConnectorId')) {
$Properties.MultiCloudConnectorId = $MultiCloudConnectorId
Expand All @@ -146,7 +145,6 @@ function New-AzStorageMoverMultiCloudConnectorEndpoint {
$null = $PSBoundParameters.Remove("Description")
}

$Properties.EndpointType = "AzureMultiCloudConnector"
$PSBoundParameters.Add("Property", $Properties)

Az.StorageMover.internal\New-AzStorageMoverEndpoint @PSBoundParameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ Creates a Nfs endpoint resource, which represents a data transfer source or dest
New-AzStorageMoverNfsEndpoint -Name myEndpoint -ResourceGroupName myResourceGroup -StorageMoverName myStorageMover -Host "x.x.x.x" -Export "/" -NfsVersion NFSv3 -Description "Description"

.Inputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint
.Notes
COMPLEX PARAMETER PROPERTIES

Expand All @@ -37,7 +37,7 @@ To create the parameters described below, construct a hash table containing the
https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemovernfsendpoint
#>
function New-AzStorageMoverNfsEndpoint {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])]
[CmdletBinding(DefaultParameterSetName = 'CreateExpanded', PositionalBinding =$false, SupportsShouldProcess, ConfirmImpact = 'Medium')]
param(
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
Expand Down Expand Up @@ -67,8 +67,8 @@ function New-AzStorageMoverNfsEndpoint {

[Parameter(ParameterSetName = 'CreateExpanded')]
[Parameter(HelpMessage="The NFS protocol version.")]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion])]
[Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion]
[Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("NFSauto", "NFSv3", "NFSv4")]
[System.String]
${NfsVersion},

[Parameter(ParameterSetName = 'CreateExpanded')]
Expand Down Expand Up @@ -137,7 +137,7 @@ function New-AzStorageMoverNfsEndpoint {
)

process {
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.NfsMountEndpointProperties]::New()
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.NfsMountEndpointProperties]::New()
if ($PSBoundParameters.ContainsKey('Host')) {
$Properties.Host = $Host
$null = $PSBoundParameters.Remove("Host")
Expand All @@ -155,7 +155,6 @@ function New-AzStorageMoverNfsEndpoint {
$null = $PSBoundParameters.Remove("Description")
}

$Properties.EndpointType = "NfsMount"
$PSBoundParameters.Add("Property", $Properties)

Az.StorageMover.internal\New-AzStorageMoverEndpoint @PSBoundParameters
Expand Down
Loading