diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/actionGroups_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/actionGroups_API.json index ab7dc08ba576..9c47e7b9c121 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/actionGroups_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/actionGroups_API.json @@ -352,16 +352,6 @@ "readOnly": true, "description": "Azure resource type" }, - "kind": { - "type": "string", - "readOnly": true, - "description": "Azure resource kind" - }, - "identity": { - "type": "string", - "readOnly": true, - "description": "Azure resource identity" - }, "location": { "type": "string", "description": "Resource location", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-06-01/actionGroups_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-06-01/actionGroups_API.json index d52602686f35..6682914c137d 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-06-01/actionGroups_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-06-01/actionGroups_API.json @@ -352,16 +352,6 @@ "readOnly": true, "description": "Azure resource type" }, - "kind": { - "type": "string", - "readOnly": true, - "description": "Azure resource kind" - }, - "identity": { - "type": "string", - "readOnly": true, - "description": "Azure resource identity" - }, "location": { "type": "string", "description": "Resource location", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/actionGroups_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/actionGroups_API.json index 6ebc6927a6cd..69e5861381f1 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/actionGroups_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/actionGroups_API.json @@ -219,7 +219,7 @@ "description": "Send test notifications to a set of provided receivers", "operationId": "ActionGroups_PostTestNotifications", "x-ms-examples": { - "List action groups": { + "Create notifications at subscription level": { "$ref": "./examples/postTestNotifications.json" } }, @@ -242,9 +242,137 @@ ], "responses": { "202": { + "description": "The notification request accepted", + "headers": { + "location": { + "type": "string", + "description": "The location header that has the polling uri." + } + } + }, + "200": { + "description": "The notification succeeded", + "schema": { + "$ref": "#/definitions/TestNotificationDetailsResponse" + } + }, + "default": { + "description": "An error occurred while sending the test notifications", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/createNotifications": { + "post": { + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "description": "Send test notifications to a set of provided receivers", + "operationId": "ActionGroups_CreateNotificationsAtResourceGroupLevel", + "x-ms-examples": { + "Create notifications at resource group level": { + "$ref": "./examples/postTestNotificationsAtResourceGroupLevel.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "notificationRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/NotificationRequestBody" + }, + "description": "The notification request body which includes the contact details" + } + ], + "responses": { + "202": { + "description": "The notification request accepted", + "headers": { + "location": { + "type": "string", + "description": "The location header that has the polling uri." + } + } + }, + "200": { + "description": "The notification succeeded", + "schema": { + "$ref": "#/definitions/TestNotificationDetailsResponse" + } + }, + "default": { + "description": "An error occurred while sending the test notifications", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/createNotifications": { + "post": { + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "description": "Send test notifications to a set of provided receivers", + "operationId": "ActionGroups_CreateNotificationsAtActionGroupResourceLevel", + "x-ms-examples": { + "Create notifications at resource group level": { + "$ref": "./examples/postTestNotificationsAtActionGroupResourceLevel.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "notificationRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/NotificationRequestBody" + }, + "description": "The notification request body which includes the contact details" + } + ], + "responses": { + "202": { + "description": "The notification request accepted", + "headers": { + "location": { + "type": "string", + "description": "The location header that has the polling uri." + } + } + }, + "200": { "description": "The notification succeeded", "schema": { - "$ref": "#/definitions/TestNotificationResponse" + "$ref": "#/definitions/TestNotificationDetailsResponse" } }, "default": { @@ -261,7 +389,7 @@ "description": "Get the test notifications by the notification id", "operationId": "ActionGroups_GetTestNotifications", "x-ms-examples": { - "Get notification details": { + "Get notification details at subscription level": { "$ref": "./examples/getTestNotifications.json" } }, @@ -292,12 +420,93 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/notificationStatus/{notificationId}": { + "get": { + "description": "Get the test notifications by the notification id", + "operationId": "ActionGroups_GetTestNotificationsAtResourceGroupLevel", + "x-ms-examples": { + "Get notification details at resource group level": { + "$ref": "./examples/getTestNotificationsAtResourceGroupLevel.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/NotificationIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The notification details", + "schema": { + "$ref": "#/definitions/TestNotificationDetailsResponse" + } + }, + "default": { + "description": "An error occurred while sending the test notifications", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/notificationStatus/{notificationId}": { + "get": { + "description": "Get the test notifications by the notification id", + "operationId": "ActionGroups_GetTestNotificationsAtActionGroupResourceLevel", + "x-ms-examples": { + "Get notification details at resource group level": { + "$ref": "./examples/getTestNotificationsAtActionGroupResourceLevel.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "#/parameters/NotificationIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The notification details", + "schema": { + "$ref": "#/definitions/TestNotificationDetailsResponse" + } + }, + "default": { + "description": "An error occurred while sending the test notifications", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/actionGroups": { "get": { "description": "Get a list of all action groups in a subscription.", "operationId": "ActionGroups_ListBySubscriptionId", "x-ms-examples": { - "List action groups": { + "List action groups at subscription level": { "$ref": "./examples/listActionGroups.json" } }, @@ -333,7 +542,7 @@ "description": "Get a list of all action groups in a resource group.", "operationId": "ActionGroups_ListByResourceGroup", "x-ms-examples": { - "List action groups": { + "List action groups at resource group level": { "$ref": "./examples/listActionGroups.json" } }, @@ -435,16 +644,6 @@ "readOnly": true, "description": "Azure resource type" }, - "kind": { - "type": "string", - "readOnly": true, - "description": "Azure resource kind" - }, - "identity": { - "type": "string", - "readOnly": true, - "description": "Azure resource identity" - }, "location": { "type": "string", "description": "Resource location", @@ -468,62 +667,39 @@ "x-ms-azure-resource": true, "description": "An azure resource object" }, - "TestNotificationResponse": { - "description": "The response when test notification succeeded", - "type": "object", - "properties": { - "notificationId": { - "type": "string", - "description": "The notification id" - }, - "correlationId": { - "type": "string", - "description": "The correlation id" - }, - "createdTime": { - "type": "string", - "description": "The created time" - } - }, - "required": [ - "notificationId", - "correlationId", - "createdTime" - ] - }, "TestNotificationDetailsResponse": { "description": "The details of the test notification results.", "type": "object", "properties": { - "Context": { + "context": { "type": "object", "$ref": "#/definitions/Context" }, - "State": { + "state": { "type": "string", "description": "The overall state" }, - "CompletedTime": { + "completedTime": { "type": "string", "description": "The completed time" }, - "CreatedTime": { + "createdTime": { "type": "string", "description": "The created time" }, - "ActionDetails": { + "actionDetails": { + "x-ms-identifiers": [ + "name" + ], "type": "array", "items": { "$ref": "#/definitions/ActionDetail" }, - "x-ms-identifiers": [ - "Name" - ], "description": "The list of action detail" } }, "required": [ - "State" + "state" ] }, "ActionDetail": { @@ -560,11 +736,11 @@ "description": "The context info", "type": "object", "properties": { - "NotificationSource": { + "notificationSource": { "type": "string", "description": "The source of the notification request" }, - "ContextType": { + "contextType": { "type": "string", "description": "The context id type" } diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/getTestNotifications.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/getTestNotifications.json index 372cac27dd3e..8a88b0772731 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/getTestNotifications.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/getTestNotifications.json @@ -8,17 +8,17 @@ "200": { "headers": {}, "body": { - "Context": { - "NotificationSource": "Microsoft.Insights/TestNotification", - "ContextType": "Microsoft.Insights/Budget" + "context": { + "notificationSource": "Microsoft.Insights/TestNotification", + "contextType": "Microsoft.Insights/Budget" }, - "State": "Completed", - "CompletedTime": "0001-01-01T00:00:00+00:00", - "CreatedTime": "2021-09-21T04:52:29.5091168+00:00", - "ActionDetails": [ + "state": "Completed", + "completedTime": "0001-01-01T00:00:00+00:00", + "createdTime": "2021-09-21T04:52:29.5091168+00:00", + "actionDetails": [ { "MechanismType": "AzureAppPush", - "Name": "AzureAppPush", + "Name": "AzureAppPush-name", "Status": "Completed", "SubState": "Default", "SendTime": "2021-09-21T04:52:42.8620629+00:00", @@ -26,7 +26,7 @@ }, { "MechanismType": "AzureFunction", - "Name": "AzureFunction-1", + "Name": "AzureFunction-name", "Status": "Completed", "SubState": "Default", "SendTime": "2021-09-21T04:52:42.0623319+00:00", @@ -34,7 +34,7 @@ }, { "MechanismType": "Email", - "Name": "Email-2", + "Name": "Email-name", "Status": "Completed", "SubState": "Default", "SendTime": "2021-09-21T04:52:40.7480368+00:00", @@ -42,15 +42,23 @@ }, { "MechanismType": "LogicApp", - "Name": "Sample logicApp", + "Name": "LogicApp-Name", "Status": "Completed", "SubState": "Default", "SendTime": "2021-09-21T04:52:42.2473419+00:00", "Detail": null }, + { + "MechanismType": "Webhook", + "Name": "Webhook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, { "MechanismType": "SecureWebhook", - "Name": "SecureWebhook-1", + "Name": "SecureWebhook-name", "Status": "Completed", "SubState": "Default", "SendTime": "2021-09-21T04:52:42.0723479+00:00", @@ -58,7 +66,7 @@ }, { "MechanismType": "Sms", - "Name": "Sms-1", + "Name": "Sms-name", "Status": "Completed", "SubState": "Default", "SendTime": "2021-09-21T04:52:41.353015+00:00", @@ -66,11 +74,35 @@ }, { "MechanismType": "Voice", - "Name": "Voice-1", + "Name": "Voice-name", "Status": "Completed", "SubState": "Default", "SendTime": "2021-09-21T04:52:41.6330734+00:00", "Detail": null + }, + { + "MechanismType": "EventHub", + "Name": "EventHub-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "AutomationRunbook", + "Name": "AutomationRunbook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "Itsm", + "Name": "Itsm-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null } ] } diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/getTestNotificationsAtActionGroupResourceLevel.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/getTestNotificationsAtActionGroupResourceLevel.json new file mode 100644 index 000000000000..6add9debedb2 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/getTestNotificationsAtActionGroupResourceLevel.json @@ -0,0 +1,113 @@ +{ + "parameters": { + "subscriptionId": "11111111-1111-1111-1111-111111111111", + "resourceGroupName": "TestRgName", + "actionGroupName": "TestAgName", + "notificationId": "11000222191287", + "api-version": "2021-09-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "context": { + "notificationSource": "Microsoft.Insights/TestNotification", + "contextType": "Microsoft.Insights/Budget" + }, + "state": "Completed", + "completedTime": "0001-01-01T00:00:00+00:00", + "createdTime": "2021-09-21T04:52:29.5091168+00:00", + "actionDetails": [ + { + "MechanismType": "AzureAppPush", + "Name": "AzureAppPush-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.8620629+00:00", + "Detail": null + }, + { + "MechanismType": "AzureFunction", + "Name": "AzureFunction-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0623319+00:00", + "Detail": null + }, + { + "MechanismType": "Email", + "Name": "Email-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:40.7480368+00:00", + "Detail": null + }, + { + "MechanismType": "LogicApp", + "Name": "LogicApp-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.2473419+00:00", + "Detail": null + }, + { + "MechanismType": "Webhook", + "Name": "Webhook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "SecureWebhook", + "Name": "SecureWebhook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "Sms", + "Name": "Sms-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:41.353015+00:00", + "Detail": null + }, + { + "MechanismType": "Voice", + "Name": "Voice-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:41.6330734+00:00", + "Detail": null + }, + { + "MechanismType": "EventHub", + "Name": "EventHub-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "AutomationRunbook", + "Name": "AutomationRunbook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "Itsm", + "Name": "Itsm-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/getTestNotificationsAtResourceGroupLevel.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/getTestNotificationsAtResourceGroupLevel.json new file mode 100644 index 000000000000..7fe9b182b2c6 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/getTestNotificationsAtResourceGroupLevel.json @@ -0,0 +1,112 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-TestNotifications", + "notificationId": "11000222191287", + "api-version": "2021-09-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "context": { + "notificationSource": "Microsoft.Insights/TestNotification", + "contextType": "Microsoft.Insights/Budget" + }, + "state": "Completed", + "completedTime": "0001-01-01T00:00:00+00:00", + "createdTime": "2021-09-21T04:52:29.5091168+00:00", + "actionDetails": [ + { + "MechanismType": "AzureAppPush", + "Name": "AzureAppPush-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.8620629+00:00", + "Detail": null + }, + { + "MechanismType": "AzureFunction", + "Name": "AzureFunction-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0623319+00:00", + "Detail": null + }, + { + "MechanismType": "Email", + "Name": "Email-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:40.7480368+00:00", + "Detail": null + }, + { + "MechanismType": "LogicApp", + "Name": "LogicApp-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.2473419+00:00", + "Detail": null + }, + { + "MechanismType": "Webhook", + "Name": "Webhook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "SecureWebhook", + "Name": "SecureWebhook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "Sms", + "Name": "Sms-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:41.353015+00:00", + "Detail": null + }, + { + "MechanismType": "Voice", + "Name": "Voice-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:41.6330734+00:00", + "Detail": null + }, + { + "MechanismType": "EventHub", + "Name": "EventHub-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "AutomationRunbook", + "Name": "AutomationRunbook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "Itsm", + "Name": "Itsm-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/postTestNotifications.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/postTestNotifications.json index 641f612308eb..410c173a3d92 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/postTestNotifications.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/postTestNotifications.json @@ -102,16 +102,127 @@ "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84" } + ], + "armRoleReceivers": [ + { + "name": "ArmRole-Common", + "roleId": "11111111-1111-1111-1111-111111111111", + "useCommonAlertSchema": true + }, + { + "name": "ArmRole-nonCommon", + "roleId": "11111111-1111-1111-1111-111111111111", + "useCommonAlertSchema": false + } ] } }, "responses": { "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/11111111-1111-1111-1111-111111111111/providers/microsoft.insights/notificationStatus/11111111111111?api-version=2022-06-01" + } + }, + "200": { "headers": {}, "body": { - "notificationId": "11000222191287", - "correlationId": "5000094c-7f6b-49f2-a0ad-c620c65d34b5", - "createdTime": "2021-09-21T03:05:17+00:00" + "context": { + "notificationSource": "Microsoft.Insights/TestNotification", + "contextType": "Microsoft.Insights/Budget" + }, + "state": "Completed", + "completedTime": "0001-01-01T00:00:00+00:00", + "createdTime": "2021-09-21T04:52:29.5091168+00:00", + "actionDetails": [ + { + "MechanismType": "AzureAppPush", + "Name": "AzureAppPush-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.8620629+00:00", + "Detail": null + }, + { + "MechanismType": "AzureFunction", + "Name": "AzureFunction-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0623319+00:00", + "Detail": null + }, + { + "MechanismType": "Email", + "Name": "Email-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:40.7480368+00:00", + "Detail": null + }, + { + "MechanismType": "LogicApp", + "Name": "LogicApp-Name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.2473419+00:00", + "Detail": null + }, + { + "MechanismType": "Webhook", + "Name": "Webhook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "SecureWebhook", + "Name": "SecureWebhook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "Sms", + "Name": "Sms-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:41.353015+00:00", + "Detail": null + }, + { + "MechanismType": "Voice", + "Name": "Voice-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:41.6330734+00:00", + "Detail": null + }, + { + "MechanismType": "EventHub", + "Name": "EventHub-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "AutomationRunbook", + "Name": "AutomationRunbook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "Itsm", + "Name": "Itsm-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + } + ] } } } diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/postTestNotificationsAtActionGroupResourceLevel.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/postTestNotificationsAtActionGroupResourceLevel.json new file mode 100644 index 000000000000..52b6161a1622 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/postTestNotificationsAtActionGroupResourceLevel.json @@ -0,0 +1,231 @@ +{ + "parameters": { + "subscriptionId": "11111111-1111-1111-1111-111111111111", + "resourceGroupName": "TestRgName", + "actionGroupName": "TestAgName", + "api-version": "2021-09-01", + "notificationRequest": { + "alertType": "budget", + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "useCommonAlertSchema": false + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "1234567890" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook 1", + "serviceUri": "http://www.example.com/webhook1", + "useCommonAlertSchema": true + }, + { + "name": "Sample webhook 2", + "serviceUri": "http://www.example.com/webhook2", + "useCommonAlertSchema": true, + "useAadAuth": true, + "objectId": "d3bb868c-fe44-452c-aa26-769a6538c808", + "identifierUri": "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84" + } + ], + "itsmReceivers": [ + { + "name": "Sample itsm", + "workspaceId": "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c", + "connectionId": "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", + "ticketConfiguration": "{\"PayloadRevision\":0,\"WorkItemType\":\"Incident\",\"UseTemplate\":false,\"WorkItemData\":\"{}\",\"CreateOneWIPerCI\":false}", + "region": "westcentralus" + } + ], + "azureAppPushReceivers": [ + { + "name": "Sample azureAppPush", + "emailAddress": "johndoe@email.com" + } + ], + "automationRunbookReceivers": [ + { + "automationAccountId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", + "runbookName": "Sample runbook", + "webhookResourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084", + "isGlobalRunbook": false, + "name": "testRunbook", + "serviceUri": "http://test.me", + "useCommonAlertSchema": true + } + ], + "voiceReceivers": [ + { + "name": "Sample voice", + "countryCode": "1", + "phoneNumber": "1234567890" + } + ], + "logicAppReceivers": [ + { + "name": "Sample logicApp", + "resourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", + "callbackUrl": "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", + "useCommonAlertSchema": false + } + ], + "azureFunctionReceivers": [ + { + "name": "Sample azureFunction", + "functionAppResourceId": "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", + "functionName": "HttpTriggerCSharp1", + "httpTriggerUrl": "http://test.me", + "useCommonAlertSchema": true + } + ], + "eventHubReceivers": [ + { + "name": "Sample eventHub", + "eventHubNameSpace": "testEventHubNameSpace", + "eventHubName": "testEventHub", + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84" + } + ], + "armRoleReceivers": [ + { + "name": "ArmRole-Common", + "roleId": "11111111-1111-1111-1111-111111111111", + "useCommonAlertSchema": true + }, + { + "name": "ArmRole-nonCommon", + "roleId": "11111111-1111-1111-1111-111111111111", + "useCommonAlertSchema": false + } + ] + } + }, + "responses": { + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/TestRgName/providers/microsoft.insights/actionGroups/TestAgName/notificationStatus/11111111111111?api-version=2022-06-01" + } + }, + "200": { + "headers": {}, + "body": { + "context": { + "notificationSource": "Microsoft.Insights/TestNotification", + "contextType": "Microsoft.Insights/Budget" + }, + "state": "Completed", + "completedTime": "0001-01-01T00:00:00+00:00", + "createdTime": "2021-09-21T04:52:29.5091168+00:00", + "actionDetails": [ + { + "MechanismType": "AzureAppPush", + "Name": "AzureAppPush-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.8620629+00:00", + "Detail": null + }, + { + "MechanismType": "AzureFunction", + "Name": "AzureFunction-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0623319+00:00", + "Detail": null + }, + { + "MechanismType": "Email", + "Name": "Email-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:40.7480368+00:00", + "Detail": null + }, + { + "MechanismType": "LogicApp", + "Name": "LogicApp-Name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.2473419+00:00", + "Detail": null + }, + { + "MechanismType": "Webhook", + "Name": "Webhook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "SecureWebhook", + "Name": "SecureWebhook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "Sms", + "Name": "Sms-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:41.353015+00:00", + "Detail": null + }, + { + "MechanismType": "Voice", + "Name": "Voice-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:41.6330734+00:00", + "Detail": null + }, + { + "MechanismType": "EventHub", + "Name": "EventHub-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "AutomationRunbook", + "Name": "AutomationRunbook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "Itsm", + "Name": "Itsm-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/postTestNotificationsAtResourceGroupLevel.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/postTestNotificationsAtResourceGroupLevel.json new file mode 100644 index 000000000000..ad8723a4f674 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/postTestNotificationsAtResourceGroupLevel.json @@ -0,0 +1,230 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-TestNotifications", + "api-version": "2021-09-01", + "notificationRequest": { + "alertType": "budget", + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "useCommonAlertSchema": false + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "1234567890" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook 1", + "serviceUri": "http://www.example.com/webhook1", + "useCommonAlertSchema": true + }, + { + "name": "Sample webhook 2", + "serviceUri": "http://www.example.com/webhook2", + "useCommonAlertSchema": true, + "useAadAuth": true, + "objectId": "d3bb868c-fe44-452c-aa26-769a6538c808", + "identifierUri": "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84" + } + ], + "itsmReceivers": [ + { + "name": "Sample itsm", + "workspaceId": "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c", + "connectionId": "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", + "ticketConfiguration": "{\"PayloadRevision\":0,\"WorkItemType\":\"Incident\",\"UseTemplate\":false,\"WorkItemData\":\"{}\",\"CreateOneWIPerCI\":false}", + "region": "westcentralus" + } + ], + "azureAppPushReceivers": [ + { + "name": "Sample azureAppPush", + "emailAddress": "johndoe@email.com" + } + ], + "automationRunbookReceivers": [ + { + "automationAccountId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", + "runbookName": "Sample runbook", + "webhookResourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084", + "isGlobalRunbook": false, + "name": "testRunbook", + "serviceUri": "http://test.me", + "useCommonAlertSchema": true + } + ], + "voiceReceivers": [ + { + "name": "Sample voice", + "countryCode": "1", + "phoneNumber": "1234567890" + } + ], + "logicAppReceivers": [ + { + "name": "Sample logicApp", + "resourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", + "callbackUrl": "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", + "useCommonAlertSchema": false + } + ], + "azureFunctionReceivers": [ + { + "name": "Sample azureFunction", + "functionAppResourceId": "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", + "functionName": "HttpTriggerCSharp1", + "httpTriggerUrl": "http://test.me", + "useCommonAlertSchema": true + } + ], + "eventHubReceivers": [ + { + "name": "Sample eventHub", + "eventHubNameSpace": "testEventHubNameSpace", + "eventHubName": "testEventHub", + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84" + } + ], + "armRoleReceivers": [ + { + "name": "ArmRole-Common", + "roleId": "11111111-1111-1111-1111-111111111111", + "useCommonAlertSchema": true + }, + { + "name": "ArmRole-nonCommon", + "roleId": "11111111-1111-1111-1111-111111111111", + "useCommonAlertSchema": false + } + ] + } + }, + "responses": { + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/Test-Rg/providers/microsoft.insights/notificationStatus/11111111111111?api-version=2022-06-01" + } + }, + "200": { + "headers": {}, + "body": { + "context": { + "notificationSource": "Microsoft.Insights/TestNotification", + "contextType": "Microsoft.Insights/Budget" + }, + "state": "Completed", + "completedTime": "0001-01-01T00:00:00+00:00", + "createdTime": "2021-09-21T04:52:29.5091168+00:00", + "actionDetails": [ + { + "MechanismType": "AzureAppPush", + "Name": "AzureAppPush-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.8620629+00:00", + "Detail": null + }, + { + "MechanismType": "AzureFunction", + "Name": "AzureFunction-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0623319+00:00", + "Detail": null + }, + { + "MechanismType": "Email", + "Name": "Email-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:40.7480368+00:00", + "Detail": null + }, + { + "MechanismType": "LogicApp", + "Name": "LogicApp-Name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.2473419+00:00", + "Detail": null + }, + { + "MechanismType": "Webhook", + "Name": "Webhook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "SecureWebhook", + "Name": "SecureWebhook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "Sms", + "Name": "Sms-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:41.353015+00:00", + "Detail": null + }, + { + "MechanismType": "Voice", + "Name": "Voice-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:41.6330734+00:00", + "Detail": null + }, + { + "MechanismType": "EventHub", + "Name": "EventHub-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "AutomationRunbook", + "Name": "AutomationRunbook-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + }, + { + "MechanismType": "Itsm", + "Name": "Itsm-name", + "Status": "Completed", + "SubState": "Default", + "SendTime": "2021-09-21T04:52:42.0723479+00:00", + "Detail": null + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/actionGroups_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/actionGroups_API.json index d2131ab6be2f..a34f37f398f6 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/actionGroups_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/actionGroups_API.json @@ -541,16 +541,6 @@ "readOnly": true, "description": "Azure resource type" }, - "kind": { - "type": "string", - "readOnly": true, - "description": "Azure resource kind" - }, - "identity": { - "type": "string", - "readOnly": true, - "description": "Azure resource identity" - }, "location": { "type": "string", "description": "Resource location", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/actionGroups_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/actionGroups_API.json index aeb89d243728..f51b4190c2f8 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/actionGroups_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/actionGroups_API.json @@ -644,16 +644,6 @@ "readOnly": true, "description": "Azure resource type" }, - "kind": { - "type": "string", - "readOnly": true, - "description": "Azure resource kind" - }, - "identity": { - "type": "string", - "readOnly": true, - "description": "Azure resource identity" - }, "location": { "type": "string", "description": "Resource location",