From 318ff90b9669ac57da4f85236f8ca058448656a8 Mon Sep 17 00:00:00 2001 From: brandonh1994 <109686452+brandonh1994@users.noreply.github.com> Date: Tue, 4 Apr 2023 08:54:53 -0700 Subject: [PATCH 1/4] Adds base for updating Microsoft.Advisor from version stable/2022-10-01 to version 2023-01-01 --- .../stable/2023-01-01/advisor.json | 1730 +++++++++++++++++ .../examples/CreateConfiguration.json | 61 + .../examples/CreateSuppression.json | 34 + .../examples/DeleteSuppression.json | 11 + .../2023-01-01/examples/EmptyResponse.json | 11 + .../examples/GenerateRecommendations.json | 14 + .../examples/GetAdvisorScoreDetail.json | 155 ++ .../examples/GetRecommendationDetail.json | 69 + .../GetRecommendationMetadataEntity.json | 41 + .../examples/GetSuppressionDetail.json | 30 + .../2023-01-01/examples/ListAdvisorScore.json | 351 ++++ .../examples/ListConfigurations.json | 42 + .../examples/ListRecommendationMetadata.json | 85 + .../examples/ListRecommendations.json | 124 ++ .../2023-01-01/examples/ListSuppressions.json | 35 + .../2023-01-01/examples/OperationsList.json | 21 + .../stable/2023-01-01/examples/Predict.json | 46 + 17 files changed, 2860 insertions(+) create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/advisor.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateConfiguration.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateSuppression.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/DeleteSuppression.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/EmptyResponse.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GenerateRecommendations.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetAdvisorScoreDetail.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationDetail.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationMetadataEntity.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetSuppressionDetail.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListAdvisorScore.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListConfigurations.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendationMetadata.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendations.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListSuppressions.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/OperationsList.json create mode 100644 specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/Predict.json diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/advisor.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/advisor.json new file mode 100644 index 000000000000..6dcd05c24637 --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/advisor.json @@ -0,0 +1,1730 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-10-01", + "title": "AdvisorManagementClient", + "description": "REST APIs for Azure Advisor" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Advisor/metadata/{name}": { + "get": { + "tags": [ + "Metadata" + ], + "summary": "Gets the metadata entity.", + "operationId": "RecommendationMetadata_Get", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Name of metadata entity.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Successfully retrieved metadata entities", + "schema": { + "$ref": "#/definitions/MetadataEntity" + } + }, + "404": { + "description": "Client sent unknown metadata name", + "schema": { + "$ref": "#/definitions/ARMErrorResponseBody" + }, + "x-ms-error-response": true + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "x-ms-examples": { + "GetMetadata": { + "$ref": "./examples/GetRecommendationMetadataEntity.json" + } + } + } + }, + "/providers/Microsoft.Advisor/metadata": { + "get": { + "tags": [ + "Metadata" + ], + "summary": "Gets the list of metadata entities.", + "operationId": "RecommendationMetadata_List", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Successfully retrieved metadata entities", + "schema": { + "$ref": "#/definitions/MetadataEntityListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "x-ms-examples": { + "GetMetadata": { + "$ref": "./examples/ListRecommendationMetadata.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations": { + "get": { + "tags": [ + "Configurations" + ], + "summary": "Retrieve Azure Advisor configurations.", + "description": "Retrieve Azure Advisor configurations and also retrieve configurations of contained resource groups.", + "operationId": "Configurations_ListBySubscription", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. Successfully retrieved zero or more configurations.", + "schema": { + "$ref": "#/definitions/ConfigurationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/ListConfigurations.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations/{configurationName}": { + "put": { + "tags": [ + "Configurations" + ], + "summary": "Create/Overwrite Azure Advisor configuration.", + "description": "Create/Overwrite Azure Advisor configuration and also delete all configurations of contained resource groups.", + "operationId": "Configurations_CreateInSubscription", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "configContract", + "in": "body", + "description": "The Azure Advisor configuration data structure.", + "required": true, + "schema": { + "$ref": "#/definitions/ConfigData" + } + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "configurationName", + "in": "path", + "description": "Advisor configuration name. Value must be 'default'", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ConfigurationName", + "modelAsString": true + } + } + ], + "responses": { + "200": { + "description": "Successfully created/overwrote configuration.", + "schema": { + "$ref": "#/definitions/ConfigData" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-examples": { + "PutConfigurations": { + "$ref": "./examples/CreateConfiguration.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations": { + "get": { + "tags": [ + "Configurations" + ], + "summary": "Retrieve Azure Advisor configurations.", + "operationId": "Configurations_ListByResourceGroup", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "resourceGroup", + "in": "path", + "description": "The name of the Azure resource group.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. Successfully retrieved zero or more configurations.", + "schema": { + "$ref": "#/definitions/ConfigurationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": null + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/ListConfigurations.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations/{configurationName}": { + "put": { + "tags": [ + "Configurations" + ], + "summary": "Create/Overwrite Azure Advisor configuration.", + "operationId": "Configurations_CreateInResourceGroup", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "configContract", + "in": "body", + "description": "The Azure Advisor configuration data structure.", + "required": true, + "schema": { + "$ref": "#/definitions/ConfigData" + } + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "configurationName", + "in": "path", + "description": "Advisor configuration name. Value must be 'default'", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ConfigurationName", + "modelAsString": true + } + }, + { + "name": "resourceGroup", + "in": "path", + "description": "The name of the Azure resource group.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Successfully created/overwrote configuration.", + "schema": { + "$ref": "#/definitions/ConfigData" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-examples": { + "PutConfigurations": { + "$ref": "./examples/CreateConfiguration.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/generateRecommendations": { + "post": { + "tags": [ + "GenerateRecommendations" + ], + "description": "Initiates the recommendation generation or computation process for a subscription. This operation is asynchronous. The generated recommendations are stored in a cache in the Advisor service.", + "operationId": "Recommendations_Generate", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Accepted. Recommendation generation has been accepted.", + "headers": { + "Location": { + "description": "The URL where the status of the asynchronous operation can be checked.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-examples": { + "GenerateRecommendations": { + "$ref": "./examples/GenerateRecommendations.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/generateRecommendations/{operationId}": { + "get": { + "tags": [ + "GenerateRecommendations" + ], + "description": "Retrieves the status of the recommendation computation or generation process. Invoke this API after calling the generation recommendation. The URI of this API is returned in the Location field of the response header.", + "operationId": "Recommendations_GetGenerateStatus", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "operationId", + "in": "path", + "description": "The operation ID, which can be found from the Location field in the generate recommendation response header.", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Accepted. Recommendation generation is in progress." + }, + "204": { + "description": "NoContent. Recommendation generation has been completed." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-examples": { + "GetGenerateStatus": { + "$ref": "./examples/EmptyResponse.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/recommendations": { + "get": { + "tags": [ + "GetRecommendations" + ], + "description": "Obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations.", + "operationId": "Recommendations_List", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "The filter to apply to the recommendations.
Filter can be applied to properties ['ResourceId', 'ResourceGroup', 'RecommendationTypeGuid', '[Category](#category)'] with operators ['eq', 'and', 'or'].
Example:
- $filter=Category eq 'Cost' and ResourceGroup eq 'MyResourceGroup'", + "required": false, + "type": "string" + }, + { + "name": "$top", + "in": "query", + "description": "The number of recommendations per page if a paged version of this API is being used.", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "$skipToken", + "in": "query", + "description": "The page-continuation token to use with a paged version of this API.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. Successfully obtained cached recommendations.", + "schema": { + "$ref": "#/definitions/ResourceRecommendationBaseListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ListRecommendations": { + "$ref": "./examples/ListRecommendations.json" + } + } + } + }, + "/providers/Microsoft.Advisor/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all the available Advisor REST API operations.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Successfully retrieved operation list.", + "schema": { + "$ref": "#/definitions/OperationEntityListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "OperationsList": { + "$ref": "./examples/OperationsList.json" + } + } + } + }, + "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}": { + "get": { + "tags": [ + "GetRecommendations" + ], + "description": "Obtains details of a cached recommendation.", + "operationId": "Recommendations_Get", + "parameters": [ + { + "name": "resourceUri", + "in": "path", + "description": "The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.", + "required": true, + "type": "string" + }, + { + "name": "recommendationId", + "in": "path", + "description": "The recommendation ID.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Successfully got recommendation detail.", + "schema": { + "$ref": "#/definitions/ResourceRecommendationBase" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-examples": { + "GetRecommendationDetail": { + "$ref": "./examples/GetRecommendationDetail.json" + } + } + } + }, + "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}": { + "get": { + "tags": [ + "Suppressions" + ], + "description": "Obtains the details of a suppression.", + "operationId": "Suppressions_Get", + "parameters": [ + { + "name": "resourceUri", + "in": "path", + "description": "The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.", + "required": true, + "type": "string" + }, + { + "name": "recommendationId", + "in": "path", + "description": "The recommendation ID.", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "The name of the suppression.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Successfully got suppression detail.", + "schema": { + "$ref": "#/definitions/SuppressionContract" + } + }, + "404": { + "description": "Suppression name is not specified or Suppression Id not found.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + }, + "x-ms-error-response": true + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-examples": { + "GetSuppressionDetail": { + "$ref": "./examples/GetSuppressionDetail.json" + } + } + }, + "put": { + "tags": [ + "Suppressions" + ], + "description": "Enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute is referred to as a suppression. Use this API to create or update the snoozed or dismissed status of a recommendation.", + "operationId": "Suppressions_Create", + "parameters": [ + { + "name": "resourceUri", + "in": "path", + "description": "The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.", + "required": true, + "type": "string" + }, + { + "name": "recommendationId", + "in": "path", + "description": "The recommendation ID.", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "The name of the suppression.", + "required": true, + "type": "string" + }, + { + "name": "suppressionContract", + "in": "body", + "description": "The snoozed or dismissed attribute; for example, the snooze duration.", + "required": true, + "schema": { + "$ref": "#/definitions/SuppressionContract" + } + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Successfully created suppression.", + "schema": { + "$ref": "#/definitions/SuppressionContract" + } + }, + "404": { + "description": "Recommendation to be suppressed is not found.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + }, + "x-ms-error-response": true + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-examples": { + "CreateSuppression": { + "$ref": "./examples/CreateSuppression.json" + } + } + }, + "delete": { + "tags": [ + "Suppressions" + ], + "description": "Enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.", + "operationId": "Suppressions_Delete", + "parameters": [ + { + "name": "resourceUri", + "in": "path", + "description": "The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.", + "required": true, + "type": "string" + }, + { + "name": "recommendationId", + "in": "path", + "description": "The recommendation ID.", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "The name of the suppression.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "204": { + "description": "NoContent. The recommendation has been activated." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-examples": { + "DeleteSuppression": { + "$ref": "./examples/DeleteSuppression.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/suppressions": { + "get": { + "tags": [ + "Suppressions" + ], + "description": "Retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.", + "operationId": "Suppressions_List", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "$top", + "in": "query", + "description": "The number of suppressions per page if a paged version of this API is being used.", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "$skipToken", + "in": "query", + "description": "The page-continuation token to use with a paged version of this API.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. Successfully got all suppressions in a subscription.", + "schema": { + "$ref": "#/definitions/SuppressionContractListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ListSuppressions": { + "$ref": "./examples/ListSuppressions.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/predict": { + "post": { + "tags": [ + "Prediction" + ], + "summary": "Predicts a recommendation.", + "operationId": "Predict", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "predictionRequest", + "in": "body", + "description": "Parameters for predict recommendation.", + "required": true, + "schema": { + "$ref": "#/definitions/PredictionRequest" + } + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Successfully obtained prediction.", + "schema": { + "$ref": "#/definitions/PredictionResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-examples": { + "Predict": { + "$ref": "./examples/Predict.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/advisorScore": { + "get": { + "tags": [ + "AdvisorScore" + ], + "description": "Gets the list of advisor scores.", + "operationId": "AdvisorScores_List", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK.", + "schema": { + "$ref": "#/definitions/AdvisorScoreResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-examples": { + "ListAdvisorScore": { + "$ref": "./examples/ListAdvisorScore.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/advisorScore/{name}": { + "get": { + "tags": [ + "AdvisorScore" + ], + "description": "Gets the advisor score.", + "operationId": "AdvisorScores_Get", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "name", + "in": "path", + "description": "The scope of Advisor score entity.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK.", + "schema": { + "$ref": "#/definitions/advisorScoreEntity" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ArmErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-examples": { + "GetAdvisorScoreDetail": { + "$ref": "./examples/GetAdvisorScoreDetail.json" + } + } + } + } + }, + "definitions": { + "MetadataEntityListResult": { + "description": "The list of metadata entities", + "type": "object", + "properties": { + "value": { + "description": "The list of metadata entities.", + "type": "array", + "items": { + "$ref": "#/definitions/MetadataEntity" + } + }, + "nextLink": { + "description": "The link used to get the next page of metadata.", + "type": "string" + } + } + }, + "MetadataEntity": { + "description": "The metadata entity contract.", + "type": "object", + "properties": { + "id": { + "description": "The resource Id of the metadata entity.", + "type": "string" + }, + "type": { + "description": "The type of the metadata entity.", + "type": "string" + }, + "name": { + "description": "The name of the metadata entity.", + "type": "string" + }, + "properties": { + "$ref": "#/definitions/MetadataEntityProperties", + "description": "The metadata entity properties.", + "x-ms-client-flatten": true + } + } + }, + "MetadataEntityProperties": { + "description": "The metadata entity properties", + "type": "object", + "properties": { + "displayName": { + "description": "The display name.", + "type": "string" + }, + "dependsOn": { + "description": "The list of keys on which this entity depends on.", + "type": "array", + "items": { + "type": "string" + } + }, + "applicableScenarios": { + "description": "The list of scenarios applicable to this metadata entity.", + "type": "array", + "items": { + "enum": [ + "Alerts" + ], + "type": "string", + "x-ms-enum": { + "name": "Scenario", + "modelAsString": true + } + } + }, + "supportedValues": { + "description": "The list of supported values.", + "type": "array", + "items": { + "$ref": "#/definitions/MetadataSupportedValueDetail" + } + } + } + }, + "MetadataSupportedValueDetail": { + "description": "The metadata supported value detail.", + "type": "object", + "properties": { + "id": { + "description": "The id.", + "type": "string" + }, + "displayName": { + "description": "The display name.", + "type": "string" + } + } + }, + "ConfigurationListResult": { + "description": "The list of Advisor configurations.", + "type": "object", + "properties": { + "value": { + "description": "The list of configurations.", + "type": "array", + "items": { + "$ref": "#/definitions/ConfigData" + } + }, + "nextLink": { + "description": "The link used to get the next page of configurations.", + "type": "string" + } + } + }, + "ConfigData": { + "description": "The Advisor configuration data structure.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ConfigDataProperties", + "description": "The Advisor configuration data structure.", + "x-ms-client-flatten": true + } + } + }, + "ConfigDataProperties": { + "description": "Configuration data properties", + "type": "object", + "properties": { + "exclude": { + "description": "Exclude the resource from Advisor evaluations. Valid values: False (default) or True.", + "type": "boolean" + }, + "lowCpuThreshold": { + "description": "Minimum percentage threshold for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 5 (default), 10, 15 or 20.", + "enum": [ + "5", + "10", + "15", + "20" + ], + "type": "string", + "x-ms-enum": { + "name": "CpuThreshold", + "modelAsString": true + } + }, + "duration": { + "description": "Minimum duration for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 7 (default), 14, 21, 30, 60 or 90.", + "enum": [ + "7", + "14", + "21", + "30", + "60", + "90" + ], + "type": "string", + "x-ms-enum": { + "name": "Duration", + "modelAsString": true + } + }, + "digests": { + "description": "Advisor digest configuration. Valid only for subscriptions", + "type": "array", + "items": { + "$ref": "#/definitions/DigestConfig" + }, + "x-ms-identifiers": [ + "name" + ] + } + } + }, + "DigestConfig": { + "description": "Advisor Digest configuration entity", + "type": "object", + "properties": { + "name": { + "description": "Name of digest configuration. Value is case-insensitive and must be unique within a subscription.", + "type": "string" + }, + "actionGroupResourceId": { + "description": "Action group resource id used by digest.", + "type": "string" + }, + "frequency": { + "format": "int32", + "description": "Frequency that digest will be triggered, in days. Value must be between 7 and 30 days inclusive.", + "type": "integer" + }, + "categories": { + "description": "Categories to send digest for. If categories are not provided, then digest will be sent for all categories.", + "type": "array", + "items": { + "enum": [ + "HighAvailability", + "Security", + "Performance", + "Cost", + "OperationalExcellence" + ], + "type": "string", + "x-ms-enum": { + "name": "Category", + "modelAsString": true + } + } + }, + "language": { + "description": "Language for digest content body. Value must be ISO 639-1 code for one of Azure portal supported languages. Otherwise, it will be converted into one. Default value is English (en).", + "type": "string" + }, + "state": { + "description": "State of digest configuration.", + "enum": [ + "Active", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "DigestConfigState", + "modelAsString": true + } + } + } + }, + "ArmErrorResponse": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/ARMErrorResponseBody" + } + } + }, + "ARMErrorResponseBody": { + "description": "ARM error response body.", + "type": "object", + "properties": { + "message": { + "description": "Gets or sets the string that describes the error in detail and provides debugging information.", + "type": "string" + }, + "code": { + "description": "Gets or sets the string that can be used to programmatically identify the error.", + "type": "string" + } + } + }, + "ResourceRecommendationBaseListResult": { + "description": "The list of Advisor recommendations.", + "type": "object", + "properties": { + "nextLink": { + "description": "The link used to get the next page of recommendations.", + "type": "string" + }, + "value": { + "description": "The list of recommendations.", + "type": "array", + "items": { + "$ref": "#/definitions/ResourceRecommendationBase" + } + } + } + }, + "ResourceRecommendationBase": { + "description": "Advisor Recommendation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RecommendationProperties", + "description": "The properties of the recommendation.", + "x-ms-client-flatten": true + } + } + }, + "RecommendationProperties": { + "description": "The properties of the recommendation.", + "type": "object", + "properties": { + "category": { + "description": "The category of the recommendation.", + "enum": [ + "HighAvailability", + "Security", + "Performance", + "Cost", + "OperationalExcellence" + ], + "type": "string", + "x-ms-enum": { + "name": "category", + "modelAsString": true + } + }, + "impact": { + "description": "The business impact of the recommendation.", + "enum": [ + "High", + "Medium", + "Low" + ], + "type": "string", + "x-ms-enum": { + "name": "impact", + "modelAsString": true + } + }, + "impactedField": { + "description": "The resource type identified by Advisor.", + "type": "string" + }, + "impactedValue": { + "description": "The resource identified by Advisor.", + "type": "string" + }, + "lastUpdated": { + "format": "date-time", + "description": "The most recent time that Advisor checked the validity of the recommendation.", + "type": "string" + }, + "metadata": { + "description": "The recommendation metadata.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "recommendationTypeId": { + "description": "The recommendation-type GUID.", + "type": "string" + }, + "risk": { + "description": "The potential risk of not implementing the recommendation.", + "enum": [ + "Error", + "Warning", + "None" + ], + "type": "string", + "x-ms-enum": { + "name": "risk", + "modelAsString": true + } + }, + "shortDescription": { + "$ref": "#/definitions/ShortDescription", + "description": "A summary of the recommendation." + }, + "suppressionIds": { + "description": "The list of snoozed and dismissed rules for the recommendation.", + "type": "array", + "items": { + "format": "uuid", + "type": "string" + } + }, + "extendedProperties": { + "description": "Extended properties", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "resourceMetadata": { + "$ref": "#/definitions/ResourceMetadata", + "description": "Metadata of resource that was assessed" + }, + "description": { + "description": "The detailed description of recommendation.", + "type": "string" + }, + "label": { + "description": "The label of recommendation.", + "type": "string" + }, + "learnMoreLink": { + "description": "The link to learn more about recommendation and generation logic.", + "type": "string" + }, + "potentialBenefits": { + "description": "The potential benefit of implementing recommendation.", + "type": "string" + }, + "actions": { + "description": "The list of recommended actions to implement recommendation.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "x-ms-identifiers": [] + }, + "remediation": { + "description": "The automated way to apply recommendation.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "exposedMetadataProperties": { + "description": "The recommendation metadata properties exposed to customer to provide additional information.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "ShortDescription": { + "description": "A summary of the recommendation.", + "type": "object", + "properties": { + "problem": { + "description": "The issue or opportunity identified by the recommendation and proposed solution.", + "type": "string" + }, + "solution": { + "description": "The issue or opportunity identified by the recommendation and proposed solution.", + "type": "string" + } + } + }, + "ResourceMetadata": { + "description": "Recommendation resource metadata", + "type": "object", + "properties": { + "resourceId": { + "description": "Azure resource Id of the assessed resource", + "type": "string" + }, + "source": { + "description": "Source from which recommendation is generated", + "type": "string" + }, + "action": { + "description": "The action to view resource.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "singular": { + "description": "The singular user friendly name of resource type. eg: virtual machine", + "type": "string" + }, + "plural": { + "description": "The plural user friendly name of resource type. eg: virtual machines", + "type": "string" + } + } + }, + "OperationEntityListResult": { + "description": "The list of Advisor operations.", + "type": "object", + "properties": { + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + }, + "value": { + "description": "The list of operations.", + "type": "array", + "items": { + "$ref": "#/definitions/OperationEntity" + }, + "x-ms-identifiers": [ + "name" + ] + } + } + }, + "OperationEntity": { + "description": "The operation supported by Advisor.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string" + }, + "display": { + "$ref": "#/definitions/OperationDisplayInfo", + "description": "The operation supported by Advisor." + } + } + }, + "OperationDisplayInfo": { + "description": "The operation supported by Advisor.", + "type": "object", + "properties": { + "description": { + "description": "The description of the operation.", + "type": "string" + }, + "operation": { + "description": "The action that users can perform, based on their permission level.", + "type": "string" + }, + "provider": { + "description": "Service provider: Microsoft Advisor.", + "type": "string" + }, + "resource": { + "description": "Resource on which the operation is performed.", + "type": "string" + } + } + }, + "SuppressionContract": { + "description": "The details of the snoozed or dismissed rule; for example, the duration, name, and GUID associated with the rule.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SuppressionProperties", + "description": "The properties of the suppression.", + "x-ms-client-flatten": true + } + } + }, + "SuppressionProperties": { + "description": "The properties of the suppression.", + "type": "object", + "properties": { + "suppressionId": { + "description": "The GUID of the suppression.", + "type": "string" + }, + "ttl": { + "description": "The duration for which the suppression is valid.", + "type": "string" + }, + "expirationTimeStamp": { + "readOnly": true, + "format": "date-time", + "description": "Gets or sets the expiration time stamp.", + "type": "string" + } + } + }, + "SuppressionContractListResult": { + "description": "The list of Advisor suppressions.", + "type": "object", + "properties": { + "nextLink": { + "description": "The link used to get the next page of suppressions.", + "type": "string" + }, + "value": { + "description": "The list of suppressions.", + "type": "array", + "items": { + "$ref": "#/definitions/SuppressionContract" + } + } + } + }, + "PredictionRequest": { + "description": "Parameters for predict recommendation.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/PredictionRequestProperties", + "description": "Request properties for prediction recommendation.", + "x-ms-client-flatten": true + } + } + }, + "PredictionRequestProperties": { + "description": "Properties given for the predictor.", + "type": "object", + "properties": { + "predictionType": { + "description": "Type of the prediction.", + "enum": [ + "PredictiveRightsizing" + ], + "type": "string", + "x-ms-enum": { + "name": "predictionType", + "modelAsString": true + } + }, + "extendedProperties": { + "description": "Extended properties are arguments specific for each prediction type.", + "type": "object" + } + } + }, + "AdvisorScoreResponse": { + "type": "object", + "properties": { + "value": { + "description": "The list of operations.", + "type": "array", + "items": { + "$ref": "#/definitions/advisorScoreEntity" + } + } + } + }, + "PredictionResponse": { + "description": "Response used by predictions.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/PredictionResponseProperties", + "description": "The properties of the prediction.", + "x-ms-client-flatten": true + } + }, + "x-ms-azure-resource": true + }, + "PredictionResponseProperties": { + "description": "Properties of the prediction", + "type": "object", + "properties": { + "extendedProperties": { + "description": "Extended properties", + "type": "object" + }, + "predictionType": { + "description": "Type of the prediction.", + "enum": [ + "PredictiveRightsizing" + ], + "type": "string", + "x-ms-enum": { + "name": "predictionType", + "modelAsString": true + } + }, + "category": { + "description": "The category of the recommendation.", + "enum": [ + "HighAvailability", + "Security", + "Performance", + "Cost", + "OperationalExcellence" + ], + "type": "string", + "x-ms-enum": { + "name": "category", + "modelAsString": true + } + }, + "impact": { + "description": "The business impact of the recommendation.", + "enum": [ + "High", + "Medium", + "Low" + ], + "type": "string", + "x-ms-enum": { + "name": "impact", + "modelAsString": true + } + }, + "impactedField": { + "description": "The resource type identified by Advisor.", + "type": "string" + }, + "lastUpdated": { + "format": "date-time", + "description": "The most recent time that Advisor checked the validity of the recommendation.", + "type": "string" + }, + "shortDescription": { + "$ref": "#/definitions/ShortDescription", + "description": "A summary of the recommendation." + } + } + }, + "scoreEntity": { + "description": "The details of Advisor Score", + "type": "object", + "properties": { + "date": { + "description": "The date score was calculated.", + "type": "string" + }, + "score": { + "description": "The percentage score.", + "type": "number" + }, + "consumptionUnits": { + "description": "The consumption units for the score.", + "type": "number" + }, + "impactedResourceCount": { + "description": "The number of impacted resources.", + "type": "number" + }, + "potentialScoreIncrease": { + "description": "The potential percentage increase in overall score at subscription level once all recommendations in this scope are implemented.", + "type": "number" + }, + "categoryCount": { + "description": "The count of impacted categories.", + "type": "number", + "readOnly": true + } + } + }, + "timeSeriesEntity": { + "description": "The historic data at different aggregation levels.", + "type": "array", + "items": { + "description": "The data from different aggregation levels.", + "type": "object", + "properties": { + "aggregationLevel": { + "description": "The aggregation level of the score. ", + "type": "string", + "enum": [ + "week", + "day", + "month" + ], + "x-ms-enum": { + "name": "aggregated", + "modelAsString": true + } + }, + "scoreHistory": { + "description": "The past score data", + "type": "array", + "items": { + "$ref": "#/definitions/scoreEntity" + }, + "x-ms-identifiers": [] + } + } + }, + "x-ms-identifiers": [] + }, + "advisorScoreEntity": { + "description": "The details of Advisor score for a single category.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "description": "The Advisor score data.", + "type": "object", + "properties": { + "lastRefreshedScore": { + "description": "The details of latest available score.", + "$ref": "#/definitions/scoreEntity" + }, + "timeSeries": { + "description": "The historic Advisor score data.", + "$ref": "#/definitions/timeSeriesEntity" + } + } + } + } + } + }, + "parameters": { + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "The Azure subscription ID.", + "required": true, + "type": "string" + }, + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The version of the API to be used with the client request.", + "required": true, + "type": "string" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ] +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateConfiguration.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateConfiguration.json new file mode 100644 index 000000000000..1f058d516754 --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateConfiguration.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "subscriptionId", + "resourceGroup": "resourceGroup", + "configurationName": "default", + "configContract": { + "properties": { + "lowCpuThreshold": "5", + "duration": "7", + "exclude": true, + "digests": [ + { + "name": "digestConfigName", + "actionGroupResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName", + "frequency": 30, + "categories": [ + "HighAvailability", + "Security", + "Performance", + "Cost", + "OperationalExcellence" + ], + "language": "en", + "state": "Active" + } + ] + } + }, + "api-version": "2022-10-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Advisor/configurations/default", + "type": "Microsoft.Advisor/configurations", + "name": "default", + "properties": { + "lowCpuThreshold": "5", + "duration": "7", + "exclude": true, + "digests": [ + { + "name": "digestConfigName", + "actionGroupResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName", + "frequency": 30, + "categories": [ + "HighAvailability", + "Security", + "Performance", + "Cost", + "OperationalExcellence" + ], + "language": "en", + "state": "Active" + } + ] + } + } + } + } +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateSuppression.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateSuppression.json new file mode 100644 index 000000000000..b274e505a4a7 --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateSuppression.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "resourceUri": "resourceUri", + "recommendationId": "recommendationId", + "name": "suppressionName1", + "suppressionContract": { + "properties": { + "ttl": "07:00:00:00" + } + }, + "api-version": "2022-10-01" + }, + "responses": { + "200": { + "body": { + "id": "/resourceUri/providers/Microsoft.Advisor/recommendations/recommendationId/suppressions/suppressionName1", + "name": "suppressionName1", + "type": "Microsoft.Advisor/suppressions", + "properties": { + "suppressionId": "suppressionId", + "ttl": "07:00:00:00" + } + } + }, + "404": { + "body": { + "error": { + "code": "NotFound", + "message": "Recommendation to be suppressed is not found. Subscription Id:{0} Recommendation Id:{1}" + } + } + } + } +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/DeleteSuppression.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/DeleteSuppression.json new file mode 100644 index 000000000000..0ff09455618f --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/DeleteSuppression.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "resourceUri": "resourceUri", + "recommendationId": "recommendationId", + "name": "suppressionName1", + "api-version": "2022-10-01" + }, + "responses": { + "204": {} + } +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/EmptyResponse.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/EmptyResponse.json new file mode 100644 index 000000000000..859ef7709fde --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/EmptyResponse.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "subscriptionId": "subscriptionId", + "operationId": "123e4567-e89b-12d3-a456-426614174000", + "api-version": "2022-10-01" + }, + "responses": { + "202": {}, + "204": {} + } +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GenerateRecommendations.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GenerateRecommendations.json new file mode 100644 index 000000000000..007195030770 --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GenerateRecommendations.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "subscriptionId", + "api-version": "2022-10-01" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/subscriptionId/providers/Microsoft.Microsoft.Advisor/generateRecommendations/recGUID?api-version=2022-10-01", + "Retry-After": "60" + } + } + } +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetAdvisorScoreDetail.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetAdvisorScoreDetail.json new file mode 100644 index 000000000000..1299bddc01c7 --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetAdvisorScoreDetail.json @@ -0,0 +1,155 @@ +{ + "parameters": { + "subscriptionId": "subscriptionId", + "name": "Cost", + "api-version": "2022-10-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subId/Microsoft.Advisor/AdvisorScore/Cost", + "name": "Cost", + "type": "Microsoft.Advisor/advisorScore", + "properties": { + "lastRefreshedScore": { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0, + "categoryCount": 1 + }, + "timeSeries": [ + { + "aggregationLevel": "day", + "scoreHistory": [ + { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-24T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-23T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-22T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-21T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-20T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-19T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + } + ] + }, + { + "aggregationLevel": "month", + "scoreHistory": [ + { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-05-30T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-04-30T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + } + ] + }, + { + "aggregationLevel": "week", + "scoreHistory": [ + { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-21T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-14T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-07T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-05-31T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-05-24T00:00:00Z", + "score": 1, + "consumptionUnits": 12, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + } + ] + } + ] + } + } + } + } +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationDetail.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationDetail.json new file mode 100644 index 000000000000..a5623634f507 --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationDetail.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "resourceUri": "resourceUri", + "recommendationId": "recommendationId", + "api-version": "2022-10-01" + }, + "responses": { + "200": { + "body": { + "id": "/resourceUri/providers/Microsoft.Advisor/recommendations/recommendationId", + "name": "recommendationId", + "properties": { + "category": "Security", + "impact": "Medium", + "impactedField": "Microsoft.Compute/virtualMachines", + "impactedValue": "armavset", + "lastUpdated": "2017-02-24T22:24:43.3216408Z", + "risk": "Warning", + "shortDescription": { + "problem": "Monitoring agent should be installed on your machines", + "solution": "Monitoring agent should be installed on your machines" + }, + "remediation": { + "additionalProperties": { + "httpMethod": "POST", + "uri": "uri", + "details": "link to document" + } + }, + "resourceMetadata": { + "resourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Compute/virtualMachines/xyz", + "source": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Compute/virtualMachines/xyz/providers/Microsoft.Security/assessments/assessmentGuid", + "action": { + "additionalProperties": { + "actionType": "Document", + "link": "https://link3", + "caption": "Enable Soft Delete to protect blob data", + "description": "Enable Soft Delete to protect blob data" + }, + "metadata": { + "id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Compute/virtualMachines/xyz" + } + }, + "singular": "Virtual machine", + "plural": "Virtual machines" + }, + "actions": [ + { + "additionalProperties": { + "actionType": "Document", + "link": "https://link1", + "caption": "Enable Soft Delete to protect blob data", + "description": "Enable Soft Delete to protect blob data" + }, + "metadata": { + "id": "/subscriptions/subscriptionId" + } + } + ], + "description": "After enabling Soft Delete, deleted data transitions to a soft deleted state instead of being permanently deleted. When data is overwritten, a soft deleted snapshot is generated to save the state of the overwritten data. You can configure the amount of time soft deleted data is recoverable before it permanently expires.", + "label": "Enable Soft Delete", + "learnMoreLink": "https://link2", + "potentialBenefits": "Save and recover your data when blobs or blob snapshots are accidentally overwritten or deleted" + }, + "type": "Microsoft.Advisor/recommendations" + } + } + } +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationMetadataEntity.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationMetadataEntity.json new file mode 100644 index 000000000000..b649de5d854c --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationMetadataEntity.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "name": "types", + "api-version": "2022-10-01" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Advisor/metadata/recommendationType", + "name": "recommendationType", + "type": "Microsoft.Advisor/metadata", + "properties": { + "displayName": "Recommendation Type", + "dependsOn": [ + "category", + "impact" + ], + "applicableScenarios": [ + "Alerts" + ], + "supportedValues": [ + { + "id": "6a2b1e70-bd4c-4163-86de-5243d7ac05ee", + "displayName": "Upgrade your SKU or add more instances to ensure fault tolerance" + }, + { + "id": "da6630fb-4286-4996-92a3-a43f5f26dd34", + "displayName": "Delete ExpressRoute circuits in the provider status of Not Provisioned" + } + ] + } + } + }, + "404": { + "body": { + "code": "NotFound", + "message": "Unknown metadata name" + } + } + } +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetSuppressionDetail.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetSuppressionDetail.json new file mode 100644 index 000000000000..4fea0066d558 --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetSuppressionDetail.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "resourceUri": "resourceUri", + "recommendationId": "recommendationId", + "name": "suppressionName1", + "api-version": "2022-10-01" + }, + "responses": { + "200": { + "body": { + "id": "/resourceUri/providers/Microsoft.Advisor/recommendations/recommendationId/suppressions/suppressionName1", + "name": "suppressionName1", + "type": "Microsoft.Advisor/suppressions", + "properties": { + "suppressionId": "suppressionId1", + "ttl": "7.00:00:00", + "expirationTimeStamp": "2020-10-25T22:24:43.3216408Z" + } + } + }, + "404": { + "body": { + "error": { + "code": "NotFound", + "message": "Suppression name is not specified or Suppression Id not found" + } + } + } + } +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListAdvisorScore.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListAdvisorScore.json new file mode 100644 index 000000000000..0d7938b3f36a --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListAdvisorScore.json @@ -0,0 +1,351 @@ +{ + "parameters": { + "subscriptionId": "subscriptionId", + "api-version": "2022-10-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subId/Microsoft.Advisor/AdvisorScore/Cost", + "name": "Cost", + "type": "Microsoft.Advisor/advisorScore", + "properties": { + "lastRefreshedScore": { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0, + "categoryCount": 2 + }, + "timeSeries": [ + { + "aggregationLevel": "day", + "scoreHistory": [ + { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-24T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-23T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-22T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-21T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-20T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-19T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + } + ] + }, + { + "aggregationLevel": "month", + "scoreHistory": [ + { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-05-30T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-04-30T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + } + ] + }, + { + "aggregationLevel": "week", + "scoreHistory": [ + { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-21T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-14T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-06-07T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-05-31T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + }, + { + "date": "2020-05-24T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + } + ] + } + ] + } + }, + { + "id": "/subscriptions/subId/Microsoft.Advisor/AdvisorScore/Advisor/Performance", + "name": "Performance", + "type": "Microsoft.Advisor/advisorScore", + "properties": { + "lastRefreshedScore": { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0, + "categoryCount": 2 + }, + "timeSeries": [ + { + "aggregationLevel": "day", + "scoreHistory": [ + { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + } + ] + }, + { + "aggregationLevel": "month", + "scoreHistory": [ + { + "date": "2020-05-30T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + } + ] + }, + { + "aggregationLevel": "week", + "scoreHistory": [ + { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + } + ] + } + ] + } + }, + { + "id": "/subscriptions/subId/Microsoft.Advisor/AdvisorScore/Security", + "name": "Security", + "type": "Microsoft.Advisor/advisorScore", + "properties": { + "lastRefreshedScore": { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0, + "categoryCount": 3 + }, + "timeSeries": [ + { + "aggregationLevel": "day", + "scoreHistory": [ + { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + } + ] + }, + { + "aggregationLevel": "month", + "scoreHistory": [ + { + "date": "2020-05-30T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + } + ] + }, + { + "aggregationLevel": "week", + "scoreHistory": [ + { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + } + ] + } + ] + } + }, + { + "id": "/subscriptions/subId/Microsoft.Advisor/AdvisorScore/HighAvailability", + "name": "HighAvailability", + "type": "Microsoft.Advisor/advisorScore", + "properties": { + "lastRefreshedScore": { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0, + "categoryCount": 2 + }, + "timeSeries": [ + { + "aggregationLevel": "day", + "scoreHistory": [ + { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + } + ] + } + ] + } + }, + { + "id": "/subscriptions/subId/Microsoft.Advisor/AdvisorScore/OperationalExcellence", + "name": "OperationalExcellence", + "type": "Microsoft.Advisor/advisorScore", + "properties": { + "lastRefreshedScore": { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0, + "categoryCount": 1 + }, + "timeSeries": [ + { + "aggregationLevel": "day", + "scoreHistory": [ + { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + } + ] + } + ] + } + }, + { + "id": "/subscriptions/subId/Microsoft.Advisor/AdvisorScore/Advisor", + "name": "Advisor", + "type": "Microsoft.Advisor/advisorScore", + "properties": { + "lastRefreshedScore": { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0, + "categoryCount": 1 + }, + "timeSeries": [ + { + "aggregationLevel": "day", + "scoreHistory": [ + { + "date": "2020-06-25T00:00:00Z", + "score": 1, + "consumptionUnits": 12.24521, + "impactedResourceCount": 1, + "potentialScoreIncrease": 0 + } + ] + } + ] + } + } + ] + } + } + } +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListConfigurations.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListConfigurations.json new file mode 100644 index 000000000000..7ab2eed6daad --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListConfigurations.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "subscriptionId", + "resourceGroup": "resourceGroup", + "api-version": "2022-10-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Advisor/configurations/default", + "type": "Microsoft.Advisor/configurations", + "name": "default", + "properties": { + "lowCpuThreshold": "5", + "duration": "7", + "exclude": false, + "digests": [ + { + "name": "digestConfigName", + "actionGroupResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName", + "frequency": 30, + "categories": [ + "HighAvailability", + "Security", + "Performance", + "Cost", + "OperationalExcellence" + ], + "language": "en", + "state": "Active" + } + ] + } + } + ], + "nextLink": "string" + } + } + } +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendationMetadata.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendationMetadata.json new file mode 100644 index 000000000000..51d336d86ddd --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendationMetadata.json @@ -0,0 +1,85 @@ +{ + "parameters": { + "api-version": "2022-10-01" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "id": "providers/Microsoft.Advisor/metadata/recommendationType", + "name": "recommendationType", + "type": "Microsoft.Advisor/metadata", + "properties": { + "displayName": "Recommendation Type", + "dependsOn": [ + "category", + "impact" + ], + "applicableScenarios": [ + "Alerts" + ], + "supportedValues": [ + { + "id": "6a2b1e70-bd4c-4163-86de-5243d7ac05ee", + "displayName": "Upgrade your SKU or add more instances to ensure fault tolerance" + }, + { + "id": "da6630fb-4286-4996-92a3-a43f5f26dd34", + "displayName": "Delete ExpressRoute circuits in the provider status of Not Provisioned" + } + ] + } + }, + { + "id": "providers/Microsoft.Advisor/metadata/recommendationCategory", + "name": "recommendationCategory", + "type": "Microsoft.Advisor/metadata", + "properties": { + "displayName": "Category", + "dependsOn": null, + "applicableScenarios": [ + "Alerts" + ], + "supportedValues": [ + { + "id": "Cost", + "displayName": "Cost" + }, + { + "id": "Performance", + "displayName": "Performance" + } + ] + } + }, + { + "id": "providers/Microsoft.Advisor/metadata/recommendationImpact", + "name": "recommendationImpact", + "type": "Microsoft.Advisor/metadata", + "properties": { + "displayName": "Impact", + "dependsOn": null, + "applicableScenarios": null, + "supportedValues": [ + { + "id": "High", + "displayName": "High" + }, + { + "id": "Medium", + "displayName": "Medium" + }, + { + "id": "Low", + "displayName": "Low" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendations.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendations.json new file mode 100644 index 000000000000..ddf38a98914a --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendations.json @@ -0,0 +1,124 @@ +{ + "parameters": { + "subscriptionId": "subscriptionId", + "$top": 10, + "api-version": "2022-10-01" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/subscriptionId/providers/Microsoft.Advisor/recommendations?api-version=2022-10-01&$top=10&$skiptoken=skiptoken", + "value": [ + { + "id": "/resourceUri/providers/Microsoft.Advisor/recommendations/recGUID1", + "name": "recGUID1", + "properties": { + "category": "HighAvailability", + "impact": "Medium", + "impactedField": "Microsoft.Compute/availabilitySets", + "impactedValue": "armavset", + "lastUpdated": "2017-02-24T22:24:43.3216408Z", + "risk": "Warning", + "remediation": { + "additionalProperties": { + "httpMethod": "POST", + "uri": "uri", + "details": "link to document" + } + }, + "shortDescription": { + "problem": "To ensure high availability add one or more virtual machines to this availability set", + "solution": "To ensure high availability add one or more virtual machines to this availability set" + }, + "resourceMetadata": { + "resourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Compute/availabilitysets/abc", + "action": { + "additionalProperties": { + "actionType": "Document", + "link": "https://link3", + "caption": "Enable Soft Delete to protect blob data", + "description": "Enable Soft Delete to protect blob data" + }, + "metadata": { + "id": "/subscriptions/subscriptionId" + } + }, + "singular": "Availability set", + "plural": "Availability sets" + }, + "actions": [ + { + "additionalProperties": { + "actionType": "Document", + "link": "https://link1", + "caption": "Enable Soft Delete to protect blob data", + "description": "Enable Soft Delete to protect blob data" + }, + "metadata": { + "id": "/subscriptions/subscriptionId" + } + } + ], + "description": "After enabling Soft Delete, deleted data transitions to a soft deleted state instead of being permanently deleted. When data is overwritten, a soft deleted snapshot is generated to save the state of the overwritten data. You can configure the amount of time soft deleted data is recoverable before it permanently expires.", + "label": "Enable Soft Delete", + "learnMoreLink": "https://link2", + "potentialBenefits": "Save and recover your data when blobs or blob snapshots are accidentally overwritten or deleted" + }, + "type": "Microsoft.Advisor/recommendations" + }, + { + "id": "/resourceUri/providers/Microsoft.Advisor/recommendations/recGUID2", + "name": "recGUID2", + "properties": { + "category": "Security", + "impact": "Medium", + "impactedField": "Microsoft.Compute/virtualMachines", + "impactedValue": "armavset", + "lastUpdated": "2017-02-24T22:24:43.3216408Z", + "risk": "Warning", + "shortDescription": { + "problem": "Monitoring agent should be installed on your machines", + "solution": "Monitoring agent should be installed on your machines" + }, + "resourceMetadata": { + "resourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Compute/virtualMachines/xyz", + "source": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Compute/virtualMachines/xyz/providers/Microsoft.Security/assessments/assessmentGuid", + "action": { + "additionalProperties": { + "actionType": "Document", + "link": "https://link3", + "caption": "Enable Soft Delete to protect blob data", + "description": "Enable Soft Delete to protect blob data" + }, + "metadata": { + "id": "/subscriptions/subscriptionId" + } + }, + "singular": "Virtual machine", + "plural": "Virtual machines" + }, + "actions": [ + { + "additionalProperties": { + "actionType": "Document", + "link": "https://link1", + "caption": "Enable Soft Delete to protect blob data", + "description": "Enable Soft Delete to protect blob data" + }, + "metadata": { + "id": "/subscriptions/subscriptionId" + } + } + ], + "description": "Monitoring agent should be installed on your machines.", + "label": "Enable monitoring agent", + "learnMoreLink": "https://link2", + "potentialBenefits": "Protect and monitor machine" + }, + "type": "Microsoft.Advisor/recommendations" + } + ] + } + } + } +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListSuppressions.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListSuppressions.json new file mode 100644 index 000000000000..9882a34c8131 --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListSuppressions.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "subscriptionId1", + "api-version": "2022-10-01" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/3f75fdf7-977e-44ad-990d-99f14f0f299f/providers/microsoft.Advisor/suppressions?api-version=2022-10-01&$top=3&$skiptoken=skiptoken", + "value": [ + { + "id": "/resourceUri/providers/Microsoft.Advisor/recommendations/recommendationId/suppressions/suppressionName1", + "name": "suppressionName1", + "type": "Microsoft.Advisor/suppressions", + "properties": { + "suppressionId": "suppressionId1", + "ttl": "7.00:00:00", + "expirationTimeStamp": "2022-10-24T22:24:43.3216408Z" + } + }, + { + "id": "/resourceUri/providers/Microsoft.Advisor/recommendations/recommendationId/suppressions/suppressionName2", + "name": "suppressionName2", + "type": "Microsoft.Advisor/suppressions", + "properties": { + "suppressionId": "suppressionId2", + "ttl": "7.00:00:00", + "expirationTimeStamp": "2022-10-25T22:24:43.3216408Z" + } + } + ] + } + } + } +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/OperationsList.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/OperationsList.json new file mode 100644 index 000000000000..24ad454f3b3a --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/OperationsList.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2022-10-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.Advisor/prediction", + "display": { + "provider": "Microsoft Advisor", + "resource": "Prediction", + "description": "Predicts a recommendation." + } + } + ] + } + } + } +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/Predict.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/Predict.json new file mode 100644 index 000000000000..141834b22b8c --- /dev/null +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/Predict.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "subscriptionId", + "predictionRequest": { + "properties": { + "predictionType": "PredictiveRightsizing", + "extendedProperties": { + "region": "CentralUS", + "deploymentType": "Linux_IaaS_Software_Store", + "sku": "Standard_Dv4", + "type": "iaas", + "numberOfInstances": 10 + } + } + }, + "api-version": "2022-10-01" + }, + "responses": { + "200": { + "body": { + "properties": { + "predictionType": "PredictiveRightsizing", + "extendedProperties": { + "region": "CentralUS", + "deploymentType": "Linux_IaaS_Software_Store", + "sku": "Standard_Dv4", + "type": "iaas", + "numberOfInstances": 10, + "prediction": { + "recommendedSku": "Standard_Dv2", + "numberOfInstances": 8, + "confidence": 0.9 + } + }, + "category": "Cost", + "impact": "Low", + "impactedField": "Microsoft.Compute/virtualMachines", + "lastUpdated": "2022-02-14T14:47:18.436Z", + "shortDescription": { + "solution": "We recommend using 8 instances of type Standard_Dv2." + } + } + } + } + } +} From ed86755d0e96e436c659aa10186a29e79974a005 Mon Sep 17 00:00:00 2001 From: brandonh1994 <109686452+brandonh1994@users.noreply.github.com> Date: Tue, 4 Apr 2023 08:55:11 -0700 Subject: [PATCH 2/4] Updates readme --- .../advisor/resource-manager/readme.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/specification/advisor/resource-manager/readme.md b/specification/advisor/resource-manager/readme.md index e5b782873a5b..b5666a218e7d 100644 --- a/specification/advisor/resource-manager/readme.md +++ b/specification/advisor/resource-manager/readme.md @@ -26,24 +26,36 @@ These are the global settings for the Advisor API. ``` yaml openapi-type: arm -tag: package-2022-10 +tag: package-2023-01 +``` + + +### Tag: package-2023-01 + +These settings apply only when `--tag=package-2023-01` is specified on the command line. + +```yaml $(tag) == 'package-2023-01' +input-file: + - Microsoft.Advisor/stable/2023-01-01/advisor.json ``` ### Tag: package-2022-10 These settings apply only when `--tag=package-2022-10` is specified on the command line. -```yaml $(tag) == 'package-2022-10' +``` yaml $(tag) == 'package-2022-10' input-file: - Microsoft.Advisor/stable/2022-10-01/advisor.json ``` + ### Tag: package-2022-09 These settings apply only when `--tag=package-2022-09` is specified on the command line. -```yaml $(tag) == 'package-2022-09' +``` yaml $(tag) == 'package-2022-09' input-file: - Microsoft.Advisor/stable/2022-09-01/advisor.json ``` + ### Tag: package-2022-02-preview These settings apply only when `--tag=package-2022-02-preview` is specified on the command line. From 0c4db5fd60176c3dc605c0e354fe5bb5afbf8160 Mon Sep 17 00:00:00 2001 From: brandonh1994 <109686452+brandonh1994@users.noreply.github.com> Date: Tue, 4 Apr 2023 08:55:54 -0700 Subject: [PATCH 3/4] Updates API version in new specs and examples --- .../Microsoft.Advisor/stable/2023-01-01/advisor.json | 2 +- .../stable/2023-01-01/examples/CreateConfiguration.json | 2 +- .../stable/2023-01-01/examples/CreateSuppression.json | 2 +- .../stable/2023-01-01/examples/DeleteSuppression.json | 2 +- .../stable/2023-01-01/examples/EmptyResponse.json | 2 +- .../stable/2023-01-01/examples/GenerateRecommendations.json | 4 ++-- .../stable/2023-01-01/examples/GetAdvisorScoreDetail.json | 2 +- .../stable/2023-01-01/examples/GetRecommendationDetail.json | 2 +- .../2023-01-01/examples/GetRecommendationMetadataEntity.json | 2 +- .../stable/2023-01-01/examples/GetSuppressionDetail.json | 2 +- .../stable/2023-01-01/examples/ListAdvisorScore.json | 2 +- .../stable/2023-01-01/examples/ListConfigurations.json | 2 +- .../2023-01-01/examples/ListRecommendationMetadata.json | 2 +- .../stable/2023-01-01/examples/ListRecommendations.json | 4 ++-- .../stable/2023-01-01/examples/ListSuppressions.json | 4 ++-- .../stable/2023-01-01/examples/OperationsList.json | 2 +- .../Microsoft.Advisor/stable/2023-01-01/examples/Predict.json | 2 +- 17 files changed, 20 insertions(+), 20 deletions(-) diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/advisor.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/advisor.json index 6dcd05c24637..a207634e557f 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/advisor.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/advisor.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2022-10-01", + "version": "2023-01-01", "title": "AdvisorManagementClient", "description": "REST APIs for Azure Advisor" }, diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateConfiguration.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateConfiguration.json index 1f058d516754..741bf6642fcd 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateConfiguration.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateConfiguration.json @@ -26,7 +26,7 @@ ] } }, - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "200": { diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateSuppression.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateSuppression.json index b274e505a4a7..a9a3cc885e9a 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateSuppression.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateSuppression.json @@ -8,7 +8,7 @@ "ttl": "07:00:00:00" } }, - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "200": { diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/DeleteSuppression.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/DeleteSuppression.json index 0ff09455618f..d3ff456c54cc 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/DeleteSuppression.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/DeleteSuppression.json @@ -3,7 +3,7 @@ "resourceUri": "resourceUri", "recommendationId": "recommendationId", "name": "suppressionName1", - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "204": {} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/EmptyResponse.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/EmptyResponse.json index 859ef7709fde..652812e8f817 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/EmptyResponse.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/EmptyResponse.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "subscriptionId", "operationId": "123e4567-e89b-12d3-a456-426614174000", - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "202": {}, diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GenerateRecommendations.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GenerateRecommendations.json index 007195030770..215f152844ae 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GenerateRecommendations.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GenerateRecommendations.json @@ -1,12 +1,12 @@ { "parameters": { "subscriptionId": "subscriptionId", - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "202": { "headers": { - "Location": "https://management.azure.com/subscriptions/subscriptionId/providers/Microsoft.Microsoft.Advisor/generateRecommendations/recGUID?api-version=2022-10-01", + "Location": "https://management.azure.com/subscriptions/subscriptionId/providers/Microsoft.Microsoft.Advisor/generateRecommendations/recGUID?api-version=2023-01-01", "Retry-After": "60" } } diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetAdvisorScoreDetail.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetAdvisorScoreDetail.json index 1299bddc01c7..416b7a515480 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetAdvisorScoreDetail.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetAdvisorScoreDetail.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "subscriptionId", "name": "Cost", - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "200": { diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationDetail.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationDetail.json index a5623634f507..93d9311cd893 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationDetail.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationDetail.json @@ -2,7 +2,7 @@ "parameters": { "resourceUri": "resourceUri", "recommendationId": "recommendationId", - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "200": { diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationMetadataEntity.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationMetadataEntity.json index b649de5d854c..a24b19ef5211 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationMetadataEntity.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetRecommendationMetadataEntity.json @@ -1,7 +1,7 @@ { "parameters": { "name": "types", - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "200": { diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetSuppressionDetail.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetSuppressionDetail.json index 4fea0066d558..ea8bcb93c5ff 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetSuppressionDetail.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/GetSuppressionDetail.json @@ -3,7 +3,7 @@ "resourceUri": "resourceUri", "recommendationId": "recommendationId", "name": "suppressionName1", - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "200": { diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListAdvisorScore.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListAdvisorScore.json index 0d7938b3f36a..62257566e3cb 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListAdvisorScore.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListAdvisorScore.json @@ -1,7 +1,7 @@ { "parameters": { "subscriptionId": "subscriptionId", - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "200": { diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListConfigurations.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListConfigurations.json index 7ab2eed6daad..1ee38c2148b1 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListConfigurations.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListConfigurations.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "subscriptionId", "resourceGroup": "resourceGroup", - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "200": { diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendationMetadata.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendationMetadata.json index 51d336d86ddd..3f85d367d536 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendationMetadata.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendationMetadata.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "200": { diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendations.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendations.json index ddf38a98914a..ec3cf65b4a26 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendations.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListRecommendations.json @@ -2,12 +2,12 @@ "parameters": { "subscriptionId": "subscriptionId", "$top": 10, - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "200": { "body": { - "nextLink": "https://management.azure.com/subscriptions/subscriptionId/providers/Microsoft.Advisor/recommendations?api-version=2022-10-01&$top=10&$skiptoken=skiptoken", + "nextLink": "https://management.azure.com/subscriptions/subscriptionId/providers/Microsoft.Advisor/recommendations?api-version=2023-01-01&$top=10&$skiptoken=skiptoken", "value": [ { "id": "/resourceUri/providers/Microsoft.Advisor/recommendations/recGUID1", diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListSuppressions.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListSuppressions.json index 9882a34c8131..4e36891ceed4 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListSuppressions.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/ListSuppressions.json @@ -1,12 +1,12 @@ { "parameters": { "subscriptionId": "subscriptionId1", - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "200": { "body": { - "nextLink": "https://management.azure.com/subscriptions/3f75fdf7-977e-44ad-990d-99f14f0f299f/providers/microsoft.Advisor/suppressions?api-version=2022-10-01&$top=3&$skiptoken=skiptoken", + "nextLink": "https://management.azure.com/subscriptions/3f75fdf7-977e-44ad-990d-99f14f0f299f/providers/microsoft.Advisor/suppressions?api-version=2023-01-01&$top=3&$skiptoken=skiptoken", "value": [ { "id": "/resourceUri/providers/Microsoft.Advisor/recommendations/recommendationId/suppressions/suppressionName1", diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/OperationsList.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/OperationsList.json index 24ad454f3b3a..72bc4c1896d6 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/OperationsList.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/OperationsList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "200": { diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/Predict.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/Predict.json index 141834b22b8c..cfd9e617c83a 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/Predict.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/Predict.json @@ -13,7 +13,7 @@ } } }, - "api-version": "2022-10-01" + "api-version": "2023-01-01" }, "responses": { "200": { From 54dbdf792f83fe91bb1dcbd3fae36e121d8f7d0a Mon Sep 17 00:00:00 2001 From: Brandon Hill Date: Wed, 17 May 2023 07:40:44 -0700 Subject: [PATCH 4/4] adding v2 to 2023-01-01 put configuration api path --- .../stable/2023-01-01/examples/CreateConfiguration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateConfiguration.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateConfiguration.json index 741bf6642fcd..a758a3144579 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateConfiguration.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2023-01-01/examples/CreateConfiguration.json @@ -31,7 +31,7 @@ "responses": { "200": { "body": { - "id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Advisor/configurations/default", + "id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Advisor/configurations/v2/default", "type": "Microsoft.Advisor/configurations", "name": "default", "properties": {