diff --git a/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsAvailable.json b/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsAvailable.json new file mode 100644 index 000000000000..fd094011c2b2 --- /dev/null +++ b/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsAvailable.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2023-01-01-preview", + "scope": "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6", + "CheckNameAvailabilityRequest": { + "name": "sampleName", + "type": "Microsoft.Help/diagnostics" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": true + } + } + } +} diff --git a/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsNotAvailable.json b/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsNotAvailable.json new file mode 100644 index 000000000000..52764446e8ac --- /dev/null +++ b/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsNotAvailable.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-01-01-preview", + "scope": "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6", + "CheckNameAvailabilityRequest": { + "name": "sampleName", + "type": "Microsoft.Help/diagnostics" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": false, + "reason": "Name is already in use", + "message": "Name not available" + } + } + } +} diff --git a/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CreateDiagnosticForKeyVaultResource.json b/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CreateDiagnosticForKeyVaultResource.json new file mode 100644 index 000000000000..f10d3a361a45 --- /dev/null +++ b/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CreateDiagnosticForKeyVaultResource.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2023-01-01-preview", + "scope": "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read", + "diagnosticsResourceName": "VMNotWorkingInsight", + "diagnosticItemRequest": { + "properties": { + "insights": [ + { + "solutionId": "SampleSolutionId", + "additionalParameters": { + "foo": "bar" + } + } + ], + "globalParameters": { + "startTime": "2020-07-01" + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read/providers/Microsoft.Help/diagnostics/VMNotWorkingInsight", + "name": "VMNotWorkingInsight", + "type": "Microsoft.Help/diagnostics", + "properties": { + "provisioningState": "Succeeded", + "acceptedAt": "2023-03-10T03:04:40Z" + } + } + } + } +} diff --git a/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/GetDiagnosticForKeyVaultResource.json b/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/GetDiagnosticForKeyVaultResource.json new file mode 100644 index 000000000000..998837706184 --- /dev/null +++ b/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/GetDiagnosticForKeyVaultResource.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2023-01-01-preview", + "scope": "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read", + "diagnosticsResourceName": "VMNotWorkingInsight" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read/providers/Microsoft.Help/diagnostics/VMNotWorkingInsight", + "type": "VMNotWorkingInsight", + "name": "Microsoft.Help/diagnostics", + "properties": { + "acceptedAt": "2023-03-10T03:04:40Z", + "provisioningState": "Succeeded", + "diagnostics": [ + { + "solutionId": "sampleSolutionId", + "status": "Succeeded", + "insights": [ + { + "id": "InsightArticleId", + "title": "An example title for an Insight", + "results": "Article Content", + "importanceLevel": "Critical" + } + ], + "error": { + "code": "errorCode", + "message": "errorMessage" + } + } + ] + } + } + } + } +} diff --git a/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListDiscoverySolutionsForKeyVaultResource.json b/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListDiscoverySolutionsForKeyVaultResource.json new file mode 100644 index 000000000000..c25c8427d036 --- /dev/null +++ b/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListDiscoverySolutionsForKeyVaultResource.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2023-01-01-preview", + "scope": "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "solutionId": "SampleSolutionId1", + "solutionType": "Diagnostics", + "description": "This is a diagnostic", + "requiredParameterSets": [ + [ + "ResourceUri" + ] + ] + }, + { + "solutionId": "SampleSolutionId2", + "solutionType": "Diagnostics", + "description": "This is another diagnostic", + "requiredParameterSets": [ + [ + "ResourceUri" + ] + ] + }, + { + "solutionId": "SampleSolutionId3", + "solutionType": "Diagnostics", + "description": "This is another testing diagnostic" + }, + { + "solutionId": "SampleSolutionId4", + "solutionType": "Diagnostics", + "description": "This is also another testing diagnostic" + } + ], + "nextLink": "nextLinkUrl" + } + } + } +} diff --git a/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListOperations.json b/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListOperations.json new file mode 100644 index 000000000000..3ae03407bc54 --- /dev/null +++ b/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListOperations.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-01-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.Help/diagnostics/read", + "isDataAction": false, + "display": { + "provider": "Microsoft.Diagnostics", + "resource": "Diagnostics", + "operation": "Create/Read a Diagnostic", + "description": "Created and Reads a diagnostic resource to troubleshoot an issue with a resource." + } + }, + { + "name": "Microsoft.Help/discoverySolutions/read", + "isDataAction": false, + "display": { + "provider": "Microsoft.Help", + "resource": "DiscoverySolutions", + "operation": "List of available solutions.", + "description": "Returns list of solutions based on ResourceType or ProblemClassficationId" + } + } + ] + } + } + } +} diff --git a/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/help.json b/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/help.json new file mode 100644 index 000000000000..dd150f6fdcb9 --- /dev/null +++ b/specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/help.json @@ -0,0 +1,614 @@ +{ + "swagger": "2.0", + "info": { + "title": "HelpRP", + "description": "Help RP provider", + "version": "2023-01-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": { + "/providers/Microsoft.Help/operations": { + "get": { + "tags": [ + "operations" + ], + "description": "Returns list of operations.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Operation details.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List All Operations": { + "$ref": "./examples/ListOperations.json" + } + } + } + }, + "/{scope}/providers/Microsoft.Help/checkNameAvailability": { + "post": { + "tags": [ + "diagnostics" + ], + "description": "This API is used to check the uniqueness of a resource name used for a diagnostic check.", + "operationId": "Diagnostics_CheckNameAvailability", + "parameters": [ + { + "$ref": "#/parameters/ScopeParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "CheckNameAvailabilityRequest", + "description": "The required parameters for availability check.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/CheckNameAvailabilityRequest" + } + } + ], + "responses": { + "200": { + "description": "Response for the availability of the requested resource name.", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Example when name is available for a Diagnostic resource": { + "$ref": "./examples/CheckNameAvailabilityForDiagnosticWhenNameIsAvailable.json" + }, + "Example when name is not available for a Diagnostic resource": { + "$ref": "./examples/CheckNameAvailabilityForDiagnosticWhenNameIsNotAvailable.json" + } + } + } + }, + "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}": { + "put": { + "tags": [ + "diagnostics" + ], + "description": "
Overview:
Azure Help API programmatically helps you troubleshoot Azure issues and provides access to rich and powerful self-help solutions and diagnostics. Using the API, you can perform the following operations:
Solution Discovery | Lists the diagnostics for an Azure issue based on the prerequisites. |
Diagnostics | Create and Get diagnostics for issues with Azure resources based on prerequisites (see below). |
Prerequisites for Diagnostics:
The diagnostics API is called after solutions discovery and returns diagnostic info for your Azure issue.
You must have reader access role at the resource level to create diagnostics.
'RequiredParameterSets' from Discovery Solutions API response has to be passed via 'properties.insights.additionalParameters' as a key-value pairs to Diagnostics Api.",
+ "operationId": "Diagnostics_Create",
+ "x-ms-long-running-operation": true,
+ "x-ms-long-running-operation-options": {
+ "final-state-via": "azure-async-operation"
+ },
+ "parameters": [
+ {
+ "$ref": "#/parameters/ScopeParameter"
+ },
+ {
+ "$ref": "#/parameters/DiagnosticsResourceNameParameter"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "in": "body",
+ "name": "diagnosticResourceRequest",
+ "description": "The required request body for this insightResource invocation.",
+ "schema": {
+ "$ref": "#/definitions/DiagnosticResource"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "Successful diagnostics invocation (may contain errors).",
+ "schema": {
+ "$ref": "#/definitions/DiagnosticResource"
+ }
+ },
+ "default": {
+ "description": "Error response describing why the operation failed.",
+ "schema": {
+ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Creates a Diagnostic for a KeyVault resource": {
+ "$ref": "./examples/CreateDiagnosticForKeyVaultResource.json"
+ }
+ }
+ },
+ "get": {
+ "tags": [
+ "diagnostics"
+ ],
+ "description": "
Overview:
Azure Help API programmatically helps you troubleshoot Azure issues and provides access to rich and powerful self-help solutions and diagnostics. Using the API, you can perform the following operations:
Solution Discovery | Lists the diagnostics for an Azure issue based on the prerequisites. |
Diagnostics | Create and Get diagnostics for issues with Azure resources based on prerequisites (see below). |
Prerequisites for Diagnostics:
The diagnostics API is called after solutions discovery and returns diagnostic info for your Azure issue.
You must have reader access role at the resource level to get the diagnostics.
'RequiredParameterSets' from Discovery Solutions API response has to be passed via 'properties.insights.additionalParameters' as a key-value pairs to Diagnostics Api.",
+ "operationId": "Diagnostics_Get",
+ "parameters": [
+ {
+ "$ref": "#/parameters/ScopeParameter"
+ },
+ {
+ "$ref": "#/parameters/DiagnosticsResourceNameParameter"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful fetched insight diagnostic (may contain errors).",
+ "schema": {
+ "$ref": "#/definitions/DiagnosticResource"
+ }
+ },
+ "default": {
+ "description": "Error response describing why the operation failed.",
+ "schema": {
+ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Gets a Diagnostic for a KeyVault resource": {
+ "$ref": "./examples/GetDiagnosticForKeyVaultResource.json"
+ }
+ }
+ }
+ },
+ "/{scope}/providers/Microsoft.Help/discoverySolutions": {
+ "get": {
+ "tags": [
+ "discoverySolutions"
+ ],
+ "description": "
Overview:
Azure Help API programmatically helps you troubleshoot Azure issues and provides access to rich and powerful self-help solutions and diagnostics. Using the API, you can perform the following operations:
Solution Discovery | Lists the diagnostics for an Azure issue based on the prerequisites (see below). |
Diagnostics | Create and Get diagnostics for issues with Azure resources. |
Prerequisites for solution discovery:
You can call the API to discover solutions with the following inputs:
i. Required inputs: resourceUri.
ii. Optional input: problemClassificationId.
This API enables discovery of diagnostics for a defined list of Azure support issues, and is not supported for all ProblemClassificationId(s) at the moment. For ProblemClassificationId(s) that are not supported, the API response will not return any diagnostics. You can use ProblemClassifications API to get the problem categories and ProblemClassificationId(s) reference.
You must have reader access role at the resource level to get the solutions.
Note: 'RequiredParameterSets' from Discovery Solutions API response has to be passed via 'properties.insights.additionalParameters' as an input to Diagnostics API.