From 32b2a5e4bb81f732c84c8645269781329ffc0e6e Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Wed, 9 Mar 2022 15:03:16 -0800 Subject: [PATCH 01/17] Add new apis for test button feature --- .../stable/2022-04-01/actionGroups_API.json | 1299 +++++++++++++++++ .../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 | 130 ++ ...TestNotificationsAtResourceGroupLevel.json | 131 ++ .../monitor/resource-manager/readme.md | 35 +- 12 files changed, 2496 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..6f91fc58c793 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/actionGroups_API.json @@ -0,0 +1,1299 @@ +{ + "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", + "schema": { + "$ref": "#/definitions/TestNotificationResponse" + } + }, + "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_PostTestNotificationsAtResourceGroupLevel", + "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", + "schema": { + "$ref": "#/definitions/TestNotificationResponse" + } + }, + "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" + }, + "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": { + "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": { + "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": { + "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": { + "type": "array", + "items": { + "$ref": "#/definitions/EmailReceiver" + }, + "description": "The list of email receivers that are part of this action group." + }, + "smsReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/SmsReceiver" + }, + "description": "The list of SMS receivers that are part of this action group." + }, + "webhookReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/WebhookReceiver" + }, + "description": "The list of webhook receivers that are part of this action group." + }, + "itsmReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/ItsmReceiver" + }, + "description": "The list of ITSM receivers that are part of this action group." + }, + "azureAppPushReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/AzureAppPushReceiver" + }, + "description": "The list of AzureAppPush receivers that are part of this action group." + }, + "automationRunbookReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/AutomationRunbookReceiver" + }, + "description": "The list of AutomationRunbook receivers that are part of this action group." + }, + "voiceReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/VoiceReceiver" + }, + "description": "The list of voice receivers that are part of this action group." + }, + "logicAppReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/LogicAppReceiver" + }, + "description": "The list of logic app receivers that are part of this action group." + }, + "azureFunctionReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/AzureFunctionReceiver" + }, + "description": "The list of azure function receivers that are part of this action group." + }, + "armRoleReceivers": { + "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": { + "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": { + "type": "array", + "items": { + "$ref": "#/definitions/EmailReceiver" + }, + "description": "The list of email receivers that are part of this action group." + }, + "smsReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/SmsReceiver" + }, + "description": "The list of SMS receivers that are part of this action group." + }, + "webhookReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/WebhookReceiver" + }, + "description": "The list of webhook receivers that are part of this action group." + }, + "itsmReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/ItsmReceiver" + }, + "description": "The list of ITSM receivers that are part of this action group." + }, + "azureAppPushReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/AzureAppPushReceiver" + }, + "description": "The list of AzureAppPush receivers that are part of this action group." + }, + "automationRunbookReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/AutomationRunbookReceiver" + }, + "description": "The list of AutomationRunbook receivers that are part of this action group." + }, + "voiceReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/VoiceReceiver" + }, + "description": "The list of voice receivers that are part of this action group." + }, + "logicAppReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/LogicAppReceiver" + }, + "description": "The list of logic app receivers that are part of this action group." + }, + "azureFunctionReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/AzureFunctionReceiver" + }, + "description": "The list of azure function receivers that are part of this action group." + }, + "armRoleReceivers": { + "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": { + "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..3b7cd284e5ed --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/postTestNotifications.json @@ -0,0 +1,130 @@ +{ + "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": {}, + "body": { + "notificationId": "11000222191287", + "correlationId": "5000094c-7f6b-49f2-a0ad-c620c65d34b5", + "createdTime": "2021-09-21T03:05:17+00:00" + } + } + } +} 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..0e03a6ac419c --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/postTestNotificationsAtResourceGroupLevel.json @@ -0,0 +1,131 @@ +{ + "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": {}, + "body": { + "notificationId": "11000222191287", + "correlationId": "5000094c-7f6b-49f2-a0ad-c620c65d34b5", + "createdTime": "2021-09-21T03:05:17+00:00" + } + } + } +} diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index b2d612c0a861..d0d7f8ffeaf5 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/2021-09-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-2022-02 These settings apply only when `--tag=package-2022-02` is specified on the command line @@ -942,7 +973,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 From b8f58ada6841a7044fa9789788bfc8d1cd952d27 Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Wed, 9 Mar 2022 15:14:56 -0800 Subject: [PATCH 02/17] Fix bug --- specification/monitor/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index d0d7f8ffeaf5..12aeb884ecb4 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -55,7 +55,7 @@ input-file: - 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/2021-09-01/actionGroups_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 From 68e23107f4a646d6e37a56d11bbfe44523a83065 Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Wed, 9 Mar 2022 16:21:01 -0800 Subject: [PATCH 03/17] Revert to old package version --- specification/monitor/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 12aeb884ecb4..12a93ae0116d 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -35,7 +35,7 @@ title: MonitorManagementClient ``` yaml description: Monitor Management Client openapi-type: arm -tag: package-2022-04 +tag: package-2022-02 directive: - suppress: Example Validations From 07bce7654c052dda57e391cf3d34796d7e2adc98 Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Wed, 9 Mar 2022 17:23:52 -0800 Subject: [PATCH 04/17] Fix errors --- .../stable/2022-04-01/actionGroups_API.json | 4 ++-- specification/monitor/resource-manager/readme.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 6f91fc58c793..d7a0686dcd6f 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 @@ -217,7 +217,7 @@ "final-state-via": "location" }, "description": "Send test notifications to a set of provided receivers", - "operationId": "ActionGroups_PostTestNotifications", + "operationId": "ActionGroups_CreateNotificationsAtSubscriptionLevel", "x-ms-examples": { "Create notifications at subscription level": { "$ref": "./examples/postTestNotifications.json" @@ -263,7 +263,7 @@ "final-state-via": "location" }, "description": "Send test notifications to a set of provided receivers", - "operationId": "ActionGroups_PostTestNotificationsAtResourceGroupLevel", + "operationId": "ActionGroups_CreateNotificationsAtResourceGroupLevel", "x-ms-examples": { "Create notifications at resource group level": { "$ref": "./examples/postTestNotificationsAtResourceGroupLevel.json" diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 12a93ae0116d..12aeb884ecb4 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -35,7 +35,7 @@ title: MonitorManagementClient ``` yaml description: Monitor Management Client openapi-type: arm -tag: package-2022-02 +tag: package-2022-04 directive: - suppress: Example Validations From 65fd73dd0c6de9dfc23d31a1a507d6366d1de576 Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Wed, 9 Mar 2022 17:50:54 -0800 Subject: [PATCH 05/17] Fix errors --- specification/monitor/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 12aeb884ecb4..12a93ae0116d 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -35,7 +35,7 @@ title: MonitorManagementClient ``` yaml description: Monitor Management Client openapi-type: arm -tag: package-2022-04 +tag: package-2022-02 directive: - suppress: Example Validations From 7e3db63daff3f90e431d6ce8ce605ccf25b24d18 Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Wed, 9 Mar 2022 19:15:12 -0800 Subject: [PATCH 06/17] Fix error --- .../Microsoft.Insights/stable/2022-04-01/actionGroups_API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d7a0686dcd6f..04db010001f0 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 @@ -217,7 +217,7 @@ "final-state-via": "location" }, "description": "Send test notifications to a set of provided receivers", - "operationId": "ActionGroups_CreateNotificationsAtSubscriptionLevel", + "operationId": "ActionGroups_PostTestNotifications"", "x-ms-examples": { "Create notifications at subscription level": { "$ref": "./examples/postTestNotifications.json" From 67437694e30b871b2ad11f688cfbc730b54a9fa2 Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Wed, 9 Mar 2022 19:19:37 -0800 Subject: [PATCH 07/17] Remove " --- .../Microsoft.Insights/stable/2022-04-01/actionGroups_API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 04db010001f0..b9a572e24b26 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 @@ -217,7 +217,7 @@ "final-state-via": "location" }, "description": "Send test notifications to a set of provided receivers", - "operationId": "ActionGroups_PostTestNotifications"", + "operationId": "ActionGroups_PostTestNotifications", "x-ms-examples": { "Create notifications at subscription level": { "$ref": "./examples/postTestNotifications.json" From 529a149b258dfa8dc8dcc52b6e1fea16ab2b40d6 Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Mon, 28 Mar 2022 20:54:48 -0700 Subject: [PATCH 08/17] Only include the actiongroups changes in this new tag as per Dapeng. --- .../monitor/resource-manager/readme.md | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 12a93ae0116d..0bfc3d0f4882 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -48,29 +48,7 @@ These settings apply only when `--tag=package-2022-04` is specified on the comma ``` 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-2022-02 From 549062ee8f2df1fc5e0c2118f8442ffa3a685ffd Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Mon, 28 Mar 2022 21:22:34 -0700 Subject: [PATCH 09/17] Revert "Only include the actiongroups changes in this new tag as per Dapeng." This reverts commit 529a149b258dfa8dc8dcc52b6e1fea16ab2b40d6. --- .../monitor/resource-manager/readme.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 0bfc3d0f4882..12a93ae0116d 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -48,7 +48,29 @@ These settings apply only when `--tag=package-2022-04` is specified on the comma ``` 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-2022-02 From 5b5eaa1465e98fbfafe91ade2ce5ef65128b072b Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Mon, 28 Mar 2022 22:01:01 -0700 Subject: [PATCH 10/17] Add "x-ms-identifiers": [], --- .../stable/2022-04-01/actionGroups_API.json | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) 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 b9a572e24b26..6f068dbb21e8 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 @@ -600,6 +600,7 @@ "description": "The created time" }, "ActionDetails": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/ActionDetail" @@ -676,6 +677,7 @@ "type": "object", "properties": { "value": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/ActionGroupResource" @@ -698,6 +700,7 @@ "description": "The name of the supported alert type." }, "emailReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/EmailReceiver" @@ -705,6 +708,7 @@ "description": "The list of email receivers that are part of this action group." }, "smsReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/SmsReceiver" @@ -712,6 +716,7 @@ "description": "The list of SMS receivers that are part of this action group." }, "webhookReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/WebhookReceiver" @@ -719,6 +724,7 @@ "description": "The list of webhook receivers that are part of this action group." }, "itsmReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/ItsmReceiver" @@ -726,6 +732,7 @@ "description": "The list of ITSM receivers that are part of this action group." }, "azureAppPushReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/AzureAppPushReceiver" @@ -733,6 +740,7 @@ "description": "The list of AzureAppPush receivers that are part of this action group." }, "automationRunbookReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/AutomationRunbookReceiver" @@ -740,6 +748,7 @@ "description": "The list of AutomationRunbook receivers that are part of this action group." }, "voiceReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/VoiceReceiver" @@ -747,6 +756,7 @@ "description": "The list of voice receivers that are part of this action group." }, "logicAppReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/LogicAppReceiver" @@ -754,6 +764,7 @@ "description": "The list of logic app receivers that are part of this action group." }, "azureFunctionReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/AzureFunctionReceiver" @@ -761,6 +772,7 @@ "description": "The list of azure function receivers that are part of this action group." }, "armRoleReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/ArmRoleReceiver" @@ -768,6 +780,7 @@ "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" @@ -794,6 +807,7 @@ "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" @@ -801,6 +815,7 @@ "description": "The list of email receivers that are part of this action group." }, "smsReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/SmsReceiver" @@ -808,6 +823,7 @@ "description": "The list of SMS receivers that are part of this action group." }, "webhookReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/WebhookReceiver" @@ -815,6 +831,7 @@ "description": "The list of webhook receivers that are part of this action group." }, "itsmReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/ItsmReceiver" @@ -822,6 +839,7 @@ "description": "The list of ITSM receivers that are part of this action group." }, "azureAppPushReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/AzureAppPushReceiver" @@ -829,6 +847,7 @@ "description": "The list of AzureAppPush receivers that are part of this action group." }, "automationRunbookReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/AutomationRunbookReceiver" @@ -836,6 +855,7 @@ "description": "The list of AutomationRunbook receivers that are part of this action group." }, "voiceReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/VoiceReceiver" @@ -843,6 +863,7 @@ "description": "The list of voice receivers that are part of this action group." }, "logicAppReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/LogicAppReceiver" @@ -850,6 +871,7 @@ "description": "The list of logic app receivers that are part of this action group." }, "azureFunctionReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/AzureFunctionReceiver" @@ -857,6 +879,7 @@ "description": "The list of azure function receivers that are part of this action group." }, "armRoleReceivers": { + "x-ms-identifiers": [], "type": "array", "items": { "$ref": "#/definitions/ArmRoleReceiver" @@ -864,6 +887,7 @@ "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" From bf789de8d12b152e871e1f67b601d5ff17e915c8 Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Mon, 28 Mar 2022 23:14:55 -0700 Subject: [PATCH 11/17] Update the default tag --- specification/monitor/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 12a93ae0116d..12aeb884ecb4 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -35,7 +35,7 @@ title: MonitorManagementClient ``` yaml description: Monitor Management Client openapi-type: arm -tag: package-2022-02 +tag: package-2022-04 directive: - suppress: Example Validations From 3ea54adf0c99db2862acab8a6dd2cae5306400c2 Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Thu, 14 Apr 2022 10:44:15 -0700 Subject: [PATCH 12/17] Add location headers --- .../stable/2022-04-01/actionGroups_API.json | 12 ++++++++++++ .../2022-04-01/examples/postTestNotifications.json | 10 ++++------ .../postTestNotificationsAtResourceGroupLevel.json | 10 ++++------ 3 files changed, 20 insertions(+), 12 deletions(-) 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 6f068dbb21e8..fcfb1d4c2995 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 @@ -243,6 +243,12 @@ "responses": { "202": { "description": "The notification succeeded", + "headers": { + "location": { + "type": "string", + "description": "The location header that has the polling uri." + } + }, "schema": { "$ref": "#/definitions/TestNotificationResponse" } @@ -292,6 +298,12 @@ "responses": { "202": { "description": "The notification succeeded", + "headers": { + "location": { + "type": "string", + "description": "The location header that has the polling uri." + } + }, "schema": { "$ref": "#/definitions/TestNotificationResponse" } 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 index 3b7cd284e5ed..e7716fe0f9f9 100644 --- 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 @@ -119,12 +119,10 @@ }, "responses": { "202": { - "headers": {}, - "body": { - "notificationId": "11000222191287", - "correlationId": "5000094c-7f6b-49f2-a0ad-c620c65d34b5", - "createdTime": "2021-09-21T03:05:17+00:00" - } + "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" + }, + "body": {} } } } 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 index 0e03a6ac419c..e9db81bbf63c 100644 --- 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 @@ -120,12 +120,10 @@ }, "responses": { "202": { - "headers": {}, - "body": { - "notificationId": "11000222191287", - "correlationId": "5000094c-7f6b-49f2-a0ad-c620c65d34b5", - "createdTime": "2021-09-21T03:05:17+00:00" - } + "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" + }, + "body": {} } } } From 67a2aa59fbc4e8377fd491f1c5fde8e10db2ec16 Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Thu, 14 Apr 2022 11:20:12 -0700 Subject: [PATCH 13/17] No need to return response --- .../stable/2022-04-01/actionGroups_API.json | 29 ------------------- 1 file changed, 29 deletions(-) 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 fcfb1d4c2995..736a1d1004c6 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 @@ -248,9 +248,6 @@ "type": "string", "description": "The location header that has the polling uri." } - }, - "schema": { - "$ref": "#/definitions/TestNotificationResponse" } }, "default": { @@ -303,9 +300,6 @@ "type": "string", "description": "The location header that has the polling uri." } - }, - "schema": { - "$ref": "#/definitions/TestNotificationResponse" } }, "default": { @@ -568,29 +562,6 @@ "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", From 47906470ad8e6ce084003f63ded2339ab6ad3eb9 Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Thu, 14 Apr 2022 11:41:07 -0700 Subject: [PATCH 14/17] build --- .../stable/2022-04-01/examples/postTestNotifications.json | 3 ++- .../examples/postTestNotificationsAtResourceGroupLevel.json | 3 ++- specification/monitor/resource-manager/readme.md | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) 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 index e7716fe0f9f9..9d13f8b8e6af 100644 --- 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 @@ -122,7 +122,8 @@ "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" }, - "body": {} + "body": { + } } } } 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 index e9db81bbf63c..24ed51619284 100644 --- 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 @@ -123,7 +123,8 @@ "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" }, - "body": {} + "body": { + } } } } diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index d35dc9876090..59de0e7106b2 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -71,7 +71,7 @@ input-file: - 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 From e7241632969490ae2aba3c073ba5c6d0f4e2824e Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Thu, 14 Apr 2022 12:01:39 -0700 Subject: [PATCH 15/17] build --- .../stable/2022-04-01/examples/postTestNotifications.json | 2 -- .../examples/postTestNotificationsAtResourceGroupLevel.json | 2 -- specification/monitor/resource-manager/readme.md | 1 + 3 files changed, 1 insertion(+), 4 deletions(-) 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 index 9d13f8b8e6af..3e5704562903 100644 --- 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 @@ -121,8 +121,6 @@ "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" - }, - "body": { } } } 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 index 24ed51619284..3a3adfaf22d7 100644 --- 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 @@ -122,8 +122,6 @@ "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" - }, - "body": { } } } diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 59de0e7106b2..6d1315733eb7 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -71,6 +71,7 @@ input-file: - 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 From 4fe989f96da26e185e06ba57d7ce8279032b6bd6 Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Thu, 14 Apr 2022 12:15:16 -0700 Subject: [PATCH 16/17] format json --- .../examples/postTestNotifications.json | 234 ++++++++--------- ...TestNotificationsAtResourceGroupLevel.json | 236 ++++++++---------- 2 files changed, 217 insertions(+), 253 deletions(-) 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 index 3e5704562903..89144f4914bc 100644 --- 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 @@ -1,127 +1,109 @@ { - "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" - } - } - } -} + "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" + } + } + } +} \ No newline at end of file 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 index 3a3adfaf22d7..9825f1c07ba2 100644 --- 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 @@ -1,128 +1,110 @@ { - "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" - } - } - } -} + "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" + } + } + } +} \ No newline at end of file From cfb784bf60cffce989688b2ae2f9c2131b3411f7 Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Thu, 14 Apr 2022 12:32:13 -0700 Subject: [PATCH 17/17] Prettier check --- .../examples/postTestNotifications.json | 234 +++++++++-------- ...TestNotificationsAtResourceGroupLevel.json | 236 ++++++++++-------- 2 files changed, 253 insertions(+), 217 deletions(-) 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 index 89144f4914bc..2b1c28120aed 100644 --- 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 @@ -1,109 +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" - } - } - } -} \ No newline at end of file + "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 index 9825f1c07ba2..aadf2cab02b9 100644 --- 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 @@ -1,110 +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" - } - } - } -} \ No newline at end of file + "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" + } + } + } +}