Struct: s3.ReplicationRuleFilter

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

Overview

A filter that identifies the subset of objects to which the replication rule applies. A Filter must specify exactly one Prefix, Tag, or an And child element.

Implemented Interfaces

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

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

And *ReplicationRuleAndOperator `type:"structure"`

A container for specifying rule filters. The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. For example:

  • If you specify both a Prefix and a Tag filter, wrap these filters in an And tag.

  • If you specify a filter based on multiple tags, wrap the Tag elements in an And tag.

Prefix *string `type:"string"`

An object key name prefix that identifies the subset of 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"`

A container for specifying a tag key and value.

The rule applies only to objects that have the tag in their tag set.

_ struct{} `type:"structure"`

Method Details

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



21479
21480
21481
// File 'service/s3/api.go', line 21479

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

func (s *ReplicationRuleFilter) SetAnd(v *ReplicationRuleAndOperator) *ReplicationRuleFilter

SetAnd sets the And field's value.



21504
21505
21506
21507
// File 'service/s3/api.go', line 21504

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

SetPrefix sets the Prefix field's value.



21510
21511
21512
21513
// File 'service/s3/api.go', line 21510

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

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

SetTag sets the Tag field's value.



21516
21517
21518
21519
// File 'service/s3/api.go', line 21516

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

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



21470
21471
21472
// File 'service/s3/api.go', line 21470

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

func (s *ReplicationRuleFilter) Validate() error

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



21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
// File 'service/s3/api.go', line 21484

func (s *ReplicationRuleFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleFilter"} 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 }