Skip to main content
REST API reference
A newer release of this product is available.

Updates the s3 bucket lifecycle rule configuration

  • actions - lifecycle management actions associated with the rule

  • enabled - lifecycle management rule is enabled or not

  • object_age_days - number of days since creation after which objects can be deleted

  • object_expiry_date - specific date from when objects can expire

  • expired_object_delete_marker - cleanup object delete markers

  • new_non_current_versions - number of latest non-current versions to be retained

  • non_current_days - number of days after which non-current versions can be deleted

  • after_initiation_days - number of days of initiation after which uploads can be aborted # related ontap commands

  • vserver object-store-server bucket lifecycle-management-rule modify # learn more

  • [doc /protocols/s3/services/{svmuuid}/buckets/{s3_bucketuuid}/rules](#docs-object-store-protocols_s3_services_{svmuuid}_buckets_{s3_bucketuuid}_rules)

PATCH /protocols/s3/services/{svm.uuid}/buckets/{s3_bucket.uuid}/rules/{name}

Introduced In: 9.13

Updates the S3 bucket lifecycle rule configuration.

Important notes

  • The following fields can be modified for a bucket:

  • actions - Lifecycle Management actions associated with the rule.

  • enabled - Lifecycle Management rule is enabled or not..

  • object_age_days - Number of days since creation after which objects can be deleted.

  • object_expiry_date - Specific date from when objects can expire.

  • expired_object_delete_marker - Cleanup object delete markers.

  • new_non_current_versions - Number of latest non-current versions to be retained.

  • non_current_days - Number of days after which non-current versions can be deleted.

  • after_initiation_days - Number of days of initiation after which uploads can be aborted.

  • vserver object-store-server bucket lifecycle-management-rule modify

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.

return_timeout

integer

query

False

The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202.

  • Default value: 0

  • Max value: 120

  • Min value: 0

svm.uuid

string

path

True

UUID of the SVM to which this object belongs.

Request Body

Name Type Description

abort_incomplete_multipart_upload

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

expiration

Specifies a way to perform expiration action on filtered objects within a bucket.

non_current_version_expiration

non_current_version_expiration

Specifies a way to perform non_current_version_expiration action on filtered objects within a bucket.

Example request
{
  "expiration": {
    "object_expiry_date": "string"
  }
}

Response

Status: 200, Ok
Name Type Description

num_records

integer

Number of records

records

array[s3_bucket_lifecycle_rule]

Example response
{
  "num_records": 1,
  "records": [
    {
      "expiration": {
        "object_expiry_date": "string"
      }
    }
  ]
}

Response

Status: 202, Accepted

Error

Status: Default

ONTAP Error Response Codes

Error code Message

92405861

"The specified SVM UUID or bucket UUID does not exist.";

92406114

"The Expiration action requires specifying either object_expiry_date, object_age_days or expired_object_delete_marker.";

92406115

"The NonCurrentVersionExpiration action requires either new_non_current_versions or non_current_days.";

92406116

"The AbortIncompleteMultipartUpload action requires after_initiation_days.";

92406117

"The Expiration action cannot have both an expiry date and an age.";

92406118

"Using Lifecycle Management rules requires an effective cluster version of 9.13.1 .";

92406119

"One or more object store buckets exist with Lifecycle Management rules. To list the buckets, run the vserver object-store-server bucket lifecycle-management-rule show command. To delete the buckets, use the vserver object-store-server bucket delete command.";

92406120

"The AbortIncompleteMultipartUpload action cannot be specified with tags.";

92406121

"Expired object delete marker cannot be specified with tags.";

92406122

"Expired object delete marker cannot be specified with object age days or expiry date.";

92406123

"Expiration is supported on object store volumes only, bucket on Vserver is not an object store volume.";

92406126

"Lifecycle Management rule for bucket in Vserver is invalid because specified tags contain one or more invalid characters. Valid characters for a tag are 0-9, A-Z, a-z, +, -, =, ., _, :, /, @.";

92406131

"Lifecycle Management rule for bucket in Vserver cannot be created because non_current_days must be specified when new_non_current_versions is specified.";

92406132

"Lifecycle Management rule for bucket in Vserver requires object_age_days to be greater than zero.";

92406133

"Lifecycle Management rule for bucket in Vserver is invalid. The object_expiry_date must be later than January 1, 1970.";

92406135

"MetroCluster is configured on cluster. Object Expiration is not supported in a MetroCluster configuration.";

92406136

"Lifecycle Management rule for bucket in Vserver is invalid. The object_expiry_date must be at midnight GMT.";

92406139

"Lifecycle Management rule for bucket in Vserver with action is a stale entry. Contact technical support for assistance.";

92406140

"Expired object delete marker must be enabled to create a Lifecycle Management rule.";

92406141

"Lifecycle Management rule for bucket in Vserver with action cannot have expired_object_delete_marker disabled. To disable expired_object_delete_marker, run vserver object-store-server bucket lifecycle-management-rule delete";

Definitions

See Definitions

href

Name Type Description

href

string

abort_incomplete_multipart_upload

Specifies a way to perform abort_incomplete_multipart_upload action on filtered objects within a bucket.

Name Type Description

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

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

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

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 or <tag=value>.

s3_bucket_lifecycle_rule

Information about the lifecycle management rule of a bucket.

Name Type Description

abort_incomplete_multipart_upload

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

expiration

Specifies a way to perform expiration action on filtered objects within a bucket.

non_current_version_expiration

non_current_version_expiration

Specifies a way to perform non_current_version_expiration action on filtered 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.

Close
Try it out

Sign in with your NetApp Cloud Central credentials.

Try this API

Parameters

Headers

Body

Code

Response