Skip to content

Latest commit

 

History

History
291 lines (178 loc) · 10.5 KB

File metadata and controls

291 lines (178 loc) · 10.5 KB

API Reference

Constructs

Dashboard

An AWS CloudWatch Dashboard.

Example

// create a dashboard for AutoScaling
new Dashboard(this, 'dashboard', {
   autoScalingName: 'my-auto-scaling',
   autoScalingMaxCapacity: 10
});

Initializers

import { Dashboard } from 'halloumi-cloudwatch-dashboard'

new Dashboard(scope: Construct, id: string, props?: HalloumiDashboard)
Name Type Description
scope constructs.Construct the scope into which to import this dashboard.
id string the logical ID of the returned dashboard construct.
props HalloumiDashboard No description.

scopeRequired
  • Type: constructs.Construct

the scope into which to import this dashboard.


idRequired
  • Type: string

the logical ID of the returned dashboard construct.


propsOptional

Methods

Name Description
toString Returns a string representation of this construct.

toString
public toString(): string

Returns a string representation of this construct.

Static Functions

Name Description
isConstruct Checks if x is a construct.

isConstruct
import { Dashboard } from 'halloumi-cloudwatch-dashboard'

Dashboard.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


Structs

HalloumiDashboard

Initializer

import { HalloumiDashboard } from 'halloumi-cloudwatch-dashboard'

const halloumiDashboard: HalloumiDashboard = { ... }

Properties

Name Type Description
dashboardName string Name of the dashboard.
end string The end of the time range to use for each widget on the dashboard when the dashboard loads.
periodOverride aws-cdk-lib.aws_cloudwatch.PeriodOverride Use this field to specify the period for the graphs when the dashboard loads.
start string The start of the time range to use for each widget on the dashboard.
widgets aws-cdk-lib.aws_cloudwatch.IWidget[][] Initial set of widgets on the dashboard.
autoScaling aws-cdk-lib.aws_autoscaling.AutoScalingGroup | aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup | {[ key: string ]: string | number | number[]}[] List of AutoScaling.
elasticache aws-cdk-lib.aws_elasticache.CfnReplicationGroup | {[ key: string ]: string | number}[] List of Elasticache.
loadBalancer aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer | aws-cdk-lib.aws_elasticloadbalancingv2.BaseLoadBalancer | {[ key: string ]: string}[] List of LoadBalancers.
rds aws-cdk-lib.aws_rds.CfnDBCluster[] List of RDS.

dashboardNameOptional
public readonly dashboardName: string;
  • Type: string
  • Default: automatically generated name

Name of the dashboard.

If set, must only contain alphanumerics, dash (-) and underscore (_)


endOptional
public readonly end: string;
  • Type: string
  • Default: When the dashboard loads, the end date will be the current time.

The end of the time range to use for each widget on the dashboard when the dashboard loads.

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.


periodOverrideOptional
public readonly periodOverride: PeriodOverride;
  • Type: aws-cdk-lib.aws_cloudwatch.PeriodOverride
  • Default: Auto

Use this field to specify the period for the graphs when the dashboard loads.

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.


startOptional
public readonly start: string;
  • Type: string
  • Default: When the dashboard loads, the start time will be the default time range.

The start of the time range to use for each widget on the dashboard.

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.


widgetsOptional
public readonly widgets: IWidget[][];
  • Type: aws-cdk-lib.aws_cloudwatch.IWidget[][]
  • Default: No widgets

Initial set of widgets on the dashboard.

One array represents a row of widgets.


autoScalingOptional
public readonly autoScaling: AutoScalingGroup | CfnAutoScalingGroup | {[ key: string ]: string | number | number[]}[];
  • Type: aws-cdk-lib.aws_autoscaling.AutoScalingGroup | aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup | {[ key: string ]: string | number | number[]}[]
  • Default: None

List of AutoScaling.

If set, must only contain a list of AutoScaling or Dictionary "{ 'name': string, 'max_capacity': number }"


elasticacheOptional
public readonly elasticache: CfnReplicationGroup | {[ key: string ]: string | number}[];
  • Type: aws-cdk-lib.aws_elasticache.CfnReplicationGroup | {[ key: string ]: string | number}[]
  • Default: None

List of Elasticache.

If set, must only contain a list of Elasticache or Dictionary "{ 'name': string, 'nodes': number }" with nodes being optional


loadBalancerOptional
public readonly loadBalancer: CfnLoadBalancer | BaseLoadBalancer | {[ key: string ]: string}[];
  • Type: aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer | aws-cdk-lib.aws_elasticloadbalancingv2.BaseLoadBalancer | {[ key: string ]: string}[]
  • Default: None

List of LoadBalancers.

If set, must only contain a list of LoadBalancer or Dictionary "{ 'name': string, 'full_name': string }"


rdsOptional
public readonly rds: CfnDBCluster[];
  • Type: aws-cdk-lib.aws_rds.CfnDBCluster[]
  • Default: None

List of RDS.

If set, must only contain a list of RDS