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
4 changes: 2 additions & 2 deletions src/StorageMover/StorageMover.Autorest/Az.StorageMover.psd1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@{
GUID = 'd6053d97-1a9b-4fc6-9bd2-09c5b23b34db'
RootModule = './Az.StorageMover.psm1'
ModuleVersion = '1.1.0'
ModuleVersion = '1.2.0'
CompatiblePSEditions = 'Core', 'Desktop'
Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
Expand All @@ -11,7 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.StorageMover.private.dll'
FormatsToProcess = './Az.StorageMover.format.ps1xml'
FunctionsToExport = 'Get-AzStorageMover', 'Get-AzStorageMoverAgent', 'Get-AzStorageMoverEndpoint', 'Get-AzStorageMoverJobDefinition', 'Get-AzStorageMoverJobRun', 'Get-AzStorageMoverProject', 'New-AzStorageMover', 'New-AzStorageMoverAzSmbFileShareEndpoint', 'New-AzStorageMoverAzStorageContainerEndpoint', 'New-AzStorageMoverJobDefinition', 'New-AzStorageMoverNfsEndpoint', 'New-AzStorageMoverProject', 'New-AzStorageMoverSmbEndpoint', 'Remove-AzStorageMover', 'Remove-AzStorageMoverEndpoint', 'Remove-AzStorageMoverJobDefinition', 'Remove-AzStorageMoverProject', 'Start-AzStorageMoverJobDefinition', 'Stop-AzStorageMoverJobDefinition', 'Unregister-AzStorageMoverAgent', 'Update-AzStorageMover', 'Update-AzStorageMoverAgent', 'Update-AzStorageMoverAzSmbFileShareEndpoint', 'Update-AzStorageMoverAzStorageContainerEndpoint', 'Update-AzStorageMoverJobDefinition', 'Update-AzStorageMoverNfsEndpoint', 'Update-AzStorageMoverProject', 'Update-AzStorageMoverSmbEndpoint', '*'
FunctionsToExport = 'Get-AzStorageMover', 'Get-AzStorageMoverAgent', 'Get-AzStorageMoverEndpoint', 'Get-AzStorageMoverJobDefinition', 'Get-AzStorageMoverJobRun', 'Get-AzStorageMoverProject', 'New-AzStorageMover', 'New-AzStorageMoverAzSmbFileShareEndpoint', 'New-AzStorageMoverAzStorageContainerEndpoint', 'New-AzStorageMoverJobDefinition', 'New-AzStorageMoverNfsEndpoint', 'New-AzStorageMoverProject', 'New-AzStorageMoverSmbEndpoint', 'New-AzStorageMoverUploadLimitWeeklyRecurrenceObject', 'Remove-AzStorageMover', 'Remove-AzStorageMoverEndpoint', 'Remove-AzStorageMoverJobDefinition', 'Remove-AzStorageMoverProject', 'Start-AzStorageMoverJobDefinition', 'Stop-AzStorageMoverJobDefinition', 'Unregister-AzStorageMoverAgent', 'Update-AzStorageMover', 'Update-AzStorageMoverAgent', 'Update-AzStorageMoverAzSmbFileShareEndpoint', 'Update-AzStorageMoverAzStorageContainerEndpoint', 'Update-AzStorageMoverJobDefinition', 'Update-AzStorageMoverNfsEndpoint', 'Update-AzStorageMoverProject', 'Update-AzStorageMoverSmbEndpoint', '*'
AliasesToExport = 'New-AzStorageMoverSmbFileShareEndpoint', 'Update-AzStorageMoverSmbFileShareEndpoint', '*'
PrivateData = @{
PSData = @{
Expand Down
22 changes: 16 additions & 6 deletions src/StorageMover/StorageMover.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
This directory contains the PowerShell module for the StorageMover service.

---
## Status
[![Az.StorageMover](https://img.shields.io/powershellgallery/v/Az.StorageMover.svg?style=flat-square&label=Az.StorageMover "Az.StorageMover")](https://www.powershellgallery.com/packages/Az.StorageMover/)

## Info
- Modifiable: yes
- Generated: all
Expand All @@ -31,15 +28,15 @@ For information on how to develop for `Az.StorageMover`, see [how-to.md](how-to.

``` yaml
# Please specify the commit id that includes your features to make sure generated codes stable.
commit: 74948e5fb9b1e1f8b9d58fb65fc81d5cba6b6ced
commit: 1cb8cb0a95c20513c5d767614888f415be99245d
require:
# readme.azure.noprofile.md is the common configuration file
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
- $(repo)/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/storagemover.json
- $(repo)/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2024-07-01/storagemover.json

# For new RP, the version is 0.1.0
module-version: 1.1.0
module-version: 1.2.0
# Normally, title is the service name
title: StorageMover
subject-prefix: $(service-name)
Expand All @@ -51,6 +48,19 @@ use-extension:
"@autorest/powershell": "3.x"

directive:
- from: swagger-document
where: $.definitions.Time.properties.minute
transform: >-
return {
"description": "The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0.",
"type": "integer",
"format": "int32",
"enum": [
0,
30
],
"default": 0
}
- where:
verb: Set
remove: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "storageMovers/agents",
"apiVersion": "2023-10-01",
"apiVersion": "2024-07-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.storagemover"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "storageMovers/endpoints",
"apiVersion": "2023-10-01",
"apiVersion": "2024-07-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.storagemover"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "storageMovers/projects/jobDefinitions/jobRuns",
"apiVersion": "2023-10-01",
"apiVersion": "2024-07-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.storagemover"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "storageMovers/projects/jobDefinitions",
"apiVersion": "2023-10-01",
"apiVersion": "2024-07-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.storagemover"
},
Expand Down Expand Up @@ -103,7 +103,7 @@
},
{
"name": "Start-AzStorageMoverJobDefinition",
"description": "Requests an Agent to start a new instance of this Job Definition, generating a new Job Run resource.",
"description": "Creates 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": "Requests an Agent to start a new instance of this Job Definition, generating a new Job Run resource.",
"description": "Creates 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
@@ -1,6 +1,6 @@
{
"resourceType": "storageMovers/projects",
"apiVersion": "2023-10-01",
"apiVersion": "2024-07-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.storagemover"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "storageMovers",
"apiVersion": "2023-10-01",
"apiVersion": "2024-07-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.storagemover"
},
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.Api20231001.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.IEndpoint
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20231001.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.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.Api20231001.IEndpoint])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.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.Api20231001.AzureStorageSmbFileShareEndpointProperties]::New()
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.AzureStorageSmbFileShareEndpointProperties]::New()

if ($PSBoundParameters.ContainsKey('FileShareName')) {
$Properties.FileShareName = $FileShareName
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.Api20231001.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.IEndpoint
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20231001.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.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.Api20231001.IEndpoint])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.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.Api20231001.AzureStorageBlobContainerEndpointProperties]::New()
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.AzureStorageBlobContainerEndpointProperties]::New()

if ($PSBoundParameters.ContainsKey('BlobContainerName')) {
$Properties.BlobContainerName = $BlobContainerName
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.Api20231001.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.IEndpoint
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20231001.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.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.Api20231001.IEndpoint])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.IEndpoint])]
[CmdletBinding(DefaultParameterSetName = 'CreateExpanded', PositionalBinding =$false, SupportsShouldProcess, ConfirmImpact = 'Medium')]
param(
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
Expand Down Expand Up @@ -137,7 +137,7 @@ function New-AzStorageMoverNfsEndpoint {
)

process {
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20231001.NfsMountEndpointProperties]::New()
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.NfsMountEndpointProperties]::New()
if ($PSBoundParameters.ContainsKey('Host')) {
$Properties.Host = $Host
$null = $PSBoundParameters.Remove("Host")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ Creates an SMB endpoint resource, which represents a data transfer source or des
.Example
New-AzStorageMoverSmbEndpoint -Name $endpointName -ResourceGroupName $rgname -StorageMoverName $storagemovername -Host $host -ShareName $shareName -CredentialsUsernameUri "https://examples-azureKeyVault.vault.azure.net/secrets/examples-username" -CredentialsPasswordUri "https://examples-azureKeyVault.vault.azure.net/secrets/examples-password" -Description "Description"
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20231001.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.IEndpoint
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20231001.IEndpoint
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.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-azstoragemoversmbendpoint
#>
function New-AzStorageMoverSmbEndpoint {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20231001.IEndpoint])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.IEndpoint])]
[CmdletBinding(DefaultParameterSetName = 'CreateExpanded', PositionalBinding =$false, SupportsShouldProcess, ConfirmImpact = 'Medium')]
param(
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
Expand Down Expand Up @@ -140,7 +140,7 @@ function New-AzStorageMoverSmbEndpoint {
)

process {
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20231001.SmbMountEndpointProperties]::New()
$Properties = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.SmbMountEndpointProperties]::New()

if ($PSBoundParameters.ContainsKey('Host')) {
$Properties.Host = $Host
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@

# ----------------------------------------------------------------------------------
# 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,
# 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.
# ----------------------------------------------------------------------------------

<#
.Synopsis
Create an in-memory object for UploadLimitWeeklyRecurrence.
.Description
Create an in-memory object for UploadLimitWeeklyRecurrence.

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.UploadLimitWeeklyRecurrence
.Link
https://learn.microsoft.com/powershell/module/Az.StorageMover/new-AzStorageMoverUploadLimitWeeklyRecurrenceObject
#>
function New-AzStorageMoverUploadLimitWeeklyRecurrenceObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.UploadLimitWeeklyRecurrence')]
[CmdletBinding(PositionalBinding=$false)]
Param(

[Parameter(Mandatory, HelpMessage="The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence.")]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek])]
[Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek[]]
$Day,
[Parameter(Mandatory, HelpMessage="The WAN-link upload bandwidth (maximum data transfer rate) in megabits per second. Value of 0 indicates no throughput is allowed and any running migration job is effectively paused for the duration of this recurrence. Only data plane operations are governed by this limit. Control plane operations ensure seamless functionality. The agent may exceed this limit with control messages, if necessary.")]
[int]
$LimitInMbps,
[Parameter(Mandatory, HelpMessage="The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). Hour value 24 cannot be combined with any other minute value but 0.")]
[int]
$EndTimeHour,
[Parameter(HelpMessage="The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0.")]
[ArgumentCompleter({0, 30})]
[ValidateSet(0,30)]
[int]
$EndTimeMinute,
[Parameter(Mandatory, HelpMessage="The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). Hour value 24 cannot be combined with any other minute value but 0.")]
[int]
$StartTimeHour,
[Parameter(HelpMessage="The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0.")]
[ArgumentCompleter({0, 30})]
[ValidateSet(0,30)]
[int]
$StartTimeMinute
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20240701.UploadLimitWeeklyRecurrence]::New()

if ($PSBoundParameters.ContainsKey('Day')) {
$Object.Day = $Day
}
if ($PSBoundParameters.ContainsKey('LimitInMbps')) {
$Object.LimitInMbps = $LimitInMbps
}
if ($PSBoundParameters.ContainsKey('EndTimeHour')) {
$Object.EndTimeHour = $EndTimeHour
}
if ($PSBoundParameters.ContainsKey('EndTimeMinute')) {
$Object.EndTimeMinute = $EndTimeMinute
}
if ($PSBoundParameters.ContainsKey('StartTimeHour')) {
$Object.StartTimeHour = $StartTimeHour
}
if ($PSBoundParameters.ContainsKey('StartTimeMinute')) {
$Object.StartTimeMinute = $StartTimeMinute
}
return $Object
}
}
Loading