question

KevinVanheel-2157 avatar image
0 Votes"
KevinVanheel-2157 asked ChaitanyaNaykodiMSFT-9638 edited

Az cli list result questions

The question to me seems quite simple. I am working from an organisation which doesn't allow to make use of functions that are still under development, hence my problem.

I am running everything through Azure Pipelines, so I can't store variables I get from the Az-Cli and then use powershell for example to perform operations on that variable.

The issue specifically lies in Lists (Yes, really, like one of the most common and well documented structures in all of computer programming).

I am trying to get the available IP-addresses my created V-NET has. Keep in mind, this being a big organisation I am not able to specify these myself as it's a fairly common task with boilerplate yml code to create the vnet.

Hence, I try running the az-cli command right after in the pipeline: "az network vnet list-available-ips -g MyResourceGroup -n MyVNet"
This correctly gives me the available ip-addresses that I am looking for.
HOWEVER storing once of these values seem to be impossible. I am not allowed to run --querry [0] after the command as this is a command currently under development.
I do not seem to be able to perform ANY action on the variable in which I stored this list. I am at lost here. How do I get access to 1 of the results in this list and then store this as separate variable? I need to be able to store this value in my library for further steps in my development pipeline

not-supported
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @KevinVanheel-2157,
Thank you for reaching out, but currently Azure DevOps related questions are not supported on this forum. To get quicker support you can post this question this forum instead https://techcommunity.microsoft.com/t5/azure-devops/bd-p/AzureDevOpsForum

Hope this helps! Thank you!

0 Votes 0 ·

0 Answers