Can I remove a backend by the address, or some other identifier, rather than an index?
as of today, Azure cli supports removing backends using index. You can raise a feature request here in this feedback section for its future availability. Also, I feel that this feature update might not help in case If there are same backend addresses with different ports (Same IP Diff Port concept).
As a work around you can even try using JQ for parsing and editing the JSON script generated using Azure CLI. But, not sure whether the backend API's will allow so.
I am using az network front-door backend-pool backend list to get the list of backends, the response does not provide an index to use.
--> Yes, the list provide the JSON output with no Index value before the blocks. Generally, Index starts from "0" and the count goes on depending on your backends.
If I list the backends multiple times, can I be guaranteed that they always come back in the same order?
--> I have tested this In my lab, where I can see the order never jumbled. It follows the portal.
If I add a new backend to the pool, is it always the last in the list, and therefore the highest index?
--> Yes, on adding new backend it will be given the +1 Index number to Its preceder.
If I delete the first backend (index = 1), does that index get replaced with the next in the list?
-->Yes, if there are three Indexes say , {0=x,1=y,2=z}, then on deleting Index "1" the value will be shifted left like this {0=x,1=z}.
----------
Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.