Skip to main content

deleteFunction()

根据名称删除已部署的 Lambda 函数。

🌐 Deletes a deployed Lambda function based on its name.

要检索函数列表,请先调用 getFunctions()

🌐 To retrieve a list of functions, call getFunctions() first.

示例

🌐 Example

import {deleteFunction, getFunctions} from '@remotion/lambda';

const functions = await getFunctions({
  region: 'us-east-1',
  compatibleOnly: false,
});
for (const fn of functions) {
  await deleteFunction({
    region: 'us-east-1',
    functionName: fn.functionName,
  });
}

参数

🌐 Arguments

一个具有以下属性的对象:

🌐 An object with the following properties:

region

该函数部署到的AWS区域

🌐 The AWS region to which the function was deployed to.

functionName

要删除的函数名称。

🌐 The name of the function to be deleted.

返回值

🌐 Return value

没有。如果删除失败,该函数会以错误拒绝。

🌐 Nothing. If the deletion failed, the function rejects with an error.

另请参阅

🌐 See also