AWS Thinkbox Discussion Forums

Event scripts for Cloud worker instances

Sorry if this question is a little naive, but I’m just starting to dig into both event plug-ins and cloud provider plug-ins.

I have an event plug-in working successfully for the OnSlave*Callback methods in a DeadlineEventListener. For cloud instances, I need to access the cloud instance ID to do some work through a custom REST API. Is there a way to get the CloudInstance.ID from a SlaveInfo or SlaveSettings object?

Hello!

If the Cloud Instance ID isn’t available on the Monitor UI there won’t be a way to grab it from the API.

However, since the Worker events are run on the machine itself if you can somehow get that instance ID you could load it into one of the Extra Info fields on the Worker to refer to later.

If you’re ever curious about who/when/where an Event Plugin is run, this section of the docs is a lifesaver.

1 Like

Okay thanks Justin!

I actually found a way to do the inverse, and get the worker name for an instance through the 3rd-party REST API we’re using.

Thanks for that link to the docs, that is indeed useful info!

1 Like
Privacy | Site terms | Cookie preferences