{ "swagger": "2.0", "info": { "title": "AzureStackHCI", "description": "The Microsoft.AzureStackHCI Rest API spec.", "version": "2024-01-01" }, "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": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks/{virtualHardDiskName}": { "get": { "operationId": "VirtualHardDisks_Get", "description": "Gets a virtual hard disk", "x-ms-examples": { "GetVirtualHardDisk": { "$ref": "./examples/GetVirtualHardDisk.json" } }, "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/VirtualHardDiskNameParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } }, "200": { "description": "OK", "schema": { "$ref": "#/definitions/VirtualHardDisks" } } } }, "put": { "operationId": "VirtualHardDisks_CreateOrUpdate", "description": "The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual hard disk creation.", "x-ms-examples": { "PutVirtualHardDisk": { "$ref": "./examples/PutVirtualHardDisk.json" } }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/VirtualHardDiskNameParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "virtualHardDisks", "in": "body", "required": true, "schema": { "$ref": "#/definitions/VirtualHardDisks" } } ], "responses": { "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } }, "200": { "description": "Updated", "schema": { "$ref": "#/definitions/VirtualHardDisks" } }, "201": { "description": "Created", "schema": { "$ref": "#/definitions/VirtualHardDisks" } } } }, "delete": { "operationId": "VirtualHardDisks_Delete", "description": "The operation to delete a virtual hard disk.", "x-ms-examples": { "DeleteVirtualHardDisk": { "$ref": "./examples/DeleteVirtualHardDisk.json" } }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/VirtualHardDiskNameParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } }, "202": { "description": "Accepted", "headers": { "Location": { "type": "string" } } }, "204": { "description": "No content" } } }, "patch": { "operationId": "VirtualHardDisks_Update", "description": "The operation to update a virtual hard disk.", "x-ms-examples": { "UpdateVirtualHardDisk": { "$ref": "./examples/UpdateVirtualHardDisk.json" } }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/VirtualHardDiskNameParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "virtualHardDisks", "in": "body", "required": true, "schema": { "$ref": "#/definitions/VirtualHardDisksUpdateRequest" } } ], "responses": { "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } }, "200": { "description": "OK", "schema": { "$ref": "#/definitions/VirtualHardDisks" } }, "202": { "description": "Accepted", "headers": { "Location": { "type": "string" } } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks": { "get": { "operationId": "VirtualHardDisks_List", "description": "Lists all of the virtual hard disks in the specified resource group. Use the nextLink property in the response to get the next page of virtual hard disks.", "x-ms-examples": { "ListVirtualHardDiskByResourceGroup": { "$ref": "./examples/ListVirtualHardDiskByResourceGroup.json" } }, "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } }, "200": { "description": "OK", "schema": { "$ref": "#/definitions/VirtualHardDisksListResult" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/virtualHardDisks": { "get": { "operationId": "VirtualHardDisks_ListAll", "description": "Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the response to get the next page of virtual hard disks.", "x-ms-examples": { "ListVirtualHardDiskBySubscription": { "$ref": "./examples/ListVirtualHardDiskBySubscription.json" } }, "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } }, "200": { "description": "OK", "schema": { "$ref": "#/definitions/VirtualHardDisksListResult" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } } }, "definitions": { "VirtualHardDiskProperties": { "type": "object", "properties": { "blockSizeBytes": { "type": "integer", "format": "int32" }, "diskSizeGB": { "type": "integer", "format": "int64", "description": "Size of the disk in GB" }, "dynamic": { "type": "boolean", "description": "Boolean for enabling dynamic sizing on the virtual hard disk" }, "logicalSectorBytes": { "type": "integer", "format": "int32" }, "physicalSectorBytes": { "type": "integer", "format": "int32" }, "hyperVGeneration": { "type": "string", "description": "The hypervisor generation of the Virtual Machine [V1, V2]", "enum": [ "V1", "V2" ], "x-ms-enum": { "name": "HyperVGeneration", "modelAsString": true } }, "diskFileFormat": { "type": "string", "description": "The format of the actual VHD file [vhd, vhdx]", "enum": [ "vhdx", "vhd" ], "x-ms-enum": { "name": "DiskFileFormat", "modelAsString": true } }, "provisioningState": { "type": "string", "description": "Provisioning state of the virtual hard disk.", "readOnly": true, "enum": [ "Succeeded", "Failed", "InProgress", "Accepted", "Deleting", "Canceled" ], "x-ms-enum": { "name": "ProvisioningStateEnum", "modelAsString": true } }, "containerId": { "type": "string", "format": "arm-id", "x-ms-arm-id-details": { "allowedResources": [ { "type": "Microsoft.AzureStackHCI/storageContainers" } ] }, "description": "Storage ContainerID of the storage container to be used for VHD" }, "status": { "$ref": "#/definitions/VirtualHardDiskStatus" } }, "description": "Properties under the virtual hard disk resource" }, "VirtualHardDiskStatus": { "type": "object", "x-ms-client-flatten": true, "readOnly": true, "properties": { "errorCode": { "type": "string", "description": "VirtualHardDisk provisioning error code" }, "errorMessage": { "type": "string", "description": "Descriptive error message" }, "provisioningStatus": { "type": "object", "properties": { "operationId": { "type": "string", "description": "The ID of the operation performed on the virtual hard disk" }, "status": { "type": "string", "description": "The status of the operation performed on the virtual hard disk [Succeeded, Failed, InProgress]", "enum": [ "Succeeded", "Failed", "InProgress" ], "x-ms-enum": { "name": "Status", "modelAsString": true } } } } }, "description": "The observed state of virtual hard disks" }, "VirtualHardDisks": { "type": "object", "description": "The virtual hard disk resource definition.", "x-ms-azure-resource": true, "x-ms-client-flatten": true, "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/VirtualHardDiskProperties" }, "extendedLocation": { "$ref": "./common.json#/definitions/ExtendedLocation", "description": "The extendedLocation of the resource." } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" } ] }, "VirtualHardDisksUpdateRequest": { "type": "object", "properties": { "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Resource tags" } }, "description": "The virtual hard disk resource patch definition." }, "VirtualHardDisksListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/VirtualHardDisks" } }, "nextLink": { "type": "string" } } } }, "parameters": { "VirtualHardDiskNameParameter": { "name": "virtualHardDiskName", "in": "path", "required": true, "type": "string", "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,62}[a-zA-Z0-9]$", "x-ms-parameter-location": "method", "maxLength": 80, "minLength": 1, "description": "Name of the virtual hard disk" } } }