swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  title: Azure Action Groups
  version: 2019-06-01
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-ms-code-generation-settings:
    name: MonitorManagementClient
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-06-01/actionGroups_API.json
      version: "2.0"
  x-preferred: true
  x-providerName: azure.com
  x-serviceName: monitor-actionGroups_API
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters:
  ActionGroupNameParameter:
    description: The name of the action group.
    in: path
    name: actionGroupName
    required: true
    type: string
    x-ms-parameter-location: method
  ApiVersionParameter:
    description: Client Api Version.
    in: query
    name: api-version
    required: true
    type: string
  ResourceGroupNameParameter:
    description: The name of the resource group.
    in: path
    name: resourceGroupName
    required: true
    type: string
    x-ms-parameter-location: method
  SubscriptionIdParameter:
    description: The Azure subscription Id.
    in: path
    name: subscriptionId
    required: true
    type: string
paths:
  "/subscriptions/{subscriptionId}/providers/microsoft.insights/actionGroups":
    get:
      description: Get a list of all action groups in a subscription.
      operationId: ActionGroups_ListBySubscriptionId
      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"
      x-ms-examples:
        List action groups:
          parameters:
            api-version: 2019-06-01
            resourceGroupName: Default-NotificationRules
            subscriptionId: 187f412d-1758-44d9-b052-169e2564721d
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup
                    location: Global
                    name: SampleActionGroup
                    properties:
                      armRoleReceivers: []
                      automationRunbookReceivers: []
                      azureAppPushReceivers: []
                      azureFunctionReceivers: []
                      emailReceivers:
                        - emailAddress: johndoe@email.com
                          name: John Doe's email
                          status: Enabled
                          useCommonAlertSchema: true
                        - emailAddress: janesmith@email.com
                          name: Jane Smith's email
                          status: Disabled
                          useCommonAlertSchema: true
                      enabled: true
                      groupShortName: sample
                      itsmReceivers: []
                      logicAppReceivers: []
                      smsReceivers:
                        - countryCode: "1"
                          name: John Doe's mobile
                          phoneNumber: "1234567890"
                          status: Disabled
                        - countryCode: "1"
                          name: Jane Smith's mobile
                          phoneNumber: 987654321
                          status: Enabled
                      voiceReceivers: []
                      webhookReceivers:
                        - name: Sample webhook
                          serviceUri: http://www.example.com/webhook
                          useCommonAlertSchema: false
                        - identifierUri: http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a
                          name: Sample webhook 2
                          objectId: d3bb868c-fe44-452c-aa26-769a6538c808
                          serviceUri: http://www.example.com/webhook2
                          tenantId: 68a4459a-ccb8-493c-b9da-dd30457d1b84
                          useAadAuth: true
                          useCommonAlertSchema: true
                    tags: {}
                    type: Microsoft.Insights/ActionGroups
                  - id: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup2
                    location: Global
                    name: SampleActionGroup2
                    properties:
                      armRoleReceivers: []
                      automationRunbookReceivers: []
                      azureAppPushReceivers: []
                      azureFunctionReceivers: []
                      emailReceivers:
                        - emailAddress: johndoe@email.com
                          name: John Doe's email
                          status: Enabled
                          useCommonAlertSchema: true
                      enabled: false
                      groupShortName: sample2
                      itsmReceivers: []
                      logicAppReceivers: []
                      smsReceivers:
                        - countryCode: "1"
                          name: Jane Smith's mobile
                          phoneNumber: 987654321
                          status: Enabled
                      voiceReceivers: []
                      webhookReceivers: []
                    tags: {}
                    type: Microsoft.Insights/ActionGroups
              headers: {}
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups":
    get:
      description: Get a list of all action groups in a resource group.
      operationId: ActionGroups_ListByResourceGroup
      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"
      x-ms-examples:
        List action groups:
          parameters:
            api-version: 2019-06-01
            resourceGroupName: Default-NotificationRules
            subscriptionId: 187f412d-1758-44d9-b052-169e2564721d
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup
                    location: Global
                    name: SampleActionGroup
                    properties:
                      armRoleReceivers: []
                      automationRunbookReceivers: []
                      azureAppPushReceivers: []
                      azureFunctionReceivers: []
                      emailReceivers:
                        - emailAddress: johndoe@email.com
                          name: John Doe's email
                          status: Enabled
                          useCommonAlertSchema: true
                        - emailAddress: janesmith@email.com
                          name: Jane Smith's email
                          status: Disabled
                          useCommonAlertSchema: true
                      enabled: true
                      groupShortName: sample
                      itsmReceivers: []
                      logicAppReceivers: []
                      smsReceivers:
                        - countryCode: "1"
                          name: John Doe's mobile
                          phoneNumber: "1234567890"
                          status: Disabled
                        - countryCode: "1"
                          name: Jane Smith's mobile
                          phoneNumber: 987654321
                          status: Enabled
                      voiceReceivers: []
                      webhookReceivers:
                        - name: Sample webhook
                          serviceUri: http://www.example.com/webhook
                          useCommonAlertSchema: false
                        - identifierUri: http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a
                          name: Sample webhook 2
                          objectId: d3bb868c-fe44-452c-aa26-769a6538c808
                          serviceUri: http://www.example.com/webhook2
                          tenantId: 68a4459a-ccb8-493c-b9da-dd30457d1b84
                          useAadAuth: true
                          useCommonAlertSchema: true
                    tags: {}
                    type: Microsoft.Insights/ActionGroups
                  - id: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup2
                    location: Global
                    name: SampleActionGroup2
                    properties:
                      armRoleReceivers: []
                      automationRunbookReceivers: []
                      azureAppPushReceivers: []
                      azureFunctionReceivers: []
                      emailReceivers:
                        - emailAddress: johndoe@email.com
                          name: John Doe's email
                          status: Enabled
                          useCommonAlertSchema: true
                      enabled: false
                      groupShortName: sample2
                      itsmReceivers: []
                      logicAppReceivers: []
                      smsReceivers:
                        - countryCode: "1"
                          name: Jane Smith's mobile
                          phoneNumber: 987654321
                          status: Enabled
                      voiceReceivers: []
                      webhookReceivers: []
                    tags: {}
                    type: Microsoft.Insights/ActionGroups
              headers: {}
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}":
    delete:
      description: Delete an action group.
      operationId: ActionGroups_Delete
      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"
      x-ms-examples:
        Delete an action group:
          parameters:
            actionGroupName: SampleActionGroup
            api-version: 2019-06-01
            resourceGroupName: Default-NotificationRules
            subscriptionId: 187f412d-1758-44d9-b052-169e2564721d
          responses:
            "200": {}
            "204": {}
    get:
      description: Get an action group.
      operationId: ActionGroups_Get
      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"
      x-ms-examples:
        Get an action group:
          parameters:
            actionGroupName: SampleActionGroup
            api-version: 2019-06-01
            resourceGroupName: Default-NotificationRules
            subscriptionId: 187f412d-1758-44d9-b052-169e2564721d
          responses:
            "200":
              body:
                id: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup
                location: Global
                name: SampleActionGroup
                properties:
                  armRoleReceivers: []
                  automationRunbookReceivers: []
                  azureAppPushReceivers: []
                  azureFunctionReceivers: []
                  emailReceivers:
                    - emailAddress: johndoe@email.com
                      name: John Doe's email
                      status: Enabled
                      useCommonAlertSchema: true
                    - emailAddress: janesmith@email.com
                      name: Jane Smith's email
                      status: Disabled
                      useCommonAlertSchema: true
                  enabled: true
                  groupShortName: sample
                  itsmReceivers: []
                  logicAppReceivers: []
                  smsReceivers:
                    - countryCode: "1"
                      name: John Doe's mobile
                      phoneNumber: "1234567890"
                      status: Disabled
                    - countryCode: "1"
                      name: Jane Smith's mobile
                      phoneNumber: 987654321
                      status: Enabled
                  voiceReceivers: []
                  webhookReceivers:
                    - name: Sample webhook
                      serviceUri: http://www.example.com/webhook
                      useCommonAlertSchema: false
                    - identifierUri: http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a
                      name: Sample webhook 2
                      objectId: d3bb868c-fe44-452c-aa26-769a6538c808
                      serviceUri: http://www.example.com/webhook2
                      tenantId: 68a4459a-ccb8-493c-b9da-dd30457d1b84
                      useAadAuth: true
                      useCommonAlertSchema: true
                tags: {}
                type: Microsoft.Insights/ActionGroups
              headers: {}
    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"
        - description: Parameters supplied to the operation.
          in: body
          name: actionGroupPatch
          required: true
          schema:
            $ref: "#/definitions/ActionGroupPatchBody"
      responses:
        "200":
          description: An existing action group was successfully updated.
          schema:
            $ref: "#/definitions/ActionGroupResource"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      x-ms-examples:
        Patch an action group:
          parameters:
            actionGroupName: SampleActionGroup
            actionGroupPatch:
              properties:
                enabled: false
              tags:
                key1: value1
                key2: value2
            api-version: 2019-06-01
            resourceGroupName: Default-NotificationRules
            subscriptionId: 187f412d-1758-44d9-b052-169e2564721d
          responses:
            "200":
              body:
                id: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup
                location: Global
                name: SampleActionGroup
                properties:
                  armRoleReceivers: []
                  automationRunbookReceivers: []
                  azureAppPushReceivers: []
                  azureFunctionReceivers: []
                  emailReceivers:
                    - emailAddress: johndoe@email.com
                      name: John Doe's email
                      status: Enabled
                      useCommonAlertSchema: true
                    - emailAddress: janesmith@email.com
                      name: Jane Smith's email
                      status: Enabled
                      useCommonAlertSchema: true
                  enabled: true
                  groupShortName: sample
                  itsmReceivers: []
                  logicAppReceivers: []
                  smsReceivers:
                    - countryCode: "1"
                      name: John Doe's mobile
                      phoneNumber: "1234567890"
                      status: Enabled
                    - countryCode: "1"
                      name: Jane Smith's mobile
                      phoneNumber: 987654321
                      status: Enabled
                  voiceReceivers: []
                  webhookReceivers:
                    - name: Sample webhook
                      serviceUri: http://www.example.com/webhook
                      useCommonAlertSchema: false
                    - identifierUri: http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a
                      name: Sample webhook 2
                      objectId: d3bb868c-fe44-452c-aa26-769a6538c808
                      serviceUri: http://www.example.com/webhook2
                      tenantId: 68a4459a-ccb8-493c-b9da-dd30457d1b84
                      useAadAuth: true
                      useCommonAlertSchema: true
                tags:
                  key1: value1
                  key2: value2
                type: Microsoft.Insights/ActionGroups
              headers: {}
    put:
      description: Create a new action group or update an existing one.
      operationId: ActionGroups_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ActionGroupNameParameter"
        - description: The action group to create or use for the update.
          in: body
          name: actionGroup
          required: true
          schema:
            $ref: "#/definitions/ActionGroupResource"
        - $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"
      x-ms-examples:
        Create or update an action group:
          parameters:
            actionGroup:
              location: Global
              properties:
                armRoleReceivers:
                  - name: Sample armRole
                    roleId: 8e3af657-a8ff-443c-a75c-2fe8c4bcb635
                    useCommonAlertSchema: true
                automationRunbookReceivers:
                  - automationAccountId: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest
                    isGlobalRunbook: false
                    name: testRunbook
                    runbookName: Sample runbook
                    serviceUri: https://s13events.azure-automation.net/webhooks?token=iimE%2fD19Eg%2bvDy22yUMecIZY6Uiz%2bHfuQ67r8r1wY%2fI%3d
                    useCommonAlertSchema: true
                    webhookResourceId: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084
                azureAppPushReceivers:
                  - emailAddress: johndoe@email.com
                    name: Sample azureAppPush
                azureFunctionReceivers:
                  - 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==
                    name: Sample azureFunction
                    useCommonAlertSchema: true
                emailReceivers:
                  - emailAddress: johndoe@email.com
                    name: John Doe's email
                    useCommonAlertSchema: false
                  - emailAddress: janesmith@email.com
                    name: Jane Smith's email
                    useCommonAlertSchema: true
                enabled: true
                groupShortName: sample
                itsmReceivers:
                  - connectionId: a3b9076c-ce8e-434e-85b4-aff10cb3c8f1
                    name: Sample itsm
                    region: westcentralus
                    ticketConfiguration: '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}'
                    workspaceId: 5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c
                logicAppReceivers:
                  - 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
                    name: Sample logicApp
                    resourceId: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp
                    useCommonAlertSchema: false
                smsReceivers:
                  - countryCode: "1"
                    name: John Doe's mobile
                    phoneNumber: "1234567890"
                  - countryCode: "1"
                    name: Jane Smith's mobile
                    phoneNumber: 987654321
                voiceReceivers:
                  - countryCode: "1"
                    name: Sample voice
                    phoneNumber: "1234567890"
                webhookReceivers:
                  - name: Sample webhook 1
                    serviceUri: http://www.example.com/webhook1
                    useCommonAlertSchema: true
                  - identifierUri: http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a
                    name: Sample webhook 2
                    objectId: d3bb868c-fe44-452c-aa26-769a6538c808
                    serviceUri: http://www.example.com/webhook2
                    tenantId: 68a4459a-ccb8-493c-b9da-dd30457d1b84
                    useAadAuth: true
                    useCommonAlertSchema: true
              tags: {}
            actionGroupName: SampleActionGroup
            api-version: 2019-06-01
            resourceGroupName: Default-NotificationRules
            subscriptionId: 187f412d-1758-44d9-b052-169e2564721d
          responses:
            "200":
              body:
                id: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup
                location: Global
                name: SampleActionGroup
                properties:
                  armRoleReceivers:
                    - name: Sample armRole
                      roleId: 8e3af657-a8ff-443c-a75c-2fe8c4bcb635
                      useCommonAlertSchema: true
                  automationRunbookReceivers:
                    - automationAccountId: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest
                      isGlobalRunbook: false
                      name: testRunbook
                      runbookName: Sample runbook
                      serviceUri: https://s13events.azure-automation.net/webhooks?token=iimE%2fD19Eg%2bvDy22yUMecIZY6Uiz%2bHfuQ67r8r1wY%2fI%3d
                      useCommonAlertSchema: true
                      webhookResourceId: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084
                  azureAppPushReceivers:
                    - emailAddress: johndoe@email.com
                      name: Sample azureAppPush
                  azureFunctionReceivers:
                    - 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==
                      name: Sample azureFunction
                      useCommonAlertSchema: true
                  emailReceivers:
                    - emailAddress: johndoe@email.com
                      name: John Doe's email
                      status: Enabled
                      useCommonAlertSchema: false
                    - emailAddress: janesmith@email.com
                      name: Jane Smith's email
                      status: Enabled
                      useCommonAlertSchema: true
                  enabled: true
                  groupShortName: sample
                  itsmReceivers:
                    - connectionId: a3b9076c-ce8e-434e-85b4-aff10cb3c8f1
                      name: Sample itsm
                      region: westcentralus
                      ticketConfiguration: '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}'
                      workspaceId: 5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c
                  logicAppReceivers:
                    - 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
                      name: Sample logicApp
                      resourceId: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp
                      useCommonAlertSchema: false
                  smsReceivers:
                    - countryCode: "1"
                      name: John Doe's mobile
                      phoneNumber: "1234567890"
                      status: Enabled
                    - countryCode: "1"
                      name: Jane Smith's mobile
                      phoneNumber: 987654321
                      status: Enabled
                  voiceReceivers:
                    - countryCode: "1"
                      name: Sample voice
                      phoneNumber: "1234567890"
                  webhookReceivers:
                    - name: Sample webhook 1
                      serviceUri: http://www.example.com/webhook1
                      useCommonAlertSchema: true
                    - identifierUri: http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a
                      name: Sample webhook 2
                      objectId: d3bb868c-fe44-452c-aa26-769a6538c808
                      serviceUri: http://www.example.com/webhook2
                      tenantId: 68a4459a-ccb8-493c-b9da-dd30457d1b84
                      useAadAuth: true
                      useCommonAlertSchema: true
                tags: {}
                type: Microsoft.Insights/ActionGroups
              headers: {}
            "201":
              body:
                id: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup
                location: Global
                name: SampleActionGroup
                properties:
                  armRoleReceivers:
                    - name: Sample armRole
                      roleId: 8e3af657-a8ff-443c-a75c-2fe8c4bcb635
                      useCommonAlertSchema: true
                  automationRunbookReceivers:
                    - automationAccountId: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest
                      isGlobalRunbook: false
                      name: testRunbook
                      runbookName: Sample runbook
                      serviceUri: https://s13events.azure-automation.net/webhooks?token=iimE%2fD19Eg%2bvDy22yUMecIZY6Uiz%2bHfuQ67r8r1wY%2fI%3d
                      useCommonAlertSchema: true
                      webhookResourceId: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084
                  azureAppPushReceivers:
                    - emailAddress: johndoe@email.com
                      name: Sample azureAppPush
                  azureFunctionReceivers:
                    - 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==
                      name: Sample azureFunction
                      useCommonAlertSchema: true
                  emailReceivers:
                    - emailAddress: johndoe@email.com
                      name: John Doe's email
                      status: Enabled
                      useCommonAlertSchema: false
                    - emailAddress: janesmith@email.com
                      name: Jane Smith's email
                      status: Enabled
                      useCommonAlertSchema: true
                  enabled: true
                  groupShortName: sample
                  itsmReceivers:
                    - connectionId: a3b9076c-ce8e-434e-85b4-aff10cb3c8f1
                      name: Sample itsm
                      region: westcentralus
                      ticketConfiguration: '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}'
                      workspaceId: 5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c
                  logicAppReceivers:
                    - 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
                      name: Sample logicApp
                      resourceId: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp
                      useCommonAlertSchema: false
                  smsReceivers:
                    - countryCode: "1"
                      name: John Doe's mobile
                      phoneNumber: "1234567890"
                      status: Enabled
                    - countryCode: "1"
                      name: Jane Smith's mobile
                      phoneNumber: 987654321
                      status: Enabled
                  voiceReceivers:
                    - countryCode: "1"
                      name: Sample voice
                      phoneNumber: "1234567890"
                  webhookReceivers:
                    - name: Sample webhook 1
                      serviceUri: http://www.example.com/webhook1
                      useCommonAlertSchema: true
                    - identifierUri: http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a
                      name: Sample webhook 2
                      objectId: d3bb868c-fe44-452c-aa26-769a6538c808
                      serviceUri: http://www.example.com/webhook2
                      tenantId: 68a4459a-ccb8-493c-b9da-dd30457d1b84
                      useAadAuth: true
                      useCommonAlertSchema: true
                tags: {}
                type: Microsoft.Insights/ActionGroups
              headers: {}
  "/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
      parameters:
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ActionGroupNameParameter"
        - description: The receiver to re-enable.
          in: body
          name: enableRequest
          required: true
          schema:
            $ref: "#/definitions/EnableRequest"
        - $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"
      x-ms-examples:
        Enable the receiver:
          parameters:
            actionGroupName: SampleActionGroup
            api-version: 2019-06-01
            enableRequest:
              receiverName: John Doe's mobile
            resourceGroupName: Default-NotificationRules
            subscriptionId: 187f412d-1758-44d9-b052-169e2564721d
          responses:
            "200": {}
            "409": {}
