DeleteTask
client.Environments.Automations.Tasks.Delete(ctx, body) (*EnvironmentAutomationTaskDeleteResponse, error)
POST/gitpod.v1.EnvironmentAutomationService/DeleteTask
Deletes an automation task.
Use this method to:
- Remove unused tasks
- Clean up task configurations
- Delete obsolete automations
Examples
-
Delete task:
Removes a task and its configuration.
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
DeleteTask
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"),
)
task, err := client.Environments.Automations.Tasks.Delete(context.TODO(), gitpod.EnvironmentAutomationTaskDeleteParams{
ID: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", task)
}
{}Returns Examples
{}