Struct: s3.LifecycleRule
Overview
A lifecycle rule for individual objects in an Amazon S3 bucket.
For more information see, Managing your storage lifecycle (docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html) in the Amazon S3 User Guide.
Implemented Interfaces
s3crypto.Cipher, s3manager.ReadSeekerWriteTo, request.Validator, s3manager.WriterReadFrom
Structure Field Summary collapse
-
AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload
Specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload.
-
Expiration *LifecycleExpiration
Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.
-
Filter *LifecycleRuleFilter
The Filter is used to identify objects that a Lifecycle Rule applies to.
-
ID *string
Unique identifier for the rule.
-
NoncurrentVersionExpiration *NoncurrentVersionExpiration
Specifies when noncurrent object versions expire.
-
NoncurrentVersionTransitions []*NoncurrentVersionTransition
Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class.
-
Prefix *string
Prefix identifying one or more objects to which the rule applies.
-
Status *string
If 'Enabled', the rule is currently being applied.
-
Transitions []*Transition
Specifies when an Amazon S3 object transitions to a specified storage class.
- _ struct{}
Service Operations collapse
-
GoString() string
operation
GoString returns the string representation.
-
SetAbortIncompleteMultipartUpload(*AbortIncompleteMultipartUpload) *LifecycleRule
operation
SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
-
SetExpiration(*LifecycleExpiration) *LifecycleRule
operation
SetExpiration sets the Expiration field's value.
-
SetFilter(*LifecycleRuleFilter) *LifecycleRule
operation
SetFilter sets the Filter field's value.
-
SetID(string) *LifecycleRule
operation
SetID sets the ID field's value.
-
SetNoncurrentVersionExpiration(*NoncurrentVersionExpiration) *LifecycleRule
operation
SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
-
SetNoncurrentVersionTransitions([]*NoncurrentVersionTransition) *LifecycleRule
operation
SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value.
-
SetPrefix(string) *LifecycleRule
operation
SetPrefix sets the Prefix field's value.
-
SetStatus(string) *LifecycleRule
operation
SetStatus sets the Status field's value.
-
SetTransitions([]*Transition) *LifecycleRule
operation
SetTransitions sets the Transitions field's value.
-
String() string
operation
String returns the string representation.
-
Validate() error
operation
Validate inspects the fields of the type to determine if they are valid.
Structure Field Details
AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload
`type:"structure"`
Specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration (docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config) in the Amazon S3 User Guide.
Expiration *LifecycleExpiration
`type:"structure"`
Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.
Filter *LifecycleRuleFilter
`type:"structure" required:"true"`
The Filter is used to identify objects that a Lifecycle Rule applies to. A Filter must have exactly one of Prefix, Tag, or And specified. Filter is required if the LifecycleRule does not containt a Prefix element.
Filter is a required field
ID *string
`type:"string"`
Unique identifier for the rule. The value cannot be longer than 255 characters.
NoncurrentVersionExpiration *NoncurrentVersionExpiration
`type:"structure"`
Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent object versions at a specific period in the object's lifetime.
NoncurrentVersionTransitions []*NoncurrentVersionTransition
`locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"`
Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to a specific storage class at a set period in the object's lifetime.
Prefix *string
`deprecated:"true" type:"string"`
Prefix identifying one or more objects to which the rule applies. This is no longer used; use Filter instead.
Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints (docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
Deprecated: Prefix has been deprecated
Status *string
`type:"string" required:"true" enum:"ExpirationStatus"`
If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied.
Status is a required field
Transitions []*Transition
`locationName:"Transition" type:"list" flattened:"true"`
Specifies when an Amazon S3 object transitions to a specified storage class.
_ struct{}
`type:"structure"`
Method Details
func (s LifecycleRule) GoString() string
GoString returns the string representation.
API parameter values that are decorated as “sensitive” in the API will not be included in the string output. The member name will be present, but the value will be replaced with “sensitive”.
15656 15657 15658 |
// File 'service/s3/api.go', line 15656
|
func (s *LifecycleRule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *LifecycleRule
SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
15682 15683 15684 15685 |
// File 'service/s3/api.go', line 15682
|
func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule
SetExpiration sets the Expiration field's value.
15688 15689 15690 15691 |
// File 'service/s3/api.go', line 15688
|
func (s *LifecycleRule) SetFilter(v *LifecycleRuleFilter) *LifecycleRule
SetFilter sets the Filter field's value.
15694 15695 15696 15697 |
// File 'service/s3/api.go', line 15694
|
func (s *LifecycleRule) SetID(v string) *LifecycleRule
SetID sets the ID field's value.
15700 15701 15702 15703 |
// File 'service/s3/api.go', line 15700
|
func (s *LifecycleRule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *LifecycleRule
SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
15706 15707 15708 15709 |
// File 'service/s3/api.go', line 15706
|
func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule
SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value.
15712 15713 15714 15715 |
// File 'service/s3/api.go', line 15712
|
func (s *LifecycleRule) SetPrefix(v string) *LifecycleRule
SetPrefix sets the Prefix field's value.
15718 15719 15720 15721 |
// File 'service/s3/api.go', line 15718
|
func (s *LifecycleRule) SetStatus(v string) *LifecycleRule
SetStatus sets the Status field's value.
15724 15725 15726 15727 |
// File 'service/s3/api.go', line 15724
|
func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule
SetTransitions sets the Transitions field's value.
15730 15731 15732 15733 |
// File 'service/s3/api.go', line 15730
|
func (s LifecycleRule) String() string
String returns the string representation.
API parameter values that are decorated as “sensitive” in the API will not be included in the string output. The member name will be present, but the value will be replaced with “sensitive”.
15647 15648 15649 |
// File 'service/s3/api.go', line 15647
|
func (s *LifecycleRule) Validate() error
Validate inspects the fields of the type to determine if they are valid.
15661 15662 15663 15664 15665 15666 15667 15668 15669 15670 15671 15672 15673 15674 15675 15676 15677 15678 15679 |
// File 'service/s3/api.go', line 15661
|