Skip to content
Ona Docs

CancelWorkflowExecutionAction

client.Automations.CancelExecutionAction(ctx, body) (*AutomationCancelExecutionActionResponse, error)
POST/gitpod.v1.WorkflowService/CancelWorkflowExecutionAction

Cancels a running workflow execution action.

Use this method to:

  • Stop long-running actions
  • Cancel failed actions
  • Manage resource usage

Examples

  • Cancel execution action:

    Stops a running workflow execution action.

    workflowExecutionActionId: "a1b2c3d4-5e6f-7890-abcd-ef1234567890"
ParametersExpand Collapse
body AutomationCancelExecutionActionParams
WorkflowExecutionActionID param.Field[string]Optional
formatuuid
ReturnsExpand Collapse
type AutomationCancelExecutionActionResponse interface{…}

CancelWorkflowExecutionAction

package main

import (
  "context"
  "fmt"

  "github.com/gitpod-io/gitpod-sdk-go"
  "github.com/gitpod-io/gitpod-sdk-go/option"
)

func main() {
  client := gitpod.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  response, err := client.Automations.CancelExecutionAction(context.TODO(), gitpod.AutomationCancelExecutionActionParams{
    WorkflowExecutionActionID: gitpod.F("a1b2c3d4-5e6f-7890-abcd-ef1234567890"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
{}
Returns Examples
{}