definitions:
  ActionGroup:
    description: An Azure action group.
    properties:
      armRoleReceivers:
        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.
        items:
          $ref: "#/definitions/ArmRoleReceiver"
        type: array
      automationRunbookReceivers:
        description: The list of AutomationRunbook receivers that are part of this action group.
        items:
          $ref: "#/definitions/AutomationRunbookReceiver"
        type: array
      azureAppPushReceivers:
        description: The list of AzureAppPush receivers that are part of this action group.
        items:
          $ref: "#/definitions/AzureAppPushReceiver"
        type: array
      azureFunctionReceivers:
        description: The list of azure function receivers that are part of this action group.
        items:
          $ref: "#/definitions/AzureFunctionReceiver"
        type: array
      emailReceivers:
        description: The list of email receivers that are part of this action group.
        items:
          $ref: "#/definitions/EmailReceiver"
        type: array
      enabled:
        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.
        type: boolean
      groupShortName:
        description: The short name of the action group. This will be used in SMS messages.
        maxLength: 12
        type: string
      itsmReceivers:
        description: The list of ITSM receivers that are part of this action group.
        items:
          $ref: "#/definitions/ItsmReceiver"
        type: array
      logicAppReceivers:
        description: The list of logic app receivers that are part of this action group.
        items:
          $ref: "#/definitions/LogicAppReceiver"
        type: array
      smsReceivers:
        description: The list of SMS receivers that are part of this action group.
        items:
          $ref: "#/definitions/SmsReceiver"
        type: array
      voiceReceivers:
        description: The list of voice receivers that are part of this action group.
        items:
          $ref: "#/definitions/VoiceReceiver"
        type: array
      webhookReceivers:
        description: The list of webhook receivers that are part of this action group.
        items:
          $ref: "#/definitions/WebhookReceiver"
        type: array
    required:
      - groupShortName
      - enabled
  ActionGroupList:
    description: A list of action groups.
    properties:
      nextLink:
        description: Provides the link to retrieve the next set of elements.
        type: string
      value:
        description: The list of action groups.
        items:
          $ref: "#/definitions/ActionGroupResource"
        type: array
  ActionGroupPatch:
    description: An Azure action group for patch operations.
    properties:
      enabled:
        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.
        type: boolean
  ActionGroupPatchBody:
    description: An action group object for the body of patch operations.
    properties:
      properties:
        $ref: "#/definitions/ActionGroupPatch"
        description: The action group settings for an update operation.
        x-ms-client-flatten: true
      tags:
        additionalProperties:
          type: string
        description: Resource tags
  ActionGroupResource:
    allOf:
      - $ref: "#/definitions/Resource"
    description: An action group resource.
    properties:
      properties:
        $ref: "#/definitions/ActionGroup"
        description: The action groups properties of the resource.
        x-ms-client-flatten: true
  ArmRoleReceiver:
    description: An arm role receiver.
    properties:
      name:
        description: The name of the arm role receiver. Names must be unique across all receivers within an action group.
        type: string
      roleId:
        description: The arm role id.
        type: string
      useCommonAlertSchema:
        description: Indicates whether to use common alert schema.
        type: boolean
    required:
      - name
      - roleId
      - useCommonAlertSchema
  AutomationRunbookReceiver:
    description: The Azure Automation Runbook notification receiver.
    properties:
      automationAccountId:
        description: The Azure automation account Id which holds this runbook and authenticate to Azure resource.
        type: string
      isGlobalRunbook:
        description: Indicates whether this instance is global runbook.
        type: boolean
      name:
        description: Indicates name of the webhook.
        type: string
      runbookName:
        description: The name for this runbook.
        type: string
      serviceUri:
        description: The URI where webhooks should be sent.
        type: string
      useCommonAlertSchema:
        description: Indicates whether to use common alert schema.
        type: boolean
      webhookResourceId:
        description: The resource id for webhook linked to this runbook.
        type: string
    required:
      - automationAccountId
      - runbookName
      - webhookResourceId
      - isGlobalRunbook
      - useCommonAlertSchema
  AzureAppPushReceiver:
    description: The Azure mobile App push notification receiver.
    properties:
      emailAddress:
        description: The email address registered for the Azure mobile app.
        type: string
      name:
        description: The name of the Azure mobile app push receiver. Names must be unique across all receivers within an action group.
        type: string
    required:
      - name
      - emailAddress
  AzureFunctionReceiver:
    description: An azure function receiver.
    properties:
      functionAppResourceId:
        description: The azure resource id of the function app.
        type: string
      functionName:
        description: The function name in the function app.
        type: string
      httpTriggerUrl:
        description: The http trigger url where http request sent to.
        type: string
      name:
        description: The name of the azure function receiver. Names must be unique across all receivers within an action group.
        type: string
      useCommonAlertSchema:
        description: Indicates whether to use common alert schema.
        type: boolean
    required:
      - name
      - functionAppResourceId
      - functionName
      - httpTriggerUrl
      - useCommonAlertSchema
  EmailReceiver:
    description: An email receiver.
    properties:
      emailAddress:
        description: The email address of this receiver.
        type: string
      name:
        description: The name of the email receiver. Names must be unique across all receivers within an action group.
        type: string
      status:
        $ref: "#/definitions/ReceiverStatus"
        description: The receiver status of the e-mail.
        readOnly: true
      useCommonAlertSchema:
        description: Indicates whether to use common alert schema.
        type: boolean
    required:
      - name
      - emailAddress
      - useCommonAlertSchema
  EnableRequest:
    description: Describes a receiver that should be resubscribed.
    properties:
      receiverName:
        description: The name of the receiver to resubscribe.
        type: string
    required:
      - receiverName
  ErrorResponse:
    description: Describes the format of Error response.
    properties:
      code:
        description: Error code
        type: string
      message:
        description: Error message indicating why the operation failed.
        type: string
    type: object
  ItsmReceiver:
    description: An Itsm receiver.
    properties:
      connectionId:
        description: Unique identification of ITSM connection among multiple defined in above workspace.
        type: string
      name:
        description: The name of the Itsm receiver. Names must be unique across all receivers within an action group.
        type: string
      region:
        description: Region in which workspace resides. Supported values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope'
        type: string
      ticketConfiguration:
        description: JSON blob for the configurations of the ITSM action. CreateMultipleWorkItems option will be part of this blob as well.
        type: string
      workspaceId:
        description: OMS LA instance identifier.
        type: string
    required:
      - name
      - workspaceId
      - connectionId
      - ticketConfiguration
      - region
  LogicAppReceiver:
    description: A logic app receiver.
    properties:
      callbackUrl:
        description: The callback url where http request sent to.
        type: string
      name:
        description: The name of the logic app receiver. Names must be unique across all receivers within an action group.
        type: string
      resourceId:
        description: The azure resource id of the logic app receiver.
        type: string
      useCommonAlertSchema:
        description: Indicates whether to use common alert schema.
        type: boolean
    required:
      - name
      - resourceId
      - callbackUrl
      - useCommonAlertSchema
  ReceiverStatus:
    description: Indicates the status of the receiver. Receivers that are not Enabled will not receive any communications.
    enum:
      - NotSpecified
      - Enabled
      - Disabled
    type: string
    x-ms-enum:
      modelAsString: false
      name: ReceiverStatus
  Resource:
    description: An azure resource object
    properties:
      id:
        description: Azure resource Id
        readOnly: true
        type: string
      location:
        description: Resource location
        type: string
        x-ms-mutability:
          - create
          - read
      name:
        description: Azure resource name
        readOnly: true
        type: string
      tags:
        additionalProperties:
          type: string
        description: Resource tags
      type:
        description: Azure resource type
        readOnly: true
        type: string
    required:
      - location
    x-ms-azure-resource: true
  SmsReceiver:
    description: An SMS receiver.
    properties:
      countryCode:
        description: The country code of the SMS receiver.
        type: string
      name:
        description: The name of the SMS receiver. Names must be unique across all receivers within an action group.
        type: string
      phoneNumber:
        description: The phone number of the SMS receiver.
        type: string
      status:
        $ref: "#/definitions/ReceiverStatus"
        description: The status of the receiver.
        readOnly: true
    required:
      - name
      - countryCode
      - phoneNumber
  VoiceReceiver:
    description: A voice receiver.
    properties:
      countryCode:
        description: The country code of the voice receiver.
        type: string
      name:
        description: The name of the voice receiver. Names must be unique across all receivers within an action group.
        type: string
      phoneNumber:
        description: The phone number of the voice receiver.
        type: string
    required:
      - name
      - countryCode
      - phoneNumber
  WebhookReceiver:
    description: A webhook receiver.
    properties:
      identifierUri:
        description: Indicates the identifier uri for aad auth.
        type: string
      name:
        description: The name of the webhook receiver. Names must be unique across all receivers within an action group.
        type: string
      objectId:
        description: Indicates the webhook app object Id for aad auth.
        type: string
      serviceUri:
        description: The URI where webhooks should be sent.
        type: string
      tenantId:
        description: Indicates the tenant id for aad auth.
        type: string
      useAadAuth:
        default: false
        description: Indicates whether or not use AAD authentication.
        type: boolean
      useCommonAlertSchema:
        description: Indicates whether to use common alert schema.
        type: boolean
    required:
      - name
      - serviceUri
      - useCommonAlertSchema
