Struct: s3.LifecycleRuleFilter

import "../ibm-cos-sdk-go/service/s3"

Overview

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.

Implemented Interfaces

s3crypto.Cipher, s3manager.ReadSeekerWriteTo, request.Validator, s3manager.WriterReadFrom

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

And *LifecycleRuleAndOperator `type:"structure"`

This is used in a Lifecycle Rule Filter to apply a logical AND to two or more predicates. The Lifecycle Rule will apply to any object matching all of the predicates configured inside the And operator.

ObjectSizeGreaterThan *int64 `type:"long"`

ObjectSizeLessThan *int64 `type:"long"`

Prefix *string `type:"string"`

Prefix identifying one or more objects to which the rule applies.

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).

Tag *Tag `type:"structure"`

This tag must exist in the object's tag set in order for the rule to apply.

_ struct{} `type:"structure"`

Method Details

func (s LifecycleRuleFilter) 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”.



15854
15855
15856
// File 'service/s3/api.go', line 15854

func (s LifecycleRuleFilter) GoString() string { return s.String() }

func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRuleFilter

SetAnd sets the And field's value.



15879
15880
15881
15882
// File 'service/s3/api.go', line 15879

func (s *LifecycleRuleFilter) SetObjectSizeGreaterThan(v int64) *LifecycleRuleFilter

SetObjectSizeGreaterThan sets the ObjectSizeGreaterThan field's value.



15885
15886
15887
15888
// File 'service/s3/api.go', line 15885

func (s *LifecycleRuleFilter) SetObjectSizeGreaterThan(v int64) *LifecycleRuleFilter { s.ObjectSizeGreaterThan = &v return s }

func (s *LifecycleRuleFilter) SetObjectSizeLessThan(v int64) *LifecycleRuleFilter

SetObjectSizeLessThan sets the ObjectSizeLessThan field's value.



15891
15892
15893
15894
// File 'service/s3/api.go', line 15891

func (s *LifecycleRuleFilter) SetObjectSizeLessThan(v int64) *LifecycleRuleFilter { s.ObjectSizeLessThan = &v return s }

func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter

SetPrefix sets the Prefix field's value.



15897
15898
15899
15900
// File 'service/s3/api.go', line 15897

func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter { s.Prefix = &v return s }

func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter

SetTag sets the Tag field's value.



15903
15904
15905
15906
// File 'service/s3/api.go', line 15903

func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter { s.Tag = v return s }

func (s LifecycleRuleFilter) 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”.



15845
15846
15847
// File 'service/s3/api.go', line 15845

func (s LifecycleRuleFilter) String() string { return awsutil.Prettify(s) }

func (s *LifecycleRuleFilter) Validate() error

Validate inspects the fields of the type to determine if they are valid.



15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
// File 'service/s3/api.go', line 15859

func (s *LifecycleRuleFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleFilter"} if s.And != nil { if err := s.And.Validate(); err != nil { invalidParams.AddNested("And", err.(request.ErrInvalidParams)) } } if s.Tag != nil { if err := s.Tag.Validate(); err != nil { invalidParams.AddNested("Tag", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil }