How to Terminate a Pod via GraphQL?
Hi everyone,
I'm trying to figure out how to terminate a pod using GraphQL on RunPod. However, I couldn't find any related documentation or examples that explain the mutation or process for this.
Does anyone know the correct way to terminate a pod through the GraphQL API? If possible, please share the mutation syntax or any tips for handling this process.
Thanks in advance for your help!
4 Replies
I'm not positive because I haven't tried, but it looks like this is the closest thing: https://graphql-spec.runpod.io/#definition-PodTerminateInput
I'm poking around at their Pulumi provider and I think I found an example of a mutation you can use in Go here: https://github.com/runpod/pulumi-runpod-native/blob/main/provider/pod.go#L415
GitHub
pulumi-runpod-native/provider/pod.go at main · runpod/pulumi-runpod...
Contribute to runpod/pulumi-runpod-native development by creating an account on GitHub.
even if you don't use python, https://github.com/runpod/runpod-python/tree/main/runpod/api can be helpful because it's a wrapper for GraphQL
GitHub
runpod-python/runpod/api at main · runpod/runpod-python
🐍 | Python library for RunPod API and serverless worker SDK. - runpod/runpod-python