From e44675386b84cad6d8fcb0e19bee84f37374073a Mon Sep 17 00:00:00 2001 From: shriku11 <34076417+shriku11@users.noreply.github.com> Date: Tue, 9 Jan 2018 14:29:00 -0800 Subject: [PATCH] Added new receivers to action group document. (#2077) * Added new receivers to action group document. * fixed few comments. * Corrected the file syntactically using openapi-linter * Add required patch operation for which it is flagging this documentation * Fixed some liter format validation issues, added patch example * Fixed couple for validation errors * Fixed new validation error for runbook receiver * fixed the description field for ITSM Ticket configuration field. * Added new receivers to action group document. * fixed few comments. * Corrected the file syntactically using openapi-linter * Add required patch operation for which it is flagging this documentation * Fixed some liter format validation issues, added patch example * Fixed couple for validation errors * Fixed new validation error for runbook receiver * fixed the description field for ITSM Ticket configuration field. * Added example file for patch operation to new directory called stable. --- .../stable/2017-04-01/actionGroups_API.json | 177 ++++++++++++++++++ .../examples/createOrUpdateActionGroup.json | 75 ++++++++ .../2017-04-01/examples/enableReceiver.json | 4 + .../2017-04-01/examples/patchActionGroup.json | 62 ++++++ 4 files changed, 318 insertions(+) create mode 100644 specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/examples/patchActionGroup.json diff --git a/specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/actionGroups_API.json b/specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/actionGroups_API.json index fdad7e4b20a9..e9aa7d84ff75 100644 --- a/specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/actionGroups_API.json +++ b/specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/actionGroups_API.json @@ -162,6 +162,52 @@ } } } + }, + "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": { @@ -391,6 +437,27 @@ "$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." } }, "required": [ @@ -464,6 +531,90 @@ "serviceUri" ] }, + "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." + } + }, + "required": [ + "automationAccountId", + "runbookName", + "webhookResourceId", + "isGlobalRunbook" + ] + }, "ReceiverStatus": { "type": "string", "enum": [ @@ -502,6 +653,32 @@ "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": { diff --git a/specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/examples/createOrUpdateActionGroup.json b/specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/examples/createOrUpdateActionGroup.json index 9741f061f21b..c061cee773df 100644 --- a/specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/examples/createOrUpdateActionGroup.json +++ b/specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/examples/createOrUpdateActionGroup.json @@ -37,6 +37,31 @@ "name": "Sample webhook", "serviceUri": "http://www.example.com/webhook" } + ], + "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" + } ] } } @@ -84,6 +109,31 @@ "name": "Sample webhook", "serviceUri": "http://www.example.com/webhook" } + ], + "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" + } ] } } @@ -130,6 +180,31 @@ "name": "Sample webhook", "serviceUri": "http://www.example.com/webhook" } + ], + "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" + } ] } } diff --git a/specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/examples/enableReceiver.json b/specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/examples/enableReceiver.json index 242f9d73e5f3..65bd11c1c1fb 100644 --- a/specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/examples/enableReceiver.json +++ b/specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/examples/enableReceiver.json @@ -12,6 +12,10 @@ "200": { "headers": {}, "body": null + }, + "409": { + "headers": {}, + "body": null } } } \ No newline at end of file diff --git a/specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/examples/patchActionGroup.json b/specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/examples/patchActionGroup.json new file mode 100644 index 000000000000..1175ff17126e --- /dev/null +++ b/specification/monitor/resource-manager/microsoft.insights/stable/2017-04-01/examples/patchActionGroup.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "actionGroupName": "SampleActionGroup", + "api-version": "2017-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" + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Enabled" + } + ], + "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" + } + ] + } + } + } + } +} \ No newline at end of file