UNPKG

831 BJavaScriptView Raw
1import { Amplify } from '@aws-amplify/core';
2import { copy as copy$1 } from './internal/copy.mjs';
3
4// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
5// SPDX-License-Identifier: Apache-2.0
6/**
7 * Copy an object from a source object to a new object within the same bucket. Can optionally copy files across
8 * different level or identityId (if source object's level is 'protected').
9 *
10 * @param input - The CopyInput object.
11 * @returns Output containing the destination key.
12 * @throws service: {@link S3Exception} - Thrown when checking for existence of the object
13 * @throws validation: {@link StorageValidationErrorCode } - Thrown when
14 * source or destination key are not defined.
15 */
16const copy = async (input) => {
17 return copy$1(Amplify, input);
18};
19
20export { copy };
21//# sourceMappingURL=copy.mjs.map