class TableThreshold
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CloudWatch.TableThreshold |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#TableThreshold |
Java | software.amazon.awscdk.services.cloudwatch.TableThreshold |
Python | aws_cdk.aws_cloudwatch.TableThreshold |
TypeScript (source) | aws-cdk-lib » aws_cloudwatch » TableThreshold |
Thresholds for highlighting cells in TableWidget.
Example
declare const dashboard: cloudwatch.Dashboard;
dashboard.addWidgets(new cloudwatch.TableWidget({
// ...
thresholds: [
cloudwatch.TableThreshold.above(1000, cloudwatch.Color.RED),
cloudwatch.TableThreshold.between(500, 1000, cloudwatch.Color.ORANGE),
cloudwatch.TableThreshold.below(500, cloudwatch.Color.GREEN),
],
}));
Methods
Name | Description |
---|---|
to | |
static above(value, color?) | A threshold for highlighting and coloring cells above the specified value. |
static below(value, color?) | A threshold for highlighting and coloring cells below the specified value. |
static between(lowerBound, upperBound, color?) | A threshold for highlighting and coloring cells within the specified values. |
Json()
topublic toJson(): any
Returns
any
static above(value, color?)
public static above(value: number, color?: string): TableThreshold
Parameters
- value
number
— lower bound of threshold range. - color
string
— cell color for values within threshold range.
Returns
A threshold for highlighting and coloring cells above the specified value.
static below(value, color?)
public static below(value: number, color?: string): TableThreshold
Parameters
- value
number
— upper bound of threshold range. - color
string
— cell color for values within threshold range.
Returns
A threshold for highlighting and coloring cells below the specified value.
static between(lowerBound, upperBound, color?)
public static between(lowerBound: number, upperBound: number, color?: string): TableThreshold
Parameters
- lowerBound
number
— lower bound of threshold range. - upperBound
number
— upper bound of threshold range. - color
string
— cell color for values within threshold range.
Returns
A threshold for highlighting and coloring cells within the specified values.