You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# $schedule then contains a JSON structure with elements for each configured time windows and the upload limit in Mbps that applies during this window.
127
124
128
-
#------------
129
-
# SET a new bandwidth limitation window on Monday and Tuesday:
-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.
136
140
137
-
#TODO:
138
-
#I need to see how to add a single new time block to an empty or existing schedule.
139
-
#I need to see the best method of editing a schedule.
140
-
#I need to see how I can delete a schedule.
141
-
#
142
-
#I would like to document the JSON schema through an annotated example schedule.
141
+
# Updates the bandwidth limit schedule for the selected agent by adding the defined "time block" to the schedule.
142
+
# Ensure that the new limit does not overlap with an already configured limit in the schedule, otherwise the operation will fail.
143
+
Update-AzStorageMoverAgent `
144
+
-ResourceGroupName resourceGroupName `
145
+
-StorageMoverName storageMoverName `
146
+
-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.
150
+
```
143
151
152
+
#### Disable bandwidth limitation for an agent
153
+
```powershell
154
+
Update-AzStorageMoverAgent `
155
+
-ResourceGroupName resourceGroupName `
156
+
-StorageMoverName storageMoverName `
157
+
-AgentName registeredAgentName `
158
+
-UploadLimitScheduleWeeklyRecurrence [] # Supply an empty array to remove all previously configured limits. This operation cannot be undone. You have to build and supply a new schedule if you want to enable bandwidth limitations for this agent again.
144
159
```
145
160
161
+
#### Change an existing bandwidth limitation
162
+
You can combine the previously described management actions to selectively update an existing bandwidth limitation to a new limit or updated time span.
163
+
164
+
```powershell
165
+
# Step 1: define the new limit object you want to use to replace an existing limit:
-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.
172
+
173
+
# Step 2: Find the bandwidth limitation window you wan to change:
$schedule[<n>] = $limit # Replace the limit (start count at zero) with your newly defined limit.
177
+
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
+
Update-AzStorageMoverAgent `
181
+
-ResourceGroupName $resourceGroupName `
182
+
-StorageMoverName $storageMoverName `
183
+
-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 try and append the new schedule. Ensure there are no overlapping time spans, otherwise the operation will fail.
192
+
```
193
+
## Understanding the JSON schema of the bandwidth limit schedule
194
+
The bandwidth limit schedule is stored as a JSON construct in the property `UploadLimitScheduleWeeklyRecurrence` of a registered agent.
195
+
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.
197
+
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.
198
+
199
+
> [!IMPORTANT]
200
+
> 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.
201
+
202
+
The following two representations of a bandwidth limit schedule are equivalent:
203
+
:::image type="content" source="media/bandwidth-management/bandwidth-limit-json-small.png" alt-text="Azure portal dialog showing a calendar, similar to Outlook, with scheduled bandwidth limitation windows." lightbox="media/bandwidth-management/bandwidth-limit-json.png":::
204
+
205
+
```json
206
+
{
207
+
{
208
+
"startTime":
209
+
{
210
+
"hour": 7,
211
+
"minute": 0
212
+
},
213
+
"endTime":
214
+
{
215
+
"hour": 9,
216
+
"minute": 0
217
+
}
218
+
"days": ["Monday"],
219
+
"limitInMbps": 500
220
+
},
221
+
{
222
+
"startTime":
223
+
{
224
+
"hour": 9,
225
+
"minute": 0
226
+
},
227
+
"endTime":
228
+
{
229
+
"hour": 12,
230
+
"minute": 0
231
+
}
232
+
"days": ["Monday", "Tuesday", "Wednesday"],
233
+
"limitInMbps": 200
234
+
}
235
+
}
236
+
```
237
+
> [!NOTE]
238
+
> Time spans not covered by an entry in the schedule allow the agent to utilize all available bandwidth. During these times, it is likely that and agent doesn't utilize all available bandwidth. You can find more details about that in the performance article, section: "[Why migration performance varies](performance-targets.md#why-migration-performance-varies)".
0 commit comments