Azure-rest-api-specs: App Service - Web App creation fails with Bad Request - The parameter properties has an invalid value

Created on 10 Apr 2019  路  1Comment  路  Source: Azure/azure-rest-api-specs

I am using azure REST and getting below response as

{
  "Code": "BadRequest",
  "Message": "The parameter properties has an invalid value.",
  "Target": null,
  "Details": [
    {
      "Message": "The parameter properties has an invalid value."
    },
    {
      "Code": "BadRequest"
    },
    {
      "ErrorEntity": {
        "ExtendedCode": "51008",
        "MessageTemplate": "The parameter {0} has an invalid value.",
        "Parameters": [
          "properties"
        ],
        "Code": "BadRequest",
        "Message": "The parameter properties has an invalid value."
      }
    }
  ],
  "Innererror": null
}

unable to find invalid value.

below are my request sample

PUT https://management.azure.com/subscriptions/{subscriptionID}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}?api-version=2016-08-01
Authorization: Bearer {access_token}
Content-type: application/json

Body

{
     "location":"North Europe"
}
App Services Service Attention

Most helpful comment

@gauravbhavsar The error is not very intuitive. You are running into this because the body has no "properties" property.

{
"type": "Microsoft.Web/sites",
"location":"North Europe",
"properties" : {
"serverFarmId": "Server Farm Resource Id",
}
}

>All comments

@gauravbhavsar The error is not very intuitive. You are running into this because the body has no "properties" property.

{
"type": "Microsoft.Web/sites",
"location":"North Europe",
"properties" : {
"serverFarmId": "Server Farm Resource Id",
}
}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lmazuel picture lmazuel  路  4Comments

tombuildsstuff picture tombuildsstuff  路  5Comments

mcardosos picture mcardosos  路  6Comments

ctaggart picture ctaggart  路  7Comments

liamjbennett picture liamjbennett  路  5Comments