diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2016-03-01/Recommendations.json b/specification/web/resource-manager/Microsoft.Web/stable/2016-03-01/Recommendations.json index feb0fc3e1323..589495fd27ad 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2016-03-01/Recommendations.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2016-03-01/Recommendations.json @@ -48,12 +48,12 @@ "200": { "description": "OK", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Recommendation" - } + "$ref": "#/definitions/RecommendationCollection" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -80,6 +80,36 @@ } } }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable": { + "post": { + "tags": [ + "Recommendations" + ], + "summary": "Disables the specified rule so it will not apply to a subscription in the future.", + "description": "Disables the specified rule so it will not apply to a subscription in the future.", + "operationId": "Recommendations_DisableRecommendationForSubscription", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Rule name", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully disabled recommendations." + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory": { "get": { "tags": [ @@ -117,12 +147,12 @@ "200": { "description": "OK", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Recommendation" - } + "$ref": "#/definitions/RecommendationCollection" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -169,12 +199,12 @@ "200": { "description": "OK", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Recommendation" - } + "$ref": "#/definitions/RecommendationCollection" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -276,6 +306,12 @@ "description": "Specify true to update the last-seen timestamp of the recommendation object.", "type": "boolean" }, + { + "name": "recommendationId", + "in": "query", + "description": "The GUID of the recommedation object if you query an expired one. You don't need to specify it to query an active entry.", + "type": "string" + }, { "$ref": "#/parameters/subscriptionIdParameter" }, @@ -292,222 +328,305 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable": { + "post": { + "tags": [ + "Recommendations" + ], + "summary": "Disables the specific rule for a web site permanently.", + "description": "Disables the specific rule for a web site permanently.", + "operationId": "Recommendations_DisableRecommendationForSite", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "siteName", + "in": "path", + "description": "Site name", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "Rule name", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully disabled recommendations." + } + } + } } }, "definitions": { "Recommendation": { "description": "Represents a recommendation result generated by the recommendation engine.", "type": "object", + "allOf": [ + { + "$ref": "./CommonDefinitions.json#/definitions/ProxyOnlyResource" + } + ], "properties": { - "creationTime": { - "format": "date-time", - "description": "Timestamp when this instance was created.", - "type": "string" - }, - "recommendationId": { - "format": "uuid", - "description": "A GUID value that each recommendation object is associated with.", - "type": "string", - "example": "00000000-0000-0000-0000-000000000000" - }, - "resourceId": { - "description": "Full ARM resource ID string that this recommendation object is associated with.", - "type": "string" - }, - "resourceScope": { - "description": "Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site.", - "enum": [ - "ServerFarm", - "Subscription", - "WebSite" - ], - "type": "string", - "x-ms-enum": { - "name": "ResourceScopeType", - "modelAsString": true - } - }, - "ruleName": { - "description": "Unique name of the rule.", - "type": "string" - }, - "displayName": { - "description": "UI friendly name of the rule (may not be unique).", - "type": "string" - }, - "message": { - "description": "Recommendation text.", - "type": "string" - }, - "level": { - "description": "Level indicating how critical this recommendation can impact.", - "enum": [ - "Critical", - "Warning", - "Information", - "NonUrgentSuggestion" - ], - "type": "string", - "x-ms-enum": { - "name": "NotificationLevel", - "modelAsString": false - } - }, - "channels": { - "description": "List of channels that this recommendation can apply.", - "enum": [ - "Notification", - "Api", - "Email", - "Webhook", - "All" - ], - "type": "string", - "x-ms-enum": { - "name": "Channels", - "modelAsString": false - } - }, - "tags": { - "description": "The list of category tags that this recommendation belongs to.", + "properties": { + "description": "Recommendation resource specific properties", + "properties": { + "creationTime": { + "format": "date-time", + "description": "Timestamp when this instance was created.", + "type": "string" + }, + "recommendationId": { + "format": "uuid", + "description": "A GUID value that each recommendation object is associated with.", + "type": "string", + "example": "00000000-0000-0000-0000-000000000000" + }, + "resourceId": { + "description": "Full ARM resource ID string that this recommendation object is associated with.", + "type": "string" + }, + "resourceScope": { + "description": "Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site.", + "enum": [ + "ServerFarm", + "Subscription", + "WebSite" + ], + "type": "string", + "x-ms-enum": { + "name": "ResourceScopeType", + "modelAsString": true + } + }, + "ruleName": { + "description": "Unique name of the rule.", + "type": "string" + }, + "displayName": { + "description": "UI friendly name of the rule (may not be unique).", + "type": "string" + }, + "message": { + "description": "Recommendation text.", + "type": "string" + }, + "level": { + "description": "Level indicating how critical this recommendation can impact.", + "enum": [ + "Critical", + "Warning", + "Information", + "NonUrgentSuggestion" + ], + "type": "string", + "x-ms-enum": { + "name": "NotificationLevel", + "modelAsString": false + } + }, + "channels": { + "description": "List of channels that this recommendation can apply.", + "enum": [ + "Notification", + "Api", + "Email", + "Webhook", + "All" + ], + "type": "string", + "x-ms-enum": { + "name": "Channels", + "modelAsString": false + } + }, + "tags": { + "description": "The list of category tags that this recommendation belongs to.", + "type": "array", + "items": { + "type": "string" + } + }, + "actionName": { + "description": "Name of action recommended by this object.", + "type": "string" + }, + "startTime": { + "format": "date-time", + "description": "The beginning time in UTC of a range that the recommendation refers to.", + "type": "string" + }, + "endTime": { + "format": "date-time", + "description": "The end time in UTC of a range that the recommendation refers to.", + "type": "string" + }, + "nextNotificationTime": { + "format": "date-time", + "description": "When to notify this recommendation next in UTC. Null means that this will never be notified anymore.", + "type": "string" + }, + "notificationExpirationTime": { + "format": "date-time", + "description": "Date and time in UTC when this notification expires.", + "type": "string" + }, + "notifiedTime": { + "format": "date-time", + "description": "Last timestamp in UTC this instance was actually notified. Null means that this recommendation hasn't been notified yet.", + "type": "string" + }, + "score": { + "format": "double", + "description": "A metric value measured by the rule.", + "type": "number" + }, + "isDynamic": { + "description": "True if this is associated with a dynamically added rule", + "type": "boolean" + }, + "extensionName": { + "description": "Extension name of the portal if exists.", + "type": "string" + }, + "bladeName": { + "description": "Deep link to a blade on the portal.", + "type": "string" + }, + "forwardLink": { + "description": "Forward link to an external document associated with the rule.", + "type": "string" + } + }, + "x-ms-client-flatten": true + } + } + }, + "RecommendationCollection": { + "description": "Collection of recommendations.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "Collection of resources.", "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Recommendation" } }, - "actionName": { - "description": "Name of action recommended by this object.", - "type": "string" - }, - "startTime": { - "format": "date-time", - "description": "The beginning time in UTC of a range that the recommendation refers to.", - "type": "string" - }, - "endTime": { - "format": "date-time", - "description": "The end time in UTC of a range that the recommendation refers to.", - "type": "string" - }, - "nextNotificationTime": { - "format": "date-time", - "description": "When to notify this recommendation next in UTC. Null means that this will never be notified anymore.", - "type": "string" - }, - "notificationExpirationTime": { - "format": "date-time", - "description": "Date and time in UTC when this notification expires.", - "type": "string" - }, - "notifiedTime": { - "format": "date-time", - "description": "Last timestamp in UTC this instance was actually notified. Null means that this recommendation hasn't been notified yet.", - "type": "string" - }, - "score": { - "format": "double", - "description": "A metric value measured by the rule.", - "type": "number" - }, - "isDynamic": { - "description": "True if this is associated with a dynamically added rule", - "type": "boolean" - }, - "extensionName": { - "description": "Extension name of the portal if exists.", - "type": "string" - }, - "bladeName": { - "description": "Deep link to a blade on the portal.", - "type": "string" - }, - "forwardLink": { - "description": "Forward link to an external document associated with the rule.", - "type": "string" + "nextLink": { + "description": "Link to next page of resources.", + "type": "string", + "readOnly": true } } }, "RecommendationRule": { "description": "Represents a recommendation rule that the recommendation engine can perform.", "type": "object", + "allOf": [ + { + "$ref": "./CommonDefinitions.json#/definitions/ProxyOnlyResource" + } + ], "properties": { - "name": { - "description": "Unique name of the rule.", - "type": "string" - }, - "displayName": { - "description": "UI friendly name of the rule.", - "type": "string" - }, - "message": { - "description": "Localized name of the rule (Good for UI).", - "type": "string" - }, - "recommendationId": { - "format": "uuid", - "description": "Recommendation ID of an associated recommendation object tied to the rule, if exists.\nIf such an object doesn't exist, it is set to null.", - "type": "string", - "example": "00000000-0000-0000-0000-000000000000" - }, - "description": { - "description": "Localized detailed description of the rule.", - "type": "string" - }, - "actionName": { - "description": "Name of action that is recommended by this rule in string.", - "type": "string" - }, - "level": { - "description": "Level of impact indicating how critical this rule is.", - "enum": [ - "Critical", - "Warning", - "Information", - "NonUrgentSuggestion" - ], - "type": "string", - "x-ms-enum": { - "name": "NotificationLevel", - "modelAsString": false - } - }, - "channels": { - "description": "List of available channels that this rule applies.", - "enum": [ - "Notification", - "Api", - "Email", - "Webhook", - "All" - ], - "type": "string", - "x-ms-enum": { - "name": "Channels", - "modelAsString": false - } - }, - "tags": { - "description": "An array of category tags that the rule contains.", - "type": "array", - "items": { - "type": "string" - } - }, - "isDynamic": { - "description": "True if this is associated with a dynamically added rule", - "type": "boolean" - }, - "extensionName": { - "description": "Extension name of the portal if exists. Applicable to dynamic rule only.", - "type": "string" - }, - "bladeName": { - "description": "Deep link to a blade on the portal. Applicable to dynamic rule only.", - "type": "string" - }, - "forwardLink": { - "description": "Forward link to an external document associated with the rule. Applicable to dynamic rule only.", - "type": "string" + "properties": { + "description": "RecommendationRule resource specific properties", + "properties": { + "name": { + "description": "Unique name of the rule.", + "type": "string" + }, + "displayName": { + "description": "UI friendly name of the rule.", + "type": "string" + }, + "message": { + "description": "Localized name of the rule (Good for UI).", + "type": "string" + }, + "recommendationId": { + "format": "uuid", + "description": "Recommendation ID of an associated recommendation object tied to the rule, if exists.\nIf such an object doesn't exist, it is set to null.", + "type": "string", + "example": "00000000-0000-0000-0000-000000000000" + }, + "description": { + "description": "Localized detailed description of the rule.", + "type": "string" + }, + "actionName": { + "description": "Name of action that is recommended by this rule in string.", + "type": "string" + }, + "level": { + "description": "Level of impact indicating how critical this rule is.", + "enum": [ + "Critical", + "Warning", + "Information", + "NonUrgentSuggestion" + ], + "type": "string", + "x-ms-enum": { + "name": "NotificationLevel", + "modelAsString": false + } + }, + "channels": { + "description": "List of available channels that this rule applies.", + "enum": [ + "Notification", + "Api", + "Email", + "Webhook", + "All" + ], + "type": "string", + "x-ms-enum": { + "name": "Channels", + "modelAsString": false + } + }, + "tags": { + "description": "An array of category tags that the rule contains.", + "type": "array", + "items": { + "type": "string" + } + }, + "isDynamic": { + "description": "True if this is associated with a dynamically added rule", + "type": "boolean" + }, + "extensionName": { + "description": "Extension name of the portal if exists. Applicable to dynamic rule only.", + "type": "string" + }, + "bladeName": { + "description": "Deep link to a blade on the portal. Applicable to dynamic rule only.", + "type": "string" + }, + "forwardLink": { + "description": "Forward link to an external document associated with the rule. Applicable to dynamic rule only.", + "type": "string" + } + }, + "x-ms-client-flatten": true } } }