Make a copy of an object in a bucket.

Example

Use a bare-bones client and the command you need to make an API call.

import { BucketsClient, CopyObjectCommand } from "@stedi/sdk-client-buckets"; // ES Modules import
// const { BucketsClient, CopyObjectCommand } = require("@stedi/sdk-client-buckets"); // CommonJS import
const client = new BucketsClient(config);
const input = { // CopyObjectInput
from: { // BucketObject
bucketName: "STRING_VALUE", // required
key: "STRING_VALUE", // required
},
to: {
bucketName: "STRING_VALUE", // required
key: "STRING_VALUE", // required
},
};
const command = new CopyObjectCommand(input);
const response = await client.send(command);
// {};

Param

CopyObjectCommandInput

Returns

CopyObjectCommandOutput

See

Throws

NoSuchBucketException (client fault)

Throws

NoSuchKeyException (client fault)

Throws

AccessDeniedException (client fault)

Throws

ProductUnavailableException (client fault)

Throws

ResourceAlreadyExistsException (client fault)

Throws

ResourceNotFoundException (client fault)

Throws

ResourceUnderChangeException (client fault)

Throws

ServiceException (server fault)

Throws

BucketsServiceException

Base exception class for all service exceptions from Buckets service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods

  • Returns EndpointParameterInstructions