Skip to content

Is there a way to assign reservation to RG? #18156

Answered by gaoyp830
Fiury00 asked this question in Q&A
Discussion options

You must be logged in to vote

@Fiury00 I took a look at the cmdlet implementation of Update-AzReservation, passing in RG ID is currently not supported. To unblock you, I suggest using direct ARM call with the following information:

API call:
PATCH - https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/{ReservationorderId}/reservations/{ReservationId}?api-version=2019-04-01

Request body:
{"properties":{"appliedScopeType":"Single","instanceFlexibility":{instanceFlexibilityValue},"appliedScopes":["/subscriptions/{subId}/resourceGroups/{rgName}"],"name":{ReservationName},"renew":{renew value, true or false}}

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dingmeng-xue
Comment options

Answer selected by dingmeng-xue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Reservations needs-author-feedback More information is needed from author to address the issue.
3 participants