Aliyun oss client for Fluent-plugin-oss

Install

gem install oss-client

Usage

Basic

Set oss account by arguments.

oss-client --endpoint xxx --access_key_id xxx --access_key_secret xxx --bucket xxx oss-client command

You can also use enviroment variables.

ENDPOINT=xxx ACCESS_KEY_ID=xxx ACCESS_KEY_SECRET=xxx BUCKET=xxx oss-client command

List

Get objects list from oss with a specific prefix.

oss-client list -p xxx #The prefix argument works in all commands

Summary

Get objects count in all vitual directories.

oss-client summary

Specify the delimiter(default: '/').

oss-client summary -d -

Count sub-directories.

oss-client summary --max-depth=2

Delete

Remove objects in oss.

oss-client delete

Then type 'Y' to confirm.

Download

Use download-dir argument to specify the download directory(default: current dir).

oss-client download

If there is an object named 'a/b/c.jpg', directories 'a' and 'b' will be create recursively.