From e24fe07222b97077ca0f54ffc66b312be4aaeff7 Mon Sep 17 00:00:00 2001 From: Yueli Lu Date: Wed, 27 Feb 2019 16:58:47 -0800 Subject: [PATCH] new application insignts api version for unified schema in action --- .../stable/2019-03-01/actionGroups_API.json | 862 ++++++++++++++++++ .../examples/createOrUpdateActionGroup.json | 318 +++++++ .../examples/deleteActionGroup.json | 18 + .../2019-03-01/examples/enableReceiver.json | 21 + .../2019-03-01/examples/getActionGroup.json | 59 ++ .../2019-03-01/examples/listActionGroups.json | 90 ++ .../2019-03-01/examples/patchActionGroup.json | 65 ++ .../monitor/resource-manager/readme.md | 37 +- 8 files changed, 1466 insertions(+), 4 deletions(-) create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/actionGroups_API.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/createOrUpdateActionGroup.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/deleteActionGroup.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/enableReceiver.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/getActionGroup.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/listActionGroups.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/patchActionGroup.json diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/actionGroups_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/actionGroups_API.json new file mode 100644 index 000000000000..a4b47bf7894a --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/actionGroups_API.json @@ -0,0 +1,862 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Action Groups API", + "x-ms-code-generation-settings": { + "name": "MonitorManagementClient" + }, + "version": "2019-03-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": "#/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": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/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": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/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": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/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": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "#/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/actionGroups": { + "get": { + "description": "Get a list of all action groups in a subscription.", + "operationId": "ActionGroups_ListBySubscriptionId", + "x-ms-examples": { + "List action groups": { + "$ref": "./examples/listActionGroups.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/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": { + "$ref": "./examples/listActionGroups.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/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": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "name": "enableRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/EnableRequest" + }, + "description": "The receiver to re-enable." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The receiver was successfully enabled." + }, + "409": { + "description": "The receiver is already enabled in the action group." + }, + "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": { + "Resource": { + "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" + }, + "location": { + "type": "string", + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "required": [ + "location" + ], + "x-ms-azure-resource": true, + "description": "An azure resource object" + }, + "ActionGroupResource": { + "description": "An action group resource.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "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.", + "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." + } + } + }, + "ActionGroup": { + "description": "An Azure action group.", + "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." + } + }, + "required": [ + "groupShortName", + "enabled" + ] + }, + "EmailReceiver": { + "description": "An email receiver.", + "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." + }, + "useUnifiedSchema": { + "type": "boolean", + "description": "Indicates whether to use unified schema." + }, + "status": { + "readOnly": true, + "$ref": "#/definitions/ReceiverStatus", + "description": "The receiver status of the e-mail." + } + }, + "required": [ + "name", + "emailAddress", + "useUnifiedSchema" + ] + }, + "SmsReceiver": { + "description": "An SMS receiver.", + "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.", + "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." + }, + "useUnifiedSchema": { + "type": "boolean", + "description": "Indicates whether to use unified schema." + } + }, + "required": [ + "name", + "serviceUri", + "useUnifiedSchema" + ] + }, + "ItsmReceiver": { + "description": "An Itsm receiver.", + "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" + ] + }, + "AzureAppPushReceiver": { + "description": "The Azure mobile App push notification receiver.", + "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.", + "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." + }, + "useUnifiedSchema": { + "type": "boolean", + "description": "Indicates whether to use unified schema." + } + }, + "required": [ + "automationAccountId", + "runbookName", + "webhookResourceId", + "isGlobalRunbook", + "useUnifiedSchema" + ] + }, + "VoiceReceiver": { + "description": "A voice receiver.", + "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.", + "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." + }, + "useUnifiedSchema": { + "type": "boolean", + "description": "Indicates whether to use unified schema." + } + }, + "required": [ + "name", + "resourceId", + "callbackUrl", + "useUnifiedSchema" + ] + }, + "AzureFunctionReceiver": { + "description": "An azure function receiver.", + "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." + }, + "useUnifiedSchema": { + "type": "boolean", + "description": "Indicates whether to use unified schema." + } + }, + "required": [ + "name", + "functionAppResourceId", + "functionName", + "httpTriggerUrl", + "useUnifiedSchema" + ] + }, + "ArmRoleReceiver": { + "description": "An arm role receiver.", + "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." + }, + "useUnifiedSchema": { + "type": "boolean", + "description": "Indicates whether to use unified schema." + } + }, + "required": [ + "name", + "roleId", + "useUnifiedSchema" + ] + }, + "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.", + "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.", + "properties": { + "tags": { + "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.", + "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": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription Id." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "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" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/createOrUpdateActionGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/createOrUpdateActionGroup.json new file mode 100644 index 000000000000..e1a82fde3d8e --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/createOrUpdateActionGroup.json @@ -0,0 +1,318 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "actionGroupName": "SampleActionGroup", + "api-version": "2019-03-01", + "actionGroup": { + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "useUnifiedSchema": false + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "useUnifiedSchema": true + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "1234567890" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook", + "serviceUri": "http://www.example.com/webhook", + "useUnifiedSchema": true + } + ], + "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": "https://s13events.azure-automation.net/webhooks?token=iimE%2fD19Eg%2bvDy22yUMecIZY6Uiz%2bHfuQ67r8r1wY%2fI%3d", + "useUnifiedSchema": 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", + "useUnifiedSchema": false + } + ], + "azureFunctionReceivers": [ + { + "name": "Sample azureFunction", + "functionAppResourceId": "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", + "functionName": "HttpTriggerCSharp1", + "httpTriggerUrl": "https://testfunctionapp.azurewebsites.net/api/HttpTriggerCSharp1?code=4CopFfiXqUQC8dvIM7F53J7tIU3Gy9QQIG/vKAXMe2avhHqK3/jVYw==", + "useUnifiedSchema": true + } + ], + "armRoleReceivers": [ + { + "name": "Sample armRole", + "roleId": "8e3af657-a8ff-443c-a75c-2fe8c4bcb635", + "useUnifiedSchema": true + } + ] + } + } + }, + "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", + "useUnifiedSchema": false + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Enabled", + "useUnifiedSchema": 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", + "useUnifiedSchema": true + } + ], + "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": "https://s13events.azure-automation.net/webhooks?token=iimE%2fD19Eg%2bvDy22yUMecIZY6Uiz%2bHfuQ67r8r1wY%2fI%3d", + "useUnifiedSchema": 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", + "useUnifiedSchema": false + } + ], + "azureFunctionReceivers": [ + { + "name": "Sample azureFunction", + "functionAppResourceId": "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", + "functionName": "HttpTriggerCSharp1", + "httpTriggerUrl": "https://testfunctionapp.azurewebsites.net/api/HttpTriggerCSharp1?code=4CopFfiXqUQC8dvIM7F53J7tIU3Gy9QQIG/vKAXMe2avhHqK3/jVYw==", + "useUnifiedSchema": true + } + ], + "armRoleReceivers": [ + { + "name": "Sample armRole", + "roleId": "8e3af657-a8ff-443c-a75c-2fe8c4bcb635", + "useUnifiedSchema": true + } + ] + } + } + }, + "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", + "useUnifiedSchema": false + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Enabled", + "useUnifiedSchema": 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", + "useUnifiedSchema": true + } + ], + "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": "https://s13events.azure-automation.net/webhooks?token=iimE%2fD19Eg%2bvDy22yUMecIZY6Uiz%2bHfuQ67r8r1wY%2fI%3d", + "useUnifiedSchema": 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", + "useUnifiedSchema": false + } + ], + "azureFunctionReceivers": [ + { + "name": "Sample azureFunction", + "functionAppResourceId": "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", + "functionName": "HttpTriggerCSharp1", + "httpTriggerUrl": "https://testfunctionapp.azurewebsites.net/api/HttpTriggerCSharp1?code=4CopFfiXqUQC8dvIM7F53J7tIU3Gy9QQIG/vKAXMe2avhHqK3/jVYw==", + "useUnifiedSchema": true + } + ], + "armRoleReceivers": [ + { + "name": "Sample armRole", + "roleId": "8e3af657-a8ff-443c-a75c-2fe8c4bcb635", + "useUnifiedSchema": true + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/deleteActionGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/deleteActionGroup.json new file mode 100644 index 000000000000..3f5e257870b3 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/deleteActionGroup.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "actionGroupName": "SampleActionGroup", + "api-version": "2019-03-01" + }, + "responses": { + "200": { + "headers": {}, + "body": null + }, + "204": { + "headers": {}, + "body": null + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/enableReceiver.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/enableReceiver.json new file mode 100644 index 000000000000..460f6864c0eb --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/enableReceiver.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "actionGroupName": "SampleActionGroup", + "api-version": "2019-03-01", + "enableRequest": { + "receiverName": "John Doe's mobile" + } + }, + "responses": { + "200": { + "headers": {}, + "body": null + }, + "409": { + "headers": {}, + "body": null + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/getActionGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/getActionGroup.json new file mode 100644 index 000000000000..28e3f31b5d2f --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/getActionGroup.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "actionGroupName": "SampleActionGroup", + "api-version": "2019-03-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", + "useUnifiedSchema": true + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Disabled", + "useUnifiedSchema": 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", + "useUnifiedSchema": false + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/listActionGroups.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/listActionGroups.json new file mode 100644 index 000000000000..78ea4baed409 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/listActionGroups.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "api-version": "2019-03-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", + "useUnifiedSchema": true + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Disabled", + "useUnifiedSchema": 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", + "useUnifiedSchema": false + } + ] + } + }, + { + "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", + "useUnifiedSchema": true + } + ], + "smsReceivers": [ + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "webhookReceivers": [] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/patchActionGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/patchActionGroup.json new file mode 100644 index 000000000000..587eb02e94c8 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/patchActionGroup.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "actionGroupName": "SampleActionGroup", + "api-version": "2019-03-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", + "useUnifiedSchema": true + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Enabled", + "useUnifiedSchema": 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", + "useUnifiedSchema": false + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 6fe368f32359..771f3a6b56c1 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -24,6 +24,35 @@ To see additional help and options, run: These are the global settings for the MonitorClient API. + +### Tag: package-2019-03 + +These settings apply only when `--tag=package-2019-03` is specified on the command line. + +```yaml $(tag) == 'package-2019-03' +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/2019-03-01/actionGroups_API.json +- Microsoft.Insights/stable/2017-04-01/activityLogAlerts_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/preview/2017-11-01-preview/baseline_API.json +- Microsoft.Insights/preview/2017-11-01-preview/calculateBaseline_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 +``` + ``` yaml title: MonitorClient description: Monitor Management Client @@ -99,7 +128,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/2018-09-01/actionGroups_API.json +- Microsoft.Insights/stable/2018-03-01/actionGroups_API.json - Microsoft.Insights/stable/2017-04-01/activityLogAlerts_API.json - Microsoft.Insights/stable/2015-04-01/activityLogs_API.json - Microsoft.Insights/stable/2015-04-01/eventCategories_API.json @@ -125,7 +154,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/2018-09-01/actionGroups_API.json +- Microsoft.Insights/stable/2017-04-01/actionGroups_API.json - Microsoft.Insights/stable/2017-04-01/activityLogAlerts_API.json - Microsoft.Insights/stable/2015-04-01/activityLogs_API.json - Microsoft.Insights/stable/2015-04-01/eventCategories_API.json @@ -149,7 +178,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/2018-09-01/actionGroups_API.json +- Microsoft.Insights/stable/2017-04-01/actionGroups_API.json - Microsoft.Insights/stable/2017-04-01/activityLogAlerts_API.json - Microsoft.Insights/stable/2015-04-01/activityLogs_API.json - Microsoft.Insights/stable/2015-04-01/eventCategories_API.json @@ -197,7 +226,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/2018-09-01/actionGroups_API.json +- Microsoft.Insights/stable/2017-04-01/actionGroups_API.json - Microsoft.Insights/stable/2017-04-01/activityLogAlerts_API.json ```