Struct: s3.ReplicationRule

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

Overview

Specifies which Amazon S3 objects to replicate and where to store the replicas.

Implemented Interfaces

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

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

DeleteMarkerReplication *DeleteMarkerReplication `type:"structure" required:"true"`

Specifies whether Amazon S3 replicates delete markers. If you specify a Filter in your replication configuration, you must also include a DeleteMarkerReplication element. If your Filter includes a Tag element, the DeleteMarkerReplication Status must be set to Disabled, because Amazon S3 does not support replicating delete markers for tag-based rules. For an example configuration, see Basic Rule Configuration (docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config).

For more information about delete marker replication, see Basic Rule Configuration (docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html).

If you are using an earlier version of the replication configuration, Amazon S3 handles replication of delete markers differently. For more information, see Backward Compatibility (docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).

DeleteMarkerReplication is a required field

Destination *Destination `type:"structure" required:"true"`

A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).

Destination is a required field

Filter *ReplicationRuleFilter `type:"structure" required:"true"`

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.

Filter is a required field

ID *string `type:"string"`

A unique identifier for the rule. The maximum value is 255 characters.

Prefix *string `deprecated:"true" type:"string"`

An object key name prefix that identifies the object or objects to which the rule applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket, specify an empty string.

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

Priority *int64 `type:"integer" required:"true"`

The priority indicates which rule has precedence whenever two or more replication rules conflict. Amazon S3 will attempt to replicate objects according to all replication rules. However, if there are two or more rules with the same destination bucket, then objects will be replicated according to the rule with the highest priority. The higher the number, the higher the priority.

For more information, see Replication (docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) in the Amazon S3 User Guide.

Priority is a required field

Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"`

Specifies whether the rule is enabled.

Status is a required field

_ struct{} `type:"structure"`

Method Details

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



21514
21515
21516
// File 'service/s3/api.go', line 21514

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

func (s *ReplicationRule) SetDeleteMarkerReplication(v *DeleteMarkerReplication) *ReplicationRule

SetDeleteMarkerReplication sets the DeleteMarkerReplication field's value.



21559
21560
21561
21562
// File 'service/s3/api.go', line 21559

func (s *ReplicationRule) SetDeleteMarkerReplication(v *DeleteMarkerReplication) *ReplicationRule { s.DeleteMarkerReplication = v return s }

func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule

SetDestination sets the Destination field's value.



21565
21566
21567
21568
// File 'service/s3/api.go', line 21565

func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule { s.Destination = v return s }

func (s *ReplicationRule) SetFilter(v *ReplicationRuleFilter) *ReplicationRule

SetFilter sets the Filter field's value.



21571
21572
21573
21574
// File 'service/s3/api.go', line 21571

func (s *ReplicationRule) SetFilter(v *ReplicationRuleFilter) *ReplicationRule { s.Filter = v return s }

func (s *ReplicationRule) SetID(v string) *ReplicationRule

SetID sets the ID field's value.



21577
21578
21579
21580
// File 'service/s3/api.go', line 21577

func (s *ReplicationRule) SetID(v string) *ReplicationRule { s.ID = &v return s }

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

SetPrefix sets the Prefix field's value.



21583
21584
21585
21586
// File 'service/s3/api.go', line 21583

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

func (s *ReplicationRule) SetPriority(v int64) *ReplicationRule

SetPriority sets the Priority field's value.



21589
21590
21591
21592
// File 'service/s3/api.go', line 21589

func (s *ReplicationRule) SetPriority(v int64) *ReplicationRule { s.Priority = &v return s }

func (s *ReplicationRule) SetStatus(v string) *ReplicationRule

SetStatus sets the Status field's value.



21595
21596
21597
21598
// File 'service/s3/api.go', line 21595

func (s *ReplicationRule) SetStatus(v string) *ReplicationRule { s.Status = &v return s }

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



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

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

func (s *ReplicationRule) Validate() error

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



21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
21553
21554
21555
21556
// File 'service/s3/api.go', line 21519

func (s *ReplicationRule) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"} if s.DeleteMarkerReplication == nil { invalidParams.Add(request.NewErrParamRequired("DeleteMarkerReplication")) } if s.Destination == nil { invalidParams.Add(request.NewErrParamRequired("Destination")) } if s.Filter == nil { invalidParams.Add(request.NewErrParamRequired("Filter")) } if s.Priority == nil { invalidParams.Add(request.NewErrParamRequired("Priority")) } if s.Status == nil { invalidParams.Add(request.NewErrParamRequired("Status")) } if s.DeleteMarkerReplication != nil { if err := s.DeleteMarkerReplication.Validate(); err != nil { invalidParams.AddNested("DeleteMarkerReplication", err.(request.ErrInvalidParams)) } } if s.Destination != nil { if err := s.Destination.Validate(); err != nil { invalidParams.AddNested("Destination", err.(request.ErrInvalidParams)) } } if s.Filter != nil { if err := s.Filter.Validate(); err != nil { invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil }