Retrieve S3 lifecycle rules for a bucket by name
GET /protocols/s3/services/{svm.uuid}/buckets/{s3_bucket.uuid}/rules/{name}
Introduced In: 9.13
Retrieves all S3 Lifecycle rules associated with a bucket. Note that in order to retrieve S3 bucket rule parametes, the 'fields' option should be set to '**'.
Related ONTAP commands
- 
vserver object-store-server bucket lifecycle-management-rule show 
Parameters
| Name | Type | In | Required | Description | 
|---|---|---|---|---|
s3_bucket.uuid  | 
string  | 
path  | 
True  | 
The unique identifier of the bucket.  | 
name  | 
string  | 
path  | 
True  | 
The name of the lifecycle management rule to be applied on the bucket.  | 
svm.uuid  | 
string  | 
path  | 
True  | 
UUID of the SVM to which this object belongs.  | 
fields  | 
array[string]  | 
query  | 
False  | 
Specify the fields to return.  | 
Response
Status: 200, Ok
| Name | Type | Description | 
|---|---|---|
_links  | 
||
abort_incomplete_multipart_upload  | 
Specifies a way to perform abort_incomplete_multipart_upload action on filtered objects within a bucket.  | 
|
enabled  | 
boolean  | 
Specifies whether or not the associated rule is enabled.  | 
expiration  | 
Specifies a way to perform expiration action on filtered objects within a bucket.  | 
|
name  | 
string  | 
Bucket lifecycle management rule identifier.  | 
non_current_version_expiration  | 
Specifies a way to perform non_current_version_expiration action on filtered objects within a bucket.  | 
|
object_filter  | 
Specifies a way to filter objects within a bucket.  | 
Example response
{
  "_links": {
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "abort_incomplete_multipart_upload": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    }
  },
  "expiration": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "object_expiry_date": "string"
  },
  "name": "string",
  "non_current_version_expiration": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    }
  },
  "object_filter": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "prefix": "/logs",
    "size_greater_than": 10485760,
    "size_less_than": 10240,
    "tags": [
      "project1=projA",
      "project2=projB"
    ]
  }
}
Error
Status: Default, Error
| Name | Type | Description | 
|---|---|---|
error  | 
Example error
{
  "error": {
    "arguments": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}
Definitions
See Definitions
href
| Name | Type | Description | 
|---|---|---|
href  | 
string  | 
_links
| Name | Type | Description | 
|---|---|---|
self  | 
abort_incomplete_multipart_upload
Specifies a way to perform abort_incomplete_multipart_upload action on filtered objects within a bucket.
| Name | Type | Description | 
|---|---|---|
_links  | 
||
after_initiation_days  | 
integer  | 
Number of days of initiation after which uploads can be aborted.  | 
expiration
Specifies a way to perform expiration action on filtered objects within a bucket.
| Name | Type | Description | 
|---|---|---|
_links  | 
||
expired_object_delete_marker  | 
boolean  | 
Cleanup object delete markers.  | 
object_age_days  | 
integer  | 
Number of days since creation after which objects can be deleted.  | 
object_expiry_date  | 
string  | 
Specific date from when objects can expire.  | 
non_current_version_expiration
Specifies a way to perform non_current_version_expiration action on filtered objects within a bucket.
| Name | Type | Description | 
|---|---|---|
_links  | 
||
new_non_current_versions  | 
integer  | 
Number of latest non-current versions to be retained.  | 
non_current_days  | 
integer  | 
Number of days after which non-current versions can be deleted.  | 
object_filter
Specifies a way to filter objects within a bucket.
| Name | Type | Description | 
|---|---|---|
_links  | 
||
prefix  | 
string  | 
A prefix that is matched against object-names within a bucket.  | 
size_greater_than  | 
integer  | 
Size of the object greater than specified for which the corresponding lifecycle rule is to be applied.  | 
size_less_than  | 
integer  | 
Size of the object smaller than specified for which the corresponding lifecycle rule is to be applied.  | 
tags  | 
array[string]  | 
An array of key-value paired tags of the form   | 
error_arguments
| Name | Type | Description | 
|---|---|---|
code  | 
string  | 
Argument code  | 
message  | 
string  | 
Message argument  | 
error
| Name | Type | Description | 
|---|---|---|
arguments  | 
array[error_arguments]  | 
Message arguments  | 
code  | 
string  | 
Error code  | 
message  | 
string  | 
Error message  | 
target  | 
string  | 
The target parameter that caused the error.  |