question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add FQDNs parameter to VirtualMachine class in azure.mgmt.compute.v2020_06_01.models.VirtualMachine

See original GitHub issue

Is your feature request related to a problem? Please describe. I’d like to retrieve VM FQDNs with Python to compare them with DNS Zone Cname record canonical names.

Describe the solution you’d like Currently, the VirtualMachine class defined in azure.mgmt.compute.v2020_06_01.models.VirtualMachine does not have the FQDN member variable. See: https://docs.microsoft.com/en-us/python/api/azure-mgmt-compute/azure.mgmt.compute.v2020_06_01.models.virtualmachine?view=azure-python

Adding that member variable would make it very easy to find the FQDN / domain name of a VM resource.

Describe alternatives you’ve considered The azure cli lets you retrieve the FQDNs of a VM as follows:

az vm show --show-details --resource-group <rg_name> --name <vm_name> --query "[fqdns]"

I thought of running this command inside my Python code, but this defeats the purpose in my situation since I am using managed identities and not CLI credentials in my code (an Azure function). Also, Azure functions written in Python appears to not support CLI-usage with ease, as indicated here: https://stackoverflow.com/questions/59354593/run-azure-cli-commands-from-a-azure-function-app#:~:text=Azure function does not support,create resources and manage them.

I have also thought of comparing DNS Zone canonical names to VM names, but VM names are arbitrary and may change over time, whereas the FQDNs, albeit also possible to change, appear more static. Consequently, under those assumptions, using VM names is less reliable than using VM public DNS names when comparing them to DNS Zone CName record canonical names.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
r3mattiacommented, Jan 11, 2021

Hey @avirishuv thank you for the update. I will get back to you soon with information.

1reaction
avirishuvcommented, Oct 20, 2020

@r3mattia Let me look into this, will get back with more information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VirtualMachine Class - azure-mgmt-compute - Microsoft Learn
Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must...
Read more >
azure.mgmt.compute.v2017_03_30.models.VirtualMachine ...
Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must...
Read more >
VirtualMachinesOperations Class - Microsoft Learn
Parameters supplied to the Create Virtual Machine operation. Is either a model type or a IO type. Required. content_type: str. Body Parameter content-type....
Read more >
VirtualMachinesOperations Class - Microsoft Learn
Shuts down the virtual machine and releases the compute resources. ... LROPoller[azure.mgmt.compute.v2021_07_01.models._models_py3.
Read more >
azure.mgmt.compute.v2019_03_01.models ...
Describes a virtual machine scale set virtual machine. Variables are only populated by ... All required parameters must be populated in order to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found