|
| 1 | +{ |
| 2 | + "swagger": "2.0", |
| 3 | + "info": { |
| 4 | + "version": "2023-06-07", |
| 5 | + "title": "LabServicesClient", |
| 6 | + "description": "REST API for managing Azure Lab Services images." |
| 7 | + }, |
| 8 | + "host": "management.azure.com", |
| 9 | + "schemes": [ |
| 10 | + "https" |
| 11 | + ], |
| 12 | + "consumes": [ |
| 13 | + "application/json" |
| 14 | + ], |
| 15 | + "produces": [ |
| 16 | + "application/json" |
| 17 | + ], |
| 18 | + "securityDefinitions": { |
| 19 | + "azure_auth": { |
| 20 | + "type": "oauth2", |
| 21 | + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", |
| 22 | + "flow": "implicit", |
| 23 | + "description": "Azure Active Directory OAuth2 Flow", |
| 24 | + "scopes": { |
| 25 | + "user_impersonation": "impersonate your user account" |
| 26 | + } |
| 27 | + } |
| 28 | + }, |
| 29 | + "paths": { |
| 30 | + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images": { |
| 31 | + "parameters": [ |
| 32 | + { |
| 33 | + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" |
| 34 | + }, |
| 35 | + { |
| 36 | + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" |
| 37 | + }, |
| 38 | + { |
| 39 | + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" |
| 40 | + }, |
| 41 | + { |
| 42 | + "$ref": "LabPlans.json#/parameters/LabPlanNameParameter" |
| 43 | + }, |
| 44 | + { |
| 45 | + "in": "query", |
| 46 | + "name": "$filter", |
| 47 | + "type": "string", |
| 48 | + "description": "The filter to apply to the operation." |
| 49 | + } |
| 50 | + ], |
| 51 | + "get": { |
| 52 | + "tags": [ |
| 53 | + "Image" |
| 54 | + ], |
| 55 | + "summary": "Gets all images.", |
| 56 | + "description": "Gets all images from galleries attached to a lab plan.", |
| 57 | + "operationId": "Images_ListByLabPlan", |
| 58 | + "responses": { |
| 59 | + "200": { |
| 60 | + "description": "The request was successful; a list of images is returned", |
| 61 | + "schema": { |
| 62 | + "$ref": "#/definitions/PagedImages" |
| 63 | + } |
| 64 | + }, |
| 65 | + "default": { |
| 66 | + "description": "The default error response.", |
| 67 | + "schema": { |
| 68 | + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" |
| 69 | + } |
| 70 | + } |
| 71 | + }, |
| 72 | + "x-ms-pageable": { |
| 73 | + "nextLinkName": "nextLink" |
| 74 | + }, |
| 75 | + "x-ms-examples": { |
| 76 | + "listImages": { |
| 77 | + "$ref": "./examples/Images/listImages.json" |
| 78 | + } |
| 79 | + } |
| 80 | + } |
| 81 | + }, |
| 82 | + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images/{imageName}": { |
| 83 | + "parameters": [ |
| 84 | + { |
| 85 | + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" |
| 86 | + }, |
| 87 | + { |
| 88 | + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" |
| 89 | + }, |
| 90 | + { |
| 91 | + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" |
| 92 | + }, |
| 93 | + { |
| 94 | + "$ref": "LabPlans.json#/parameters/LabPlanNameParameter" |
| 95 | + }, |
| 96 | + { |
| 97 | + "$ref": "#/parameters/ImageNameParameter" |
| 98 | + } |
| 99 | + ], |
| 100 | + "get": { |
| 101 | + "tags": [ |
| 102 | + "Image" |
| 103 | + ], |
| 104 | + "summary": "Gets an image.", |
| 105 | + "description": "Gets an image resource.", |
| 106 | + "operationId": "Images_Get", |
| 107 | + "responses": { |
| 108 | + "200": { |
| 109 | + "description": "The request was successful; the image is returned", |
| 110 | + "schema": { |
| 111 | + "$ref": "#/definitions/Image" |
| 112 | + } |
| 113 | + }, |
| 114 | + "default": { |
| 115 | + "description": "The default error response.", |
| 116 | + "schema": { |
| 117 | + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" |
| 118 | + } |
| 119 | + } |
| 120 | + }, |
| 121 | + "x-ms-examples": { |
| 122 | + "getImage": { |
| 123 | + "$ref": "./examples/Images/getImage.json" |
| 124 | + } |
| 125 | + } |
| 126 | + }, |
| 127 | + "put": { |
| 128 | + "tags": [ |
| 129 | + "Image" |
| 130 | + ], |
| 131 | + "summary": "Updates an image via PUT.", |
| 132 | + "description": "Updates an image resource via PUT. Creating new resources via PUT will not function.", |
| 133 | + "operationId": "Images_CreateOrUpdate", |
| 134 | + "parameters": [ |
| 135 | + { |
| 136 | + "in": "body", |
| 137 | + "name": "body", |
| 138 | + "description": "The request body.", |
| 139 | + "required": true, |
| 140 | + "schema": { |
| 141 | + "$ref": "#/definitions/Image" |
| 142 | + } |
| 143 | + } |
| 144 | + ], |
| 145 | + "responses": { |
| 146 | + "200": { |
| 147 | + "description": "The request was successful; the image is returned", |
| 148 | + "schema": { |
| 149 | + "$ref": "#/definitions/Image" |
| 150 | + } |
| 151 | + }, |
| 152 | + "default": { |
| 153 | + "description": "The default error response.", |
| 154 | + "schema": { |
| 155 | + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" |
| 156 | + } |
| 157 | + } |
| 158 | + }, |
| 159 | + "x-ms-examples": { |
| 160 | + "putImage": { |
| 161 | + "$ref": "./examples/Images/putImage.json" |
| 162 | + } |
| 163 | + } |
| 164 | + }, |
| 165 | + "patch": { |
| 166 | + "tags": [ |
| 167 | + "Image" |
| 168 | + ], |
| 169 | + "summary": "Updates an image.", |
| 170 | + "description": "Updates an image resource.", |
| 171 | + "consumes": [ |
| 172 | + "application/json" |
| 173 | + ], |
| 174 | + "operationId": "Images_Update", |
| 175 | + "parameters": [ |
| 176 | + { |
| 177 | + "in": "body", |
| 178 | + "name": "body", |
| 179 | + "description": "The request body.", |
| 180 | + "required": true, |
| 181 | + "schema": { |
| 182 | + "$ref": "#/definitions/ImageUpdate" |
| 183 | + } |
| 184 | + } |
| 185 | + ], |
| 186 | + "responses": { |
| 187 | + "200": { |
| 188 | + "description": "The request was successful; the image is returned", |
| 189 | + "schema": { |
| 190 | + "$ref": "#/definitions/Image" |
| 191 | + } |
| 192 | + }, |
| 193 | + "default": { |
| 194 | + "description": "The default error response.", |
| 195 | + "schema": { |
| 196 | + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" |
| 197 | + } |
| 198 | + } |
| 199 | + }, |
| 200 | + "x-ms-examples": { |
| 201 | + "patchImage": { |
| 202 | + "$ref": "./examples/Images/patchImage.json" |
| 203 | + } |
| 204 | + } |
| 205 | + } |
| 206 | + } |
| 207 | + }, |
| 208 | + "definitions": { |
| 209 | + "Image": { |
| 210 | + "description": "Lab services virtual machine image", |
| 211 | + "type": "object", |
| 212 | + "allOf": [ |
| 213 | + { |
| 214 | + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" |
| 215 | + } |
| 216 | + ], |
| 217 | + "properties": { |
| 218 | + "systemData": { |
| 219 | + "description": "Metadata pertaining to creation and last modification of the image.", |
| 220 | + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", |
| 221 | + "readOnly": true |
| 222 | + }, |
| 223 | + "properties": { |
| 224 | + "description": "Image resource properties", |
| 225 | + "$ref": "#/definitions/ImageProperties", |
| 226 | + "x-ms-client-flatten": true |
| 227 | + } |
| 228 | + }, |
| 229 | + "required": [ |
| 230 | + "properties" |
| 231 | + ] |
| 232 | + }, |
| 233 | + "PagedImages": { |
| 234 | + "description": "Paged list of Lab services virtual machine images.", |
| 235 | + "type": "object", |
| 236 | + "properties": { |
| 237 | + "value": { |
| 238 | + "description": "The array page of virtual machine images.", |
| 239 | + "type": "array", |
| 240 | + "items": { |
| 241 | + "$ref": "#/definitions/Image" |
| 242 | + }, |
| 243 | + "readOnly": true |
| 244 | + }, |
| 245 | + "nextLink": { |
| 246 | + "description": "The link to get the next page of image results.", |
| 247 | + "type": "string", |
| 248 | + "readOnly": true |
| 249 | + } |
| 250 | + } |
| 251 | + }, |
| 252 | + "ImageUpdate": { |
| 253 | + "description": "Lab services virtual machine image for updates.", |
| 254 | + "type": "object", |
| 255 | + "properties": { |
| 256 | + "properties": { |
| 257 | + "description": "Image resource properties", |
| 258 | + "$ref": "#/definitions/ImageUpdateProperties", |
| 259 | + "x-ms-client-flatten": true |
| 260 | + } |
| 261 | + } |
| 262 | + }, |
| 263 | + "ImageUpdateProperties": { |
| 264 | + "description": "Properties of an image resource update", |
| 265 | + "type": "object", |
| 266 | + "properties": { |
| 267 | + "enabledState": { |
| 268 | + "description": "Is the image enabled", |
| 269 | + "default": "Disabled", |
| 270 | + "$ref": "LabServices.json#/definitions/enableState" |
| 271 | + } |
| 272 | + } |
| 273 | + }, |
| 274 | + "ImageProperties": { |
| 275 | + "description": "Properties of an image resource.", |
| 276 | + "type": "object", |
| 277 | + "allOf": [ |
| 278 | + { |
| 279 | + "$ref": "#/definitions/ImageUpdateProperties" |
| 280 | + } |
| 281 | + ], |
| 282 | + "properties": { |
| 283 | + "provisioningState": { |
| 284 | + "description": "Current provisioning state of the image.", |
| 285 | + "$ref": "LabServices.json#/definitions/provisioningState", |
| 286 | + "readOnly": true |
| 287 | + }, |
| 288 | + "displayName": { |
| 289 | + "description": "The image display name.", |
| 290 | + "type": "string", |
| 291 | + "readOnly": true |
| 292 | + }, |
| 293 | + "description": { |
| 294 | + "description": "A description of the image.", |
| 295 | + "type": "string", |
| 296 | + "readOnly": true |
| 297 | + }, |
| 298 | + "iconUrl": { |
| 299 | + "description": "URL of the image icon.", |
| 300 | + "type": "string", |
| 301 | + "readOnly": true |
| 302 | + }, |
| 303 | + "author": { |
| 304 | + "description": "The image author.", |
| 305 | + "type": "string", |
| 306 | + "readOnly": true |
| 307 | + }, |
| 308 | + "osType": { |
| 309 | + "description": "The OS Type of the image.", |
| 310 | + "$ref": "LabServices.json#/definitions/osType", |
| 311 | + "readOnly": true |
| 312 | + }, |
| 313 | + "plan": { |
| 314 | + "description": "The ID of marketplace plan associated with the image (optional).", |
| 315 | + "type": "string", |
| 316 | + "readOnly": true |
| 317 | + }, |
| 318 | + "termsStatus": { |
| 319 | + "description": "The status of image terms of use (enabled = accepted, disabled = not accepted).", |
| 320 | + "$ref": "LabServices.json#/definitions/enableState", |
| 321 | + "readOnly": true |
| 322 | + }, |
| 323 | + "offer": { |
| 324 | + "description": "The ID of an offer associated with the image.", |
| 325 | + "type": "string", |
| 326 | + "readOnly": true |
| 327 | + }, |
| 328 | + "publisher": { |
| 329 | + "description": "The ID of the publisher of the image.", |
| 330 | + "type": "string", |
| 331 | + "readOnly": true |
| 332 | + }, |
| 333 | + "sku": { |
| 334 | + "description": "The image SKU.", |
| 335 | + "type": "string", |
| 336 | + "readOnly": true |
| 337 | + }, |
| 338 | + "version": { |
| 339 | + "description": "The image version.", |
| 340 | + "type": "string", |
| 341 | + "readOnly": true |
| 342 | + }, |
| 343 | + "sharedGalleryId": { |
| 344 | + "description": "The ID for the image in the shared gallery.", |
| 345 | + "$ref": "LabServices.json#/definitions/url", |
| 346 | + "readOnly": true |
| 347 | + }, |
| 348 | + "availableRegions": { |
| 349 | + "description": "The available regions of the image in the shared gallery.", |
| 350 | + "type": "array", |
| 351 | + "items": { |
| 352 | + "type": "string" |
| 353 | + } |
| 354 | + }, |
| 355 | + "osState": { |
| 356 | + "description": "The OS State of the image.", |
| 357 | + "$ref": "LabServices.json#/definitions/osState", |
| 358 | + "readOnly": true |
| 359 | + } |
| 360 | + }, |
| 361 | + "required": [ |
| 362 | + "enabledState" |
| 363 | + ] |
| 364 | + } |
| 365 | + }, |
| 366 | + "parameters": { |
| 367 | + "ImageNameParameter": { |
| 368 | + "name": "imageName", |
| 369 | + "in": "path", |
| 370 | + "required": true, |
| 371 | + "type": "string", |
| 372 | + "description": "The image name.", |
| 373 | + "pattern": "^[-\\w\\\\._\\\\(\\\\)]+$", |
| 374 | + "minLength": 1, |
| 375 | + "maxLength": 100, |
| 376 | + "x-ms-parameter-location": "method" |
| 377 | + } |
| 378 | + } |
| 379 | +} |
0 commit comments