[Notification Hubs] Unable to remove APNS|GCM|... credentials from a Notification Hub #2246
Labels
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Mgmt
This issue is related to a management-plane library.
needs-author-feedback
Workflow: More information is needed from author to address the issue.
no-recent-activity
There has been no recent activity on this issue.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Bug Report
github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs
v18.0.0
go version
:go version go1.10.2 darwin/amd64
👋 me again!
So I've been looking into Notification Hubs and have found a bug in the SDK;
Looking to the Portal, it's possible to add APNS/GCM Credentials for a given Notification Hub using the following (redacted) request:
which works as expected using the
CreateOrUpdate
method of thenotificationhubs
SDK (2017-04-01/v18.0.0). It's also possible to successfully retrieve these credentials using the `` method/endpoint which is :thumbs_up: so far.The issue comes with removing these credentials - in the Portal this is done by submitting the following request:
which returns a 200 OK which is :thumbs_up:. However I'm unable to replicate this request using the Go SDK as the top level properties have the attribute
omitempty
; setting this to an empty object gets translated as (in this case, trying to remove the APNS Credentials):which returns an error from the API:
As such I don't think there's a way of removing credentials from a Notification Hub using the SDK today. For the moment I can workaround this by making a DELETE call and force-recreating the Notification Hub, which whilst isn't great will allow us to ship this at the moment (albeit with a disclaimer).
Relevant PR from our side: hashicorp/terraform-provider-azurerm#1589
Thanks!
The text was updated successfully, but these errors were encountered: