Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new resource type for alerts meta data #6459

Merged
merged 19 commits into from
Jul 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,36 @@
}
}
},
"/providers/Microsoft.AlertsManagement/alertsMetaData": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alertsMetadata is very generic name for this operation. Can you make it more specific. Like monitorProviders. What other things will you add to this meta data? If its not going to be lot of new things, may be you can have specific APIs to surface that information instead of clubbing it all in this API.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We wanted a generic name only. Since we want to use this resource type for utility APIs. I mean we're going to return some or other meta data info with this resource type API based on identifier passed in API param

"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 @@ -390,7 +420,7 @@
}
}
},
"x-ms-pageable": {
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
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 @@ -2127,7 +2171,7 @@
},
"ActionRuleProperties": {
"description": "Action rule properties defining scope, conditions, suppression logic for action rule",
"discriminator" : "type",
"discriminator": "type",
"required": [
"type"
],
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"
}
]
}
}
}
}
}