Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Class GetObjectTorrentCommandProtected

Returns torrent files from a bucket. BitTorrent can save you bandwidth when you're distributing large files.

You can get torrent only for objects that are less than 5 GB in size, and that are not encrypted using server-side encryption with a customer-provided encryption key.

To use GET, you must have READ access to the object.

This action is not supported by Amazon S3 on Outposts.

The following action is related to GetObjectTorrent:

Example

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

import { S3Client, GetObjectTorrentCommand } from "@aws-sdk/client-s3"; // ES Modules import
// const { S3Client, GetObjectTorrentCommand } = require("@aws-sdk/client-s3"); // CommonJS import
const client = new S3Client(config);
const input = { // GetObjectTorrentRequest
Bucket: "STRING_VALUE", // required
Key: "STRING_VALUE", // required
RequestPayer: "requester",
ExpectedBucketOwner: "STRING_VALUE",
};
const command = new GetObjectTorrentCommand(input);
const response = await client.send(command);
// { // GetObjectTorrentOutput
// Body: "STREAMING_BLOB_VALUE",
// RequestCharged: "requester",
// };

Param

GetObjectTorrentCommandInput

Returns

GetObjectTorrentCommandOutput

See

Throws

S3ServiceException

Base exception class for all service exceptions from S3 service.

Example

To retrieve torrent files for an object

// The following example retrieves torrent files of an object.
const input = {
"Bucket": "examplebucket",
"Key": "HappyFace.jpg"
};
const command = new GetObjectTorrentCommand(input);
await client.send(command);
// example id: to-retrieve-torrent-files-for-an-object-1481834115959

Hierarchy

Constructors

Properties

Methods