• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (PHP SDK)
  4. Bucket-Related APIs
  5. DELETE Bucket lifecycle

DELETE Bucket lifecycle

API Description

You can use this API to delete all lifecycle rules of a bucket.

Method Definition

1. ObsClient->deleteBucketLifecycleConfiguration(array $parameter)
2. ObsClient->deleteBucketLifecycleConfigurationAsync(array $parameter, callable $callback)

Request Parameter

Field

Type

Optional or Mandatory

Description

Bucket

string

Mandatory

Bucket name

Returned Result

Field

Type

Description

HttpStatusCode

integer

HTTP status code

Reason

string

Reason description

RequestId

string

Request ID returned by the OBS server

Sample Code

try{
       $resp = $obsClient -> deleteBucketLifecycleConfiguration([
             'Bucket' => 'bucketname'
       ]);
       printf("RequestId:%s\n", $resp['RequestId']);
}catch (Obs\Common\ObsException $obsException){
       printf("ExceptionCode:%s\n", $obsException->getExceptionCode());
       printf("ExceptionMessage:%s\n", $obsException->getExceptionMessage());
}