Class: AWSCDK::S3::CfnBucket::ReplicationRuleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::CfnBucket::ReplicationRuleProperty
- Defined in:
- s3/cfn_bucket.rb
Overview
Specifies which Amazon S3 objects to replicate and where to store the replicas.
Instance Attribute Summary collapse
-
#delete_marker_replication ⇒ AWSCDK::IResolvable, ...
readonly
Specifies whether Amazon S3 replicates delete markers.
-
#destination ⇒ AWSCDK::IResolvable, AWSCDK::S3::CfnBucket::ReplicationDestinationProperty
readonly
A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).
-
#filter ⇒ AWSCDK::IResolvable, ...
readonly
A filter that identifies the subset of objects to which the replication rule applies.
-
#id ⇒ String?
readonly
A unique identifier for the rule.
-
#prefix ⇒ String?
readonly
An object key name prefix that identifies the object or objects to which the rule applies.
-
#priority ⇒ Numeric?
readonly
The priority indicates which rule has precedence whenever two or more replication rules conflict.
-
#source_selection_criteria ⇒ AWSCDK::IResolvable, ...
readonly
A container that describes additional filters for identifying the source objects that you want to replicate.
-
#status ⇒ String
readonly
Specifies whether the rule is enabled.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(destination:, status:, delete_marker_replication: nil, filter: nil, id: nil, prefix: nil, priority: nil, source_selection_criteria: nil) ⇒ ReplicationRuleProperty
constructor
A new instance of ReplicationRuleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(destination:, status:, delete_marker_replication: nil, filter: nil, id: nil, prefix: nil, priority: nil, source_selection_criteria: nil) ⇒ ReplicationRuleProperty
Returns a new instance of ReplicationRuleProperty.
3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 |
# File 's3/cfn_bucket.rb', line 3613 def initialize(destination:, status:, delete_marker_replication: nil, filter: nil, id: nil, prefix: nil, priority: nil, source_selection_criteria: nil) @destination = destination.is_a?(Hash) ? ::AWSCDK::S3::CfnBucket::ReplicationDestinationProperty.new(**destination.transform_keys(&:to_sym)) : destination Jsii::Type.check_type(@destination, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5CdWNrZXQuUmVwbGljYXRpb25EZXN0aW5hdGlvblByb3BlcnR5In1dfX0=")), "destination") @status = status Jsii::Type.check_type(@status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "status") @delete_marker_replication = delete_marker_replication.is_a?(Hash) ? ::AWSCDK::S3::CfnBucket::DeleteMarkerReplicationProperty.new(**delete_marker_replication.transform_keys(&:to_sym)) : delete_marker_replication Jsii::Type.check_type(@delete_marker_replication, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5CdWNrZXQuRGVsZXRlTWFya2VyUmVwbGljYXRpb25Qcm9wZXJ0eSJ9XX19")), "deleteMarkerReplication") unless @delete_marker_replication.nil? @filter = filter.is_a?(Hash) ? ::AWSCDK::S3::CfnBucket::ReplicationRuleFilterProperty.new(**filter.transform_keys(&:to_sym)) : filter Jsii::Type.check_type(@filter, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5CdWNrZXQuUmVwbGljYXRpb25SdWxlRmlsdGVyUHJvcGVydHkifV19fQ==")), "filter") unless @filter.nil? @id = id Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") unless @id.nil? @prefix = prefix Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix") unless @prefix.nil? @priority = priority Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "priority") unless @priority.nil? @source_selection_criteria = source_selection_criteria.is_a?(Hash) ? ::AWSCDK::S3::CfnBucket::SourceSelectionCriteriaProperty.new(**source_selection_criteria.transform_keys(&:to_sym)) : source_selection_criteria Jsii::Type.check_type(@source_selection_criteria, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5CdWNrZXQuU291cmNlU2VsZWN0aW9uQ3JpdGVyaWFQcm9wZXJ0eSJ9XX19")), "sourceSelectionCriteria") unless @source_selection_criteria.nil? end |
Instance Attribute Details
#delete_marker_replication ⇒ AWSCDK::IResolvable, ... (readonly)
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 .
For more information about delete marker replication, see Basic Rule Configuration .
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 .
3652 3653 3654 |
# File 's3/cfn_bucket.rb', line 3652 def delete_marker_replication @delete_marker_replication end |
#destination ⇒ AWSCDK::IResolvable, AWSCDK::S3::CfnBucket::ReplicationDestinationProperty (readonly)
A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).
3636 3637 3638 |
# File 's3/cfn_bucket.rb', line 3636 def destination @destination end |
#filter ⇒ AWSCDK::IResolvable, ... (readonly)
A filter that identifies the subset of objects to which the replication rule applies.
A Filter must specify exactly one Prefix , TagFilter , or an And child element. The use of the filter field indicates that this is a V2 replication configuration. This field isn't supported in a V1 replication configuration.
V1 replication configuration only supports filtering by key prefix. To filter using a V1 replication configuration, add the
Prefixdirectly as a child element of theRuleelement.
3661 3662 3663 |
# File 's3/cfn_bucket.rb', line 3661 def filter @filter end |
#id ⇒ String? (readonly)
A unique identifier for the rule.
The maximum value is 255 characters. If you don't specify a value, AWS CloudFormation generates a random ID. When using a V2 replication configuration this property is capitalized as "ID".
3668 3669 3670 |
# File 's3/cfn_bucket.rb', line 3668 def id @id end |
#prefix ⇒ String? (readonly)
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. To filter using a V1 replication configuration, add the Prefix directly as a child element of the Rule element.
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 .
3677 3678 3679 |
# File 's3/cfn_bucket.rb', line 3677 def prefix @prefix end |
#priority ⇒ Numeric? (readonly)
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 in the Amazon S3 User Guide .
3686 3687 3688 |
# File 's3/cfn_bucket.rb', line 3686 def priority @priority end |
#source_selection_criteria ⇒ AWSCDK::IResolvable, ... (readonly)
A container that describes additional filters for identifying the source objects that you want to replicate.
You can choose to enable or disable the replication of these objects.
3693 3694 3695 |
# File 's3/cfn_bucket.rb', line 3693 def source_selection_criteria @source_selection_criteria end |
#status ⇒ String (readonly)
Specifies whether the rule is enabled.
3641 3642 3643 |
# File 's3/cfn_bucket.rb', line 3641 def status @status end |
Class Method Details
.jsii_properties ⇒ Object
3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 |
# File 's3/cfn_bucket.rb', line 3695 def self.jsii_properties { :destination => "destination", :status => "status", :delete_marker_replication => "deleteMarkerReplication", :filter => "filter", :id => "id", :prefix => "prefix", :priority => "priority", :source_selection_criteria => "sourceSelectionCriteria", } end |
Instance Method Details
#to_jsii ⇒ Object
3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 |
# File 's3/cfn_bucket.rb', line 3708 def to_jsii result = {} result.merge!({ "destination" => @destination, "status" => @status, "deleteMarkerReplication" => @delete_marker_replication, "filter" => @filter, "id" => @id, "prefix" => @prefix, "priority" => @priority, "sourceSelectionCriteria" => @source_selection_criteria, }) result.compact end |