Struct aws_sdk_s3::model::ReplicationRule
source · #[non_exhaustive]pub struct ReplicationRule { /* private fields */ }
Expand description
Specifies which Amazon S3 objects to replicate and where to store the replicas.
Implementations§
source§impl ReplicationRule
impl ReplicationRule
sourcepub fn id(&self) -> Option<&str>
pub fn id(&self) -> Option<&str>
A unique identifier for the rule. The maximum value is 255 characters.
sourcepub fn priority(&self) -> i32
pub fn priority(&self) -> i32
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.
sourcepub fn prefix(&self) -> Option<&str>
👎Deprecated
pub fn prefix(&self) -> Option<&str>
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.
sourcepub fn filter(&self) -> Option<&ReplicationRuleFilter>
pub fn filter(&self) -> Option<&ReplicationRuleFilter>
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.
sourcepub fn status(&self) -> Option<&ReplicationRuleStatus>
pub fn status(&self) -> Option<&ReplicationRuleStatus>
Specifies whether the rule is enabled.
sourcepub fn source_selection_criteria(&self) -> Option<&SourceSelectionCriteria>
pub fn source_selection_criteria(&self) -> Option<&SourceSelectionCriteria>
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. Currently, Amazon S3 supports only the filter that you can specify for objects created with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service (SSE-KMS).
sourcepub fn existing_object_replication(&self) -> Option<&ExistingObjectReplication>
pub fn existing_object_replication(&self) -> Option<&ExistingObjectReplication>
sourcepub fn destination(&self) -> Option<&Destination>
pub fn destination(&self) -> Option<&Destination>
A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).
sourcepub fn delete_marker_replication(&self) -> Option<&DeleteMarkerReplication>
pub fn delete_marker_replication(&self) -> Option<&DeleteMarkerReplication>
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.
source§impl ReplicationRule
impl ReplicationRule
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ReplicationRule
.
Examples found in repository?
6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517
pub fn deser_structure_crate_model_replication_rule(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReplicationRule, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReplicationRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ID") /* ID com.amazonaws.s3#ReplicationRule$ID */ => {
let var_346 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_346);
}
,
s if s.matches("Priority") /* Priority com.amazonaws.s3#ReplicationRule$Priority */ => {
let var_347 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#Priority`)"))
}
?
)
;
builder = builder.set_priority(var_347);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3#ReplicationRule$Prefix */ => {
let var_348 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_348);
}
,
s if s.matches("Filter") /* Filter com.amazonaws.s3#ReplicationRule$Filter */ => {
let var_349 =
Some(
crate::xml_deser::deser_union_crate_model_replication_rule_filter(&mut tag)
?
)
;
builder = builder.set_filter(var_349);
}
,
s if s.matches("Status") /* Status com.amazonaws.s3#ReplicationRule$Status */ => {
let var_350 =
Some(
Result::<crate::model::ReplicationRuleStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ReplicationRuleStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_350);
}
,
s if s.matches("SourceSelectionCriteria") /* SourceSelectionCriteria com.amazonaws.s3#ReplicationRule$SourceSelectionCriteria */ => {
let var_351 =
Some(
crate::xml_deser::deser_structure_crate_model_source_selection_criteria(&mut tag)
?
)
;
builder = builder.set_source_selection_criteria(var_351);
}
,
s if s.matches("ExistingObjectReplication") /* ExistingObjectReplication com.amazonaws.s3#ReplicationRule$ExistingObjectReplication */ => {
let var_352 =
Some(
crate::xml_deser::deser_structure_crate_model_existing_object_replication(&mut tag)
?
)
;
builder = builder.set_existing_object_replication(var_352);
}
,
s if s.matches("Destination") /* Destination com.amazonaws.s3#ReplicationRule$Destination */ => {
let var_353 =
Some(
crate::xml_deser::deser_structure_crate_model_destination(&mut tag)
?
)
;
builder = builder.set_destination(var_353);
}
,
s if s.matches("DeleteMarkerReplication") /* DeleteMarkerReplication com.amazonaws.s3#ReplicationRule$DeleteMarkerReplication */ => {
let var_354 =
Some(
crate::xml_deser::deser_structure_crate_model_delete_marker_replication(&mut tag)
?
)
;
builder = builder.set_delete_marker_replication(var_354);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for ReplicationRule
impl Clone for ReplicationRule
source§fn clone(&self) -> ReplicationRule
fn clone(&self) -> ReplicationRule
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more