Skip to main content

deleteService()

Deletes a deployed Cloud Run service based on its name.

To retrieve a list of services, call getServices() first.

Example

ts
import {deleteService, getServices} from '@remotion/cloudrun';
 
const services = await getServices({
region: 'us-east1',
compatibleOnly: false,
});
for (const service of services) {
await deleteService({
region: 'us-east1',
serviceName: service.serviceName,
});
}

Arguments

An object with the following properties:

region

The GCP region to which the service was deployed to.

serviceName

The name of the service to be deleted.

Return value

Nothing. If the deletion failed, the service rejects with an error.

See also