0

The following command is in powershell, where it adds the authorization certificate along with new httpsettings.

$poolSetting = New-AzureRmApplicationGatewayBackendHttpSettings -Name 'setting01' -Port 443 -Protocol Https -CookieBasedAffinity Enabled -AuthenticationCertificates $authcert

How can we do this via az CLI (Azure CLI)? In there I'm not able to find the AuthenticationCertificates attribute.

2
  • I think --cert-file parameter in the cli command is same AuthenticationCertificates parameter Commented Jan 25, 2018 at 11:49
  • Nope it is for SSL certificate to be attached to frontend listener Commented Jan 25, 2018 at 11:53

1 Answer 1

1

When you create a application gateway, there is no such command. But you could use az network application-gateway http-settings update to modify it.

See this link.

az network application-gateway http-settings create  --gateway-name yugangw-ag-1 -g yugangw-ag  --port 443 -n yugangw-ag-1-be-http-settings  --protocol https
az network application-gateway auth-cert create --cert-file d:\temp\TestCert.cer --gateway-name yugangw-ag-1 -n yugangw-ag-1-auth-cert -g yugangw-ag
az network application-gateway http-settings update  --gateway-name yugangw-ag-1 -g yugangw-ag -n yugangw-ag-1-be-http-settings --add authenticationCertificates id="/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/yugangw-ag/providers/Microsoft.Network/applicationGateways/yugangw-ag-1/authenticationCertificates/yugangw-ag-1-auth-cert"
Sign up to request clarification or add additional context in comments.

3 Comments

Just give me some time to try this shenbao
Placed it on deployment lets see what happens
Apologies for replying late but you are a life saver

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.