UNPKG

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