Skip to content
Ona Docs

DeleteService

environments.automations.services.delete(ServiceDeleteParams**kwargs) -> object
POST/gitpod.v1.EnvironmentAutomationService/DeleteService

Deletes an automation service. This call does not block until the service is deleted. If the service is not stopped it will be stopped before deletion.

Use this method to:

  • Remove unused services
  • Clean up service configurations
  • Stop and delete services

Examples

  • Delete service:

    Removes a service after stopping it.

    id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
    force: false
  • Force delete:

    Immediately removes a service.

    id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
    force: true
ParametersExpand Collapse
id: Optional[str]
formatuuid
force: Optional[bool]
ReturnsExpand Collapse
object

DeleteService

import os
from gitpod import Gitpod

client = Gitpod(
    bearer_token=os.environ.get("GITPOD_API_KEY"),  # This is the default and can be omitted
)
service = client.environments.automations.services.delete(
    id="d2c94c27-3b76-4a42-b88c-95a85e392c68",
    force=False,
)
print(service)
{}
Returns Examples
{}