I am trying to create a new CDN profile in my subscription on Azure.
However, when I run the command below to create a CDN profile:
New-AzCdnProfile -Location westus -ProfileName <String> -ResourceGroupName myresourcegroup -Sku Standard_Verizon
I get the error below:
New-AzCdnProfile: Operation returned an invalid status code 'BadRequest'
I have tried to resolve this but no luck yet
I finally figured it out. The error message gotten in the command line wasn't descriptive enough.
The issue was caused by me hitting the maximum limit of CDN profiles under my subscription. A Content Delivery Network subscription can contain one or more Content Delivery Network profiles.
So a workaround for this will be to organize the endpoints for your apps into different categories, say, production, test, and staging. And then create Content Delivery Network profiles for each of these categories to house the corresponding endpoints that fall into the category.
Resources: Content Delivery Network limits