Back to Genai Toolbox

cloud-storage-copy-object

docs/en/integrations/cloud-storage/tools/cloud-storage-copy-object.md

1.2.02.6 KB
Original Source

About

A cloud-storage-copy-object tool copies an object from one Cloud Storage location to another. The source and destination bucket parameters are separate, so the destination can be in the same bucket or a different bucket.

Existing destination objects are replaced.

Compatible Sources

{{< compatible-sources >}}

Requirements

The Cloud Storage credentials must be able to read the source object and create or update the destination object.

Parameters

parametertyperequireddescription
source_bucketstringtrueName of the Cloud Storage bucket containing the source object.
source_objectstringtrueFull source object name (path) within the source bucket, e.g. path/to/file.txt.
destination_bucketstringtrueName of the Cloud Storage bucket to copy into.
destination_objectstringtrueFull destination object name (path) within the destination bucket.

Example

yaml
kind: tool
name: copy_object
type: cloud-storage-copy-object
source: my-gcs-source
description: Use this tool to copy Cloud Storage objects.

Output Format

The tool returns a JSON object with:

fieldtypedescription
sourceBucketstringSource Cloud Storage bucket.
sourceObjectstringSource Cloud Storage object name.
destinationBucketstringDestination Cloud Storage bucket.
destinationObjectstringDestination Cloud Storage object name.
bytesintegerSize of the copied object.
contentTypestringContent type recorded on the destination object.

Reference

fieldtyperequireddescription
typestringtrueMust be "cloud-storage-copy-object".
sourcestringtrueName of the Cloud Storage source to copy objects in.
descriptionstringtrueDescription of the tool that is passed to the LLM.