Jeroen Heier
Jeroen Heier

Reputation: 3694

How can I install a webapp extension AspNetCoreRuntime.3.0.x86 using Azure CLI?

After installing the latest Az module in Powershell I can install the webapp extension AspNetCoreRuntime.3.0.x86 using the following command:

New-AzResource -ResourceGroupName '<resource-group>' -ResourceType 'Microsoft.Web/sites/siteextensions' -Name '<webapp-name>/AspNetCoreRuntime.3.0.x86' -ApiVersion '2018-02-01'

Now I want the same results using azure-cli:

az resource create --resource-group '<resource-group>' --resource-type 'Microsoft.Web/sites/siteextensions' --name '<webapp-name>/AspNetCoreRuntime.3.0.x86' --api-version '2018-02-01'

but when executed it requires an extra argument --properties but I cann't find any documentation regarding this argument. If I provide an empty json object the operation fails:

az : ERROR: Operation failed with status: 'Not Found'. Details: 404 Client Error: Not Found for url ....

How can I solve this problem using Azure CLI?

Upvotes: 1

Views: 814

Answers (2)

Joy Wang
Joy Wang

Reputation: 42063

The --name should be --name '<webapp-name>/siteextensions/AspNetCoreRuntime.3.0.x86', also append --properties '{}'.

Try the sample as below, it works fine on my side.

az resource create --resource-group '<resource-group>' --resource-type 'Microsoft.Web/sites/siteextensions' --name '<webapp-name>/siteextensions/AspNetCoreRuntime.3.0.x86' --api-version '2018-02-01' --properties '{}'

enter image description here

Upvotes: 2

Bevan
Bevan

Reputation: 1424

Just try --properties {}

If their aren't actually any mandatory properties this will make CLI happy

Upvotes: 0

Related Questions