Azure-cli: equivalent of Get-AzureRmMarketplaceTerms to check license state

Created on 7 Jun 2019  Â·  3Comments  Â·  Source: Azure/azure-cli

Hi,

We do CI/CD deployment where we create dedicated subscription (if not exist already) and we accept MartketPlace License terms of images which we are going to use.

In a case of solution update for existing subscription license are accepted again which take some time while it's not needed. For instance we accept FortiGate NVA using this command:
for urn in $(az vm image list --all --publisher fortinet --offer fortinet_fortigate-vm_v5 --sku fortinet_fg-vm_payg --query '[].urn' --output tsv); do az vm image accept-terms --urn $urn; done

Ideally it would be to have command az vm image list-terms --urn $urn which would return license term state which should be much quicker than making acceptance again of already accepted license. In other words equivalent of this command Get-AzureRmMarketplaceTerms -Publisher "fortinet" -Product "fortinet_fortigate-vm_v5" -Name "fortinet_fg-vm_payg" would be perfect as its return:

Publisher : fortinet
Product : fortinet_fortigate-vm_v5
Plan : fortinet_fg-vm_payg
LicenseTextLink : https://storelegalterms.blob.core.windows.net/legalterms/3E5ED_legalterms_FORTINET%253a24FORTINET%253a5FFORTIGATE%253a2DVM%253a5FV5%253a24FORTINET%253a5FFG%253a2DVM%253a5FPAYG%253a245R5VKDQTL7OVGO2KWZHZ3VNZPJ
D4ETPHJV4N7WFMSNUPPLV4V2ER7MINZUSVSFFMWDS4FJVROM3R3BFSIGXWS6YTVDL6AQZRX7ZXVKQ.txt
PrivacyPolicyLink : http://www.fortinet.com/doc/legal/EULA.pdf
Signature : B22SM6QBXBWMV6DLVFZY4WSMF2MH2JT3ODP4T6Z4AEY62F26J4DD6VIAWXKWQXDZFV7SL2B4ZJ2ANBYTZKLT5MNKXFSROIUGSIJ5OIY
Accepted : True
Signdate : 6/7/2019 2:24:17 PM

Thanks!

Compute-cli

Most helpful comment

Your advice is great!
I suggest we have a new category of “az image terms” with 3 commands underneath like “accept”, “list” and “reject”.

All 3 comments

This seems like a feature request, but @adewaleo might know how to do this in the CLI as is.

Your advice is great!
I suggest we have a new category of “az image terms” with 3 commands underneath like “accept”, “list” and “reject”.

PR merged. This feature will be available in Azure CLI 2.0.76. Official Release: 11/04/2019

Was this page helpful?
0 / 5 - 0 ratings