azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Command "az network application-gateway http-listener update" doesn't work with parameter "--ssl-profile"

Open phibao37 opened this issue 5 years ago • 3 comments

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az network application-gateway http-listener update

Errors:

usage error: --ssl-profile [KEY=VALUE ...]

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

I tried some command as below:

  • SSL_PROFILE_ID=/subscriptions/***********/resourceGroups/***********/providers/Microsoft.Network/applicationGateways/***********ApplicationGateway/sslProfiles/***********
  • Command 1: az network application-gateway http-listener update --gateway-name {} -g {} -n {} --ssl-profile $SSL_PROFILE_ID --only-show-errors
  • Command 2: az network application-gateway http-listener update --gateway-name {} -g {} -n {} --ssl-profile name=my_client_profile --only-show-errors

Expected Behavior

Either Command 1 or Command 2 should succeed to update the SSL profile for the existing HTTP listener. However, error occurred on both commands:

Command 1: ERROR: usage error: --ssl-profile [KEY=VALUE ...] Command 2:

ERROR: (InvalidRequestFormat) Cannot parse the request.
Code: InvalidRequestFormat
Message: Cannot parse the request.
Exception Details:      (SubscriptionsPrefixMissingInJsonReferenceId) Value of id property has to start with '/subscriptions/'. Provided value doesn't: [{'name': 'my_client_profile'}]. Path properties.httpListeners[0].properties.sslProfile.
Code: SubscriptionsPrefixMissingInJsonReferenceId
Message: Value of id property has to start with '/subscriptions/'. Provided value doesn't: [{'name': 'my_client_profile'}]. Path properties.httpListeners[0].properties.sslProfile

Environment Summary

Windows-10-10.0.18362-SP0
Python 3.8.9
Installer: MSI

azure-cli 2.30.0

Additional Context

phibao37 avatar Nov 17 '21 17:11 phibao37

network

yonzhan avatar Nov 17 '21 23:11 yonzhan

Is there any workaround with version 2.30.0? Any way we can update the SSL Profile on a listener with the CLI?

aferland1 avatar Nov 25 '21 15:11 aferland1

Hi @aferland1, you can use --set to update property directly.

kairu-ms avatar Nov 26 '21 02:11 kairu-ms