Skip to content

Commit 5449bd2

Browse files
nreactNaveena Patil
and
Naveena Patil
authored
Adding SharingProfile to CapacityReservationGroup for CrossPartitionCapacityReservationGroup operations (#26378)
* Adding Sharing Profile to CapacityReservationGroup * Updating Sharingprofile property name to avoid confict * Fixed formats * Updating sharingprofile definition * Fixed issues reported from PR checks * Adding doc link * Fixed formatting * Addressed PR comments * Addressing PR comments --------- Co-authored-by: Naveena Patil <[email protected]>
1 parent 86ba737 commit 5449bd2

File tree

3 files changed

+84
-5
lines changed

3 files changed

+84
-5
lines changed

specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2023-09-01/capacityReservation.json

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"CapacityReservationGroups"
4141
],
4242
"operationId": "CapacityReservationGroups_CreateOrUpdate",
43-
"description": "The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags may be modified. Please refer to https://aka.ms/CapacityReservation for more details.",
43+
"description": "The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile may be modified. Please refer to https://aka.ms/CapacityReservation for more details.",
4444
"parameters": [
4545
{
4646
"name": "resourceGroupName",
@@ -103,7 +103,7 @@
103103
"CapacityReservationGroups"
104104
],
105105
"operationId": "CapacityReservationGroups_Update",
106-
"description": "The operation to update a capacity reservation group. When updating a capacity reservation group, only tags may be modified.",
106+
"description": "The operation to update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile may be modified.",
107107
"parameters": [
108108
{
109109
"name": "resourceGroupName",
@@ -730,6 +730,27 @@
730730
],
731731
"readOnly": true,
732732
"description": "List of instance view of the capacity reservations under the capacity reservation group."
733+
},
734+
"sharedSubscriptionIds": {
735+
"type": "array",
736+
"items": {
737+
"$ref": "../../../common-types/v1/common.json#/definitions/SubResourceReadOnly"
738+
},
739+
"x-ms-identifiers": [],
740+
"readOnly": true,
741+
"description": "List of the subscriptions that the capacity reservation group is shared with. **Note:** Minimum api-version: 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more details."
742+
}
743+
}
744+
},
745+
"ResourceSharingProfile": {
746+
"type": "object",
747+
"properties": {
748+
"subscriptionIds": {
749+
"type": "array",
750+
"description": "Specifies an array of Subscription resource Ids that capacity reservation group is shared with. The resource Id should be provided in form: /subscriptions/{subscriptionId}. **Note:** Minimum api-version: 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more details.",
751+
"items": {
752+
"$ref": "../../../common-types/v1/common.json#/definitions/SubResource"
753+
}
733754
}
734755
}
735756
},
@@ -756,6 +777,10 @@
756777
"$ref": "#/definitions/CapacityReservationGroupInstanceView",
757778
"readOnly": true,
758779
"description": "The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group."
780+
},
781+
"sharingProfile": {
782+
"$ref": "#/definitions/ResourceSharingProfile",
783+
"description": "Specifies the settings to enable sharing across subscriptions for the capacity reservation group resource. Pls. keep in mind the capacity reservation group resource generally can be shared across subscriptions belonging to a single azure AAD tenant or cross AAD tenant if there is a trust relationship established between the AAD tenants. **Note:** Minimum api-version: 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more details."
759784
}
760785
},
761786
"description": "capacity reservation group Properties."

specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2023-09-01/examples/capacityReservationExamples/CapacityReservationGroup_CreateOrUpdate.json

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,19 @@
1212
"zones": [
1313
"1",
1414
"2"
15-
]
15+
],
16+
"properties": {
17+
"sharingProfile": {
18+
"subscriptionIds": [
19+
{
20+
"id": "/subscriptions/{subscription-id1}"
21+
},
22+
{
23+
"id": "/subscriptions/{subscription-id2}"
24+
}
25+
]
26+
}
27+
}
1628
}
1729
},
1830
"responses": {
@@ -27,7 +39,19 @@
2739
"zones": [
2840
"1",
2941
"2"
30-
]
42+
],
43+
"properties": {
44+
"sharingProfile": {
45+
"subscriptionIds": [
46+
{
47+
"id": "/subscriptions/{subscription-id1}"
48+
},
49+
{
50+
"id": "/subscriptions/{subscription-id2}"
51+
}
52+
]
53+
}
54+
}
3155
}
3256
},
3357
"200": {
@@ -42,7 +66,19 @@
4266
"zones": [
4367
"1",
4468
"2"
45-
]
69+
],
70+
"properties": {
71+
"sharingProfile": {
72+
"subscriptionIds": [
73+
{
74+
"id": "/subscriptions/{subscription-id1}"
75+
},
76+
{
77+
"id": "/subscriptions/{subscription-id2}"
78+
}
79+
]
80+
}
81+
}
4682
}
4783
}
4884
}

specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2023-09-01/examples/capacityReservationExamples/CapacityReservationGroup_Get.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@
1919
"id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation2"
2020
}
2121
],
22+
"sharingProfile": {
23+
"subscriptionIds": [
24+
{
25+
"id": "/subscriptions/{subscription-id1}"
26+
},
27+
{
28+
"id": "/subscriptions/{subscription-id2}"
29+
}
30+
]
31+
},
2232
"instanceView": {
2333
"capacityReservations": [
2434
{
@@ -63,6 +73,14 @@
6373
}
6474
]
6575
}
76+
],
77+
"sharedSubscriptionIds": [
78+
{
79+
"id": "/subscriptions/{subscription-id1}"
80+
},
81+
{
82+
"id": "/subscriptions/{subscription-id2}"
83+
}
6684
]
6785
}
6886
},

0 commit comments

Comments
 (0)