Use cases
The Object Expiration feature can be used on buckets to delete objects automatically.
User Case 1: Feature Disabled
- An S3 Client is looking to write an object into an IBM Cloud Object Storage System for a nonversioned bucket.
- An object of the same name exists in the bucket.
- The user includes an x-ibm-forbid-overwrite header with a value of True.
- The feature has NOT been enabled by the system owner.
- The header is ignored, and the request succeeds.
User Case 2: Feature Enabled, Versioned Bucket
- An S3 Client is looking to write an object into an IBM Cloud Object Storage System for a Versioned bucket.
- An object of the same name exists in the bucket.
- The user includes an x-ibm-forbid-overwrite header with a value of True.
- The feature has been enabled by the system owner.
- The header is ignored, and the request succeeds. The Forbid Overwrite headers are ignored for Versioned Buckets.
User Case 3: Feature Enabled, Nonversioned Bucket, Forbid overwrite value is `true`
- An S3 Client is looking to write an object into an IBM Cloud Object Storage System for a Nonversioned bucket. The S3 Client does NOT want to overwrite an object with the same name if one exists on the system already.
- An object of the same name exists in the bucket.
- The user includes an x-ibm-forbid-overwrite header with a value of True.
- The feature has been enabled by the system owner.
- The header and `true` value are respected by the system and the request is rejected with a 409 – ObjectAlreadyExists. The Forbid Overwrite headers is honored.
User Case 4: Feature Enabled, Nonversioned Bucket, Forbid overwrite value is `false`
- An S3 Client is looking to write an object into an IBM Cloud Object Storage System for a Nonversioned bucket. The S3 Client does NOT want to overwrite an object with the same name if one exists on the system already.
- An object of the same name exists in the bucket.
- The user includes an x-ibm-forbid-overwrite header with a value of False (or empty string).
- The feature has been enabled by the system owner.
- The header does NOT contain a True value (case-insensitive) so the system allows the request to proceed and the overwrite to succeed. The Forbid Overwrite header is honored based on the value.
User Case 5: Feature Enabled, Nonversioned Bucket, Invalid forbid overwrite header value.
- An S3 Client is looking to write an object into an IBM Cloud Object Storage System for a Nonversioned bucket. The S3 Client does NOT want to overwrite an object with the same name if one exists on the system already.
- An object of the same name exists in the bucket.
- The user includes an x-ibm-forbid-overwrite header with a value of abc.
- The feature has been enabled by the system owner.
- The header does NOT contain a valid value so the system rejects the request with a 400 – Invalid Request. The Forbid Overwrite header is honored based on the value.