Class NumericConditions
Conditions that can be applied to numeric attributes.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.SNS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class NumericConditions : Object, INumericConditions
Syntax (vb)
Public Class NumericConditions
Inherits Object
Implements INumericConditions
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
Constructors
NumericConditions() |
Properties
Allowlist | Match one or more values. |
Between | Match values that are between the specified values. |
BetweenStrict | Match values that are strictly between the specified values. |
GreaterThan | Match values that are greater than the specified value. |
GreaterThanOrEqualTo | Match values that are greater than or equal to the specified value. |
LessThan | Match values that are less than the specified value. |
LessThanOrEqualTo | Match values that are less than or equal to the specified value. |
Constructors
NumericConditions()
public NumericConditions()
Properties
Allowlist
Match one or more values.
public double[] Allowlist { get; set; }
Property Value
System.Double[]
Remarks
Default: - None
Between
Match values that are between the specified values.
public IBetweenCondition Between { get; set; }
Property Value
Remarks
Default: - None
BetweenStrict
Match values that are strictly between the specified values.
public IBetweenCondition BetweenStrict { get; set; }
Property Value
Remarks
Default: - None
GreaterThan
Match values that are greater than the specified value.
public Nullable<double> GreaterThan { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: - None
GreaterThanOrEqualTo
Match values that are greater than or equal to the specified value.
public Nullable<double> GreaterThanOrEqualTo { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: - None
LessThan
Match values that are less than the specified value.
public Nullable<double> LessThan { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: - None
LessThanOrEqualTo
Match values that are less than or equal to the specified value.
public Nullable<double> LessThanOrEqualTo { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: - None