EventHubs with 2.67: The entity description of type 'EventHubDescription' has unsupported properties for api-version '2022-10' in the request.
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
Az cli 2.67.0 creates broken event hub resources, where authorization rules cannot be added.
Downgrading to 2.66.0 and recreating the event hub solves the issue.
### Related command
```
az eventhubs eventhub create --subscription sub --resource-group rg --namespace-name ns --name test --partition-count 4 --cleanup-policy Compact
az eventhubs eventhub authorization-rule create --subscription sub --resource-group rg --namespace-name ns --eventhub-name test --name eventhub-send --rights Send --debug
```
Fails with a 400:
```
"error":{"code":"MessagingGatewayBadRequest","message":"SubCode=40000. The entity description of type 'EventHubDescription' has unsupported properties for api-version '2022-10' in the request. Try including the correct api-version query string in the request. TrackingId:a068e44c-23b3-48ad-9d8d-9fa644ed1c64_G10, SystemTracker:ns, Timestamp:2024-11-26T12:08:05"}}
```
### Errors
```
az eventhubs eventhub create --subscription sub --resource-group rg --namespace-name ns --name test --partition-count 4 --cleanup-policy Compact
az eventhubs eventhub authorization-rule create --subscription sub --resource-group rg --namespace-name ns --eventhub-name test --name eventhub-send --rights Send --debug
```
Fails with a 400:
```
"error":{"code":"MessagingGatewayBadRequest","message":"SubCode=40000. The entity description of type 'EventHubDescription' has unsupported properties for api-version '2022-10' in the request. Try including the correct api-version query string in the request. TrackingId:a068e44c-23b3-48ad-9d8d-9fa644ed1c64_G10, SystemTracker:ns, Timestamp:2024-11-26T12:08:05"}}
```
### Issue script & Debug output
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/sub/resourceGroups/rg/providers/Microsoft.EventHub/namespaces/ns/eventhubs/test/authorizationRules/eventhub-send?api-version=2023-01-01-preview'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'Content-Length': '36'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'a74761d2-abef-11ef-a356-68c6acf4af06'
cli.azure.cli.core.sdk.policies: 'CommandName': 'eventhubs eventhub authorization-rule create'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--subscription --resource-group --namespace-name --eventhub-name --name --rights --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.67.0 (DEB) azsdk-python-core/1.31.0 Python/3.12.7 (Linux-6.8.0-49-generic-x86_64-with-glibc2.39)'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"properties": {"rights": ["Send"]}}
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/sub/resourceGroups/rg/providers/Microsoft.EventHub/namespaces/nseventhubs/test/authorizationRules/eventhub-send?api-version=2023-01-01-preview HTTP/1.1" 400 446
cli.azure.cli.core.sdk.policies: Response status: 400
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies: 'Content-Length': '446'
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies: 'Expires': '-1'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '38f23314-e786-4b3b-96e5-7d3dfc89cda9'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'a74761d2-abef-11ef-a356-68c6acf4af06_RP'
cli.azure.cli.core.sdk.policies: 'x-ms-messaging-activity-id': '37dde2da-34f0-4d19-97b6-ec412bef7e6f'
cli.azure.cli.core.sdk.policies: 'x-ms-messaging-routing-id': 'WESTEUROPE|WESTEUROPE|G7|2024-11-26T12:12:07'
cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '199'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-writes': '2999'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '38f23314-e786-4b3b-96e5-7d3dfc89cda9'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'SWEDENSOUTH:20241126T121207Z:38f23314-e786-4b3b-96e5-7d3dfc89cda9'
cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies: 'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: AF927FF7439D424FA0D394BA9B4350CC Ref B: FRA231050416027 Ref C: 2024-11-26T12:12:06Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Tue, 26 Nov 2024 12:12:07 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"error":{"code":"MessagingGatewayBadRequest","message":"SubCode=40000. The entity description of type 'EventHubDescription' has unsupported properties for api-version '2022-10' in the request. Try including the correct api-version query string in the request. TrackingId:37dde2da-34f0-4d19-97b6-ec412bef7e6f_G27, SystemTracker:cmb-feed-subscriptionsservice-development.servicebus.windows.net:eventhub-ft-gp-4354, Timestamp:2024-11-26T12:12:07"}}
### Expected behavior
I expect a working event hub resource to be created.
### Environment Summary
azure-cli 2.67.0
core 2.67.0
telemetry 1.1.0
Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1
Python location '/opt/az/bin/python3'
Extensions directory '/home/jl/.azure/cliextensions'
Python (Linux) 3.12.7 (main, Nov 13 2024, 04:06:34) [GCC 13.2.0]
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.