functions and events in OCI

411 Views Asked by At

I have a scenario in where I want to run commands in instance using functions based on events in OCI(oracle cloud infrastructure). flow : object storage: object update/modification -> trigger event -> execute function : to run commands in specific instances using run command Is this achievable ? As currently I see that to execute run command service we would need oci config files(profile)

1

There are 1 best solutions below

0
On BEST ANSWER

To do this, you can use the OCI Java or Python SDK within the function to invoke the Run Command API.

See API details at “Using the API” in the docs. You will also need to configure the Functions resource principal to have access to the Compute instance in question. See this for details on configuring the Functions resource principal