def get_vm_ids_by_ud(access_token, subscription_id, resource_group, vmssname, updatedomain):
instance_viewlist = azurerm.list_vmss_vm_instance_view(access_token, subscription_id,<EOL>resource_group, vmssname)<EOL>udinstancelist = []<EOL>for instance_view in instance_viewlist['<STR_LIT:value>']:<EOL><INDENT>vmud = instance_view['<STR_LIT>']['<STR_LIT>']['<STR_LIT>']<EOL>if vmud == updatedomain:<EOL><INDENT>udinstancelist.append(instance_view['<STR_LIT>'])<EOL><DEDENT><DEDENT>udinstancelist.sort()<EOL>return udinstancelist<EOL>
look at VMSS VM instance view to get VM IDs by UD