diff --git a/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/Microsoft.WorkloadMonitor.json b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/Microsoft.WorkloadMonitor.json new file mode 100644 index 000000000000..8366d5ef07b6 --- /dev/null +++ b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/Microsoft.WorkloadMonitor.json @@ -0,0 +1,798 @@ +{ + "swagger": "2.0", + "info": { + "description": "Workload Monitor API", + "version": "2020-01-13-preview", + "title": "Workload Monitor API", + "contact": { + "email": "wlmengg@microsoft.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "paths": { + "/providers/Microsoft.WorkloadMonitor/operations": { + "get": { + "summary": "Gets a list of possible operations", + "operationId": "Operations_List", + "produces": [ + "application/json" + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "list of operations", + "schema": { + "$ref": "#/definitions/OperationList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultError" + } + } + }, + "x-ms-examples": { + "OperationList_Get": { + "$ref": "./examples/OperationList_Get.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.WorkloadMonitor/monitors": { + "get": { + "summary": "Get list of a monitors of a resource (with optional filter).", + "operationId": "Monitors_List", + "produces": [ + "application/json" + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceNamespace" + }, + { + "$ref": "#/parameters/resourceType" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "$ref": "#/parameters/filter" + }, + { + "$ref": "#/parameters/expand" + } + ], + "responses": { + "200": { + "description": "Search results matching criteria", + "schema": { + "$ref": "#/definitions/MonitorList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultError" + } + } + }, + "x-ms-examples": { + "Get monitor list with default values": { + "$ref": "./examples/MonitorList_GetDefault.json" + }, + "Get monitor list with filtered values": { + "$ref": "./examples/MonitorList_GetFiltered.json" + }, + "Get monitor list with expanded values": { + "$ref": "./examples/MonitorList_GetExpanded.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.WorkloadMonitor/monitors/{monitorId}": { + "get": { + "summary": "Get the current status of a monitor of a resource.", + "operationId": "Monitors_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceNamespace" + }, + { + "$ref": "#/parameters/resourceType" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "$ref": "#/parameters/monitorId" + }, + { + "$ref": "#/parameters/expand" + } + ], + "responses": { + "200": { + "description": "search results matching criteria", + "schema": { + "$ref": "#/definitions/Monitor" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultError" + } + } + }, + "x-ms-examples": { + "Get monitor with default values": { + "$ref": "./examples/Monitor_GetDefault.json" + }, + "Get monitor with expanded values": { + "$ref": "./examples/Monitor_GetExpanded.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.WorkloadMonitor/monitors/{monitorId}/history": { + "get": { + "summary": "Get history of a monitor of a resource (with optional filter).", + "operationId": "Monitors_ListStateChanges", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceNamespace" + }, + { + "$ref": "#/parameters/resourceType" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "$ref": "#/parameters/monitorId" + }, + { + "$ref": "#/parameters/filter" + }, + { + "$ref": "#/parameters/expand" + }, + { + "in": "query", + "name": "startTimestampUtc", + "description": "The start Timestamp for the desired history", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "in": "query", + "name": "endTimestampUtc", + "description": "The end Timestamp for the desired history", + "required": false, + "type": "string", + "format": "date-time" + } + ], + "responses": { + "200": { + "description": "search results matching criteria", + "schema": { + "$ref": "#/definitions/MonitorStateChangeList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultError" + } + } + }, + "x-ms-examples": { + "Get monitor history with default values": { + "$ref": "./examples/MonitorHistory_GetDefault.json" + }, + "Get monitor list with filtered values": { + "$ref": "./examples/MonitorHistory_GetFiltered.json" + }, + "Get monitor history with expanded values": { + "$ref": "./examples/MonitorHistory_GetExpanded.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.WorkloadMonitor/monitors/{monitorId}/history/{timestampUnix}": { + "get": { + "summary": "Get the status of a monitor at a specific timestamp in history.", + "operationId": "Monitors_GetStateChange", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceNamespace" + }, + { + "$ref": "#/parameters/resourceType" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "$ref": "#/parameters/monitorId" + }, + { + "$ref": "#/parameters/timestampUnix" + }, + { + "$ref": "#/parameters/expand" + } + ], + "responses": { + "200": { + "description": "search results matching criteria", + "schema": { + "$ref": "#/definitions/MonitorStateChange" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultError" + } + } + }, + "x-ms-examples": { + "Get monitor state change with default values": { + "$ref": "./examples/MonitorStateChange_GetDefault.json" + }, + "Get monitor state change with expanded values": { + "$ref": "./examples/MonitorStateChange_GetExpanded.json" + } + } + } + } + }, + "parameters": { + "api-version": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", + "required": true, + "type": "string", + "enum": [ + "2020-01-13-preview" + ] + }, + "subscriptionId": { + "in": "path", + "name": "subscriptionId", + "required": true, + "type": "string", + "description": "The subscriptionId of the resource", + "x-ms-parameter-location": "method" + }, + "resourceGroupName": { + "in": "path", + "name": "resourceGroupName", + "required": true, + "type": "string", + "description": "The resourceGroupName of the resource", + "x-ms-parameter-location": "method" + }, + "resourceNamespace": { + "in": "path", + "name": "resourceNamespace", + "required": true, + "type": "string", + "description": "The resourceNamespace of the resource", + "x-ms-parameter-location": "method" + }, + "resourceType": { + "in": "path", + "name": "resourceType", + "required": true, + "type": "string", + "description": "The resourceType of the resource", + "x-ms-parameter-location": "method" + }, + "resourceName": { + "in": "path", + "name": "resourceName", + "required": true, + "type": "string", + "description": "The resourceType of the resource", + "x-ms-parameter-location": "method" + }, + "monitorId": { + "in": "path", + "name": "monitorId", + "description": "The monitorId of the resource (url encoded)", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "timestampUnix": { + "in": "path", + "name": "timestampUnix", + "description": "The timestamp of the state change (Unix format)", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "filter": { + "name": "$filter", + "in": "query", + "description": "list example: $filter=monitorName eq 'logical-disks|C:|disk-free-space-mb'; history example: $filter=isHeartbeat eq false", + "required": false, + "type": "string", + "x-ms-parameter-location": "method" + }, + "expand": { + "name": "$expand", + "in": "query", + "description": "ex: $expand=evidence,configuration", + "required": false, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "definitions": { + "MonitorStateChangeList": { + "title": "Monitor History", + "description": "The monitor history of a monitor", + "type": "object", + "readOnly": true, + "properties": { + "value": { + "title": "State Change Array", + "description": "Array of state change transitions.", + "type": "array", + "items": { + "$ref": "#/definitions/MonitorStateChange" + } + }, + "nextLink": { + "title": "Pageable next link", + "description": "Link to next page if list is too long.", + "type": "string" + } + } + }, + "MonitorList": { + "title": "Monitor List", + "description": "Basic information about the current status of a monitor.", + "type": "object", + "readOnly": true, + "properties": { + "value": { + "title": "Monitor Array", + "description": "Array of monitors.", + "type": "array", + "items": { + "$ref": "#/definitions/Monitor" + } + }, + "nextLink": { + "title": "Pageable next link", + "description": "Link to next page if list is too long.", + "type": "string" + } + } + }, + "Monitor": { + "title": "Monitor Status", + "description": "Information about a monitor.", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/MonitorProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "Resource": { + "description": "The resource model definition for the ARM proxy resource, 'microsoft.workloadmonitor/monitors'.", + "type": "object", + "properties": { + "id": { + "readOnly": true, + "title": "Arm ID", + "description": "Arm ID of this monitor.", + "type": "string", + "example": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A" + }, + "name": { + "readOnly": true, + "title": "Url-encoded monitor name", + "description": "Url-encoded monitor name.", + "type": "string", + "example": "logical-disks|C@3A" + }, + "type": { + "readOnly": true, + "title": "Resource type", + "description": "Type of ARM resource.", + "type": "string", + "example": "Microsoft.WorkloadMonitor/monitors" + } + }, + "x-ms-azure-resource": true + }, + "MonitorProperties": { + "title": "Monitor Properties", + "description": "Properties of the monitor.", + "type": "object", + "properties": { + "monitorName": { + "title": "Monitor Name", + "description": "Human-readable name of this monitor.", + "type": "string", + "example": "logical-disks|C:" + }, + "monitorType": { + "title": "Monitor Type", + "description": "Type of this monitor.", + "type": "string", + "example": "logical-disks|*" + }, + "monitoredObject": { + "title": "Monitored Object", + "description": "Dynamic monitored object of this monitor.", + "type": "string", + "example": "C:" + }, + "parentMonitorName": { + "title": "Parent Monitor Name", + "description": "Name of this monitor's parent.", + "type": "string", + "example": "logical-disks" + }, + "previousMonitorState": { + "title": "Health State", + "description": "Current health state of this monitor.", + "$ref": "#/definitions/HealthState", + "example": "Healthy" + }, + "currentMonitorState": { + "title": "Health State", + "description": "Current health state of this monitor.", + "$ref": "#/definitions/HealthState", + "example": "Healthy" + }, + "evaluationTimestamp": { + "title": "Last Evaluated", + "description": "Timestamp that this monitor was last evaluated.", + "type": "string", + "example": "2020-02-15T20:20:18.5765757Z" + }, + "currentStateFirstObservedTimestamp": { + "title": "Last State Change", + "description": "Timestamp of this monitor's last state change.", + "type": "string", + "example": "2020-02-15T20:20:1.5765757Z" + }, + "lastReportedTimestamp": { + "title": "Last Reported", + "description": "Timestamp of this monitor's last reported state.", + "type": "string", + "example": "2020-02-15T20:20:1.5765757Z" + }, + "evidence": { + "title": "Evidence", + "description": "Evidence of this monitor's last state change.", + "type": "object" + }, + "monitorConfiguration": { + "title": "Configuration", + "description": "Configuration settings at the time of this monitor's last state change.", + "type": "object" + } + } + }, + "MonitorStateChange": { + "title": "Monitor State Change", + "description": "Information about a state transition of a monitor.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/MonitorStateChangeProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "MonitorStateChangeProperties": { + "title": "Monitor Properties", + "description": "Properties of the monitor.", + "type": "object", + "properties": { + "monitorName": { + "title": "Monitor Name", + "description": "Human-readable name of this monitor.", + "type": "string", + "example": "logical-disks|C:" + }, + "monitorType": { + "title": "Monitor Type", + "description": "Type of this monitor.", + "type": "string", + "example": "logical-disks|*" + }, + "monitoredObject": { + "title": "Monitored Object", + "description": "Dynamic monitored object of this monitor.", + "type": "string", + "example": "C:" + }, + "evaluationTimestamp": { + "title": "Timestamp", + "description": "Timestamp of that this event ocurred.", + "type": "string", + "example": "2020-01-08T20:20:18.5765757Z" + }, + "currentStateFirstObservedTimestamp": { + "title": "Timestamp", + "description": "Timestamp of that this health state first ocurred.", + "type": "string", + "example": "2020-01-08T20:20:18.5765757Z" + }, + "previousMonitorState": { + "title": "Previous Health State", + "description": "Previous health state.", + "$ref": "#/definitions/HealthState", + "example": "Healthy" + }, + "currentMonitorState": { + "title": "New Health State", + "description": "New health state.", + "$ref": "#/definitions/HealthState", + "example": "Critical" + }, + "evidence": { + "title": "Evidence", + "description": "Evidence of this monitor's last state change.", + "type": "object" + }, + "monitorConfiguration": { + "title": "Configuration", + "description": "Configuration settings at the time of this monitor's last state change.", + "type": "object" + } + } + }, + "HealthState": { + "title": "Health State", + "description": "Possible health states of a monitor.", + "type": "string", + "readOnly": true, + "enum": [ + "Healthy", + "Critical", + "Warning", + "Unknown" + ], + "x-ms-enum": { + "name": "HealthState", + "modelAsString": true + } + }, + "OperationList": { + "title": "Operation List", + "description": "List of possible operations.", + "type": "object", + "readOnly": true, + "properties": { + "value": { + "title": "Operations Array", + "description": "Array of possible operations.", + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "title": "Pageable next link", + "description": "Link to next page if list is too long.", + "type": "string" + } + } + }, + "Operation": { + "title": "Operation", + "description": "Operation supported by the resource provider.", + "type": "object", + "readOnly": true, + "required": [ + "name", + "display", + "origin" + ], + "properties": { + "name": { + "title": "Operation Name", + "description": "Name of the operation.", + "type": "string", + "example": "Microsoft.WorkloadMonitor/monitors/read" + }, + "display": { + "title": "Display", + "description": "The properties of the resource operation.", + "type": "object", + "required": [ + "provider", + "resource", + "operation", + "description" + ], + "properties": { + "provider": { + "title": "Provider Name", + "description": "Provider name of this operation.", + "type": "string", + "example": "Microsoft.WorkloadMonitor" + }, + "resource": { + "title": "Resource Name", + "description": "Resource name of this operation.", + "type": "string", + "example": "Monitors" + }, + "operation": { + "title": "Operation Name", + "description": "Operation name of the operation.", + "type": "string", + "example": "Get monitors" + }, + "description": { + "title": "Description", + "description": "Description of the operation.", + "type": "string", + "example": "Gets monitors and their current health state" + } + } + }, + "origin": { + "title": "Origin", + "description": "The origin of the operation.", + "type": "string", + "example": "user, system" + } + } + }, + "DefaultError": { + "title": "Default Error", + "description": "Error body contract.", + "type": "object", + "properties": { + "error": { + "title": "error details", + "description": "Details about the error", + "type": "object", + "properties": { + "code": { + "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.", + "type": "string" + }, + "message": { + "description": "Human-readable representation of the error.", + "type": "string" + }, + "details": { + "description": "Details of the error.", + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDetails" + } + } + } + } + } + }, + "ErrorDetails": { + "title": "Error Details", + "description": "Error details of the error body contract.", + "type": "object", + "properties": { + "code": { + "description": "Property level error code.", + "type": "string" + }, + "message": { + "description": "Human-readable representation of property-level error.", + "type": "string" + } + } + } + }, + "host": "management.azure.com", + "basePath": "/", + "schemes": [ + "https" + ], + "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/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorHistory_GetDefault.json b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorHistory_GetDefault.json new file mode 100644 index 000000000000..45677764722b --- /dev/null +++ b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorHistory_GetDefault.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "subscriptionId": "bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21", + "resourceGroupName": "tugamidiAlerts", + "resourceNamespace": "Microsoft.Compute", + "resourceType": "virtualMachines", + "resourceName": "linuxEUS", + "monitorId": "logical-disks|C@3A", + "api-version": "2020-01-13-preview", + "startTimestampUtc": "2020-01-04T20:20:18.5765757Z", + "endTimestampUtc": "2020-01-09T20:20:18.5765757Z" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A|disk-free-space-mb/history/1578514818", + "name": "1578514818", + "type": "Microsoft.WorkloadMonitor/monitors/history", + "properties": { + "monitorName": "logical-disks|C:|disk-free-space-mb", + "monitorType": "logical-disks|*|disk-free-space-mb", + "monitoredObject": "C:", + "evaluationTimestamp": "2020-01-07T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-01-07T20:20:18.5765757Z", + "previousMonitorState": "Warning", + "currentMonitorState": "Critical" + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A|disk-free-space-mb/history/1578255618", + "name": "1578255618", + "type": "Microsoft.WorkloadMonitor/monitors/history", + "properties": { + "monitorName": "logical-disks|C:|disk-free-space-mb", + "monitorType": "logical-disks|*|disk-free-space-mb", + "monitoredObject": "C:", + "evaluationTimestamp": "2020-01-06T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-01-05T20:20:18.5765757Z", + "previousMonitorState": "Warning", + "currentMonitorState": "Warning" + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A|disk-free-space-mb/history/1578255618", + "name": "1578255618", + "type": "Microsoft.WorkloadMonitor/monitors/history", + "properties": { + "monitorName": "logical-disks|C:|disk-free-space-mb", + "monitorType": "logical-disks|*|disk-free-space-mb", + "monitoredObject": "C:", + "evaluationTimestamp": "2020-01-05T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-01-05T20:20:18.5765757Z", + "previousMonitorState": "Healthy", + "currentMonitorState": "Warning" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorHistory_GetExpanded.json b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorHistory_GetExpanded.json new file mode 100644 index 000000000000..a4b82ea11c1f --- /dev/null +++ b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorHistory_GetExpanded.json @@ -0,0 +1,116 @@ +{ + "parameters": { + "subscriptionId": "bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21", + "resourceGroupName": "tugamidiAlerts", + "resourceNamespace": "Microsoft.Compute", + "resourceType": "virtualMachines", + "resourceName": "linuxEUS", + "monitorId": "logical-disks|C@3A", + "api-version": "2020-01-13-preview", + "startTimestampUtc": "2020-01-04T20:20:18.5765757Z", + "endTimestampUtc": "2020-01-09T20:20:18.5765757Z", + "$expand": "evidence,configuration" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A|disk-free-space-mb/history/1578514818", + "name": "1578514818", + "type": "Microsoft.WorkloadMonitor/monitors/history", + "properties": { + "monitorName": "logical-disks|C:|disk-free-space-mb", + "monitorType": "logical-disks|*|disk-free-space-mb", + "monitoredObject": "C:", + "evaluationTimestamp": "2020-01-07T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-01-07T20:20:18.5765757Z", + "previousMonitorState": "Warning", + "currentMonitorState": "Critical", + "evidence": { + "reason": { + "code": 2100, + "message": "Collected samples met critical condition for this monitor." + }, + "samples": [ + { + "value": 1361.019, + "timestamp": "2020-03-24T20:51:00.6058242Z" + }, + { + "value": 1261.019, + "timestamp": "2020-03-24T21:51:00.6058242Z" + } + ] + }, + "monitorConfiguration": {} + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A|disk-free-space-mb/history/1578255618", + "name": "1578255618", + "type": "Microsoft.WorkloadMonitor/monitors/history", + "properties": { + "monitorName": "logical-disks|C:|disk-free-space-mb", + "monitorType": "logical-disks|*|disk-free-space-mb", + "monitoredObject": "C:", + "evaluationTimestamp": "2020-01-06T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-01-05T20:20:18.5765757Z", + "previousMonitorState": "Warning", + "currentMonitorState": "Warning", + "evidence": { + "reason": { + "code": 2100, + "message": "Collected samples met critical condition for this monitor." + }, + "samples": [ + { + "value": 1361.019, + "timestamp": "2020-03-24T20:51:00.6058242Z" + }, + { + "value": 1261.019, + "timestamp": "2020-03-24T21:51:00.6058242Z" + } + ] + }, + "monitorConfiguration": {} + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A|disk-free-space-mb/history/1578255618", + "name": "1578255618", + "type": "Microsoft.WorkloadMonitor/monitors/history", + "properties": { + "monitorName": "logical-disks|C:|disk-free-space-mb", + "monitorType": "logical-disks|*|disk-free-space-mb", + "monitoredObject": "C:", + "evaluationTimestamp": "2020-01-05T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-01-05T20:20:18.5765757Z", + "previousMonitorState": "Healthy", + "currentMonitorState": "Warning", + "evidence": { + "reason": { + "code": 2100, + "message": "Collected samples met critical condition for this monitor." + }, + "samples": [ + { + "value": 1361.019, + "timestamp": "2020-03-24T20:51:00.6058242Z" + }, + { + "value": 1261.019, + "timestamp": "2020-03-24T21:51:00.6058242Z" + } + ] + }, + "monitorConfiguration": {} + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorHistory_GetFiltered.json b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorHistory_GetFiltered.json new file mode 100644 index 000000000000..304e91636dfd --- /dev/null +++ b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorHistory_GetFiltered.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21", + "resourceGroupName": "tugamidiAlerts", + "resourceNamespace": "Microsoft.Compute", + "resourceType": "virtualMachines", + "resourceName": "linuxEUS", + "monitorId": "logical-disks|C@3A|disk-free-space-mb", + "api-version": "2020-01-13-preview", + "startTimestampUtc": "2020-01-04T20:20:18.5765757Z", + "endTimestampUtc": "2020-01-09T20:20:18.5765757Z", + "$filter": "isHeartbeat eq false" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A|disk-free-space-mb/history/1578514818", + "name": "1578514818", + "type": "Microsoft.WorkloadMonitor/monitors/history", + "properties": { + "monitorName": "logical-disks|C:|disk-free-space-mb", + "monitorType": "logical-disks|*|disk-free-space-mb", + "monitoredObject": "C:", + "evaluationTimestamp": "2020-01-07T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-01-07T20:20:18.5765757Z", + "previousMonitorState": "Warning", + "currentMonitorState": "Critical" + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A|disk-free-space-mb/history/1578255618", + "name": "1578255618", + "type": "Microsoft.WorkloadMonitor/monitors/history", + "properties": { + "monitorName": "logical-disks|C:|disk-free-space-mb", + "monitorType": "logical-disks|*|disk-free-space-mb", + "monitoredObject": "C:", + "evaluationTimestamp": "2020-01-05T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-01-05T20:20:18.5765757Z", + "previousMonitorState": "Healthy", + "currentMonitorState": "Warning" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorList_GetDefault.json b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorList_GetDefault.json new file mode 100644 index 000000000000..0d9aa2903374 --- /dev/null +++ b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorList_GetDefault.json @@ -0,0 +1,131 @@ +{ + "parameters": { + "subscriptionId": "bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21", + "resourceGroupName": "tugamidiAlerts", + "resourceNamespace": "Microsoft.Compute", + "resourceType": "virtualMachines", + "resourceName": "linuxEUS", + "api-version": "2020-01-13-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/root", + "name": "root", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "root", + "monitorType": "root", + "monitoredObject": "", + "parentMonitorName": "", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Critical", + "currentMonitorState": "Critical" + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks", + "name": "logical-disks", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "logical-disks", + "monitorType": "logical-disks", + "monitoredObject": "", + "parentMonitorName": "root", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Critical", + "currentMonitorState": "Critical" + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A", + "name": "logical-disks|C@3A", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "logical-disks|C:", + "monitorType": "logical-disks|*", + "monitoredObject": "C:", + "parentMonitorName": "logical-disks", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Critical", + "currentMonitorState": "Critical" + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A|disk-free-space-mb", + "name": "logical-disks|C@3A|disk-free-space-mb", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "logical-disks|C:|disk-free-space-mb", + "monitorType": "logical-disks|*|disk-free-space-mb", + "monitoredObject": "C:", + "parentMonitorName": "logical-disks|C:", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Critical", + "currentMonitorState": "Critical" + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/cpu-utilization-percentage", + "name": "cpu-utilization-percentage", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "cpu-utilization-percentage", + "monitorType": "cpu-utilization-percentage", + "monitoredObject": "", + "parentMonitorName": "root", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Warning", + "currentMonitorState": "Warning" + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/memory", + "name": "memory", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "memory", + "monitorType": "memory", + "monitoredObject": "", + "parentMonitorName": "root", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Healthy", + "currentMonitorState": "Healthy" + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/available-mb", + "name": "available-mb", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "memory|available-mb", + "monitorType": "memory|available-mb", + "monitoredObject": "", + "parentMonitorName": "memory", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Healthy", + "currentMonitorState": "Healthy" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorList_GetExpanded.json b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorList_GetExpanded.json new file mode 100644 index 000000000000..e9ae8b79d179 --- /dev/null +++ b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorList_GetExpanded.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "subscriptionId": "bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21", + "resourceGroupName": "tugamidiAlerts", + "resourceNamespace": "Microsoft.Compute", + "resourceType": "virtualMachines", + "resourceName": "linuxEUS", + "api-version": "2020-01-13-preview", + "$expand": "evidence,configuration" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/root", + "name": "root", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "root", + "monitorType": "root", + "monitoredObject": "", + "parentMonitorName": "", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Critical", + "currentMonitorState": "Critical", + "evidence": {}, + "monitorConfiguration": {} + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks", + "name": "logical-disks", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "logical-disks", + "monitorType": "logical-disks", + "monitoredObject": "", + "parentMonitorName": "root", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Critical", + "currentMonitorState": "Critical", + "evidence": {}, + "monitorConfiguration": {} + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A", + "name": "logical-disks|C@3A", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "logical-disks|C:", + "monitorType": "logical-disks|*", + "monitoredObject": "C:", + "parentMonitorName": "logical-disks", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Critical", + "currentMonitorState": "Critical", + "evidence": {}, + "monitorConfiguration": {} + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A|disk-free-space-mb", + "name": "logical-disks|C@3A|disk-free-space-mb", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "logical-disks|C:|disk-free-space-mb", + "monitorType": "logical-disks|*|disk-free-space-mb", + "monitoredObject": "C:", + "parentMonitorName": "logical-disks|C:", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Critical", + "currentMonitorState": "Critical", + "evidence": {}, + "monitorConfiguration": {} + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/cpu-utilization-percentage", + "name": "cpu-utilization-percentage", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "cpu-utilization-percentage", + "monitorType": "cpu-utilization-percentage", + "monitoredObject": "", + "parentMonitorName": "root", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Warning", + "currentMonitorState": "Warning", + "evidence": {}, + "monitorConfiguration": {} + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/memory", + "name": "memory", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "memory", + "monitorType": "memory", + "monitoredObject": "", + "parentMonitorName": "root", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Healthy", + "currentMonitorState": "Healthy", + "evidence": {}, + "monitorConfiguration": {} + } + }, + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/available-mb", + "name": "available-mb", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "memory|available-mb", + "monitorType": "memory|available-mb", + "monitoredObject": "", + "parentMonitorName": "memory", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Healthy", + "currentMonitorState": "Healthy", + "evidence": {}, + "monitorConfiguration": {} + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorList_GetFiltered.json b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorList_GetFiltered.json new file mode 100644 index 000000000000..1b829fbd8f2b --- /dev/null +++ b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorList_GetFiltered.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21", + "resourceGroupName": "tugamidiAlerts", + "resourceNamespace": "Microsoft.Compute", + "resourceType": "virtualMachines", + "resourceName": "linuxEUS", + "api-version": "2020-01-13-preview", + "$filter": "monitorName eq 'root'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/root", + "name": "root", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "root", + "monitorType": "root", + "monitoredObject": "", + "parentMonitorName": "", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Critical", + "currentMonitorState": "Critical" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorStateChange_GetDefault.json b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorStateChange_GetDefault.json new file mode 100644 index 000000000000..6ed263019f4c --- /dev/null +++ b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorStateChange_GetDefault.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21", + "resourceGroupName": "tugamidiAlerts", + "resourceNamespace": "Microsoft.Compute", + "resourceType": "virtualMachines", + "resourceName": "linuxEUS", + "monitorId": "logical-disks|C@3A", + "timestampUnix": "1584316800", + "api-version": "2020-01-13-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A|disk-free-space-mb/history/1578514818", + "name": "1578514818", + "type": "Microsoft.WorkloadMonitor/monitors/history", + "properties": { + "monitorName": "logical-disks|C:|disk-free-space-mb", + "monitorType": "logical-disks|*|disk-free-space-mb", + "monitoredObject": "C:", + "evaluationTimestamp": "2020-01-07T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-01-07T20:20:18.5765757Z", + "previousMonitorState": "Warning", + "currentMonitorState": "Critical" + } + } + } + } +} diff --git a/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorStateChange_GetExpanded.json b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorStateChange_GetExpanded.json new file mode 100644 index 000000000000..ff00d1dab28d --- /dev/null +++ b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/MonitorStateChange_GetExpanded.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21", + "resourceGroupName": "tugamidiAlerts", + "resourceNamespace": "Microsoft.Compute", + "resourceType": "virtualMachines", + "resourceName": "linuxEUS", + "monitorId": "logical-disks|C@3A", + "timestampUnix": "1584316800", + "api-version": "2020-01-13-preview", + "$expand": "evidence" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A|disk-free-space-mb/history/1578514818", + "name": "1578514818", + "type": "Microsoft.WorkloadMonitor/monitors/history", + "properties": { + "monitorName": "logical-disks|C:|disk-free-space-mb", + "monitorType": "logical-disks|*|disk-free-space-mb", + "monitoredObject": "C:", + "evaluationTimestamp": "2020-01-07T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-01-07T20:20:18.5765757Z", + "previousMonitorState": "Warning", + "currentMonitorState": "Critical", + "evidence": {} + } + } + } + } +} diff --git a/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/Monitor_GetDefault.json b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/Monitor_GetDefault.json new file mode 100644 index 000000000000..71880f7954e1 --- /dev/null +++ b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/Monitor_GetDefault.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21", + "resourceGroupName": "tugamidiAlerts", + "resourceNamespace": "Microsoft.Compute", + "resourceType": "virtualMachines", + "resourceName": "linuxEUS", + "monitorId": "logical-disks|C@3A|disk-free-space-mb", + "api-version": "2020-01-13-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A|disk-free-space-mb", + "name": "logical-disks|C@3A|disk-free-space-mb", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "logical-disks|C:|disk-free-space-mb", + "monitorType": "logical-disks|*|disk-free-space-mb", + "monitoredObject": "C:", + "parentMonitorName": "logical-disks|C:", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Healthy", + "currentMonitorState": "Warning" + } + } + } + } +} diff --git a/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/Monitor_GetExpanded.json b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/Monitor_GetExpanded.json new file mode 100644 index 000000000000..6488fd31df6c --- /dev/null +++ b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/Monitor_GetExpanded.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21", + "resourceGroupName": "tugamidiAlerts", + "resourceNamespace": "Microsoft.Compute", + "resourceType": "virtualMachines", + "resourceName": "linuxEUS", + "monitorId": "logical-disks|C@3A|disk-free-space-mb", + "api-version": "2020-01-13-preview", + "$expand": "evidence" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/bc27da3b-3ba2-4e00-a6ec-1fde64aa1e21/resourceGroups/tugamidiAlerts/providers/Microsoft.Compute/virtualMachines/linuxEUS/providers/Microsoft.WorkloadMonitor/monitors/logical-disks|C@3A|disk-free-space-mb", + "name": "logical-disks|C@3A|disk-free-space-mb", + "type": "Microsoft.WorkloadMonitor/monitors", + "properties": { + "monitorName": "logical-disks|C:|disk-free-space-mb", + "monitorType": "logical-disks|*|disk-free-space-mb", + "monitoredObject": "C:", + "parentMonitorName": "logical-disks|C:", + "evaluationTimestamp": "2020-02-15T20:20:18.5765757Z", + "currentStateFirstObservedTimestamp": "2020-02-15T20:20:1.5765757Z", + "lastReportedTimestamp": "2020-02-15T20:20:18.5765757Z", + "previousMonitorState": "Healthy", + "currentMonitorState": "Warning", + "evidence": { + "reason": { + "code": 2100, + "message": "Collected samples met critical condition for this monitor." + }, + "samples": [ + { + "value": 1361.019, + "timestamp": "2020-03-24T20:51:00.6058242Z" + }, + { + "value": 1261.019, + "timestamp": "2020-03-24T21:51:00.6058242Z" + } + ] + } + } + } + } + } +} diff --git a/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/OperationList_Get.json b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/OperationList_Get.json new file mode 100644 index 000000000000..0770f659c663 --- /dev/null +++ b/specification/workloadmonitor/resource-manager/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/examples/OperationList_Get.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2020-01-13-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.WorkloadMonitor/operations/read", + "display": { + "provider": "Microsoft.WorkloadMonitor", + "resource": "Operations", + "operation": "Get operations", + "description": "Gets a list of the supported operations" + }, + "origin": "user, system" + }, + { + "name": "Microsoft.WorkloadMonitor/monitors/read", + "display": { + "provider": "Microsoft.WorkloadMonitor", + "resource": "Monitors", + "operation": "Get monitors", + "description": "Gets monitors and their current health state" + }, + "origin": "user, system" + }, + { + "name": "Microsoft.WorkloadMonitor/monitors/history/read", + "display": { + "provider": "Microsoft.WorkloadMonitor", + "resource": "Monitors", + "operation": "Get monitor history", + "description": "Gets the history of health changes of a specific monitor" + }, + "origin": "user, system" + }, + { + "name": "Microsoft.WorkloadMonitor/register/action", + "display": { + "provider": "Microsoft.WorkloadMonitor", + "resource": "WorkloadMonitor Register Subscription", + "operation": "Register Subscription for VMHealth", + "description": "Registers subscription with Microsoft.WorkloadMonitor resource provider" + }, + "origin": "user, system" + }, + { + "name": "Microsoft.WorkloadMonitor/unregister/action", + "display": { + "provider": "Microsoft.WorkloadMonitor", + "resource": "WorkloadMonitor Register Subscription", + "operation": "Unregister Subscription for VMHealth", + "description": "Unregisters subscription with Microsoft.WorkloadMonitor resource provider" + }, + "origin": "user, system" + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/workloadmonitor/resource-manager/readme.azureresourceschema.md b/specification/workloadmonitor/resource-manager/readme.azureresourceschema.md index eac59f40a454..b47a5c5f77a9 100644 --- a/specification/workloadmonitor/resource-manager/readme.azureresourceschema.md +++ b/specification/workloadmonitor/resource-manager/readme.azureresourceschema.md @@ -7,7 +7,7 @@ These settings apply only when `--azureresourceschema` is specified on the comma ``` yaml $(azureresourceschema) && $(multiapi) batch: - tag: schema-workloadmonitor-2018-08-31-preview - + - tag: schema-workloadmonitor-2020-01-13-preview ``` Please also specify `--azureresourceschema-folder=`. @@ -22,3 +22,14 @@ input-file: - Microsoft.WorkloadMonitor/preview/2018-08-31-preview/Microsoft.WorkloadMonitor.json ``` + +### Tag: schema-workloadmonitor-2020-01-13-preview and azureresourceschema + +``` yaml $(tag) == 'schema-workloadmonitor-2020-01-13-preview' && $(azureresourceschema) +output-folder: $(azureresourceschema-folder)/schemas + +# all the input files in this apiVersion +input-file: + - Microsoft.WorkloadMonitor/preview/2020-01-13-preview/Microsoft.WorkloadMonitor.json + +``` diff --git a/specification/workloadmonitor/resource-manager/readme.md b/specification/workloadmonitor/resource-manager/readme.md index c5f72c03751d..a7d48651f23a 100644 --- a/specification/workloadmonitor/resource-manager/readme.md +++ b/specification/workloadmonitor/resource-manager/readme.md @@ -24,7 +24,7 @@ These are the global settings for the API. ``` yaml openapi-type: arm -tag: package-2018-08-31-preview +tag: package-2020-01-13-preview ``` @@ -43,6 +43,21 @@ directive: - R3026 # Create/Update/Delete operations are not exposed. ``` +### Tag: package-2020-01-13-preview + +These settings apply only when `--tag=package-2020-01-13-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2020-01-13-preview' +input-file: +- Microsoft.WorkloadMonitor/preview/2020-01-13-preview/Microsoft.WorkloadMonitor.json +``` + +``` yaml +directive: +- suppress: + - R3026 # Create/Update/Delete operations are not exposed. +``` + --- # Code Generation @@ -122,6 +137,7 @@ go: ``` yaml $(go) && $(multiapi) batch: + - tag: package-2020-01-13-preview - tag: package-2018-08-31-preview ``` @@ -134,6 +150,15 @@ Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-2020-01-13-preview' && $(go) +output-folder: $(go-sdk-folder)/services/preview/workloadmonitor/mgmt/2020-01-13-preview/workloadmonitor +``` + ## Java @@ -153,6 +178,7 @@ output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-workloadmonitor ``` yaml $(java) && $(multiapi) batch: + - tag: package-2020-01-13-preview - tag: package-2018-08-31-preview ``` @@ -169,7 +195,44 @@ regenerate-manager: true generate-interface: true ``` +### Tag: package-2020-01-13-preview and java + +These settings apply only when `--tag=package-2020-01-13-preview --java` is specified on the command line. +Please also specify `--azure-libraries-for-java-folder=`. + +``` yaml $(tag) == 'package-2020-01-13-preview' && $(java) && $(multiapi) +java: + namespace: com.microsoft.azure.management.workloadmonitor.v2020-01-13-preview + output-folder: $(azure-libraries-for-java-folder)/sdk/workloadmonitor/mgmt-v2020-01-13-preview +regenerate-manager: true +generate-interface: true +``` + ## AzureResourceSchema See configuration in [readme.azureresourceschema.md](./readme.azureresourceschema.md) +## Multi-API/Profile support for AutoRest v3 generators + +AutoRest V3 generators require the use of `--tag=all-api-versions` to select api files. + +This block is updated by an automatic script. Edits may be lost! + +``` yaml $(tag) == 'all-api-versions' /* autogenerated */ +# include the azure profile definitions from the standard location +require: $(this-folder)/../../../profiles/readme.md + +# all the input files across all versions +input-file: + - $(this-folder)/Microsoft.WorkloadMonitor/preview/2018-08-31-preview/Microsoft.WorkloadMonitor.json + - $(this-folder)/Microsoft.WorkloadMonitor/preview/2020-01-13-preview/Microsoft.WorkloadMonitor.json + +``` + +If there are files that should not be in the `all-api-versions` set, +uncomment the `exclude-file` section below and add the file paths. + +``` yaml $(tag) == 'all-api-versions' +#exclude-file: +# - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json +``` \ No newline at end of file