Skip to content

Commit 2b91d2f

Browse files
committed
Fit and finish AzPowerShell
1 parent 3aff95e commit 2b91d2f

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

articles/storage-mover/bandwidth-management.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: How to schedule bandwidth consumption of the Storage Mover agent
3-
description: Learn how to set bandwidth schedules that limit the use of the WAN link for a Storage Mover agent
2+
title: How to schedule bandwidth limitations of a Storage Mover agent
3+
description: Learn how to set a bandwidth schedule that limits the use of the WAN link for a Storage Mover agent
44
author: stevenmatthew
55
ms.author: shaas
66
ms.service: azure-storage-mover
77
ms.topic: how-to
8-
ms.date: 07/02/2022
8+
ms.date: 07/10/2024
99
---
1010

1111
# Manage network bandwidth of a Storage Mover agent
@@ -138,15 +138,17 @@ $newLimit = New-AzStorageMoverUploadLimitWeeklyRecurrenceObject `
138138
-EndTimeHour 17 ` # Mandatory. 24-hour clock: 17 = 5pm
139139
-EndTimeMinute 30 # Optional. Time blocks are precise to 30 Minutes. -EndTimeMinute 0 is equivalent to omitting the parameter. The only other acceptable value is the half hour mark: 30.
140140
141+
$schedule += $newLimit # Appends the new limit to the exiting schedule. The JSON structure does not need to be ordered by days or time.
142+
141143
# Updates the bandwidth limit schedule for the selected agent by adding the defined "time block" to the schedule.
142144
# Ensure that the new limit does not overlap with an already configured limit in the schedule, otherwise the operation will fail.
143145
Update-AzStorageMoverAgent `
144146
-ResourceGroupName $resourceGroupName `
145147
-StorageMoverName $storageMoverName `
146148
-AgentName $registeredAgentName `
147-
-UploadLimitScheduleWeeklyRecurrence $newLimit
148-
# You can supply a comma-separated list of new limits. This action will add the new limit(s) to the schedule.
149-
# If there already are other limits defined, ensure the new limit's time span is not overlapping any of them. Otherwise, the operation will fail.
149+
-UploadLimitScheduleWeeklyRecurrence $schedule
150+
# This command sets and overwrites a bandwidth limit schedule for the selected agent. Be sure to preserve an existing schedule if you want to only add a new limit. If you are building an entirely new schedule, you can form all your limit objects and then supply a comma-separated list of your new limits here.
151+
# Ensure the new limit's time span is not overlapping any existing limits. Otherwise, the operation will fail.
150152
```
151153

152154
#### Disable bandwidth limitation for an agent
@@ -175,31 +177,24 @@ $schedule = @(Get-AzStorageMoverAgent -ResourceGroupName $resourceGroupName -Sto
175177
176178
$schedule[<n>] = $limit # Replace the limit (start count at zero) with your newly defined limit.
177179
178-
# Step 3: Remove any bandwidth limitations before you apply your updated schedule.
179-
# If you skip this step, step 4 will then try to append the new schedule to the old schedule. This will likely fail as overlapping time periods are specified.
180+
#Step 3: Update the bandwidth limit schedule for the selected agent:
180181
Update-AzStorageMoverAgent `
181182
-ResourceGroupName $resourceGroupName `
182183
-StorageMoverName $storageMoverName `
183184
-AgentName $registeredAgentName `
184-
-UploadLimitScheduleWeeklyRecurrence [] # Supply an empty array to remove all previously configured limits. This operation cannot be undone.
185-
186-
#Step 4: Update the bandwidth limit schedule for the selected agent:
187-
Update-AzStorageMoverAgent `
188-
-ResourceGroupName $resourceGroupName `
189-
-StorageMoverName $storageMoverName `
190-
-AgentName $registeredAgentName `
191-
-UploadLimitScheduleWeeklyRecurrence $schedule # Apply your entire, updated schedule. Performing this step on an agent with other limits already configured will override them with the new schedule. Ensure there are no overlapping time spans, otherwise the operation will fail.
185+
-UploadLimitScheduleWeeklyRecurrence $schedule # Apply your entire, updated schedule. Performing this step on an agent with other limits already configured will override them with this new schedule. Ensure there are no overlapping time spans, otherwise the operation will fail.
192186
```
193187
## Understanding the JSON schema of the bandwidth limit schedule
194188
The bandwidth limit schedule is stored as a JSON construct in the property `UploadLimitScheduleWeeklyRecurrence` of a registered agent.
195189

196-
The [previous PowerShell section](#use-powershell-to-configure-a-bandwidth-limit-schedule) shows an example of how you can conveniently form and update this agent property by using Az PowerShell.
190+
The [previous PowerShell section](#use-powershell-to-configure-a-bandwidth-limit-schedule) shows an example of how you can form and update this agent property by using Azure PowerShell.
197191
You can, however, manually form that JSON and directly supply it as an argument for the property. The following section can help you understand the bandwidth schedule elements of this JSON construct.
198192

199193
> [!IMPORTANT]
200194
> The schedule consists of one or more time spans during which a bandwidth limit applies that the agent is not to exceed. These time spans must not be overlapping. At any given time, only one limit may apply. A JSON specifying a schedule with overlapping times is considered malformed and cannot be applied to the agent.
201195
202196
The following two representations of a bandwidth limit schedule are equivalent:
197+
203198
:::image type="content" source="media/bandwidth-management/bandwidth-limit-json-small.png" alt-text="Azure portal dialog showing a calendar with scheduled bandwidth limitations." lightbox="media/bandwidth-management/bandwidth-limit-json.png":::
204199

205200
```json

0 commit comments

Comments
 (0)