azure-cli: az eventhubs eventhub update --enable-capture $false doesn't disable capture
When running az eventhubs eventhub update --enable-capture $false
against an existing event hub with capture enabled, it does not disable capture. Here is the PUT that is sent out:
msrest.http_logger : Request method: ‘PUT’ msrest.http_logger : Request headers: msrest.http_logger : ‘Accept’: ‘application/json’ msrest.http_logger : ‘Content-Type’: ‘application/json; charset=utf-8’ msrest.http_logger : ‘accept-language’: ‘en-US’ msrest.http_logger : ‘Content-Length’: ‘602’ msrest.http_logger : ‘User-Agent’: ‘python/3.6.6 (Windows-7-6.1.7601-SP1) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-eventhub/2.6.0 Azure-SDK-For-Python AZURECLI/2.0.68’ msrest.http_logger : Request body: msrest.http_logger : {“properties”: {“messageRetentionInDays”: 7, “partitionCount”: 4, “status”: “Active”, “captureDescription”: {“enabled”: true, “encoding”: “Avro”, “intervalInSeconds”: 300, “sizeLimitInBytes”: 314572800, “destination”: {“name”: “EventHubArchive.AzureBlockBlob”, “properties”: {“storageAccountResourceId”: “/subscriptions/####/resourceGroups/####/providers/Microsoft.Storage/storageAccounts/####”, “blobContainer”: “auditexhaust”, “archiveNameFormat”: “{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}”}}}}}
When using the portal to disable capture, the request payload shows:
id: “/subscriptions/####/resourceGroups/####/providers/Microsoft.EventHub/namespaces/####/eventhubs/####” location: “West Europe” name: “####” properties: {messageRetentionInDays: 7, partitionIds: [“0”, “1”, “2”, “3”], partitionCount: 4,…} captureDescription: null messageRetentionInDays: 7 partitionCount: 4 partitionIds: [“0”, “1”, “2”, “3”] type: “Microsoft.EventHub/Namespaces/EventHubs”
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (3 by maintainers)
Yes it is working now. Tested with 2.32.0 which failed, then upgraded to 2.35.0 and confirmed working. ` az version { “azure-cli”: “2.32.0”, “azure-cli-core”: “2.32.0”, “azure-cli-telemetry”: “1.0.6”, “extensions”: {} }
az eventhubs eventhub update --name eventhubname --enable-capture false --namespace-name eventhubnamespace --resource-group resourcegroupname { “captureDescription”: { “destination”: { “archiveNameFormat”: “{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}”, “blobContainer”: “”, “name”: “EventHubArchive.AzureBlockBlob”, “storageAccountResourceId”: “” }, “enabled”: true, “encoding”: “Avro”, “intervalInSeconds”: 300, “sizeLimitInBytes”: 314572800, “skipEmptyArchives”: null }, `
` az version { “azure-cli”: “2.35.0”, “azure-cli-core”: “2.35.0”, “azure-cli-telemetry”: “1.0.6”, “extensions”: {} }
az eventhubs eventhub update --name eventhubname --enable-capture false --namespace-name eventhubnamespace --resource-group resourcegroupname { “captureDescription”: { “destination”: { “archiveNameFormat”: “{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}”, “blobContainer”: “”, “name”: “EventHubArchive.AzureBlockBlob”, “storageAccountResourceId”: “” }, “enabled”: false, “encoding”: “Avro”, “intervalInSeconds”: 300, “sizeLimitInBytes”: 314572800, “skipEmptyArchives”: null }, `
@thelethalkind Apologies for the late reply. We are looking into this issue. We will update this github thread once we have more details on this.
cc @Saglodha
Hi @thelethalkind and @PCNZ, thanks for sharing details. We would investigate this internally and would keep you posted.