Most people probably already know this, but since there are always new people who get directed to this thread, I did want to mention that the virtual switch devices created in this way cannot be used at the time of this writing to trigger an Alexa routine. That is an Amazon limitation, which only allows a few specific device classes to be used in this fashion.
If you have a Smartthings/aeotec hub, one of Todd’s other edge Drivers can be used to create virtual devices which can trigger an Alexa routine.
[ST Edge] vEdge Creator: a virtual device generator for end users
If you don’t have a Smartthings/aeotec hub, then you can create a virtual lock using the API browser plus discussed in this thread and use that to trigger an Alexa routine.
Smartthings is unusual in that it offers users a wide variety of types of virtual devices with different characteristics. That’s a very powerful and useful option, but it can sometimes get confusing.