Skip to content
Ona Docs

StartService

client.Environments.Automations.Services.Start(ctx, body) (*EnvironmentAutomationServiceStartResponse, error)
POST/gitpod.v1.EnvironmentAutomationService/StartService

Starts an automation service. This call does not block until the service is started. This call will not error if the service is already running or has been started.

Use this method to:

  • Start stopped services
  • Resume service operations
  • Trigger service initialization

Examples

  • Start service:

    Starts a previously stopped service.

    id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
ParametersExpand Collapse
body EnvironmentAutomationServiceStartParams
ID param.Field[string]Optional
formatuuid
ReturnsExpand Collapse
type EnvironmentAutomationServiceStartResponse interface{…}

StartService

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.Environments.Automations.Services.Start(context.TODO(), gitpod.EnvironmentAutomationServiceStartParams{
    ID: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
{}
Returns Examples
{}