Skip to content

Commit

Permalink
Feature/cplat 2021 04 01 - Capacity Reservation related changes (#15058)
Browse files Browse the repository at this point in the history
* updated code

* updated swagger with cr changes

* updated swagger with cr changes

* updated swagger with cr changes

* updated swagger

* updated swagger

* updated swagger
  • Loading branch information
hari-bodicherla authored Jul 6, 2021
1 parent 21ee3aa commit f287f96
Show file tree
Hide file tree
Showing 12 changed files with 1,580 additions and 34 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"api-version": "2021-04-01",
"parameters": {
"location": "westus",
"tags": {
"department": "HR"
},
"sku": {
"name": "Standard_DS1_v2",
"capacity": 4
},
"zones": [
"1"
]
},
"capacityReservationGroupName": "myCapacityReservationGroup",
"capacityReservationName": "myCapacityReservation"
},
"responses": {
"201": {
"body": {
"name": "myCapacityReservation",
"location": "westus",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation",
"tags": {
"department": "HR"
},
"sku": {
"name": "Standard_DS1_v2",
"capacity": 4
},
"zones": [
"1"
],
"properties": {
"reservationId": "{GUID}",
"provisioningState": "Creating",
"provisioningTime": "2021-06-27T01:02:38.3138469+00:00"
}
}
},
"200": {
"body": {
"name": "myCapacityReservation",
"location": "westus",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation",
"tags": {
"department": "HR"
},
"sku": {
"name": "Standard_DS1_v2",
"capacity": 4
},
"zones": [
"1"
],
"properties": {
"reservationId": "{GUID}",
"provisioningState": "Creating",
"provisioningTime": "2021-06-27T01:02:38.3138469+00:00"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"api-version": "2021-04-01",
"capacityReservationGroupName": "myCapacityReservationGroup",
"parameters": {
"location": "westus",
"tags": {
"department": "finance"
},
"zones": [
"1",
"2"
]
}
},
"responses": {
"201": {
"body": {
"name": "myCapacityReservationGroup",
"location": "westus",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/myCapacityReservationGroup",
"tags": {
"department": "finance"
},
"zones": [
"1",
"2"
]
}
},
"200": {
"body": {
"location": "westus",
"tags": {
"department": "finance",
"owner": "myCompany"
},
"name": "myCapacityReservationGroup",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/myCapacityReservationGroup",
"zones": [
"1",
"2"
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"vmName": "myVM",
"api-version": "2021-04-01",
"parameters": {
"location": "westus",
"plan": {
"publisher": "microsoft-ads",
"product": "windows-data-science-vm",
"name": "windows2016"
},
"properties": {
"hardwareProfile": {
"vmSize": "Standard_DS1_v2"
},
"storageProfile": {
"imageReference": {
"sku": "windows2016",
"publisher": "microsoft-ads",
"version": "latest",
"offer": "windows-data-science-vm"
},
"osDisk": {
"caching": "ReadOnly",
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"createOption": "FromImage",
"name": "myVMosdisk"
}
},
"capacityReservation": {
"capacityReservationGroup": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}"
}
},
"osProfile": {
"adminUsername": "{your-username}",
"computerName": "myVM",
"adminPassword": "{your-password}"
},
"networkProfile": {
"networkInterfaces": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
"properties": {
"primary": true
}
}
]
}
}
}
},
"responses": {
"200": {
"body": {
"name": "myVM",
"properties": {
"osProfile": {
"adminUsername": "{your-username}",
"secrets": [],
"computerName": "myVM",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true
}
},
"capacityReservation": {
"capacityReservationGroup": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}"
}
},
"networkProfile": {
"networkInterfaces": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
"properties": {
"primary": true
}
}
]
},
"storageProfile": {
"imageReference": {
"sku": "standard-data-science-vm",
"publisher": "microsoft-ads",
"version": "latest",
"offer": "standard-data-science-vm"
},
"osDisk": {
"osType": "Windows",
"caching": "ReadOnly",
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"createOption": "FromImage",
"name": "myVMosdisk"
},
"dataDisks": []
},
"vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
"hardwareProfile": {
"vmSize": "Standard_DS1_v2"
},
"provisioningState": "Creating"
},
"plan": {
"publisher": "microsoft-ads",
"product": "standard-data-science-vm",
"name": "standard-data-science-vm"
},
"type": "Microsoft.Compute/virtualMachines",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
"location": "westus"
}
},
"201": {
"body": {
"name": "myVM",
"properties": {
"osProfile": {
"adminUsername": "{your-username}",
"secrets": [],
"computerName": "myVM",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true
}
},
"capacityReservation": {
"capacityReservationGroup": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}"
}
},
"networkProfile": {
"networkInterfaces": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
"properties": {
"primary": true
}
}
]
},
"storageProfile": {
"imageReference": {
"sku": "standard-data-science-vm",
"publisher": "microsoft-ads",
"version": "latest",
"offer": "standard-data-science-vm"
},
"osDisk": {
"osType": "Windows",
"caching": "ReadOnly",
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"createOption": "FromImage",
"name": "myVMosdisk"
},
"dataDisks": []
},
"vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
"hardwareProfile": {
"vmSize": "Standard_DS1_v2"
},
"provisioningState": "Creating"
},
"plan": {
"publisher": "microsoft-ads",
"product": "standard-data-science-vm",
"name": "standard-data-science-vm"
},
"type": "Microsoft.Compute/virtualMachines",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
"location": "westus"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"vmName": "myVM",
"forceDeletion": "true",
"forceDeletion": true,
"api-version": "2021-04-01"
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"resourceGroupName": "myResourceGroup",
"vmScaleSetName": "myvmScaleSet",
"instanceId": "0",
"forceDeletion": "true",
"forceDeletion": true,
"api-version": "2021-04-01"
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"vmScaleSetName": "myvmScaleSet",
"forceDeletion": "true",
"forceDeletion": true,
"api-version": "2021-04-01"
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"parameters": {
"subscriptionId": "{subscriptionId}",
"resourceGroupName": "myResourceGroup",
"api-version": "2021-04-01",
"capacityReservationGroupName": "myCapacityReservationGroup",
"capacityReservationName": "myCapacityReservation"
},
"responses": {
"200": {
"body": {
"properties": {
"reservationId": "{GUID}",
"provisioningTime": "2021-06-27T01:02:38.3138469+00:00",
"virtualMachinesAssociated": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"
},
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"
},
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"
}
],
"provisioningState": "Succeeded",
"instanceView": {
"utilizationInfo": {
"virtualMachinesAllocated": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"
},
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"
}
]
},
"statuses": [
{
"code": "ProvisioningState/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded"
}
]
}
},
"location": "westus",
"tags": {
"department": "HR"
},
"sku": {
"name": "Standard_DS1_v2",
"capacity": 4
},
"zones": [
"1"
],
"name": "myCapacityReservation"
}
}
}
}
Loading

0 comments on commit f287f96

Please sign in to comment.