Skip to main content

deleteRender()

删除已渲染的视频、音频或静态图片及其相关的元数据。

🌐 Deletes a rendered video, audio or still and its associated metada.

import {deleteRender} from '@remotion/lambda';

const {freedBytes} = await deleteRender({
  bucketName: 'remotionlambda-r42fs9fk',
  region: 'us-east-1',
  renderId: '8hfxlw',
});

console.log(freedBytes); // 21249541

参数

🌐 Arguments

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

🌐 An object with the following properties:

region

渲染执行所在的AWS区域

🌐 The AWS region in which the render has performed.

bucketName

渲染存储的桶名称。这应该是你用于 renderMediaOnLambda()renderStillOnLambda() 的相同变量。

🌐 The bucket name in which the render was stored. This should be the same variable you used for renderMediaOnLambda() or renderStillOnLambda().

renderId

渲染的ID。你可以通过调用renderMediaOnLambda()renderStillOnLambda()来获取此ID。

🌐 The ID of the render. You can retrieve this ID by calling renderMediaOnLambda() or renderStillOnLambda().

customCredentials?v3.2.23

如果渲染保存到了不同的云,请传递一个具有与传递给renderMediaOnLambda()renderStillOnLambda()相同的endpointaccessKeyIdsecretAccessKey的对象。

🌐 If the render was saved to a different cloud, pass an object with the same endpoint, accessKeyId and secretAccessKey as you passed to renderMediaOnLambda() or renderStillOnLambda().

forcePathStyle?v4.0.202

forcePathStyle 传递给 AWS S3 客户端。如果你不知道这是什么,你很可能用不到它。

🌐 Passes forcePathStyle to the AWS S3 client. If you don't know what this is, you probably don't need it.

返回值

🌐 Return value

返回一个解析为具有以下属性的对象的 Promise:

🌐 Returns a promise resolving to an object with the following properties:

freedBytes

从 S3 存储桶中移除的字节数。

🌐 The amount of bytes that were removed from the S3 bucket.

另请参阅

🌐 See also