# cloudsync.list_directory

List contents of a remote bucket / directory.

If remote supports buckets, path is constructed by two keys “bucket”/”folder” in attributes. If remote does not support buckets, path is constructed using “folder” key only in attributes. “folder” is directory name and “bucket” is bucket name for remote.

Path examples:

S3 Service bucketname/directory/name

Dropbox Service directory/name

credentials is a valid id of a Cloud Sync Credential which will be used to connect to the provider.

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: cloud_sync_ls

#### cloud_sync_ls

Type: object

CloudSyncListDirectoryArgs parameters.

No Additional Properties

##

#### Credentials

Type: integer

ID of the cloud credential to use for directory listing.

##

#### Encryption

Type: boolean Default: false

Whether files are encrypted in cloud storage.

##

#### Filename Encryption

Type: boolean Default: false

Whether filenames are encrypted in cloud storage.

##

#### Encryption Password

Type: string Default: ""

Password for decrypting files and filenames.

##

#### Encryption Salt

Type: string Default: ""

Salt value for encryption key derivation.

##

#### CloudTaskAttributes

Type: object

Cloud provider-specific attributes for the listing operation.

No Additional Properties

##

#### Bucket

Type: string

Name of the cloud storage bucket or container.

Must be at least `1` characters long

##

#### Folder

Type: string

Path within the cloud storage bucket to use as the root directory for operations.

##

#### Fast List

Type: boolean

Valid only for some providers. Use fewer transactions in exchange for more RAM. This may also speed up or slow down your transfer. See https://rclone.org/docs/#fast-list for more details.

##

#### Bucket Policy Only

Type: boolean

Valid only for GOOGLECLOUDSTORAGE provider. Access checks should use bucket-level IAM policies. If you want to upload objects to a bucket with Bucket Policy Only set then you will need to set this.

##

#### Chunk Size

Type: integer

Valid only for DROPBOX provider. Upload chunk size in MiB. Must fit in memory. Note that these chunks are buffered in memory and there might be a maximum of `--transfers` chunks in progress at once. Dropbox Business accounts can have monthly data transfer limits per team per month. By using larger chunk sizes you will decrease the number of data transfer calls used and you'll be able to transfer more data to your Dropbox Business account.

##

#### Acknowledge Abuse

Type: boolean

Valid only for GOOGLE_DRIVER provider. Allow files which return cannotDownloadAbusiveFile to be downloaded. If downloading a file returns the error "This file has been identified as malware or spam and cannot be downloaded" with the error code "cannotDownloadAbusiveFile" then enable this flag to indicate you acknowledge the risks of downloading the file and TrueNAS will download it anyway.

##

#### Region

Type: string

Valid only for S3 provider. S3 Region.

##

#### Encryption

Type: enum (of null or string)

Valid only for S3 provider. Server-Side Encryption.

##### Must be one of:

- null
- "AES256"

##

#### Storage Class

Type: enum (of string)

Valid only for S3 provider. The storage class to use.

##### Must be one of:

- ""
- "STANDARD"
- "REDUCED_REDUNDANCY"
- "STANDARD_IA"
- "ONEZONE_IA"
- "INTELLIGENT_TIERING"
- "GLACIER"
- "GLACIER_IR"
- "DEEP_ARCHIVE"

##

#### Args

Type: string Default: ""

Additional arguments for the directory listing command.

##

#### Result

Type: array of object

Array of file and directory information objects.

No Additional Items

##### Each item of this array must be:

Type: object

Required roles: CLOUD_SYNC_WRITE