Promise Preston
Promise Preston

Reputation: 29068

Azure: New-AzCdnProfile: Operation returned an invalid status code 'BadRequest'

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

Upvotes: 0

Views: 717

Answers (2)

Promise Preston
Promise Preston

Reputation: 29068

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.

  • Azure Content Delivery Network profiles have a limit of 25
  • Azure Content Delivery Network endpoints per profile have a limit of 25
  • Azure Custom domains per endpoint have a limit of 25

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

Upvotes: 1

Pramod Lawate
Pramod Lawate

Reputation: 1127

Try to use this command or go for proper solution here :- https://stackoverflow.com/questions/69539630/solution-to-azure-new-azcdnprofile-operation-returned-an-invalid-status-code/69539631#69539631

New-AzCdnProfile -Location Global -ProfileName <String> -ResourceGroupName myresourcegroup -Sku Standard_Verizon

Upvotes: 0

Related Questions