diff --git a/specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/diagnostic.json b/specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/diagnostic.json new file mode 100644 index 000000000000..a5e064fb81eb --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/diagnostic.json @@ -0,0 +1,393 @@ +{ + "swagger": "2.0", + "info": { + "title": "ComputeDiagnosticResourceProviderClient", + "description": "The Compute Diagnostic Resource Provider Client", + "version": "2021-06-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": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnosticOperations/{operationId}": { + "get": { + "tags": [ + "diagnosticOperations" + ], + "operationId": "DiagnosticOperations_Read", + "description": "Gets status of a Diagnostic operation issued for Disk Inspection.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/LocationParameter" + }, + { + "in": "path", + "name": "operationId", + "required": true, + "type": "string", + "description": "The identifier pointing to a request for Disk Inspection. This is used for polling result of the request." + } + ], + "responses": { + "200": { + "description": "Success" + }, + "202": { + "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets the status of a scheduled disk inspection request.": { + "$ref": "./examples/GetDiagnosticOperation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/diskInspection/run": { + "post": { + "tags": [ + "diagnostics" + ], + "operationId": "DiskInspection_Create", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "description": "Creates a request for executing disk Inspection.", + "consumes": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/LocationParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "runDiskInspectionInput", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RunDiskInspectionInput" + }, + "description": "RunDiskInspection object supplied in the body of the Post run disk inspection operation." + } + ], + "responses": { + "202": { + "description": "Accepted", + "schema": { + "type": "string" + } + }, + "default": { + "description": "Error response describing why the diagnostic run failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Create a request for disk inspection.": { + "$ref": "./examples/RunDiskInspection.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics": { + "get": { + "tags": [ + "diagnostics" + ], + "operationId": "Diagnostics_List", + "description": "Lists all available Compute diagnostics for a subscription in a location.", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/LocationParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ComputeDiagnosticsList" + } + }, + "default": { + "description": "Error response describing why the listing call failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets the status of a scheduled disk inspection request.": { + "$ref": "./examples/GetDiagnostics.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/diskInspection": { + "get": { + "tags": [ + "diagnostics_DiskInspection" + ], + "operationId": "DiskInspection_Get", + "description": "Gets a specific Compute diagnostic for a subscription in a location.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/LocationParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ComputeDiagnosticBase" + } + }, + "default": { + "description": "Error response describing why the get call failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets the status of a scheduled disk inspection request.": { + "$ref": "./examples/GetDiskInspection.json" + } + } + } + } + }, + "definitions": { + "ComputeDiagnosticsList": { + "description": "Lists all available Compute diagnostics for a subscription in a location.", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ComputeDiagnosticBase" + }, + "description": "The collection of available Compute diagnostics returned by the listing operation." + }, + "nextLink": { + "type": "string", + "description": "The continuation token." + } + } + }, + "ComputeDiagnosticBase": { + "description": "Contains metadata of a diagnostic type", + "type": "object", + "properties": { + "id": { + "description": "Identifier for the type of diagnostic", + "type": "string" + }, + "name": { + "description": "Friendly name for the type of diagnostic", + "type": "string" + }, + "type": { + "description": "Type of the diagnostic", + "type": "string" + }, + "properties": { + "$ref": "#/definitions/DiagnosticProperties" + } + } + }, + "DiagnosticProperties": { + "description": "Contains additional properties of a diagnostic", + "type": "object", + "properties": { + "supportedResourceTypes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Describes what are the supported resource types for a diagnostic." + } + } + }, + "RunDiskInspectionInput": { + "type": "object", + "properties": { + "resourceId": { + "description": "Qualified name of the resource.", + "type": "string" + }, + "manifest": { + "description": "Name of manifest in order to trigger Disk Inspection.", + "type": "string" + }, + "uploadSasUri": { + "description": "SAS uri to the blob where results will be uploaded.", + "type": "string", + "x-ms-secret": true + } + }, + "required": [ + "resourceId", + "manifest", + "uploadSasUri" + ], + "description": "Data used for requesting a Disk Inspection execution." + }, + "RunDiskInspectionAsyncOperationResult": { + "type": "object", + "properties": { + "result": { + "type": "string" + }, + "resultStatus": { + "type": "string", + "enum": [ + "Success", + "Failed" + ], + "x-ms-enum": { + "name": "resultStatus", + "modelAsString": true + } + }, + "errorDetail": { + "$ref": "#/definitions/ErrorDetail" + }, + "createdUTC": { + "type": "string", + "format": "date-time", + "description": "The time when the disk inspection was completed." + } + }, + "description": "Api output result when disk inspection result is completed." + }, + "ErrorResponse": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/ErrorDetail" + } + }, + "description": "An error response from the Compute Diagnostic Resource Provider service." + }, + "ErrorDetail": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code." + }, + "target": { + "type": "string", + "description": "The target of the particular error." + }, + "message": { + "type": "string", + "description": "User friendly error message." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDetail" + }, + "description": "The Api error details" + }, + "innerError": { + "$ref": "#/definitions/InnerError", + "description": "The Api inner error" + } + }, + "description": "Error Detail message." + }, + "InnerError": { + "type": "object", + "properties": { + "exceptiontype": { + "type": "string", + "description": "The exception type." + }, + "errordetail": { + "type": "string", + "description": "The internal error message or exception dump." + } + }, + "description": "Inner error details." + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." + }, + "LocationParameter": { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "description": "The location used to execute the diagnostic operation.", + "pattern": "^[-\\w\\._]+$", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/examples/GetDiagnosticOperation.json b/specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/examples/GetDiagnosticOperation.json new file mode 100644 index 000000000000..be4a33d7b32d --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/examples/GetDiagnosticOperation.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "location": "eastus", + "operationId": "{operation-id}" + }, + "responses": { + "200": { + "headers": { + "x-ms-request-id": "57b891ab-1fb7-4f5a-b002-71eb6854961f", + "location": "https://westcentralus.diagnostic.compute.azure.com/subscriptions/88fd8cb2-8248-499e-9a2d-4929a4b0133c/providers/Microsoft.Compute/locations/southcentralus/diagnosticOperations/57b891ab-1fb7-4f5a-b002-71eb6854961f" + } + }, + "202": { + "headers": { + "Retry-After": "120000", + "x-ms-request-id": "57b891ab-1fb7-4f5a-b002-71eb6854961f", + "location": "https://westcentralus.diagnostic.compute.azure.com/subscriptions/88fd8cb2-8248-499e-9a2d-4929a4b0133c/providers/Microsoft.Compute/locations/southcentralus/diagnosticOperations/57b891ab-1fb7-4f5a-b002-71eb6854961f" + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/examples/GetDiagnostics.json b/specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/examples/GetDiagnostics.json new file mode 100644 index 000000000000..c2ac1302f40c --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/examples/GetDiagnostics.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "location": "eastus" + }, + "responses": { + "200": { + "headers": { + "x-ms-request-id": "27b7c568-16ec-46f3-bcf1-5bea3f2529b1" + }, + "body": { + "value": [ + { + "id": "diskInspection", + "name": "Disk Inspection", + "type": "Microsoft.Compute/locations/diagnostics", + "properties": { + "supportedResourceTypes": [ + "Microsoft.Compute/virtualMachines" + ] + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/examples/GetDiskInspection.json b/specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/examples/GetDiskInspection.json new file mode 100644 index 000000000000..9a7336df7e3a --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/examples/GetDiskInspection.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "location": "eastus" + }, + "responses": { + "200": { + "headers": { + "x-ms-request-id": "27b7c568-16ec-46f3-bcf1-5bea3f2529b1" + }, + "body": { + "id": "diskInspection", + "name": "Disk Inspection", + "type": "Microsoft.Compute/locations/diagnostics", + "properties": { + "supportedResourceTypes": [ + "Microsoft.Compute/virtualMachines" + ] + } + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/examples/RunDiskInspection.json b/specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/examples/RunDiskInspection.json new file mode 100644 index 000000000000..f0c02ad07f72 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/examples/RunDiskInspection.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "location": "eastus", + "api-version": "2021-06-01", + "runDiskInspectionInput": { + "resourceId": "/subscriptions/88fd8cb2-8248-499e-9a2d-4929a4b0133c/resourceGroups/cladtest1/providers/Microsoft.Compute/virtualMachines/adVM", + "manifest": "diagnostic", + "uploadSasUri": "testSasUri" + } + }, + "responses": { + "202": { + "body": "DiskInspection Operation with operation-id '57b891ab-1fb7-4f5a-b002-71eb6854961f' has been successfully queued.", + "headers": { + "x-ms-request-id": "57b891ab-1fb7-4f5a-b002-71eb6854961f", + "location": "https://westcentralus.diagnostic.compute.azure.com/subscriptions/88fd8cb2-8248-499e-9a2d-4929a4b0133c/providers/Microsoft.Compute/locations/southcentralus/diagnosticOperations/57b891ab-1fb7-4f5a-b002-71eb6854961f" + } + } + } +} diff --git a/specification/compute/resource-manager/readme.md b/specification/compute/resource-manager/readme.md index bbe8c38a2630..9054d216ab4e 100644 --- a/specification/compute/resource-manager/readme.md +++ b/specification/compute/resource-manager/readme.md @@ -258,6 +258,31 @@ input-file: - Microsoft.Compute/stable/2021-07-01/sharedGallery.json ``` +### Tag: package-2021-06-01-preview + +These settings apply only when `--tag=2021-06-01-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2021-06-01-preview' +input-file: +- Microsoft.Compute/stable/2021-03-01/compute.json +- Microsoft.Compute/stable/2021-03-01/runCommands.json +- Microsoft.Compute/stable/2019-04-01/skus.json +- Microsoft.Compute/stable/2020-12-01/disk.json +- Microsoft.Compute/stable/2020-09-30/gallery.json +- Microsoft.Compute/stable/2020-09-30/sharedGallery.json +- Microsoft.Compute/stable/2021-03-01/cloudService.json +- Microsoft.Compute/preview/2021-06-01-preview/diagnostic.json +``` + +### Tag: package-2021-06-01-preview-only + +These settings apply only when `--tag=package-2021-06-01-preview-only` is specified on the command line. + +``` yaml $(tag) == 'package-2021-06-01-preview-only' +input-file: +- Microsoft.Compute/preview/2021-06-01-preview/diagnostic.json +``` + ### Tag: package-2021-04-01 These settings apply only when `--tag=package-2021-04-01` is specified on the command line.