ReplicationRuleFilterProperty Struct
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.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3 as s3 } from 'aws-cdk-lib';
const replicationRuleFilterProperty: s3.CfnBucket.ReplicationRuleFilterProperty = {
and: {
prefix: 'prefix',
tagFilters: [{
key: 'key',
value: 'value',
}],
},
prefix: 'prefix',
tagFilter: {
key: 'key',
value: 'value',
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_s3 as s3
replication_rule_filter_property = s3.CfnBucket.ReplicationRuleFilterProperty(
and=s3.CfnBucket.ReplicationRuleAndOperatorProperty(
prefix="prefix",
tag_filters=[s3.CfnBucket.TagFilterProperty(
key="key",
value="value"
)]
),
prefix="prefix",
tag_filter=s3.CfnBucket.TagFilterProperty(
key="key",
value="value"
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3.*;
ReplicationRuleFilterProperty replicationRuleFilterProperty = ReplicationRuleFilterProperty.builder()
.and(ReplicationRuleAndOperatorProperty.builder()
.prefix("prefix")
.tagFilters(List.of(TagFilterProperty.builder()
.key("key")
.value("value")
.build()))
.build())
.prefix("prefix")
.tagFilter(TagFilterProperty.builder()
.key("key")
.value("value")
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;
var replicationRuleFilterProperty = new ReplicationRuleFilterProperty {
And = new ReplicationRuleAndOperatorProperty {
Prefix = "prefix",
TagFilters = new [] { new TagFilterProperty {
Key = "key",
Value = "value"
} }
},
Prefix = "prefix",
TagFilter = new TagFilterProperty {
Key = "key",
Value = "value"
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
replicationRuleFilterProperty := &ReplicationRuleFilterProperty{
And: &ReplicationRuleAndOperatorProperty{
Prefix: jsii.String("prefix"),
TagFilters: []interface{}{
&TagFilterProperty{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
},
Prefix: jsii.String("prefix"),
TagFilter: &TagFilterProperty{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
}
Properties
andoptionalIResolvable | CfnBucket.andoptionaltyping.Union[IResolvable, ReplicationRuleAndOperatorProperty]andoptionalIResolvableAndoptionalIResolvableAndoptionalinterface{} #A container for specifying rule filters.
notes
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
Prefixand aTagFilter, wrap these filters in anAndtag. - If you specify a filter based on multiple tags, wrap the
TagFilterelements in anAndtag.
prefixoptionalstringprefixoptionalstrprefixoptionalStringPrefixoptionalstringPrefixoptional*string #An object key name prefix that identifies the subset of objects to which the rule applies.
notes
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 .
tagFilteroptionalIResolvable | CfnBucket.TagFilterPropertytag_filteroptionaltyping.Union[IResolvable, TagFilterProperty]tagFilteroptionalIResolvableTagFilteroptionalIResolvableTagFilteroptionalinterface{} #A container for specifying a tag key and value.
The rule applies only to objects that have the tag in their tag set.