DeleteService
client.environments.automations.services.delete(ServiceDeleteParams { id, force } body, RequestOptionsoptions?): ServiceDeleteResponse
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
DeleteService
import Gitpod from '@gitpod/sdk';
const client = new Gitpod({
bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});
const service = await client.environments.automations.services.delete({
id: 'd2c94c27-3b76-4a42-b88c-95a85e392c68',
});
console.log(service);{}Returns Examples
{}