How to change the NOTIFICATION HUBS billing tier using powershell?

邮差的信 提交于 2019-12-25 08:04:03

问题


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.


回答1:


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



回答2:


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.



来源:https://stackoverflow.com/questions/41376868/how-to-change-the-notification-hubs-billing-tier-using-powershell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!