UNPKG

1.23 kBTypeScriptView Raw
1import { RemoveInput, RemoveOutput, RemoveWithPathInput, RemoveWithPathOutput } from '../types';
2/**
3 * Remove a file from your S3 bucket.
4 * @param input - The `RemoveWithPathInput` object.
5 * @return Output containing the removed object path.
6 * @throws service: `S3Exception` - S3 service errors thrown while while removing the object.
7 * @throws validation: `StorageValidationErrorCode` - Validation errors thrown
8 * when there is no path or path is empty or path has a leading slash.
9 */
10export declare function remove(input: RemoveWithPathInput): Promise<RemoveWithPathOutput>;
11/**
12 * @deprecated The `key` and `accessLevel` parameters are deprecated and may be removed in the next major version.
13 * Please use {@link https://docs.amplify.aws/react/build-a-backend/storage/remove | path} instead.
14 *
15 * Remove a file from your S3 bucket.
16 * @param input - The `RemoveInput` object.
17 * @return Output containing the removed object key
18 * @throws service: `S3Exception` - S3 service errors thrown while while removing the object
19 * @throws validation: `StorageValidationErrorCode` - Validation errors thrown
20 * when there is no key or its empty.
21 */
22export declare function remove(input: RemoveInput): Promise<RemoveOutput>;