Hello @Md Rahman ,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
I understand that you would like to know how to add the Path based rules in an Azure Application gateway using the Azure CLI Command.
You can refer the below article which shows App gateway path-based rule configuration via Azure CLI:
And below is the Azure CLI document with all the available commands for path-based rules:
To create a rule for a URL path map, you can use the below command:
az network application-gateway url-path-map rule create -g MyResourceGroup --gateway-name MyAppGateway -n MyUrlPathMapRule2 --path-map-name MyUrlPathMap --paths /mypath2/* --address-pool MyAddressPool --http-settings MyHttpSettings
To update a URL path map, you can use the below command:
az network application-gateway url-path-map update -g MyResourceGroup --gateway-name MyAppGateway -n MyUrlPathMap --default-http-settings MyNewHttpSettings
If you need any specific command, please let us know.
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.