Skip to content

IncidentReceiver of an action group can‘t be created in cloudshell #14580

@LiuJohn-1886

Description

@LiuJohn-1886

Example of Bicep:

@description('Action Group for Nexus IcM integration')
resource ag 'Microsoft.Insights/actionGroups@2024-10-01-preview' = {
  name: 'Cfar Nexus IcM Alerts'
  location: 'global'
  properties: {
    enabled: true
    groupShortName: 'CfarNxsIcMs'
    emailReceivers: [
      {
        name: 'email2'
        emailAddress: 'harikc@microsoft.com'
        useCommonAlertSchema: true
      }
    ]
    incidentReceivers: [
      {
        name: 'IcMReceiverLiuJohn'
        incidentManagementService: 'IcM'
        connection: {
          id: '47e0ef8f-453d-4571-9eb5-c3f7f3e99f24'
          name: 'Dfp-AzureMonitor-UX'
        }
        mappings: {
          routingId: 'DataPipelineAlertsToSRE'
	  occurringLocation: 'PROD'
          autoMitigationEnabled: 'true'
        }
      }
    ]
  }
}

Error:

PS /home/john> az deployment group create --resource-group liujohn-debug-rg --template-file ./actionGroup.bicep
{"status":"Failed","error":{"code":"DeploymentFailed","target":"/subscriptions/be1e1a26-7ebd-4d36-8c78-1abe8694828d/resourceGroups/liujohn-debug-rg/providers/Microsoft.Resources/deployments/actionGroup","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"BadRequest","target":"/subscriptions/be1e1a26-7ebd-4d36-8c78-1abe8694828d/resourceGroups/liujohn-debug-rg/providers/Microsoft.Insights/actionGroups/Cfar Nexus IcM Alerts","message":"{\r\n  \"code\": \"IncidentReceiverMappingHasInvalidEnvironment\",\r\n  \"message\": \"IncidentReceiverMappingHasInvalidEnvironment\"\r\n}"}]}}

“”Incident(preview)“” is not support in existing azure API, so I have to try cloud shell with specified azure API verion.
Failed to create action group. Error: Incident action is not supported in api version '2019-06-01'. The supported api versions are '2023-09-01-preview,2024-10-01-preview'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions