Skip to content
v2.278.0

FilterProperty Struct ​

This resource sets the criteria for the Storage Lens group data that is displayed.

For multiple filter conditions, the AND or OR logical operator is used.

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 filterProperty: s3.CfnStorageLensGroup.FilterProperty = {
  and: {
    matchAnyPrefix: ['matchAnyPrefix'],
    matchAnySuffix: ['matchAnySuffix'],
    matchAnyTag: [{
      key: 'key',
      value: 'value',
    }],
    matchObjectAge: {
      daysGreaterThan: 123,
      daysLessThan: 123,
    },
    matchObjectSize: {
      bytesGreaterThan: 123,
      bytesLessThan: 123,
    },
  },
  matchAnyPrefix: ['matchAnyPrefix'],
  matchAnySuffix: ['matchAnySuffix'],
  matchAnyTag: [{
    key: 'key',
    value: 'value',
  }],
  matchObjectAge: {
    daysGreaterThan: 123,
    daysLessThan: 123,
  },
  matchObjectSize: {
    bytesGreaterThan: 123,
    bytesLessThan: 123,
  },
  or: {
    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, CfnTag, 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

filter_property = s3.CfnStorageLensGroup.FilterProperty(
    and=s3.CfnStorageLensGroup.AndProperty(
        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
        )
    ),
    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
    ),
    or=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.*;

FilterProperty filterProperty = FilterProperty.builder()
        .and(AndProperty.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())
        .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())
        .or(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())
        .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 filterProperty = new FilterProperty {
    And = new AndProperty {
        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
        }
    },
    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
    },
    Or = 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"

filterProperty := &FilterProperty{
	And: &AndProperty{
		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),
		},
	},
	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),
	},
	Or: &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 ​

andoptionalIResolvable | CfnStorageLensGroup.AndPropertyandoptionaltyping.Union[IResolvable, AndProperty]andoptionalIResolvableAndoptionalIResolvableAndoptionalinterface{} #
This property contains the `And` logical operator, which allows multiple filter conditions to be joined for more complex comparisons of Storage Lens group data.

Objects must match all of the listed filter conditions that are joined by the And logical operator. Only one of each filter condition is allowed.

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 a 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.MatchObjectAgePropertymatch_object_ageoptionaltyping.Union[IResolvable, MatchObjectAgeProperty]matchObjectAgeoptionalIResolvableMatchObjectAgeoptionalIResolvableMatchObjectAgeoptionalinterface{} #
This property contains `DaysGreaterThan` and `DaysLessThan` to define the object age range (minimum and maximum number of days).
matchObjectSizeoptionalIResolvable | CfnStorageLensGroup.MatchObjectSizePropertymatch_object_sizeoptionaltyping.Union[IResolvable, MatchObjectSizeProperty]matchObjectSizeoptionalIResolvableMatchObjectSizeoptionalIResolvableMatchObjectSizeoptionalinterface{} #
This property contains `BytesGreaterThan` and `BytesLessThan` to define the object size range (minimum and maximum number of Bytes).
oroptionalIResolvable | CfnStorageLensGroup.OrPropertyoroptionaltyping.Union[IResolvable, OrProperty]oroptionalIResolvableOroptionalIResolvableOroptionalinterface{} #
This property contains the `Or` logical operator, which allows multiple filter conditions to be joined.

Objects can match any of the listed filter conditions, which are joined by the Or logical operator. Only one of each filter condition is allowed.