S3.Client.
get_object_torrent
(**kwargs)¶Returns torrent files from a bucket. BitTorrent can save you bandwidth when you're distributing large files. For more information about BitTorrent, see Using BitTorrent with Amazon S3.
Note
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
:
See also: AWS API Documentation
Request Syntax
response = client.get_object_torrent(
Bucket='string',
Key='string',
RequestPayer='requester',
ExpectedBucketOwner='string'
)
[REQUIRED]
The name of the bucket containing the object for which to get the torrent files.
[REQUIRED]
The object key for which to get the information.
403 Forbidden
(access denied).dict
Response Syntax
{
'Body': StreamingBody(),
'RequestCharged': 'requester'
}
Response Structure
(dict) --
Body (StreamingBody
) --
A Bencoded dictionary as defined by the BitTorrent specification
RequestCharged (string) --
If present, indicates that the requester was successfully charged for the request.
Examples
The following example retrieves torrent files of an object.
response = client.get_object_torrent(
Bucket='examplebucket',
Key='HappyFace.jpg',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}