UNPKG

@aws-amplify/storage

Version:

Storage category of aws-amplify

24 lines (22 loc) 939 B
'use strict'; // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", { value: true }); exports.copy = void 0; const core_1 = require("@aws-amplify/core"); const copy_1 = require("./internal/copy"); /** * Copy an object from a source object to a new object within the same bucket. Can optionally copy files across * different level or identityId (if source object's level is 'protected'). * * @param input - The CopyInput object. * @returns Output containing the destination key. * @throws service: {@link S3Exception} - Thrown when checking for existence of the object * @throws validation: {@link StorageValidationErrorCode } - Thrown when * source or destination key are not defined. */ const copy = async (input) => { return (0, copy_1.copy)(core_1.Amplify, input); }; exports.copy = copy; //# sourceMappingURL=copy.js.map