{ "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/galleryImages/{galleryImageName}": { "get": { "operationId": "GalleryImages_Get", "description": "Gets a gallery image", "x-ms-examples": { "GetGalleryImage": { "$ref": "./examples/GetGalleryImage.json" } }, "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/GalleryImageNameParameter" }, { "$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/GalleryImages" } } } }, "put": { "operationId": "GalleryImages_CreateOrUpdate", "description": "The operation to create or update a gallery image. Please note some properties can be set only during gallery image creation.", "x-ms-examples": { "PutGalleryImage": { "$ref": "./examples/PutGalleryImage.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/GalleryImageNameParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "galleryImages", "in": "body", "required": true, "schema": { "$ref": "#/definitions/GalleryImages" } } ], "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/GalleryImages" } }, "201": { "description": "Created", "schema": { "$ref": "#/definitions/GalleryImages" } } } }, "delete": { "operationId": "GalleryImages_Delete", "description": "The operation to delete a gallery image.", "x-ms-examples": { "DeleteGalleryImage": { "$ref": "./examples/DeleteGalleryImage.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/GalleryImageNameParameter" }, { "$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": "GalleryImages_Update", "description": "The operation to update a gallery image.", "x-ms-examples": { "UpdateGalleryImage": { "$ref": "./examples/UpdateGalleryImage.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/GalleryImageNameParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "galleryImages", "in": "body", "required": true, "schema": { "$ref": "#/definitions/GalleryImagesUpdateRequest" } } ], "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/GalleryImages" } }, "202": { "description": "Accepted", "headers": { "Location": { "type": "string" } } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages": { "get": { "operationId": "GalleryImages_List", "description": "Lists all of the gallery images in the specified resource group. Use the nextLink property in the response to get the next page of gallery images.", "x-ms-examples": { "ListGalleryImageByResourceGroup": { "$ref": "./examples/ListGalleryImageByResourceGroup.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/GalleryImagesListResult" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/galleryImages": { "get": { "operationId": "GalleryImages_ListAll", "description": "Lists all of the gallery images in the specified subscription. Use the nextLink property in the response to get the next page of gallery images.", "x-ms-examples": { "ListGalleryImageBySubscription": { "$ref": "./examples/ListGalleryImageBySubscription.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/GalleryImagesListResult" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } } }, "definitions": { "GalleryImageProperties": { "type": "object", "x-ms-client-flatten": true, "properties": { "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 gallery image" }, "imagePath": { "type": "string", "x-ms-secret": true, "description": "location of the image the gallery image should be created from" }, "osType": { "type": "string", "enum": [ "Windows", "Linux" ], "x-ms-enum": { "name": "OperatingSystemTypes", "modelAsString": false }, "description": "Operating system type that the gallery image uses [Windows, Linux]" }, "cloudInitDataSource": { "type": "string", "description": "Datasource for the gallery image when provisioning with cloud-init [NoCloud, Azure]", "enum": [ "NoCloud", "Azure" ], "x-ms-enum": { "name": "CloudInitDataSource", "modelAsString": true } }, "hyperVGeneration": { "type": "string", "description": "The hypervisor generation of the Virtual Machine [V1, V2]", "enum": [ "V1", "V2" ], "x-ms-enum": { "name": "HyperVGeneration", "modelAsString": true } }, "identifier": { "$ref": "#/definitions/GalleryImageIdentifier" }, "version": { "$ref": "#/definitions/GalleryImageVersion" }, "provisioningState": { "type": "string", "description": "Provisioning state of the gallery image.", "readOnly": true, "enum": [ "Succeeded", "Failed", "InProgress", "Accepted", "Deleting", "Canceled" ], "x-ms-enum": { "name": "ProvisioningStateEnum", "modelAsString": true } }, "status": { "$ref": "#/definitions/GalleryImageStatus" } }, "required": [ "osType" ], "description": "Properties under the gallery image resource" }, "GalleryImageStatus": { "type": "object", "x-ms-client-flatten": true, "readOnly": true, "properties": { "errorCode": { "type": "string", "description": "GalleryImage 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 gallery image" }, "status": { "type": "string", "description": "The status of the operation performed on the gallery image [Succeeded, Failed, InProgress]", "enum": [ "Succeeded", "Failed", "InProgress" ], "x-ms-enum": { "name": "Status", "modelAsString": true } } } }, "downloadStatus": { "type": "object", "properties": { "downloadSizeInMB": { "type": "integer", "format": "int64", "description": "The downloaded sized of the image in MB" } }, "description": "The download status of the gallery image" }, "progressPercentage": { "type": "integer", "format": "int64", "description": "The progress of the operation in percentage" } }, "description": "The observed state of gallery images" }, "GalleryImageIdentifier": { "type": "object", "properties": { "publisher": { "type": "string", "description": "The name of the gallery image definition publisher." }, "offer": { "type": "string", "description": "The name of the gallery image definition offer." }, "sku": { "type": "string", "description": "The name of the gallery image definition SKU." } }, "required": [ "publisher", "offer", "sku" ], "description": "This is the gallery image definition identifier." }, "GalleryImageVersion": { "type": "object", "properties": { "name": { "type": "string", "description": "This is the version of the gallery image." }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/GalleryImageVersionProperties" } }, "description": "Specifies information about the gallery image version that you want to create or update." }, "GalleryImageVersionProperties": { "type": "object", "properties": { "storageProfile": { "$ref": "#/definitions/GalleryImageVersionStorageProfile" } }, "required": [ "storageProfile" ], "description": "Describes the properties of a gallery image version." }, "GalleryImageVersionStorageProfile": { "type": "object", "properties": { "osDiskImage": { "$ref": "#/definitions/GalleryOSDiskImage" } }, "description": "This is the storage profile of a Gallery Image Version." }, "GalleryOSDiskImage": { "allOf": [ { "$ref": "#/definitions/GalleryDiskImage" } ], "description": "This is the OS disk image." }, "GalleryDiskImage": { "type": "object", "properties": { "sizeInMB": { "type": "integer", "format": "int64", "readOnly": true, "description": "This property indicates the size of the VHD to be created." } }, "description": "This is the disk image base class." }, "GalleryImages": { "type": "object", "description": "The gallery images resource definition.", "x-ms-azure-resource": true, "x-ms-client-flatten": true, "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/GalleryImageProperties" }, "extendedLocation": { "$ref": "./common.json#/definitions/ExtendedLocation", "description": "The extendedLocation of the resource." } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" } ] }, "GalleryImagesUpdateRequest": { "type": "object", "properties": { "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Resource tags" } }, "description": "The gallery images resource patch definition." }, "GalleryImagesListResult": { "type": "object", "description": "List of gallery images.", "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/GalleryImages" } }, "nextLink": { "type": "string", "description": "Link to the next set of results.", "readOnly": true } } } }, "parameters": { "GalleryImageNameParameter": { "name": "galleryImageName", "in": "path", "required": true, "type": "string", "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,78}[a-zA-Z0-9]$", "x-ms-parameter-location": "method", "maxLength": 80, "minLength": 1, "description": "Name of the gallery image" } } }