Scaleway logo
Commands

Documentation for `scw object`

The CLI documentation pages are currently under construction

The content is up to date. We're making improvements to the site over the next few weeks for a better experience.

Object-storage utils

Manage S3 buckets

Manage S3 buckets creation, deletion and updates to properties like tags, ACL and versioning.

Create an S3 bucket

Create an Object Storage Bucket with the S3 protocol. The namespace is shared between all S3 users, so its name must be unique.

Usage:

TerminalCode
scw object bucket create <name ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
nameThe unique name of the bucketRequired
tags.{index}List of tags to set on the bucket
enable-versioningWhether or not objects in the bucket should have multiple versionsDefault: false
aclThe permissions given to users (grantees) to read or write objectsDefault: private
project-idScaleway project ID to use with IAM Access Key syntax
regionRegion to target. If none is passed will use default region from the configDefault: fr-par

Delete an S3 bucket

Delete an S3 bucket with all its content.

Usage:

TerminalCode
scw object bucket delete <name ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
nameThe unique name of the bucketRequired
project-idScaleway project ID to use with IAM Access Key syntax
regionRegion to target. If none is passed will use default region from the configDefault: fr-par

Get information about an S3 bucket

Get the properties of an S3 bucket like tags, endpoint, access control, versioning, size, etc.

Usage:

TerminalCode
scw object bucket get <name ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
nameThe unique name of the bucketRequired
with-sizeWhether to return the total size of the bucket and the number of objects. This operation can take long for large buckets.Default: false
project-idScaleway project ID to use with IAM Access Key syntax
regionRegion to target. If none is passed will use default region from the configDefault: fr-par

List S3 buckets

List all existing S3 buckets in the specified region

Usage:

TerminalCode
scw object bucket list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idScaleway project ID to use with IAM Access Key syntax
regionRegion to target. If none is passed will use default region from the configDefault: fr-par

Update an S3 bucket

Update an S3 bucket's properties like tags, access control and versioning.

Usage:

TerminalCode
scw object bucket update <name ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
nameThe unique name of the bucketRequired
tags.{index}List of new tags to set on the bucket
enable-versioningWhether or not objects in the bucket should have multiple versionsDefault: false
aclThe permissions given to users (grantees) to read or write objectsDefault: private
project-idScaleway project ID to use with IAM Access Key syntax
regionRegion to target. If none is passed will use default region from the configDefault: fr-par

Manage S3 bucket CORS

Manage S3 bucket CORS rules creation and deletion.

Add CORS rules to a bucket

Add CORS rules to an Object Storage bucket with the S3 protocol.

Usage:

TerminalCode
scw object bucket-cors create <bucket ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
bucketThe name of the bucketRequired
cors-configurationThe path to the local JSON file containing the CORS configuration.Required
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par

Remove CORS rules from a bucket

Remove CORS rules from an Object Storage bucket with the S3 protocol.

Usage:

TerminalCode
scw object bucket-cors delete <bucket ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
bucketThe name of the bucketRequired
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par

Get the CORS configuration of a bucket

Get the CORS configuration of an Object Storage bucket with the S3 protocol.

Usage:

TerminalCode
scw object bucket-cors get <bucket ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
bucketThe name of the bucketRequired
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par

Manage S3 buckets' lifecycle configuration

Manage S3 buckets lifecycle rules creation and deletion.

Create a lifecycle configuration for an S3 bucket's objects.

Create a lifecycle configuration and apply to an Object Bucket's objects with the S3 protocol.

Usage:

TerminalCode
scw object bucket-lifecycle create <bucket ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
bucketThe name of the bucket to which assign the lifecycle configuration.Required
lifecycle-configurationThe path to the local JSON file containing the bucket lifecycle configuration.Required
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par

Delete an S3 bucket's lifecycle configuration if it exists.

Delete an Object Bucket's lifecycle configuration with the S3 protocol.

Usage:

TerminalCode
scw object bucket-lifecycle delete <bucket ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
bucketThe unique name of the bucketRequired
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par

Get the lifecycle configuration of an S3 bucket.

Retrieve an Object Bucket's list of lifecycle rules with the S3 protocol.

Usage:

TerminalCode
scw object bucket-lifecycle get <bucket ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
bucketThe unique name of the bucketRequired
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par

Manage S3 bucket policies

Manage S3 bucket policies creation and deletion.

Create a policy for an S3 bucket

Create a policy and apply to an Object Bucket with the S3 protocol.

Usage:

TerminalCode
scw object bucket-policy create <bucket ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
bucketThe name of the bucket to which assign the policy.Required
policyThe path to the local JSON file containing the bucket policy.Required
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par

Delete an S3 bucket's policy if it exists.

Delete an Object Bucket's policy with the S3 protocol.

Usage:

TerminalCode
scw object bucket-policy delete <bucket ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
bucketThe unique name of the bucketRequired
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par

Retrieve an S3 bucket's policy.

Retrieve an Object Bucket's policy with the S3 protocol.

Usage:

TerminalCode
scw object bucket-policy get <bucket ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
bucketThe unique name of the bucketRequired
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par

Configuration generation for S3 tools.

Generate a S3 tool configuration file

Generate a S3 tool configuration file.

Usage:

TerminalCode
scw object config get [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
typeType of S3 tool you want to generate a config forRequired
One of: rclone, s3cmd, mc
nameName of the s3 remote you want to generateDefault: scaleway
project-idScaleway project ID to use with IAM Access Key syntax
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams

Examples:

Generate a s3cmd config file for Paris region

TerminalCode
scw object config get region=fr-par type=s3cmd

Generate a rclone config file for default region

TerminalCode
scw object config get type=rclone

Generate a mc (minio) config file for default region

TerminalCode
scw object config get type=mc

Install a S3 tool configuration file to its default location

Install a S3 tool configuration file to its default location.

Usage:

TerminalCode
scw object config install [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
typeType of S3 tool you want to generate a config forRequired
One of: rclone, s3cmd, mc
nameName of the s3 remote you want to generateDefault: scaleway
project-idScaleway project ID to use with IAM Access Key syntax
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams

Examples:

Install a s3cmd config file for Paris region

TerminalCode
scw object config install region=fr-par type=s3cmd

Install a rclone config file for default region

TerminalCode
scw object config install type=rclone

Install a mc (minio) config file for default region

TerminalCode
scw object config install type=mc