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



21277
21278
21279
// File 'service/s3/api.go', line 21277

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

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

SetDeleteMarkerReplication sets the DeleteMarkerReplication field's value.



21322
21323
21324
21325
// File 'service/s3/api.go', line 21322

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.



21328
21329
21330
21331
// File 'service/s3/api.go', line 21328

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.



21334
21335
21336
21337
// File 'service/s3/api.go', line 21334

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.



21340
21341
21342
21343
// File 'service/s3/api.go', line 21340

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.



21346
21347
21348
21349
// File 'service/s3/api.go', line 21346

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.



21352
21353
21354
21355
// File 'service/s3/api.go', line 21352

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.



21358
21359
21360
21361
// File 'service/s3/api.go', line 21358

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



21268
21269
21270
// File 'service/s3/api.go', line 21268

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.



21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
// File 'service/s3/api.go', line 21282

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 }