{ "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" } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/diskInspection/registerStorageConfiguration": { "post": { "tags": [ "registerStorageConfiguration" ], "operationId": "DiskInspectionStorageConfiguration_Register", "x-ms-long-running-operation": false, "description": "Register a storageAccount for a subscription used for DiskInspection", "consumes": [ "application/json" ], "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/LocationParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "name": "storageConfigurationInput", "in": "body", "required": true, "schema": { "$ref": "#/definitions/StorageConfigurationInput" }, "description": "Storage Configuration object supplied in the body of the Post to cache storageAccount for a given subscription." } ], "responses": { "200": { "description": "Succeeded" }, "default": { "description": "Error response describing why the register operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Create a request for registering a storageAccount information.": { "$ref": "./examples/RegisterStorageConfiguration.json" } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/diskInspection/validateStorageConfiguration": { "post": { "tags": [ "validateStorageConfiguration" ], "operationId": "DiskInspectionStorageConfiguration_Validate", "x-ms-long-running-operation": false, "description": "Validate if a storageAccount configuration exists for a subscription used for DiskInspection.", "consumes": [ "application/json" ], "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/LocationParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/StorageConfigurationResponse" } }, "default": { "description": "Error response describing why the get call failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Returns storageAccount value for an existing configuration entry": { "$ref": "./examples/ValidateStorageConfiguration.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." }, "StorageConfigurationInput": { "type": "object", "properties": { "storageAccountId": { "description": "Qualified name of the storage account", "type": "string" } }, "required": [ "storageAccountId" ], "description": "Data used for registering a Storage Account for a Subscription." }, "StorageConfigurationResponse": { "type": "object", "properties": { "storageAccountId": { "type": "string" } }, "description": "Api output result when there is an existing storage configuration entry." }, "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." } } }