Interface IBetweenCondition
Between condition for a numeric attribute.
Namespace: Amazon.CDK.AWS.SNS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IBetweenCondition
Syntax (vb)
Public Interface IBetweenCondition
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Lambda;
Function fn;
var myTopic = new Topic(this, "MyTopic");
// Lambda should receive only message matching the following conditions on attributes:
// color: 'red' or 'orange' or begins with 'bl'
// size: anything but 'small' or 'medium'
// price: between 100 and 200 or greater than 300
// store: attribute must be present
myTopic.AddSubscription(new LambdaSubscription(fn, new LambdaSubscriptionProps {
FilterPolicy = new Dictionary<string, SubscriptionFilter> {
{ "color", SubscriptionFilter.StringFilter(new StringConditions {
Allowlist = new [] { "red", "orange" },
MatchPrefixes = new [] { "bl" },
MatchSuffixes = new [] { "ue" }
}) },
{ "size", SubscriptionFilter.StringFilter(new StringConditions {
Denylist = new [] { "small", "medium" }
}) },
{ "price", SubscriptionFilter.NumericFilter(new NumericConditions {
Between = new BetweenCondition { Start = 100, Stop = 200 },
GreaterThan = 300
}) },
{ "store", SubscriptionFilter.ExistsFilter() }
}
}));
Synopsis
Properties
Start | The start value. |
Stop | The stop value. |
Properties
Start
The start value.
double Start { get; }
Property Value
System.Double
Stop
The stop value.
double Stop { get; }
Property Value
System.Double