[Compute] Support Future Capacity Reservations in New-AzCapacityReservation and Get-AzCapacityReservation - #30011
Draft
Haider Agha (haagha) with Copilot wants to merge 3 commits into
Draft
[Compute] Support Future Capacity Reservations in New-AzCapacityReservation and Get-AzCapacityReservation#30011Haider Agha (haagha) with Copilot wants to merge 3 commits into
Haider Agha (haagha) with Copilot wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
…eservation Co-authored-by: haagha <64601174+haagha@users.noreply.github.com>
Co-authored-by: haagha <64601174+haagha@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] WIP Add cmdlet design for future capacity reservations
[Compute] Support Future Capacity Reservations in New-AzCapacityReservation and Get-AzCapacityReservation
Aug 14, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 7 changed files in this pull request and generated no new comments.
Suppressed comments (3)
src/Compute/Compute/ChangeLog.md:23
- The new changelog entry references PR/issue context (Fixes #1570 in the PR description) but the entry itself doesn't include an issue link/reference. Add an explicit issue reference (for example, "Fixed issue [#1570]") to match the changelog header guidance.
* Added `-ScheduleProfileStart` and `-MinimumCommitmentDays` parameters to `New-AzCapacityReservation` to create Future capacity reservations, and surfaced the read-only `ScheduleProfile` (including `ModifiableUntil`) and instance view `ReservationStateInfo` on `Get-AzCapacityReservation` output.
src/Compute/Compute.Test/ScenarioTests/VirtualMachineTests.ps1:5434
- The test formats $start as a string and passes it to a DateTime-typed parameter (-ScheduleProfileStart). This introduces unnecessary culture-dependent parsing. Pass a DateTime to the cmdlet and keep a separate formatted string only for comparing to ScheduleProfile.Start.
$sku = "Standard_DS1_v2";
$start = (Get-Date).AddDays(60).ToString("yyyy-MM-dd");
src/Compute/Compute/help/New-AzCapacityReservation.md:107
- Parameter description refers to "ScheduleProfileStart" without the leading dash, which makes it harder to identify as a parameter name in help. Use the PowerShell parameter name (-ScheduleProfileStart) consistently.
### -MinimumCommitmentDays
The minimum number of days that must pass after the start date before a Future capacity reservation can be updated or deleted once it has been committed.
Can only be used together with ScheduleProfileStart.
Minimum API version: 2026-04-01.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Future Capacity Reservations (private preview) let customers reserve capacity for a future start date. The Compute SDK already exposes
scheduleProfileandinstanceView.reservationStateInfo(API 2026-04-01), but no cmdlet surface existed for them.Changes
New-AzCapacityReservation— new optional parameters:-ScheduleProfileStart <DateTime>: when bound, buildsscheduleProfile.start(serializedyyyy-MM-dd, invariant culture), turning the request into a future reservation.-MinimumCommitmentDays <Int32>: maps toscheduleProfile.minimumCommitmentDays; only sent when explicitly bound so the service applies its own default. Errors if used without-ScheduleProfileStart.PSCapacityReservation— addedScheduleProfile, soGet-AzCapacityReservationsurfacesStart,MinimumCommitmentDays, and read-onlyModifiableUntil.InstanceView.ReservationStateInfo.ReservationStatealready flows through the SDK instance view type.SYNTAXand alphabetically inPARAMETERSofNew-AzCapacityReservation.mdplus a future-reservation example; new example inGet-AzCapacityReservation.mdfor state/modifiable-until.Test-CapacityReservationFutureReservationcovers start-only, start + commitment days, persistence via follow-upGet-*, instance-view reservation state, a non-future reservation asserting the new properties stay null, and the mutually-dependent-parameter error. Wired as a check-in[Fact].## Upcoming Release.Note: NuGet restore against
pkgs.dev.azure.comis blocked in this environment, so the module was not compiled and the scenario test was not recorded here; the scenario script was parse-validated only.Verification Checklist
PSCapacityReservationcorrectly represents the API schema (ScheduleProfile).yyyy-MM-ddserialization of-ScheduleProfileStartmatches CRP expectations (vs. full ISO 8601 date-time).SYNTAXand alphabetically ordered inPARAMETERS; examples cover the new parameters.Get-*..ps1scenario function is wired into the.csfile as a[Fact]check-in test.Microsoft.Compute/FutureCapacityReservation.ChangeLog.mdentry is concise and user-focused under## Upcoming Release.