UNPKG

1.36 kBTypeScriptView Raw
1import { CopyInput, CopyOutput, CopyWithPathInput, CopyWithPathOutput } from '../types';
2/**
3 * Copy an object from a source to a destination object within the same bucket.
4 *
5 * @param input - The `CopyWithPathInput` object.
6 * @returns Output containing the destination object path.
7 * @throws service: `S3Exception` - Thrown when checking for existence of the object
8 * @throws validation: `StorageValidationErrorCode` - Thrown when
9 * source or destination path is not defined.
10 */
11export declare function copy(input: CopyWithPathInput): Promise<CopyWithPathOutput>;
12/**
13 * @deprecated The `key` and `accessLevel` parameters are deprecated and may be removed in the next major version.
14 * Please use {@link https://docs.amplify.aws/react/build-a-backend/storage/copy | path} instead.
15 *
16 * Copy an object from a source to a destination object within the same bucket. Can optionally copy files across
17 * different accessLevel or identityId (if source object's accessLevel is 'protected').
18 *
19 * @param input - The `CopyInput` object.
20 * @returns Output containing the destination object key.
21 * @throws service: `S3Exception` - Thrown when checking for existence of the object
22 * @throws validation: `StorageValidationErrorCode` - Thrown when
23 * source or destination key is not defined.
24 */
25export declare function copy(input: CopyInput): Promise<CopyOutput>;