dcloud s3 bucket-lifecycle set

Replace the lifecycle rules

IAM s3:PutLifecycleConfigurationChanges stateAsks before it deletes (-y skips)

rules: [{ id, prefix?, enabled?, expirationDays?, noncurrentVersionExpirationDays?, abortIncompleteMultipartUploadDays?, expiredObjectDeleteMarker? }]. Applied by object storage once a day.

Synopsis

dcloud s3 bucket-lifecycle set name --rules rules

Arguments

  • <name>Required

    string

    Also accepted as --name. Constraints: 3-63 chars, /^[a-z0-9][a-z0-9-]*[a-z0-9]$/

Flags

  • --rulesRequired

    array of json

    The rules, replacing the current ones; each has its own id and at least one action (expirationDays, noncurrentVersionExpirationDays, abortIncompleteMultipartUploadDays or expiredObjectDeleteMarker)

Example

dcloud s3 bucket-lifecycle set name --rules '["example"]'

Generated from the API description, the same one the API checks requests against and the CLI is built from.