Skip to content

Commit

Permalink
Adding new resource type for alerts meta data (Azure#6459)
Browse files Browse the repository at this point in the history
* Alerts meta data api

* Added example for alerts meta data resource type

* Added identifier parameter to examples/AlertsMetaData_MonitorService.json file

* Fix value of identifier parameter in examples/AlertsMetaData_MonitorService.json file

* Fix value of identifier parameter in examples/AlertsMetaData_MonitorService.json file

* Added one more enum value for identifier enum

* Added remove added extra enum value for identifier enum

* Added enum for identifier in definitions

* Rename identifier in definitions to metadataIdentifier

* Added enum for metadataIdentifier in definitions

* Added enum for metadataIdentifier in definitions

* Update test title in AlertsManagement.json

* Schematic changes

* Added defination for monitor service

* Added defination for monitor service

* Added defination for monitor service

* Use discriminator for data of alerts meta properties

* Fix error

* Fix error
  • Loading branch information
ShivGhatbale authored and celikcigdem committed Jul 17, 2019
1 parent 21f1fc6 commit 54f111d
Show file tree
Hide file tree
Showing 2 changed files with 199 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,36 @@
}
}
},
"/providers/Microsoft.AlertsManagement/alertsMetaData": {
"get": {
"operationId": "Alerts_MetaData",
"description": "List alerts meta data information based on value of identifier parameter.",
"parameters": [
{
"$ref": "#/parameters/api-version"
},
{
"$ref": "#/parameters/identifier"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "OK. Successfully listed alert meta data.",
"schema": {
"$ref": "#/definitions/alertsMetaData"
}
}
},
"x-ms-examples": {
"MonService": {
"$ref": "./examples/AlertsMetaData_MonitorService.json"
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts": {
"get": {
"operationId": "Alerts_GetAll",
Expand Down Expand Up @@ -1269,6 +1299,20 @@
"in": "query",
"required": false,
"x-ms-parameter-location": "method"
},
"identifier": {
"name": "identifier",
"description": "Identification of the information to be retrieved by API call.",
"type": "string",
"in": "query",
"required": true,
"enum": [
"MonitorServiceList"
],
"x-ms-enum": {
"name": "identifier",
"modelAsString": true
}
}
},
"definitions": {
Expand Down Expand Up @@ -2293,6 +2337,71 @@
"description": "tags to be updated"
}
}
},
"alertsMetaData": {
"description": "alert meta data information.",
"properties": {
"properties": {
"$ref": "#/definitions/alertsMetaDataProperties"
}
}
},
"alertsMetaDataProperties": {
"description": "alert meta data property bag",
"discriminator": "metadataIdentifier",
"required": [
"metadataIdentifier"
],
"properties": {
"metadataIdentifier": {
"type": "string",
"description": "Identification of the information to be retrieved by API call",
"enum": [
"MonitorServiceList"
],
"x-ms-enum": {
"name": "metadataIdentifier",
"modelAsString": true
}
}
}
},
"MonitorServiceList": {
"title": "Monitor service details",
"description": "Monitor service details",
"required": [
"data"
],
"allOf": [
{
"$ref": "#/definitions/alertsMetaDataProperties"
},
{
"type": "object"
}
],
"properties": {
"data": {
"description": "Array of operations",
"type": "array",
"items": {
"$ref": "#/definitions/MonitorServiceDetails"
}
}
}
},
"MonitorServiceDetails": {
"description": "Details of a monitor service",
"properties": {
"name": {
"type": "string",
"description": "Monitor service name"
},
"displayName": {
"type": "string",
"description": "Monitor service display name"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"parameters": {
"api-version": "2019-05-05-preview",
"identifier": "MonitorServiceList"
},
"responses": {
"200": {
"body": {
"properties": {
"metadataIdentifier": "MonitorServiceList",
"data": [
{
"name": "ActivityLog Administrative",
"displayName": "Activity Log - Administrative"
},
{
"name": "ActivityLog Autoscale",
"displayName": "Activity Log - Autoscale"
},
{
"name": "ActivityLog Policy",
"displayName": "Activity Log - Policy"
},
{
"name": "ActivityLog Recommendation",
"displayName": "Activity Log - Recommendation"
},
{
"name": "ActivityLog Security",
"displayName": "Activity Log - Security"
},
{
"name": "Application Insights",
"displayName": "Application Insights"
},
{
"name": "Azure Backup",
"displayName": "Azure Backup"
},
{
"name": "Custom",
"displayName": "Custom"
},
{
"name": "Data Box Edge",
"displayName": "Data Box Edge"
},
{
"name": "VM Insights",
"displayName": "VM Insights"
},
{
"name": "Log Analytics",
"displayName": "Log Analytics"
},
{
"name": "Nagios",
"displayName": "NAGIOS"
},
{
"name": "Platform",
"displayName": "Platform"
},
{
"name": "Resource Health",
"displayName": "Resource Health"
},
{
"name": "SCOM",
"displayName": "SCOM"
},
{
"name": "ServiceHealth",
"displayName": "Service Health"
},
{
"name": "Smart Detector",
"displayName": "SmartDetector"
},
{
"name": "Zabbix",
"displayName": "ZABBIX"
}
]
}
}
}
}
}

0 comments on commit 54f111d

Please sign in to comment.