Azure / Azure/azure-rest-api-specs
[BUG] Notification Hub API doesn't allow to set the registrationTtl property
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 3d 37m
- Merged PRs (30d)
- 446
Description
### API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2023-09-01/notificationhubs.json#L2714
### API Spec version
2023-09-01
### Describe the bug
I tried to set registrationTtl while creating/updating Notification Hub but this property doesn't take effect.
request payload:
```
PUT https://management.azure.com/subscriptions/xxxxxxx/resourceGroups/acctestRGpol-250325143111879778/providers/Microsoft.NotificationHubs/namespaces/acctestnhn-250325143111879778/notificationHubs/acctestnh-250325143111879778
{
"location": "eastus",
"properties": {
"name": "acctestnh-250325143111879778",
"registrationTtl": "P90D"
}
}
```
API response:
```
{
"id": "/subscriptions/xxxxxx/resourceGroups/acctestRGpol-250325143111879778/providers/Microsoft.NotificationHubs/namespaces/acctestnhn-250325143111879778/NotificationHubs/acctestnh-250325143111879778",
"location": "East US",
"name": "acctestnh-250325143111879778",
"registrationTtl": "10675199.02:48:05.4775807",
"resourceGroup": "acctestRGpol-250325143111879778",
"type": "Microsoft.NotificationHubs/namespaces/notificationHubs"
}
```
### Expected behavior
The registraionTtl property should be set with the specified value.
### Actual behavior
The registraionTtl doesn't take effect and it always returns "10675199.02:48:05.4775807".
### Reproduction Steps
1. Create resource group
2. Create notification hub namespace
3. Create notification hub with "registrationTtl=P39D"
### Environment
PROD
Contributor guide
Research direction
Read specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2023-09-01/notificationhubs.json around line 2714, then compare the registrationTtl definition with the create and update request schemas. Reproduce the PUT described in the issue and verify whether the service accepts and persists P90D or P39D; done means the specified value is reflected in the API response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100