deleteService()
EXPERIMENTAL
Cloud Run 处于 Alpha 状态,且尚未积极开发。
根据名称删除已部署的 Cloud Run 服务。
🌐 Deletes a deployed Cloud Run service based on its name.
要检索服务列表,请先调用 getServices()。
🌐 To retrieve a list of services, call getServices() first.
示例
🌐 Example
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
服务部署到的 GCP 区域。
🌐 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