OrProperty Struct
This resource contains the Or logical operator, which allows multiple filter conditions to be joined for more complex comparisons of Storage Lens group data.
Objects can match any of the listed filter conditions that are joined by the Or logical operator. Only one of each filter condition is allowed.
| 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 orProperty: s3.CfnStorageLensGroup.OrProperty = {
matchAnyPrefix: ['matchAnyPrefix'],
matchAnySuffix: ['matchAnySuffix'],
matchAnyTag: [{
key: 'key',
value: 'value',
}],
matchObjectAge: {
daysGreaterThan: 123,
daysLessThan: 123,
},
matchObjectSize: {
bytesGreaterThan: 123,
bytesLessThan: 123,
},
};
python
from aws_cdk import CfnTag
# 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
or_property = s3.CfnStorageLensGroup.OrProperty(
match_any_prefix=["matchAnyPrefix"],
match_any_suffix=["matchAnySuffix"],
match_any_tag=[CfnTag(
key="key",
value="value"
)],
match_object_age=s3.CfnStorageLensGroup.MatchObjectAgeProperty(
days_greater_than=123,
days_less_than=123
),
match_object_size=s3.CfnStorageLensGroup.MatchObjectSizeProperty(
bytes_greater_than=123,
bytes_less_than=123
)
)
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.*;
OrProperty orProperty = OrProperty.builder()
.matchAnyPrefix(List.of("matchAnyPrefix"))
.matchAnySuffix(List.of("matchAnySuffix"))
.matchAnyTag(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.matchObjectAge(MatchObjectAgeProperty.builder()
.daysGreaterThan(123)
.daysLessThan(123)
.build())
.matchObjectSize(MatchObjectSizeProperty.builder()
.bytesGreaterThan(123)
.bytesLessThan(123)
.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 orProperty = new OrProperty {
MatchAnyPrefix = new [] { "matchAnyPrefix" },
MatchAnySuffix = new [] { "matchAnySuffix" },
MatchAnyTag = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
MatchObjectAge = new MatchObjectAgeProperty {
DaysGreaterThan = 123,
DaysLessThan = 123
},
MatchObjectSize = new MatchObjectSizeProperty {
BytesGreaterThan = 123,
BytesLessThan = 123
}
};
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"
orProperty := &OrProperty{
MatchAnyPrefix: []*string{
jsii.String("matchAnyPrefix"),
},
MatchAnySuffix: []*string{
jsii.String("matchAnySuffix"),
},
MatchAnyTag: []interface{}{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
MatchObjectAge: &MatchObjectAgeProperty{
DaysGreaterThan: jsii.Number(123),
DaysLessThan: jsii.Number(123),
},
MatchObjectSize: &MatchObjectSizeProperty{
BytesGreaterThan: jsii.Number(123),
BytesLessThan: jsii.Number(123),
},
}
Properties
matchAnyPrefixoptionalstring[]match_any_prefixoptionaltyping.List[str]matchAnyPrefixoptionalList<String>MatchAnyPrefixoptionalstring[]MatchAnyPrefixoptional*[]*string #This property contains a list of prefixes.
At least one prefix must be specified. Up to 10 prefixes are allowed.
matchAnySuffixoptionalstring[]match_any_suffixoptionaltyping.List[str]matchAnySuffixoptionalList<String>MatchAnySuffixoptionalstring[]MatchAnySuffixoptional*[]*string #This property contains the list of suffixes.
At least one suffix must be specified. Up to 10 suffixes are allowed.
matchAnyTagoptionalIResolvable | IResolvable | CfnTag[]match_any_tagoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, CfnTag]]]matchAnyTagoptionalIResolvableMatchAnyTagoptionalIResolvableMatchAnyTagoptionalinterface{} #This property contains the list of S3 object tags.
At least one object tag must be specified. Up to 10 object tags are allowed.
matchObjectAgeoptionalIResolvable | CfnStorageLensGroup.match_object_ageoptionaltyping.Union[IResolvable, MatchObjectAgeProperty]matchObjectAgeoptionalIResolvableMatchObjectAgeoptionalIResolvableMatchObjectAgeoptionalinterface{} #This property filters objects that match the specified object age range.
matchObjectSizeoptionalIResolvable | CfnStorageLensGroup.match_object_sizeoptionaltyping.Union[IResolvable, MatchObjectSizeProperty]matchObjectSizeoptionalIResolvableMatchObjectSizeoptionalIResolvableMatchObjectSizeoptionalinterface{} #This property contains the `BytesGreaterThan` and `BytesLessThan` values to define the object size range (minimum and maximum number of Bytes).