There are a couple of ways you can do this.
You can get all the objects with the VM name:
Each of the results will have a value named "identifier". This is the ID of the object that you can use to put it in maintenance.
Alternatively, you can be more specific when querying for resources. For example you can specify the type or "resourcKind" as it's referred to in the API.
This will get only the one for Windows:
Check out the "getResources" method in the API doc for all the properties you can query on.