From 5cebaa8a9fd8ce58156f6ee468274a9360545fa2 Mon Sep 17 00:00:00 2001 From: thomasp98296 Date: Tue, 19 Apr 2022 22:29:58 -0700 Subject: [PATCH] Add new apis for test button feature (#18156) * Add new apis for test button feature * Fix bug * Revert to old package version * Fix errors * Fix errors * Fix error * Remove " * Only include the actiongroups changes in this new tag as per Dapeng. * Revert "Only include the actiongroups changes in this new tag as per Dapeng." This reverts commit 529a149b258dfa8dc8dcc52b6e1fea16ab2b40d6. * Add "x-ms-identifiers": [], * Update the default tag * Add location headers * No need to return response * build * build * format json * Prettier check Co-authored-by: Thomas Pham --- .../stable/2022-04-01/actionGroups_API.json | 1306 +++++++++++++++++ .../examples/createOrUpdateActionGroup.json | 374 +++++ .../examples/deleteActionGroup.json | 12 + .../2022-04-01/examples/enableReceiver.json | 15 + .../2022-04-01/examples/getActionGroup.json | 76 + .../examples/getTestNotifications.json | 111 ++ ...TestNotificationsAtResourceGroupLevel.json | 112 ++ .../2022-04-01/examples/listActionGroups.json | 115 ++ .../2022-04-01/examples/patchActionGroup.json | 88 ++ .../examples/postTestNotifications.json | 127 ++ ...TestNotificationsAtResourceGroupLevel.json | 128 ++ .../monitor/resource-manager/readme.md | 35 +- 12 files changed, 2497 insertions(+), 2 deletions(-) create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/actionGroups_API.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/createOrUpdateActionGroup.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/deleteActionGroup.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/enableReceiver.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/getActionGroup.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/getTestNotifications.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/getTestNotificationsAtResourceGroupLevel.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/listActionGroups.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/patchActionGroup.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/postTestNotifications.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/postTestNotificationsAtResourceGroupLevel.json 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 new file mode 100644 index 000000000000..736a1d1004c6 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/actionGroups_API.json @@ -0,0 +1,1306 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Action Groups API", + "x-ms-code-generation-settings": { + "name": "MonitorManagementClient" + }, + "version": "2022-04-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}": { + "put": { + "description": "Create a new action group or update an existing one.", + "operationId": "ActionGroups_CreateOrUpdate", + "x-ms-examples": { + "Create or update an action group": { + "$ref": "./examples/createOrUpdateActionGroup.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "name": "actionGroup", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ActionGroupResource" + }, + "description": "The action group to create or use for the update." + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "An existing action group was successfully updated.", + "schema": { + "$ref": "#/definitions/ActionGroupResource" + } + }, + "201": { + "description": "A new action group was successfully created.", + "schema": { + "$ref": "#/definitions/ActionGroupResource" + } + }, + "default": { + "description": "An error occurred and the action group could not be created or updated.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "description": "Get an action group.", + "operationId": "ActionGroups_Get", + "x-ms-examples": { + "Get an action group": { + "$ref": "./examples/getActionGroup.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/ActionGroupResource" + } + }, + "default": { + "description": "An error occurred and the action group could not be retrieved. 404: The action group does not exist.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "description": "Delete an action group.", + "operationId": "ActionGroups_Delete", + "x-ms-examples": { + "Delete an action group": { + "$ref": "./examples/deleteActionGroup.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The action group was successfully deleted." + }, + "204": { + "description": "The action group does not exist. It may have already been deleted." + }, + "default": { + "description": "An error occurred and the action group could not be deleted.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "description": "Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.", + "operationId": "ActionGroups_Update", + "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": "actionGroupPatch", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ActionGroupPatchBody" + }, + "description": "Parameters supplied to the operation." + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "An existing action group was successfully updated.", + "schema": { + "$ref": "#/definitions/ActionGroupResource" + } + } + }, + "x-ms-examples": { + "Patch an action group": { + "$ref": "./examples/patchActionGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/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_PostTestNotifications", + "x-ms-examples": { + "Create notifications at subscription level": { + "$ref": "./examples/postTestNotifications.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$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 succeeded", + "headers": { + "location": { + "type": "string", + "description": "The location header that has the polling uri." + } + } + }, + "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 succeeded", + "headers": { + "location": { + "type": "string", + "description": "The location header that has the polling uri." + } + } + }, + "default": { + "description": "An error occurred while sending the test notifications", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/notificationStatus/{notificationId}": { + "get": { + "description": "Get the test notifications by the notification id", + "operationId": "ActionGroups_GetTestNotifications", + "x-ms-examples": { + "Get notification details at subscription level": { + "$ref": "./examples/getTestNotifications.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$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/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}/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 at subscription level": { + "$ref": "./examples/listActionGroups.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/ActionGroupList" + } + }, + "default": { + "description": "An error occurred and the list of action groups could not be retrieved.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups": { + "get": { + "description": "Get a list of all action groups in a resource group.", + "operationId": "ActionGroups_ListByResourceGroup", + "x-ms-examples": { + "List action groups at resource group level": { + "$ref": "./examples/listActionGroups.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/ActionGroupList" + } + }, + "default": { + "description": "An error occurred and the list of action groups could not be retrieved.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/subscribe": { + "post": { + "description": "Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation is only supported for Email or SMS receivers.", + "operationId": "ActionGroups_EnableReceiver", + "x-ms-examples": { + "Enable the receiver": { + "$ref": "./examples/enableReceiver.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "name": "enableRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/EnableRequest" + }, + "description": "The receiver to re-enable." + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The receiver was successfully enabled." + }, + "409": { + "description": "The receiver is already enabled in the action group.", + "x-ms-error-response": true + }, + "default": { + "description": "An error occurred and the receiver could not be enabled, e.g.: 404: The action group was not found or no matching receiver was found in the action group.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "AzureResource": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Azure resource name" + }, + "type": { + "type": "string", + "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", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "tags": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "Resource tags" + } + }, + "required": [ + "location" + ], + "type": "object", + "x-ms-azure-resource": true, + "description": "An azure resource object" + }, + "TestNotificationDetailsResponse": { + "description": "The details of the test notification results.", + "type": "object", + "properties": { + "Context": { + "type": "object", + "$ref": "#/definitions/Context" + }, + "State": { + "type": "string", + "description": "The overall state" + }, + "CompletedTime": { + "type": "string", + "description": "The completed time" + }, + "CreatedTime": { + "type": "string", + "description": "The created time" + }, + "ActionDetails": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/ActionDetail" + }, + "description": "The list of action detail" + } + }, + "required": [ + "State" + ] + }, + "ActionDetail": { + "description": "The action detail", + "type": "object", + "properties": { + "MechanismType": { + "type": "string", + "description": "The mechanism type" + }, + "Name": { + "type": "string", + "description": "The name of the action" + }, + "Status": { + "type": "string", + "description": "The status of the action" + }, + "SubState": { + "type": "string", + "description": "The substatus of the action" + }, + "SendTime": { + "type": "string", + "description": "The send time" + }, + "Detail": { + "type": "string", + "description": "The detail of the friendly error message" + } + } + }, + "Context": { + "description": "The context info", + "type": "object", + "properties": { + "NotificationSource": { + "type": "string", + "description": "The source of the notification request" + }, + "ContextType": { + "type": "string", + "description": "The context id type" + } + } + }, + "ActionGroupResource": { + "description": "An action group resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AzureResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ActionGroup", + "description": "The action groups properties of the resource." + } + } + }, + "ActionGroupList": { + "description": "A list of action groups.", + "type": "object", + "properties": { + "value": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/ActionGroupResource" + }, + "description": "The list of action groups." + }, + "nextLink": { + "type": "string", + "description": "Provides the link to retrieve the next set of elements." + } + } + }, + "NotificationRequestBody": { + "description": "The request body which contain contact detail metadata", + "type": "object", + "properties": { + "alertType": { + "type": "string", + "maxLength": 30, + "description": "The name of the supported alert type." + }, + "emailReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/EmailReceiver" + }, + "description": "The list of email receivers that are part of this action group." + }, + "smsReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/SmsReceiver" + }, + "description": "The list of SMS receivers that are part of this action group." + }, + "webhookReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/WebhookReceiver" + }, + "description": "The list of webhook receivers that are part of this action group." + }, + "itsmReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/ItsmReceiver" + }, + "description": "The list of ITSM receivers that are part of this action group." + }, + "azureAppPushReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/AzureAppPushReceiver" + }, + "description": "The list of AzureAppPush receivers that are part of this action group." + }, + "automationRunbookReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/AutomationRunbookReceiver" + }, + "description": "The list of AutomationRunbook receivers that are part of this action group." + }, + "voiceReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/VoiceReceiver" + }, + "description": "The list of voice receivers that are part of this action group." + }, + "logicAppReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/LogicAppReceiver" + }, + "description": "The list of logic app receivers that are part of this action group." + }, + "azureFunctionReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/AzureFunctionReceiver" + }, + "description": "The list of azure function receivers that are part of this action group." + }, + "armRoleReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/ArmRoleReceiver" + }, + "description": "The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported." + }, + "eventHubReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/EventHubReceiver" + }, + "description": "The list of event hub receivers that are part of this action group." + } + }, + "required": [ + "alertType" + ] + }, + "ActionGroup": { + "description": "An Azure action group.", + "type": "object", + "properties": { + "groupShortName": { + "type": "string", + "maxLength": 12, + "description": "The short name of the action group. This will be used in SMS messages." + }, + "enabled": { + "type": "boolean", + "default": true, + "description": "Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications." + }, + "emailReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/EmailReceiver" + }, + "description": "The list of email receivers that are part of this action group." + }, + "smsReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/SmsReceiver" + }, + "description": "The list of SMS receivers that are part of this action group." + }, + "webhookReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/WebhookReceiver" + }, + "description": "The list of webhook receivers that are part of this action group." + }, + "itsmReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/ItsmReceiver" + }, + "description": "The list of ITSM receivers that are part of this action group." + }, + "azureAppPushReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/AzureAppPushReceiver" + }, + "description": "The list of AzureAppPush receivers that are part of this action group." + }, + "automationRunbookReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/AutomationRunbookReceiver" + }, + "description": "The list of AutomationRunbook receivers that are part of this action group." + }, + "voiceReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/VoiceReceiver" + }, + "description": "The list of voice receivers that are part of this action group." + }, + "logicAppReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/LogicAppReceiver" + }, + "description": "The list of logic app receivers that are part of this action group." + }, + "azureFunctionReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/AzureFunctionReceiver" + }, + "description": "The list of azure function receivers that are part of this action group." + }, + "armRoleReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/ArmRoleReceiver" + }, + "description": "The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported." + }, + "eventHubReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/EventHubReceiver" + }, + "description": "The list of event hub receivers that are part of this action group." + } + }, + "required": [ + "groupShortName", + "enabled" + ] + }, + "EmailReceiver": { + "description": "An email receiver.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the email receiver. Names must be unique across all receivers within an action group." + }, + "emailAddress": { + "type": "string", + "description": "The email address of this receiver." + }, + "useCommonAlertSchema": { + "type": "boolean", + "default": false, + "description": "Indicates whether to use common alert schema." + }, + "status": { + "readOnly": true, + "$ref": "#/definitions/ReceiverStatus", + "description": "The receiver status of the e-mail." + } + }, + "required": [ + "name", + "emailAddress" + ] + }, + "SmsReceiver": { + "description": "An SMS receiver.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the SMS receiver. Names must be unique across all receivers within an action group." + }, + "countryCode": { + "type": "string", + "description": "The country code of the SMS receiver." + }, + "phoneNumber": { + "type": "string", + "description": "The phone number of the SMS receiver." + }, + "status": { + "readOnly": true, + "$ref": "#/definitions/ReceiverStatus", + "description": "The status of the receiver." + } + }, + "required": [ + "name", + "countryCode", + "phoneNumber" + ] + }, + "WebhookReceiver": { + "description": "A webhook receiver.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the webhook receiver. Names must be unique across all receivers within an action group." + }, + "serviceUri": { + "type": "string", + "description": "The URI where webhooks should be sent." + }, + "useCommonAlertSchema": { + "type": "boolean", + "default": false, + "description": "Indicates whether to use common alert schema." + }, + "useAadAuth": { + "type": "boolean", + "default": false, + "description": "Indicates whether or not use AAD authentication." + }, + "objectId": { + "type": "string", + "description": "Indicates the webhook app object Id for aad auth." + }, + "identifierUri": { + "type": "string", + "description": "Indicates the identifier uri for aad auth." + }, + "tenantId": { + "type": "string", + "description": "Indicates the tenant id for aad auth." + } + }, + "required": [ + "name", + "serviceUri" + ] + }, + "ItsmReceiver": { + "description": "An Itsm receiver.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the Itsm receiver. Names must be unique across all receivers within an action group." + }, + "workspaceId": { + "type": "string", + "description": "OMS LA instance identifier." + }, + "connectionId": { + "type": "string", + "description": "Unique identification of ITSM connection among multiple defined in above workspace." + }, + "ticketConfiguration": { + "type": "string", + "description": "JSON blob for the configurations of the ITSM action. CreateMultipleWorkItems option will be part of this blob as well." + }, + "region": { + "type": "string", + "description": "Region in which workspace resides. Supported values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope'" + } + }, + "required": [ + "name", + "workspaceId", + "connectionId", + "ticketConfiguration", + "region" + ] + }, + "EventHubReceiver": { + "description": "An Event hub receiver.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the Event hub receiver. Names must be unique across all receivers within an action group." + }, + "eventHubNameSpace": { + "type": "string", + "description": "The Event Hub namespace" + }, + "eventHubName": { + "type": "string", + "description": "The name of the specific Event Hub queue" + }, + "useCommonAlertSchema": { + "type": "boolean", + "default": false, + "description": "Indicates whether to use common alert schema." + }, + "tenantId": { + "type": "string", + "description": "The tenant Id for the subscription containing this event hub" + }, + "subscriptionId": { + "type": "string", + "description": "The Id for the subscription containing this event hub" + } + }, + "required": [ + "name", + "eventHubNameSpace", + "eventHubName", + "subscriptionId" + ] + }, + "AzureAppPushReceiver": { + "description": "The Azure mobile App push notification receiver.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the Azure mobile app push receiver. Names must be unique across all receivers within an action group." + }, + "emailAddress": { + "type": "string", + "description": "The email address registered for the Azure mobile app." + } + }, + "required": [ + "name", + "emailAddress" + ] + }, + "AutomationRunbookReceiver": { + "description": "The Azure Automation Runbook notification receiver.", + "type": "object", + "properties": { + "automationAccountId": { + "type": "string", + "description": "The Azure automation account Id which holds this runbook and authenticate to Azure resource." + }, + "runbookName": { + "type": "string", + "description": "The name for this runbook." + }, + "webhookResourceId": { + "type": "string", + "description": "The resource id for webhook linked to this runbook." + }, + "isGlobalRunbook": { + "type": "boolean", + "description": "Indicates whether this instance is global runbook." + }, + "name": { + "type": "string", + "description": "Indicates name of the webhook." + }, + "serviceUri": { + "type": "string", + "description": "The URI where webhooks should be sent." + }, + "useCommonAlertSchema": { + "type": "boolean", + "default": false, + "description": "Indicates whether to use common alert schema." + } + }, + "required": [ + "automationAccountId", + "runbookName", + "webhookResourceId", + "isGlobalRunbook" + ] + }, + "VoiceReceiver": { + "description": "A voice receiver.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the voice receiver. Names must be unique across all receivers within an action group." + }, + "countryCode": { + "type": "string", + "description": "The country code of the voice receiver." + }, + "phoneNumber": { + "type": "string", + "description": "The phone number of the voice receiver." + } + }, + "required": [ + "name", + "countryCode", + "phoneNumber" + ] + }, + "LogicAppReceiver": { + "description": "A logic app receiver.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the logic app receiver. Names must be unique across all receivers within an action group." + }, + "resourceId": { + "type": "string", + "description": "The azure resource id of the logic app receiver." + }, + "callbackUrl": { + "type": "string", + "description": "The callback url where http request sent to." + }, + "useCommonAlertSchema": { + "type": "boolean", + "default": false, + "description": "Indicates whether to use common alert schema." + } + }, + "required": [ + "name", + "resourceId", + "callbackUrl" + ] + }, + "AzureFunctionReceiver": { + "description": "An azure function receiver.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the azure function receiver. Names must be unique across all receivers within an action group." + }, + "functionAppResourceId": { + "type": "string", + "description": "The azure resource id of the function app." + }, + "functionName": { + "type": "string", + "description": "The function name in the function app." + }, + "httpTriggerUrl": { + "type": "string", + "description": "The http trigger url where http request sent to." + }, + "useCommonAlertSchema": { + "type": "boolean", + "default": false, + "description": "Indicates whether to use common alert schema." + } + }, + "required": [ + "name", + "functionAppResourceId", + "functionName", + "httpTriggerUrl" + ] + }, + "ArmRoleReceiver": { + "description": "An arm role receiver.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the arm role receiver. Names must be unique across all receivers within an action group." + }, + "roleId": { + "type": "string", + "description": "The arm role id." + }, + "useCommonAlertSchema": { + "type": "boolean", + "default": false, + "description": "Indicates whether to use common alert schema." + } + }, + "required": [ + "name", + "roleId" + ] + }, + "ReceiverStatus": { + "type": "string", + "enum": [ + "NotSpecified", + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "ReceiverStatus", + "modelAsString": false + }, + "description": "Indicates the status of the receiver. Receivers that are not Enabled will not receive any communications." + }, + "EnableRequest": { + "description": "Describes a receiver that should be resubscribed.", + "type": "object", + "properties": { + "receiverName": { + "type": "string", + "description": "The name of the receiver to resubscribe." + } + }, + "required": [ + "receiverName" + ] + }, + "ErrorResponse": { + "description": "Describes the format of Error response.", + "type": "object", + "properties": { + "code": { + "description": "Error code", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + }, + "ActionGroupPatchBody": { + "description": "An action group object for the body of patch operations.", + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ActionGroupPatch", + "description": "The action group settings for an update operation." + } + } + }, + "ActionGroupPatch": { + "description": "An Azure action group for patch operations.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": true, + "description": "Indicates whether this action group is enabled. If an action group is not enabled, then none of its actions will be activated." + } + } + } + }, + "parameters": { + "NotificationIdParameter": { + "name": "notificationId", + "in": "path", + "required": true, + "type": "string", + "description": "The notification id", + "x-ms-parameter-location": "method" + }, + "ActionGroupNameParameter": { + "name": "actionGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the action group.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/createOrUpdateActionGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/createOrUpdateActionGroup.json new file mode 100644 index 000000000000..1f8d6932bb38 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/createOrUpdateActionGroup.json @@ -0,0 +1,374 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "actionGroupName": "SampleActionGroup", + "api-version": "2022-04-01", + "actionGroup": { + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "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": "", + "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 + } + ], + "armRoleReceivers": [ + { + "name": "Sample armRole", + "roleId": "8e3af657-a8ff-443c-a75c-2fe8c4bcb635", + "useCommonAlertSchema": true + } + ], + "eventHubReceivers": [ + { + "name": "Sample eventHub", + "eventHubNameSpace": "testEventHubNameSpace", + "eventHubName": "testEventHub", + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup", + "type": "Microsoft.Insights/ActionGroups", + "name": "SampleActionGroup", + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled", + "useCommonAlertSchema": false + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Enabled", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "1234567890", + "status": "Enabled" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "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": "", + "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": "", + "useCommonAlertSchema": true + } + ], + "armRoleReceivers": [ + { + "name": "Sample armRole", + "roleId": "8e3af657-a8ff-443c-a75c-2fe8c4bcb635", + "useCommonAlertSchema": true + } + ], + "eventHubReceivers": [ + { + "name": "Sample eventHub", + "eventHubNameSpace": "testEventHubNameSpace", + "eventHubName": "testEventHub", + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84", + "useCommonAlertSchema": false + } + ] + } + } + }, + "201": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup", + "type": "Microsoft.Insights/ActionGroups", + "name": "SampleActionGroup", + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled", + "useCommonAlertSchema": false + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Enabled", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "1234567890", + "status": "Enabled" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "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": "", + "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": "", + "useCommonAlertSchema": true + } + ], + "armRoleReceivers": [ + { + "name": "Sample armRole", + "roleId": "8e3af657-a8ff-443c-a75c-2fe8c4bcb635", + "useCommonAlertSchema": true + } + ], + "eventHubReceivers": [ + { + "name": "Sample eventHub", + "eventHubNameSpace": "testEventHubNameSpace", + "eventHubName": "testEventHub", + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84", + "useCommonAlertSchema": false + } + ] + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/deleteActionGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/deleteActionGroup.json new file mode 100644 index 000000000000..d3b53916ffc1 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/deleteActionGroup.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "actionGroupName": "SampleActionGroup", + "api-version": "2022-04-01" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/enableReceiver.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/enableReceiver.json new file mode 100644 index 000000000000..9a2f290b005a --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/enableReceiver.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "actionGroupName": "SampleActionGroup", + "api-version": "2022-04-01", + "enableRequest": { + "receiverName": "John Doe's mobile" + } + }, + "responses": { + "200": {}, + "409": {} + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/getActionGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/getActionGroup.json new file mode 100644 index 000000000000..19a4c8bc37a2 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/getActionGroup.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "actionGroupName": "SampleActionGroup", + "api-version": "2022-04-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup", + "type": "Microsoft.Insights/ActionGroups", + "name": "SampleActionGroup", + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled", + "useCommonAlertSchema": true + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Disabled", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "1234567890", + "status": "Disabled" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook", + "serviceUri": "http://www.example.com/webhook", + "useCommonAlertSchema": false + }, + { + "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": [], + "azureAppPushReceivers": [], + "automationRunbookReceivers": [], + "voiceReceivers": [], + "logicAppReceivers": [], + "azureFunctionReceivers": [], + "armRoleReceivers": [], + "eventHubReceivers": [] + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/getTestNotifications.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/getTestNotifications.json new file mode 100644 index 000000000000..0eab9821c8db --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/getTestNotifications.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "notificationId": "11000222191287", + "api-version": "2022-04-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/2022-04-01/examples/getTestNotificationsAtResourceGroupLevel.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/getTestNotificationsAtResourceGroupLevel.json new file mode 100644 index 000000000000..cf08ff83767a --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/getTestNotificationsAtResourceGroupLevel.json @@ -0,0 +1,112 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-TestNotifications", + "notificationId": "11000222191287", + "api-version": "2022-04-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/2022-04-01/examples/listActionGroups.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/listActionGroups.json new file mode 100644 index 000000000000..fe81171ed0fa --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/listActionGroups.json @@ -0,0 +1,115 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "api-version": "2022-04-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup", + "type": "Microsoft.Insights/ActionGroups", + "name": "SampleActionGroup", + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled", + "useCommonAlertSchema": true + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Disabled", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "1234567890", + "status": "Disabled" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook", + "serviceUri": "http://www.example.com/webhook", + "useCommonAlertSchema": false + }, + { + "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": [], + "azureAppPushReceivers": [], + "automationRunbookReceivers": [], + "voiceReceivers": [], + "logicAppReceivers": [], + "azureFunctionReceivers": [], + "armRoleReceivers": [], + "eventHubReceivers": [] + } + }, + { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup2", + "type": "Microsoft.Insights/ActionGroups", + "name": "SampleActionGroup2", + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample2", + "enabled": false, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [ + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "webhookReceivers": [], + "itsmReceivers": [], + "azureAppPushReceivers": [], + "automationRunbookReceivers": [], + "voiceReceivers": [], + "logicAppReceivers": [], + "azureFunctionReceivers": [], + "armRoleReceivers": [], + "eventHubReceivers": [] + } + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/patchActionGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/patchActionGroup.json new file mode 100644 index 000000000000..544af6d71726 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/patchActionGroup.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "actionGroupName": "SampleActionGroup", + "api-version": "2022-04-01", + "actionGroupPatch": { + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "enabled": false + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup", + "type": "Microsoft.Insights/ActionGroups", + "name": "SampleActionGroup", + "location": "Global", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled", + "useCommonAlertSchema": true + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Enabled", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "1234567890", + "status": "Enabled" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook", + "serviceUri": "http://www.example.com/webhook", + "useCommonAlertSchema": false + }, + { + "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": [], + "azureAppPushReceivers": [], + "automationRunbookReceivers": [], + "voiceReceivers": [], + "logicAppReceivers": [], + "azureFunctionReceivers": [], + "armRoleReceivers": [], + "eventHubReceivers": [] + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/postTestNotifications.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/postTestNotifications.json new file mode 100644 index 000000000000..2b1c28120aed --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/postTestNotifications.json @@ -0,0 +1,127 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "api-version": "2022-04-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=2021-09-01" + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/postTestNotificationsAtResourceGroupLevel.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/postTestNotificationsAtResourceGroupLevel.json new file mode 100644 index 000000000000..aadf2cab02b9 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/postTestNotificationsAtResourceGroupLevel.json @@ -0,0 +1,128 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-TestNotifications", + "api-version": "2022-04-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=2021-09-01" + } + } + } +} diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 5729d859aea8..6d1315733eb7 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -35,13 +35,44 @@ title: MonitorManagementClient ``` yaml description: Monitor Management Client openapi-type: arm -tag: package-2022-02 +tag: package-2022-04 directive: - suppress: Example Validations reason: There are open issues (bugs) in the validator affecting some of the examples and since there is no way to selectively disable the validation for a particular example or paths, all of the example validation is being turned off. ``` +### Tag: package-2022-04 + +These settings apply only when `--tag=package-2022-04` is specified on the command line + +``` yaml $(tag) == 'package-2022-04' +input-file: +- Microsoft.Insights/stable/2015-04-01/autoscale_API.json +- Microsoft.Insights/stable/2015-04-01/operations_API.json +- Microsoft.Insights/stable/2016-03-01/alertRulesIncidents_API.json +- Microsoft.Insights/stable/2016-03-01/alertRules_API.json +- Microsoft.Insights/stable/2016-03-01/logProfiles_API.json +- Microsoft.Insights/preview/2017-05-01-preview/diagnosticsSettings_API.json +- Microsoft.Insights/preview/2017-05-01-preview/diagnosticsSettingsCategories_API.json +- Microsoft.Insights/stable/2022-04-01/actionGroups_API.json +- Microsoft.Insights/stable/2015-04-01/activityLogs_API.json +- Microsoft.Insights/stable/2015-04-01/eventCategories_API.json +- Microsoft.Insights/stable/2015-04-01/tenantActivityLogs_API.json +- Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json +- Microsoft.Insights/stable/2018-01-01/metrics_API.json +- Microsoft.Insights/stable/2019-03-01/metricBaselines_API.json +- Microsoft.Insights/stable/2018-03-01/metricAlert_API.json +- Microsoft.Insights/stable/2018-04-16/scheduledQueryRule_API.json +- Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json +- Microsoft.Insights/preview/2018-11-27-preview/vmInsightsOnboarding_API.json +- Microsoft.Insights/preview/2019-10-17-preview/privateLinkScopes_API.json +- Microsoft.Insights/stable/2020-10-01/activityLogAlerts_API.json +- Microsoft.Insights/preview/2021-09-01-preview/dataCollectionEndpoints_API.json +- Microsoft.Insights/preview/2021-09-01-preview/dataCollectionRuleAssociations_API.json +- Microsoft.Insights/preview/2021-09-01-preview/dataCollectionRules_API.json +``` + ### Tag: package-2016-03-preview-monitorlegacy These settings apply only when `--tag=package-2016-03-preview-monitorlegacy` is specified on the command line @@ -994,7 +1025,7 @@ directive: This section is a temporary solution to resolve the failure in those pipeline that is still using modeler v1. -``` yaml ($(go) && !$(track2) && ($(tag) == 'package-2021-07' || $(tag) == 'package-2021-09' || $(tag) == 'package-2022-02')) || $(csharp) || $(validation) +``` yaml ($(go) && !$(track2) && ($(tag) == 'package-2021-07' || $(tag) == 'package-2021-09' || $(tag) == 'package-2022-02' || $(tag) == 'package-2022-04')) || $(csharp) || $(validation) directive: - from: activityLogAlerts_API.json where: $.definitions