public static class BucketLifecycleConfiguration.Rule extends Object implements Serializable
构造器和说明 |
---|
Rule() |
限定符和类型 | 方法和说明 |
---|---|
BucketLifecycleConfiguration.Rule |
addNoncurrentVersionTransition(BucketLifecycleConfiguration.NoncurrentVersionTransition noncurrentVersionTransition)
Adds a new Non current transition to the rule.
|
BucketLifecycleConfiguration.Rule |
addTransition(BucketLifecycleConfiguration.Transition transition)
Adds a new transition to the rule.
|
AbortIncompleteMultipartUpload |
getAbortIncompleteMultipartUpload() |
Date |
getExpirationDate()
Returns the expiration date of the object.
|
int |
getExpirationInDays()
Returns the time in days from an object's creation to its expiration.
|
LifecycleFilter |
getFilter()
Returns a
LifecycleFilter that is used to identify objects that a Lifecycle Rule
applies to. |
String |
getId()
Returns the ID of this rule.
|
int |
getNoncurrentVersionExpirationInDays() |
List<BucketLifecycleConfiguration.NoncurrentVersionTransition> |
getNoncurrentVersionTransitions()
Returns the Qcloud COS non current object transition rules associated with the given
rule.
|
String |
getStatus()
Returns the status of this rule.
|
List<BucketLifecycleConfiguration.Transition> |
getTransitions()
Returns the transition attribute of the rule.
|
boolean |
isExpiredObjectDeleteMarker()
Returns whether the current expiration policy for the object is set to remove objects
when only a delete marker is left
If set to true the lifecycle policy will delete the current version of an object if and
only if the current version is a expired object delete marker.
|
void |
setAbortIncompleteMultipartUpload(AbortIncompleteMultipartUpload abortIncompleteMultipartUpload) |
void |
setExpirationDate(Date expirationDate)
Sets the expiration date of the object.
|
void |
setExpirationInDays(int expirationInDays)
Sets the time, in days, between when an object is uploaded to the bucket and when it
expires.
|
void |
setExpiredObjectDeleteMarker(boolean expiredObjectDeleteMarker)
Sets the value of the ExpiredObjectDeleteMarkers attribute.
|
void |
setFilter(LifecycleFilter filter)
Sets the
LifecycleFilter that is used to identify objects that a Lifecycle Rule
applies to. |
void |
setId(String id)
Sets the ID of this rule.
|
void |
setNoncurrentVersionExpirationInDays(int noncurrentVersionExpirationInDays) |
void |
setNoncurrentVersionTransitions(List<BucketLifecycleConfiguration.NoncurrentVersionTransition> noncurrentVersionTransitions)
Sets the Qcloud COS non current object transition rules for the given bucket.
|
void |
setStatus(String status)
Sets the status of this rule.
|
void |
setTransitions(List<BucketLifecycleConfiguration.Transition> transitions)
Sets the transition describing how this object will move between different storage
classes in Qcloud COS.
|
BucketLifecycleConfiguration.Rule |
withAbortIncompleteMultipartUpload(AbortIncompleteMultipartUpload abortIncompleteMultipartUpload) |
BucketLifecycleConfiguration.Rule |
withExpirationDate(Date expirationDate)
Sets the expiration date of the object and returns a reference to this object(Rule) for
method chaining.
|
BucketLifecycleConfiguration.Rule |
withExpirationInDays(int expirationInDays)
Sets the time, in days, between when an object is uploaded to the bucket and when it
expires, and returns a reference to this object for method chaining.
|
BucketLifecycleConfiguration.Rule |
withExpiredObjectDeleteMarker(boolean expiredObjectDeleteMarker)
Fluent method for setting the value of the ExpiredObjectDeleteMarkers attributes.
|
BucketLifecycleConfiguration.Rule |
withFilter(LifecycleFilter filter)
Fluent method to set the
LifecycleFilter that is used to identify objects that a
Lifecycle Rule applies to. |
BucketLifecycleConfiguration.Rule |
withId(String id)
Sets the ID of this rule and returns a reference to this object for method chaining.
|
BucketLifecycleConfiguration.Rule |
withNoncurrentVersionExpirationInDays(int noncurrentVersionExpirationInDays) |
BucketLifecycleConfiguration.Rule |
withNoncurrentVersionTransitions(List<BucketLifecycleConfiguration.NoncurrentVersionTransition> noncurrentVersionTransitions)
Sets the Qcloud COS non current object transition rules for the given bucket.
|
BucketLifecycleConfiguration.Rule |
withStatus(String status)
Sets the status of this rule and returns a reference to this object for method chaining.
|
BucketLifecycleConfiguration.Rule |
withTransitions(List<BucketLifecycleConfiguration.Transition> transitions)
Sets the transition describing how this object will move between different storage
classes in Qcloud COS and returns a reference to this object(Rule) for method chaining.
|
public void setId(String id)
public void setExpirationInDays(int expirationInDays)
public String getId()
public BucketLifecycleConfiguration.Rule withId(String id)
setId(String)
public int getExpirationInDays()
public BucketLifecycleConfiguration.Rule withExpirationInDays(int expirationInDays)
setExpirationInDays(int)
public boolean isExpiredObjectDeleteMarker()
If set to true the lifecycle policy will delete the current version of an object if and only if the current version is a expired object delete marker. This option only makes sense to use for versioned buckets and cannot be used in conjunction with expirationInDays or expirationDate. Note that the current version can only be removed if all non-current versions have been removed (either through a non-current version expiration policy or being explicitly deleted)
public void setExpiredObjectDeleteMarker(boolean expiredObjectDeleteMarker)
expiredObjectDeleteMarker
- True to allow the current expiration policy to remove
the current version of the object if it's the only version left and it's a delete
marker. False has no effect on the current expiration policypublic BucketLifecycleConfiguration.Rule withExpiredObjectDeleteMarker(boolean expiredObjectDeleteMarker)
setExpiredObjectDeleteMarker(boolean)
expiredObjectDeleteMarker
- public int getNoncurrentVersionExpirationInDays()
public void setNoncurrentVersionExpirationInDays(int noncurrentVersionExpirationInDays)
public BucketLifecycleConfiguration.Rule withNoncurrentVersionExpirationInDays(int noncurrentVersionExpirationInDays)
public String getStatus()
public void setStatus(String status)
public BucketLifecycleConfiguration.Rule withStatus(String status)
public void setExpirationDate(Date expirationDate)
public Date getExpirationDate()
public BucketLifecycleConfiguration.Rule withExpirationDate(Date expirationDate)
public void setTransitions(List<BucketLifecycleConfiguration.Transition> transitions)
public List<BucketLifecycleConfiguration.Transition> getTransitions()
public BucketLifecycleConfiguration.Rule withTransitions(List<BucketLifecycleConfiguration.Transition> transitions)
public BucketLifecycleConfiguration.Rule addTransition(BucketLifecycleConfiguration.Transition transition)
public List<BucketLifecycleConfiguration.NoncurrentVersionTransition> getNoncurrentVersionTransitions()
public void setNoncurrentVersionTransitions(List<BucketLifecycleConfiguration.NoncurrentVersionTransition> noncurrentVersionTransitions)
public BucketLifecycleConfiguration.Rule withNoncurrentVersionTransitions(List<BucketLifecycleConfiguration.NoncurrentVersionTransition> noncurrentVersionTransitions)
public BucketLifecycleConfiguration.Rule addNoncurrentVersionTransition(BucketLifecycleConfiguration.NoncurrentVersionTransition noncurrentVersionTransition)
public AbortIncompleteMultipartUpload getAbortIncompleteMultipartUpload()
public void setAbortIncompleteMultipartUpload(AbortIncompleteMultipartUpload abortIncompleteMultipartUpload)
public BucketLifecycleConfiguration.Rule withAbortIncompleteMultipartUpload(AbortIncompleteMultipartUpload abortIncompleteMultipartUpload)
public LifecycleFilter getFilter()
LifecycleFilter
that is used to identify objects that a Lifecycle Rule
applies to.public void setFilter(LifecycleFilter filter)
LifecycleFilter
that is used to identify objects that a Lifecycle Rule
applies to. A rule cannot have both LifecycleFilter
and the deprecated
#prefix
.filter
- LifecycleFilter
public BucketLifecycleConfiguration.Rule withFilter(LifecycleFilter filter)
LifecycleFilter
that is used to identify objects that a
Lifecycle Rule applies to. A rule cannot have both LifecycleFilter
and the
deprecated #prefix
.filter
- LifecycleFilter
Copyright © 2020. All rights reserved.