Microsoft purview accounts doesnt disable eventhub namespace in bicep

Jora Singh Randhawa 6 Reputation points
2022-12-06T14:09:42.247+00:00

When deploying a microsoft purview account with bicep there is no option for disabling eventhub namespace. It will automatically be created when deploying. Is there an option to disable eventhub namespace with bicep template file?

code example:

resource pview 'Microsoft.Purview/accounts@2021-07-01' = {  
    name: 'datagov-pview123'  
    location: 'westeurope'  
  
    identity: {  
      type: 'SystemAssigned'  
    }  
    properties: {  
      cloudConnectors: {}  
      publicNetworkAccess: 'Enabled'  
      managedResourceGroupName: 'mangov'  
  }  
}
Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
722 questions
Microsoft Security | Microsoft Purview
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 90,661 Reputation points Moderator
    2022-12-12T06:34:54.977+00:00

    Hello anonymous user,

    This is achievable via the Management Data Plane (Microsoft.Purview/Account/Update) API - https://learn.microsoft.com/en-us/rest/api/purview/accounts/update?tabs=HTTP
    You have to call this API in the post-deployment script of the bicep.

    Just blank out by specifying blank as the "eventHubNamespace" : ""

    Example payload:

    {   "location": "West US 2",   "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/SampleResourceGroup/providers/Microsoft.Purview/accounts/account1",   "name": "account1",   "type": "Microsoft.Purview/accounts",   "sku": {     "name": "Standard",     "capacity": 1   },   "systemData": {     "createdBy": "client-name",     "createdByType": "User",     "createdAt": "2019-11-22T18:39:58.6929344Z",     "lastModifiedBy": "client-name",     "lastModifiedByType": "User",     "lastModifiedAt": "2021-03-16T23:24:34.3430059Z"   },   "properties": {     "friendlyName": "friendly-account1",     "createdBy": "client-name",     "createdByObjectId": "client-objectId",     "createdAt": "2019-11-22T18:39:58.6929344Z",     "provisioningState": "Succeeded",     "endpoints": {       "catalog": "https://account2.catalog.purview.azure-test.com",       "scan": "https://account2.scan.purview.azure-test.com",       "guardian": "https://account1.guardian.purview.azure-test.com"     },     "publicNetworkAccess": "Enabled",     "managedResources": {       "resourceGroup": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl",       "storageAccount": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl/providers/Microsoft.Storage/storageAccounts/scanwestustzaagzr",       "eventHubNamespace": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl/providers/Microsoft.EventHub/namespaces/atlas-westusdddnbtp"     }   },   "tags": {     "newTag": "New tag value."   } }  
    

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is jhow you can be part of Q&A Volunteer Moderators

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.