Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eoinsha/cloudwatch-dashboard-types
TypeScript definitions for AWS CloudWatch Dashboards
https://github.com/eoinsha/cloudwatch-dashboard-types
alarms aws cloudwatch dashboard graphs json logs metrics widgets
Last synced: 15 days ago
JSON representation
TypeScript definitions for AWS CloudWatch Dashboards
- Host: GitHub
- URL: https://github.com/eoinsha/cloudwatch-dashboard-types
- Owner: eoinsha
- License: mit
- Created: 2023-11-06T19:06:45.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-13T11:25:27.000Z (about 1 year ago)
- Last Synced: 2024-12-17T01:45:06.562Z (22 days ago)
- Topics: alarms, aws, cloudwatch, dashboard, graphs, json, logs, metrics, widgets
- Language: TypeScript
- Homepage:
- Size: 99.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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`:
```bash
npm install cloudwatch-dashboard-types --save-dev
```## Usage
```typescript
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:
```bash
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.