Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add swagger for Compute Diagnostic Resource Provider #15837

Merged
merged 1 commit into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
Loading