Retrieve S3 lifecycle rules for a bucket
- PDF of this doc site
Collection of separate PDF docs
Creating your file...
GET /protocols/s3/services/{svm.uuid}/buckets/{s3_bucket.uuid}/rules
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 |
---|---|---|---|---|
expiration.expired_object_delete_marker |
boolean |
query |
False |
Filter by expiration.expired_object_delete_marker |
expiration.object_age_days |
integer |
query |
False |
Filter by expiration.object_age_days |
expiration.object_expiry_date |
string |
query |
False |
Filter by expiration.object_expiry_date |
object_filter.size_less_than |
integer |
query |
False |
Filter by object_filter.size_less_than |
object_filter.tags |
string |
query |
False |
Filter by object_filter.tags |
object_filter.size_greater_than |
integer |
query |
False |
Filter by object_filter.size_greater_than |
object_filter.prefix |
string |
query |
False |
Filter by object_filter.prefix |
name |
string |
query |
False |
Filter by name |
non_current_version_expiration.non_current_days |
integer |
query |
False |
Filter by non_current_version_expiration.non_current_days |
non_current_version_expiration.new_non_current_versions |
integer |
query |
False |
Filter by non_current_version_expiration.new_non_current_versions |
abort_incomplete_multipart_upload.after_initiation_days |
integer |
query |
False |
Filter by abort_incomplete_multipart_upload.after_initiation_days |
enabled |
boolean |
query |
False |
Filter by enabled |
s3_bucket.uuid |
string |
path |
True |
The unique identifier of 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. |
max_records |
integer |
query |
False |
Limit the number of records returned. |
return_records |
boolean |
query |
False |
The default is true for GET calls. When set to false, only the number of records is returned.
|
return_timeout |
integer |
query |
False |
The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.
|
order_by |
array[string] |
query |
False |
Order results by specified fields and optional [asc |
Response
Status: 200, Ok
Name | Type | Description |
---|---|---|
_links |
||
num_records |
integer |
Number of records |
records |
array[s3_bucket_lifecycle_rule] |
Example response
{
"_links": {
"next": {
"href": "/api/resourcelink"
},
"self": {
"href": "/api/resourcelink"
}
},
"num_records": 1,
"records": [
{
"_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 |
collection_links
Name | Type | Description |
---|---|---|
next |
||
self |
_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 |
s3_bucket_lifecycle_rule
Information about the lifecycle management rule of a bucket.
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. |
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. |