Back to Genai Toolbox

cloud-storage-move-object

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

1.2.02.6 KB
Original Source

About

A cloud-storage-move-object tool atomically moves or renames an object within the same Cloud Storage bucket by using Cloud Storage's native move API.

This tool does not perform cross-bucket moves. For a cross-bucket move, call cloud-storage-copy-object first, verify the destination, and then call cloud-storage-delete-object on the source.

Compatible Sources

{{< compatible-sources >}}

Requirements

The Cloud Storage credentials must have storage.objects.move and storage.objects.create permissions in the bucket. If the destination object already exists, storage.objects.delete is also required.

Parameters

parametertyperequireddescription
bucketstringtrueName of the Cloud Storage bucket containing the object to move.
source_objectstringtrueFull source object name (path) within the bucket, e.g. path/to/file.txt.
destination_objectstringtrueFull destination object name (path) within the same bucket.

Example

yaml
kind: tool
name: move_object
type: cloud-storage-move-object
source: my-gcs-source
description: Use this tool to move or rename an object within a Cloud Storage bucket.

Output Format

The tool returns a JSON object with:

fieldtypedescription
bucketstringCloud Storage bucket containing the object.
sourceObjectstringOriginal object name.
destinationObjectstringDestination object name.
bytesintegerSize of the moved object.
contentTypestringContent type recorded on the destination object.

Reference

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