Class DashboardProps
Properties for defining a CloudWatch Dashboard.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DashboardProps : Object, IDashboardProps
Syntax (vb)
Public Class DashboardProps
Inherits Object
Implements IDashboardProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.CloudWatch;
var dashboard = new Dashboard(this, "Dash", new DashboardProps {
DefaultInterval = Duration.Days(7),
Variables = new [] { new DashboardVariable(new DashboardVariableOptions {
Id = "region2",
Type = VariableType.PATTERN,
Label = "RegionPattern",
InputType = VariableInputType.INPUT,
Value = "us-east-1",
DefaultValue = DefaultValue.Value("us-east-1"),
Visible = true
}) }
});
Synopsis
Constructors
DashboardProps() |
Properties
DashboardName | Name of the dashboard. |
DefaultInterval | Interval duration for metrics. You can specify defaultInterval with the relative time(eg. cdk.Duration.days(7)). |
End | The end of the time range to use for each widget on the dashboard when the dashboard loads. |
PeriodOverride | Use this field to specify the period for the graphs when the dashboard loads. |
Start | The start of the time range to use for each widget on the dashboard. |
Variables | A list of dashboard variables. |
Widgets | Initial set of widgets on the dashboard. |
Constructors
DashboardProps()
public DashboardProps()
Properties
DashboardName
Name of the dashboard.
public string DashboardName { get; set; }
Property Value
System.String
Remarks
If set, must only contain alphanumerics, dash (-) and underscore (_)
Default: - automatically generated name
DefaultInterval
Interval duration for metrics. You can specify defaultInterval with the relative time(eg. cdk.Duration.days(7)).
public Duration DefaultInterval { get; set; }
Property Value
Remarks
Both properties defaultInterval
and start
cannot be set at once.
Default: When the dashboard loads, the defaultInterval time will be the default time range.
End
The end of the time range to use for each widget on the dashboard when the dashboard loads.
public string End { get; set; }
Property Value
System.String
Remarks
If you specify a value for end, you must also specify a value for start. Specify an absolute time in the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
Default: When the dashboard loads, the end date will be the current time.
PeriodOverride
Use this field to specify the period for the graphs when the dashboard loads.
public Nullable<PeriodOverride> PeriodOverride { get; set; }
Property Value
System.Nullable<PeriodOverride>
Remarks
Specifying Auto
causes the period of all graphs on the dashboard to automatically adapt to the time range of the dashboard.
Specifying Inherit
ensures that the period set for each graph is always obeyed.
Default: Auto
Start
The start of the time range to use for each widget on the dashboard.
public string Start { get; set; }
Property Value
System.String
Remarks
You can specify start without specifying end to specify a relative time range that ends with the current time. In this case, the value of start must begin with -P, and you can use M, H, D, W and M as abbreviations for minutes, hours, days, weeks and months. For example, -PT8H shows the last 8 hours and -P3M shows the last three months. You can also use start along with an end field, to specify an absolute time range. When specifying an absolute time range, use the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
Both properties defaultInterval
and start
cannot be set at once.
Default: When the dashboard loads, the start time will be the default time range.
Variables
A list of dashboard variables.
public IVariable[] Variables { get; set; }
Property Value
Remarks
Widgets
Initial set of widgets on the dashboard.
public IWidget[][] Widgets { get; set; }
Property Value
IWidget[][]
Remarks
One array represents a row of widgets.
Default: - No widgets