Azure / Azure/azure-powershell

AzureChina [Re-Open] : New-AzureRmNotificationHubsNamespace fails with Resource unavailable error

Open
#3,625 4 comments 0 reactions 1 assignee Claimed by @smithaborkar View on GitHub
Notification Hub Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

**Creating this issue, as the original was closed without helping get more information.**
[https://github.com/Azure/azure-powershell/issues/3579](url)

1. Please point to the official documentation which states "Either NotificationHubs is not available in Mooncake, it is not available in the rgion you have supplied"
2. When will this be available in China?

### Cmdlet(s)
New-AzureRmNotificationHubsNamespace

### PowerShell Version
4.0

### Module Version
6.3.9600.17400

### OS Version
6.3.9600.17400

### Description

New-AzureRmNotificationHubsNamespace command fails with **below** error,

New-AzureRmNotificationHubsNamespace : **The resource namespace 'Microsoft.NotificationHubs' is invalid.**
At line:1 char:1
+ New-AzureRmNotificationHubsNamespace -ResourceGroup SAMPLE1 -Namespace sample1 - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureRmNotificationHubsNamespace], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.NotificationHubs.Commands.Namespace.NewAzureNotificationHubsNamespace

### Debug Output

DEBUG: [Common.Authentication]: Authenticating using Account: 'pradebban@.partner.onmschina.cn', environment: 'AzureChinaCloud', tenant:
'3953396c999978206'
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 03/06/2017 06:13:02: - TokenCache: Deserialized 4 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 03/06/2017 06:13:02: 6b5c3a7a48043b1c - AcquireTokenHandlerBase: === Token Acquisition starte
46d948043b1c - AcquireTokenHandlerBase: === Token Acquisition started:
Authority: https://login.chinacloudapi.cn/3953396c-43-ae4999978206/
Resource: https://management.core.chinacloudapi.cn/
ClientId: 1950a258-27495945fc2
CacheType: Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache (4 items)
Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 03/06/2017 06:13:02: 6b5c3a7a-cb3948043b1c - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 03/06/2017 06:13:02: 6b5c3a7a-c46d948043b1c - TokenCache: An item matching the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 03/06/2017 06:13:02: 6b5cd948043b1c - TokenCache: 31.3717523883333 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 03/06/2017 06:13:02: 6b5c3a48043b1c - TokenCache: A matching item (access token or refresh token or both) was found in
the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 03/06/2017 06:13:02: 646d948043b1c - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access
token was retuned:
Access Token Hash: xZAlFd0Cjeg6OiBIypaK3OMq9k=
Refresh Token Hash: ePDMg+jMNcdH1P/ZJ/WxtX0+Ie+5S416s=
Expiration Time: 03/06/2017 06:44:24 +00:00
User Hash: WEft6t6i32QwIWOaZnMzioqyDel3KEojP4=

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 03/06/2017 06:13:02: - TokenCache: Serializing token cache with 4 items.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 03/06/2017 06:13:02: 33a19eb7fb9345faf6 - AcquireTokenHandlerBase: === Token Acquisition started:
Authority: https://login.chinacloudapi.cn/395339e4999978206/
Resource: https://management.core.chinacloudapi.cn/
ClientId: 1950a258-225945fc2
CacheType: Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache (4 items)
Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 03/06/2017 06:13:02: 33a19efb9345faf6 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 03/06/2017 06:13:02: 33a19b7fb9345faf6 - TokenCache: An item matching the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 03/06/2017 06:13:02: 33a19e80-a42b9345faf6 - TokenCache: 31.37149239 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 03/06/2017 06:13:02: 33a19e87fb9345faf6 - TokenCache: A matching item (access token or refresh token or both) was found in
the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 03/06/2017 06:13:02: 33a19e87fb9345faf6 - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access
token was retuned:
Access Token Hash: xZAlFd0Cjegax6M6OiBIypaK3OMq9k=
Refresh Token Hash: ePDMg+jMNcdH1WxtX0+Ie+5S416s=
Expiration Time: 03/06/2017 06:44:24 +00:00
User Hash: WEft6t6i32QwIWOaWMzioqyDel3KEojP4=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.chinacloudapi.cn/subscriptions/45d5d889-49a43fb17d3/resourceGroups/SAMPLE1/providers/Microsoft.NotificationHubs/nam
espaces/sample1?api-version=2016-03-01

Headers:
x-ms-client-request-id : 83a890753ab
accept-language : en-US

Body:
{
"location": "China East",
"sku": {
"name": "Free"
}
}

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
NotFound

Headers:
Pragma : no-cache
x-ms-failure-cause : gateway
x-ms-request-id : 112f53d5-e6cb-4fc6949903f
x-ms-correlation-request-id : 112f53d5-2-1cfc6949903f
x-ms-routing-request-id : CHINAEAST:20170306T061302Z:112f53d1cfc6949903f
Strict-Transport-Security : max-age=31536000; includeSubDomains
Cache-Control : no-cache
Date : Mon, 06 Mar 2017 06:13:01 GMT

Body:
{
"error": {
"code": "InvalidResourceNamespace",
"message": "The resource namespace 'Microsoft.NotificationHubs' is invalid."
}
}

Confirm
The resource namespace 'Microsoft.NotificationHubs' is invalid.
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"):
New-AzureRmNotificationHubsNamespace : The resource namespace 'Microsoft.NotificationHubs' is invalid.
At line:1 char:1
+ New-AzureRmNotificationHubsNamespace -ResourceGroup SAMPLE1 -Namespace sample1 - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureRmNotificationHubsNamespace], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.NotificationHubs.Commands.Namespace.NewAzureNotificationHubsNamespace

### Script/Steps for Reproduction

1. Create a new Resource Group if needed.
2. Run the below command,

New-AzureRmNotificationHubsNamespace -ResourceGroup "uniquename" -Location "China East" -Namespace "anyname"

Thanks,
Pradebban Raja

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.