Bucket Commands

Manage Object Storage Service (OSS) buckets for storing files.

Commands Overview

CommandDescription
raps bucket createCreate a new bucket
raps bucket listList all buckets
raps bucket detailsGet bucket details
raps bucket deleteDelete a bucket

raps bucket create

Create a new OSS bucket interactively.

raps bucket create [--key KEY] [--policy POLICY] [--region REGION]

Options:

  • --key, -k: Bucket key (will prompt if not provided)
  • --policy, -p: Retention policy: transient, temporary, or persistent
  • --region, -r: Region: US or EMEA

Interactive Example:

$ raps bucket create
Note: Bucket keys must be globally unique across all APS applications.
Suggestion: Use a prefix like 'aps-1234567890-yourname'
Enter bucket key: aps-1234567890-mybucket
Select region:
  > US
    EMEA
Select retention policy:
  > transient (deleted after 24 hours)
    temporary (deleted after 30 days)
    persistent (kept until deleted)

 Bucket created successfully!
  Key: aps-1234567890-mybucket
  Policy: transient

Non-interactive Example:

$ raps bucket create --key my-bucket --policy persistent --region US
 Bucket created successfully!

Retention Policies

PolicyDescription
transientDeleted automatically after 24 hours
temporaryDeleted automatically after 30 days
persistentKept until manually deleted

Bucket Key Rules

  • Must be globally unique across all APS applications
  • 3-128 characters
  • Lowercase letters, numbers, hyphens, underscores, and dots only

raps bucket list

List all buckets from all regions.

$ raps bucket list
Fetching buckets from all regions...

US Region:
┌────────────────────────────────────┬────────────┬──────────────────────┐
 Key Policy Created
├────────────────────────────────────┼────────────┼──────────────────────┤
 my-app-models persistent 2024-01-10 10:30:00
 temp-uploads-12345 transient 2024-01-15 14:22:00
└────────────────────────────────────┴────────────┴──────────────────────┘

EMEA Region:
┌────────────────────────────────────┬────────────┬──────────────────────┐
 Key Policy Created
├────────────────────────────────────┼────────────┼──────────────────────┤
 eu-project-files persistent 2024-01-08 09:15:00
└────────────────────────────────────┴────────────┴──────────────────────┘

JSON Output:

raps bucket list --output json

raps bucket details

Get detailed information about a specific bucket.

$ raps bucket details my-bucket
Bucket Details:
  Key: my-bucket
  Policy: persistent
  Owner: abc123xyz
  Created: 2024-01-10 10:30:00 UTC

raps bucket delete

Delete an empty bucket.

$ raps bucket delete my-bucket
 Warning: This will permanently delete bucket 'my-bucket'
  Are you sure? (y/N): y
 Bucket deleted successfully

Force delete (skip confirmation):

raps bucket delete my-bucket --force

Note: Buckets must be empty before deletion. Delete all objects first.

CI/CD Examples

Create bucket with unique name

BUCKET_KEY="app-$(date +%s)-$CI_JOB_ID"
raps bucket create --key "$BUCKET_KEY" --policy transient --region US

List buckets as JSON for processing

raps bucket list --output json | jq '.[] | select(.policy == "persistent")'

Next Steps