Check if Azure Service Bus name is unique - azure

I am creating an Azure Service Bus with the Fluent SDK. I want to give my service bus a specific name and increment by one if the name is unavailable.
The problem I am having is that I don't actually know if the name is unavailable at the time of creation.
I'm using this to create a service bus:
var serviceBusNamespace = azure.ServiceBusNamespaces
.Define(serviceBusName)
.WithRegion(Region)
.WithExistingResourceGroup(resourceGroup)
.WithSku(NamespaceSku.Standard)
.Create();
If I run this code for two different resource groups using the same serviceBusName, I get a service bus created in both resources groups without error. However when I go to the Azure portal the first service bus opens fine, but I get an error saying 'Not Found' when trying to open the second.
I understand that servicebus names must be unique across all of Azure, but
Why is the Fluent SDK allowing me to create the second service bus with the same name?
How can I check of the name is unique before creating the service bus?
I tried to ping the service bus URL to see if it exists. For example I tried this, for a URL like serviceBusName.servicebus.windows.net, but that failed.

Why is the Fluent SDK allowing me to create the second service bus with the same name?
You should raise this as an issue with the team that develops the library. In this case, Fluent SDK is produced by .NET Libraries for Azure team. Issue tracker is available here. When raising an issue, label it with Service Bus.
How can I check of the name is unique before creating the service bus?
Operation to provision a new namespace could be enqueued internally. Therefore, when you query for a namespace existence, you might get a negative response while backend is spinning it up. One of the requests will succeed, while another will fail. You'd need to create and query for a result after, checking the status.

Related

Unable to move Cloud Service (Extended Support) to another resource group

we have problem to move Cloud Service (Extended Support) from 1 resource group to another resource group in the same subscription. Both resource groups are in the same location.
Picture with status of the move validation
Error code in validation window is:
{ "code": "ResourceMoveNotSupported", "target": "/subscriptions/123456-xxxx-yyyy-zzzz-123456/resourceGroups/AAAAA-BBBBB-Migrated/providers/Microsoft.Compute/cloudServices/AAAAA-BBBBB",
"message": "Resource move is not supported for resource types
'Microsoft.Compute/cloudServices'." }
Additional information:
Source resource group was created automatically after successful in-place migration from Cloud Service (Classic) to Cloud Service (Extended Support). Now we need to move all resources created by migration back to the original resource group, where Cloud Service (Classic) was previously located. Cloud Service (Classic) was automatically deleted after migration.
The main reason why we migrated from Cloud Service (Classic) to Cloud Service (Extended Support) was ability to move between subscriptions, but we are unable to move it even inside the same subscription :(
Any ideas how to proceed with this problem?
Best course of action is to create an Azure Support Ticket.
These type of operations are deep internal to azure, and reasons why these fail range from config errors, failed internal transactions to straight up bugs for a scenario they did not consider.
Note: it might take some time and patience on your side to get the desired results reached from Azure support, as these type of tickets are usually low priority.
We finally managed to contact Azure Support.
This move is not supported :(
Since the Cloud Service extended support is a new published product,
we are sorry that currently it does not support migration from one
subscription to another. We are sorry that moving “Cloud Service
extended support” among resource groups in the same subscription is
also unsupported.

Azure Service Bus Subscription

i want to develop a Game using Azure Cloud but i am not sure which ressources i could use for it. Folowing is my problem:
There is one publisher which is providing some messages. I need to find a way to add subscriber on demand. That means whenever i need more subscriber i need to add them without changing any settings on the portal.
All subscriber needs to get the published message at the same time.
Received message from the publisher needs to be deleted for all subscriber at the same time.
Is there a ressource or a way which fits theese needs?
Thanks.
Azure SignalR Service is WebSocket Gateway service that covers all your requirements.
While you could always host your own server, the service supports scaling out.

Cannot create topics in service bus

I created a service bus account with Basic tier and tried to create a Topic but I saw that it was not possible due to the Basic tier. So I deleted this service bus and created another one with the same name, but this time with the tier as Standard. Now when I try to create a topic I get the message:
SubCode=40000. Cannot operate on type Topic because the namespace 'XXXX' is using 'Basic' tier.
But it´s Standard as you can see on the image:
There are only two hard things in Computer Science: cache invalidation and naming things.
-- Phil Karlton
Service Bus is not an exception. Your best bet at this point is to contact Azure support directly or via Twitter.

Not able to stream activity logs into Event Hub

I'm using free tier Azure account. I'm trying to configure activity logs streaming into Event Hubs as per instructions on page - https://learn.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-stream-activity-logs-event-hubs
I have created a new EventHub, Shared Access Policy called "ActivityLogsPolicy" with Manage, Send and Listen permissions.
I used this policy to configure "Export" from Activity logs however it keeps failing with error message "Create or update activity log profilesFailure"
Has anyone encountered this problem ?
I was able to get it to work as follows:
In order to make it work, you have to “Register” support for a provider called “microsoft.insights” the whole thing has look and feel of “Windows Registries” :pensive:
Search for Subscriptions in all services -> Select your subscription -> Resource Providers -> Search for “microsoft.insights” -> Enable it. Then it works
I ran into this same error after moving a subscription to a new enterprise agreement. I was not able to get it working so I needed to create a new subscription.

Azure native way to get notified of resource addition/modification

Actually I am working on an event based notification which will call a webhook/send an email in case a new resource gets added to my subscription. I could not find any Azure native service which will send me alerts/notification in case a new resource gets added to my subscription, but using powershell we can keep on polling on the resource list and workaround it, but if there is any native Azure service or function which can help me out, please inform.
You can use the azure activity log alerts to create a web hook/sms/email notification. This allows you to create a direct avenue straight from the Azure tooling. You can also use a variety of other methods to monitor your azure subscription including Log Analytics (event based logging, alerting and analytics) and App Insights (application logging and alerting)

Resources