How to change the NOTIFICATION HUBS billing tier using powershell?

278 views Asked by At

i need to change the notification hub tier free to standard using power shell script. help me on the script. i didn't find anything.

I have tried using auto scale setting , but its not working.

2

There are 2 answers

1
Amol Ravande On

In addition you can use the below request body to change the tier. This is using the Service Management API mentioned in the link above

Request Method: PUT

/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}?api-version=2016-03-01

Request Body

{
  "Location": [Resource Location],
  "Tags": null,
  "Properties": {    
    "NamespaceType": "NotificationHub"
  },
"sku":{
    "name":"Standard"
  }  
}

Below is the powershell script example you can use to update the tier. You need to install the azure powershell sdk.

$skuTier = "Standard"
Set-AzureRmNotificationHubsNamespace -ResourceGroup $ResourceGroup -Namespace $namespaceName -Location $location -Tags $tags -skuTier $skuTier -Force
0
Nikita R. On

To change billing tier you need to update your namespace.

Notification Hubs namespace can be created/updated using Service Bus management APIs. Here's an article on how to create a namespace, and another one on how to create a hub. Updating should be very similar to those.

Alternatively, here's the REST API to create or update a Notification Hubs namespace.