1.0.1 • Published 5 months ago

cloudwatch-dashboard-types v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

CloudWatch Dashboard Types

TypeScript definitions for AWS CloudWatch Dashboards.

This package provides a set of TypeScript types that make it easier to work with AWS CloudWatch Dashboard JSON.

Features

Complete TypeScript types for CloudWatch Dashboard widgets, including metric widgets, log widgets, text widgets, alarm widgets, and explorer widgets.

  • Enums and type guards for CloudWatch Dashboard properties.
  • Support for CloudWatch Dashboard annotations and variables.

Installation

Use the following command to install cloudwatch-dashboard-types:

npm install cloudwatch-dashboard-types --save-dev

Usage

import { Dashboard, MetricWidgetProperties, Widget } from 'cloudwatch-dashboard-types';

const myDashboard: Dashboard = {
  widgets: [
    {
      type: 'metric',
      x: 0,
      y: 0,
      width: 12,
      height: 6,
      properties: { /* ... */ } as MetricWidgetProperties,
    },
    // Add more widgets...
  ],
};

Testing

A set of sample dashboards and other objects are declared in the modules within tests/. These are taken from various sources and aim to provide validation that the type coverage is accurate.

Linting and testing of all types can be run with:

npm test

Contributing

Contributions are welcome! Please feel free to submit a Pull Request or open an issue if you have feedback or suggestions for improvement.

License

This project is licensed under the MIT License - see the LICENSE file for details.

1.0.1

5 months ago

1.0.1-rc2

6 months ago

1.0.1-rc1

6 months ago

1.0.0-rc1

6 months ago