Skip to content

Commit

Permalink
Publish Microsoft.AzureStackHCI 2021-07-01-preview (Azure#18152)
Browse files Browse the repository at this point in the history
* Adds base for updating Microsoft.AzureStackHCI from version preview/2021-01-01-preview to version 2021-07-01-preview

* Updates readme

* Updates API version in new specs and examples

* Publishing the 2021-07-01-preview API for self-service VM on HCI

* Fix some linter errors

* Update readme to include 2021-07

* Fix errors and run prettier

* Fix readme.go.md

* Fix SSH description

* Set provisioningState as enum

* Use common-types TrackedResource

* Change vmSize type to enum

* Set adminPassword mutability to [create]

* Set osType as Enum

* Set networkType as enum

* Some changes based on feedback

* Remove storagecontainers

* Add MocVirtualMachineStatus object

* Fix provisioningState enum

* Fix networkinterface id description

* Fix provisioningState in all the resources

* Update description of ipConfigurationReferences.ID

* Add typed status object

* Use common-types v3/types.json objects

* Remove 201 response from update apis

* Add enum PrivateIPAllocationMethod

* Add additional provisioningState enum variants

* Fix typo

* Remove MOC reference from object definitions

* Set provisioningState as read only

* Mark Statuses as readOnly

* Change description of routeTable ID

* Put extended location definition in a common file

* Change description of route.ID

* Fix customLocation enum types

* Remove storageContainers examples

StorageContainer is not published in this version

* Fix swagger lintdiff

* Remove 201 response from update examples

fixes RESPONSE_STATUS_CODE_NOT_IN_SPEC [https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/Semantic-and-Model-Violations-Reference.md\#RESPONSE_STATUS_CODE_NOT_IN_SPEC]

* Fix PrettierCheck on common.json

* Set long running operation options final state to location

* Add operations examples

* Fix model validation errors

* Fix git merge

Co-authored-by: Jocelyn Berrendonner [MSFT] <Jocelynb@microsoft.com>
  • Loading branch information
2 people authored and kayousef committed Dec 21, 2022
1 parent c1ce1d5 commit 31f25cf
Show file tree
Hide file tree
Showing 43 changed files with 4,287 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"swagger": "2.0",
"info": {
"title": "AzureStackHCI",
"description": "The Microsoft.AzureStackHCI Rest API spec",
"version": "2021-07-01-preview"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {},
"definitions": {
"ExtendedLocationType": {
"type": "string",
"description": "The type of extendedLocation.",
"enum": [
"CustomLocation"
],
"x-ms-enum": {
"name": "ExtendedLocationTypes",
"modelAsString": true
}
},
"ExtendedLocation": {
"description": "The complex type of the extended location.",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the extended location."
},
"type": {
"$ref": "#/definitions/ExtendedLocationType",
"description": "The type of the extended location."
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parameters": {
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"resourceGroupName": "test-rg",
"galleryimagesName": "test-gallery-image",
"api-version": "2021-07-01-preview"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parameters": {
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"resourceGroupName": "test-rg",
"networkinterfacesName": "test-nic",
"api-version": "2021-07-01-preview"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parameters": {
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"resourceGroupName": "test-rg",
"virtualharddisksName": "test-vhd",
"api-version": "2021-07-01-preview"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parameters": {
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"resourceGroupName": "test-rg",
"virtualmachinesName": "test-vm",
"api-version": "2021-07-01-preview"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parameters": {
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"resourceGroupName": "test-rg",
"virtualnetworksName": "test-vnet",
"api-version": "2021-07-01-preview"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"parameters": {
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"resourceGroupName": "test-rg",
"galleryimagesName": "test-gallery-image",
"api-version": "2021-07-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryimages/test-gallery-image",
"name": "test-gallery-image",
"type": "Microsoft.AzureStackHCI/galleryimages",
"location": "West US2",
"extendedLocation": {
"name": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
"type": "CustomLocation"
},
"properties": {
"provisioningState": "Accepted",
"imagePath": "C:\\test.vhdx",
"containerName": "Default_Container"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parameters": {
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"resourceGroupName": "test-rg",
"networkinterfacesName": "test-nic",
"api-version": "2021-07-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkinterfaces/test-nic",
"name": "test-vnet",
"type": "Microsoft.AzureStackHCI/networkinterfaces",
"location": "West US2",
"extendedLocation": {
"name": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
"type": "CustomLocation"
},
"properties": {
"provisioningState": "Accepted",
"ipConfigurations": [
{
"name": "ipconfig-sample",
"properties": {
"subnet": {
"id": "external"
}
}
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters": {
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"resourceGroupName": "test-rg",
"virtualharddisksName": "test-vhd",
"api-version": "2021-07-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualharddisks/test-vhd",
"name": "test-vhd",
"type": "Microsoft.AzureStackHCI/virtualharddisks",
"location": "West US2",
"extendedLocation": {
"name": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
"type": "CustomLocation"
},
"properties": {
"diskSizeBytes": 32,
"provisioningState": "Accepted"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"parameters": {
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"resourceGroupName": "test-rg",
"virtualmachinesName": "test-vm",
"api-version": "2021-07-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualmachines/test-vm",
"name": "test-vm",
"type": "Microsoft.AzureStackHCI/virtualmachines",
"location": "West US2",
"extendedLocation": {
"name": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
"type": "CustomLocation"
},
"properties": {
"provisioningState": "Accepted",
"storageProfile": {
"imageReference": {
"name": "test-gallery-image"
}
},
"hardwareProfile": {
"vmSize": "Default"
},
"osProfile": {
"computerName": "luamaster",
"adminUsername": "localadmin"
},
"networkProfile": {
"networkInterfaces": [
{
"id": "test-nic"
}
]
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters": {
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"resourceGroupName": "test-rg",
"virtualnetworksName": "test-vnet",
"api-version": "2021-07-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryimages/test-vnet",
"name": "test-vnet",
"type": "Microsoft.AzureStackHCI/virtualnetworks",
"location": "West US2",
"extendedLocation": {
"name": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
"type": "CustomLocation"
},
"properties": {
"provisioningState": "Accepted",
"networkType": "Transparent"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"parameters": {
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"resourceGroupName": "test-rg",
"api-version": "2021-07-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryimages/test-gallery-image",
"name": "test-gallery-image",
"type": "Microsoft.AzureStackHCI/galleryimages",
"location": "West US2",
"extendedLocation": {
"name": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
"type": "CustomLocation"
},
"properties": {
"provisioningState": "Accepted",
"imagePath": "C:\\test.vhdx",
"containerName": "Default_Container"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"parameters": {
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"api-version": "2021-07-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryimages/test-gallery-image",
"name": "test-gallery-image",
"type": "Microsoft.AzureStackHCI/galleryimages",
"location": "West US2",
"extendedLocation": {
"name": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
"type": "CustomLocation"
},
"properties": {
"provisioningState": "Accepted",
"imagePath": "C:\\test.vhdx",
"containerName": "Default_Container"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"parameters": {
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"resourceGroupName": "test-rg",
"networkinterfacesName": "test-nic",
"api-version": "2021-07-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkinterfaces/test-nic",
"name": "test-vnet",
"type": "Microsoft.AzureStackHCI/networkinterfaces",
"location": "West US2",
"extendedLocation": {
"name": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
"type": "CustomLocation"
},
"properties": {
"provisioningState": "Accepted",
"ipConfigurations": [
{
"name": "ipconfig-sample",
"properties": {
"subnet": {
"id": "external"
}
}
}
]
}
}
]
}
}
}
}
Loading

0 comments on commit 31f25cf

Please sign in to comment.