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



16005
16006
16007
// File 'service/s3/api.go', line 16005

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

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

SetAnd sets the And field’s value.



16030
16031
16032
16033
// File 'service/s3/api.go', line 16030

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

SetObjectSizeGreaterThan sets the ObjectSizeGreaterThan field’s value.



16036
16037
16038
16039
// File 'service/s3/api.go', line 16036

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.



16042
16043
16044
16045
// File 'service/s3/api.go', line 16042

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.



16048
16049
16050
16051
// File 'service/s3/api.go', line 16048

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.



16054
16055
16056
16057
// File 'service/s3/api.go', line 16054

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



15996
15997
15998
// File 'service/s3/api.go', line 15996

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.



16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
// File 'service/s3/api.go', line 16010

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 }