Create Azure Service Bus with ACS (for PHP integration)
I am trying to set up an ACS namespace to allow access from a PHP integration application. It was an option in the portal, but now it's removed, so I'm trying to create a namespace via powershell. As you can see from the commented lines, I've tried several approaches. Azure Wednesday has been set up over the past few weeks.
#Add-AzureRMAccount
Login-AzureRmAccount -SubscriptionId "my-guid"
#Select-AzureRMSubscription -SubscriptionId "my-guid" | Select-AzureRmSubscription
Get-AzureRmSubscription -SubscriptionId "my-guid" | Select-AzureRmSubscription
New-AzureSBNamespace -Name "myservicebus.servicebus.windows.net" -Location "UK South" -CreateACSNamespace $true -NamespaceType Messaging
I've tried several combinations, but I still get the same error when I call the New-AzureSBNamespace method, which looks like this: "No subscription by default"
EDIT: I can now create a namespace / service bus bus using the shell, but it doesn't seem to have ACS support.
Login-AzureRmAccount -SubscriptionId "2a428947-cc0e-4fa5-aef2-a7ad0fe7a26e"
Get-AzureRmSubscription -SubscriptionId "2a428947-cc0e-4fa5-aef2-a7ad0fe7a26e" | Select-AzureRmSubscription
New-AzureRmServiceBusNamespace -ResourceGroup StevenStone-Shop -NamespaceName my-service-bus -Location UKSouth -SkuName "Basic"
The reason I am trying to do this is because I can connect via PHP with a connection like below:
"Endpoint = [yourEndpoint]; SharedSecretIssuer = [Default Issuer]; SharedSecretValue = [Default Key]"
https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-php-how-to-use-queues
source to share
You may need to add -CreateACSNamespace $true
to the command to create a new ACS Service Bus namespace.
Add-AzureAccount # this will sign you in
New-AzureSBNamespace -CreateACSNamespace $true -Name 'mytestbusname' -Location 'West US' -NamespaceType 'Messaging'
If this is successful, you will get the connection string in the PowerShell output. If there are connection errors with it and the connection string looks like Endpoint=sb://...
, change it to Endpoint=https://...
.
See this post for details .
source to share