Skip to content

RESOURCECTL

The main command to manage your resources

DOCUMENTATION

Check the javadoc for more information :

SYNOPSIS

resourcectl -t [TENANT] [COMMAND] [OPTIONS]

DESCRIPTION

The resourcectl command allows you to manage your resources to a backend storage for a dedicated tenant.

The different commands are :

  • upload : to upload a resource
  • download : to download a resource
  • list : to display resources information
  • register : to push a resource information only

Metadata

Each resource is related to a metadata, stored inside a different kind of backend service. A metadata is basically all the information about everything that is not the resource itself, but what is related to, such as the creation time, the name, the url, the size, etc ...

When a resource is created, updated, deleted, moved or copied, a metadata is also automatically generated to describe this resource and is always returned as the command result.
To fetch the metadata, a user can execute the list command. To push a resource metadata only, a user can execute the register command.

EXAMPLES

# upload
resourcectl -t mytenant download --name csv/mylogs.csv --file /data/original_file.csv --type csv

# download
resourcectl -t mytenant get --name csv/mylogs.csv

# list
resourcectl -t mytenant list

# register
resourcectl -t mytenant register --name csv/mylogs.csv --file data/original_file.csv

OPTIONS

Upload

  • --file Optional
    Path of the source file to upload

  • --name
    Mandatory
    Future name of the uploaded resource inside the storage

  • --type
    Optional
    Resource type

  • --help, -h
    Optional
    Display a command usage summary

Download

  • --name, -n
    Mandatory
    The name of the resource to download (Must match the resource name inside the storage).

  • --version, -v
    Optional
    To download a specific version of a resource

  • --output, -o
    Optional
    To download the resource to a dedicated file on the system. Otherwise, the resource content is always inside the result of the command.

  • --help, -h
    Optional
    Display a command usage summary

List

  • --name
    Optional , default is '*'
    Filter metadata by name.
    The pattern can contain wildcards.

  • --type Optional
    Filter metadata by file type.

  • --help
    Optional
    Display a command usage summary

  • --all
    Optional
    List all version of each resource

Register

  • --name, -n
    Mandatory
    Name of the resource to register inside the storage

  • --path
    Mandatory
    Real location of the resource to register

  • --type Optional Type of the resource

  • --help, -h
    Optional
    Display a command usage summary