# API Reference
**Classes**
Name|Description
----|-----------
[WatchApiGateway](#cdk-watchful-watchapigateway)|*No description*
[WatchDynamoTable](#cdk-watchful-watchdynamotable)|*No description*
[WatchEcsService](#cdk-watchful-watchecsservice)|*No description*
[WatchLambdaFunction](#cdk-watchful-watchlambdafunction)|*No description*
[WatchRdsAurora](#cdk-watchful-watchrdsaurora)|*No description*
[WatchStateMachine](#cdk-watchful-watchstatemachine)|*No description*
[Watchful](#cdk-watchful-watchful)|*No description*
[WatchfulAspect](#cdk-watchful-watchfulaspect)|A CDK aspect that can automatically watch all resources within a scope.
**Structs**
Name|Description
----|-----------
[QuickLink](#cdk-watchful-quicklink)|*No description*
[SectionOptions](#cdk-watchful-sectionoptions)|*No description*
[WatchApiGatewayOptions](#cdk-watchful-watchapigatewayoptions)|*No description*
[WatchApiGatewayProps](#cdk-watchful-watchapigatewayprops)|*No description*
[WatchDynamoTableOptions](#cdk-watchful-watchdynamotableoptions)|*No description*
[WatchDynamoTableProps](#cdk-watchful-watchdynamotableprops)|*No description*
[WatchEcsServiceOptions](#cdk-watchful-watchecsserviceoptions)|*No description*
[WatchEcsServiceProps](#cdk-watchful-watchecsserviceprops)|*No description*
[WatchLambdaFunctionOptions](#cdk-watchful-watchlambdafunctionoptions)|*No description*
[WatchLambdaFunctionProps](#cdk-watchful-watchlambdafunctionprops)|*No description*
[WatchRdsAuroraOptions](#cdk-watchful-watchrdsauroraoptions)|*No description*
[WatchRdsAuroraProps](#cdk-watchful-watchrdsauroraprops)|*No description*
[WatchStateMachineOptions](#cdk-watchful-watchstatemachineoptions)|*No description*
[WatchStateMachineProps](#cdk-watchful-watchstatemachineprops)|*No description*
[WatchedOperation](#cdk-watchful-watchedoperation)|An operation (path and method) worth monitoring.
[WatchfulAspectProps](#cdk-watchful-watchfulaspectprops)|*No description*
[WatchfulProps](#cdk-watchful-watchfulprops)|*No description*
**Interfaces**
Name|Description
----|-----------
[IWatchful](#cdk-watchful-iwatchful)|*No description*
## class WatchApiGateway 🔹
__Implements__: [IConstruct](#constructs-iconstruct), [IDependable](#constructs-idependable)
__Extends__: [Construct](#constructs-construct)
### Initializer
```ts
new WatchApiGateway(scope: Construct, id: string, props: WatchApiGatewayProps)
```
* **scope** ([Construct](#constructs-construct)
) *No description*
* **id** (string
) *No description*
* **props** ([WatchApiGatewayProps](#cdk-watchful-watchapigatewayprops)
) *No description*
* **cacheGraph** (boolean
) Include a dashboard graph for caching metrics. __*Default*__: false
* **serverErrorThreshold** (number
) Alarm when 5XX errors reach this threshold over 5 minutes. __*Default*__: 1 any 5xx HTTP response will trigger the alarm
* **watchedOperations** (Array<[WatchedOperation](#cdk-watchful-watchedoperation)>
) A list of operations to monitor separately. __*Default*__: only API-level monitoring is added.
* **restApi** ([aws_apigateway.RestApi](#aws-cdk-lib-aws-apigateway-restapi)
) The API Gateway REST API that is being watched.
* **title** (string
) The title of this section.
* **watchful** ([IWatchful](#cdk-watchful-iwatchful)
) The Watchful instance to add widgets into.
## class WatchDynamoTable 🔹
__Implements__: [IConstruct](#constructs-iconstruct), [IDependable](#constructs-idependable)
__Extends__: [Construct](#constructs-construct)
### Initializer
```ts
new WatchDynamoTable(scope: Construct, id: string, props: WatchDynamoTableProps)
```
* **scope** ([Construct](#constructs-construct)
) *No description*
* **id** (string
) *No description*
* **props** ([WatchDynamoTableProps](#cdk-watchful-watchdynamotableprops)
) *No description*
* **readCapacityThresholdPercent** (number
) Threshold for read capacity alarm (percentage). __*Default*__: 80
* **writeCapacityThresholdPercent** (number
) Threshold for read capacity alarm (percentage). __*Default*__: 80
* **table** ([aws_dynamodb.Table](#aws-cdk-lib-aws-dynamodb-table)
) *No description*
* **title** (string
) *No description*
* **watchful** ([IWatchful](#cdk-watchful-iwatchful)
) *No description*
## class WatchEcsService 🔹
__Implements__: [IConstruct](#constructs-iconstruct), [IDependable](#constructs-idependable)
__Extends__: [Construct](#constructs-construct)
### Initializer
```ts
new WatchEcsService(scope: Construct, id: string, props: WatchEcsServiceProps)
```
* **scope** ([Construct](#constructs-construct)
) *No description*
* **id** (string
) *No description*
* **props** ([WatchEcsServiceProps](#cdk-watchful-watchecsserviceprops)
) *No description*
* **cpuMaximumThresholdPercent** (number
) Threshold for the Cpu Maximum utilization. __*Default*__: 80
* **memoryMaximumThresholdPercent** (number
) Threshold for the Memory Maximum utilization. __*Default*__: 0.
* **requestsErrorRateThreshold** (number
) Threshold for the Number of Request Errors. __*Default*__: 0.
* **requestsThreshold** (number
) Threshold for the Number of Requests. __*Default*__: 0.
* **targetResponseTimeThreshold** (number
) Threshold for the Target Response Time. __*Default*__: 0.
* **targetGroup** ([aws_elasticloadbalancingv2.ApplicationTargetGroup](#aws-cdk-lib-aws-elasticloadbalancingv2-applicationtargetgroup)
) *No description*
* **title** (string
) *No description*
* **watchful** ([IWatchful](#cdk-watchful-iwatchful)
) *No description*
* **ec2Service** ([aws_ecs.Ec2Service](#aws-cdk-lib-aws-ecs-ec2service)
) *No description* __*Optional*__
* **fargateService** ([aws_ecs.FargateService](#aws-cdk-lib-aws-ecs-fargateservice)
) *No description* __*Optional*__
## class WatchLambdaFunction 🔹
__Implements__: [IConstruct](#constructs-iconstruct), [IDependable](#constructs-idependable)
__Extends__: [Construct](#constructs-construct)
### Initializer
```ts
new WatchLambdaFunction(scope: Construct, id: string, props: WatchLambdaFunctionProps)
```
* **scope** ([Construct](#constructs-construct)
) *No description*
* **id** (string
) *No description*
* **props** ([WatchLambdaFunctionProps](#cdk-watchful-watchlambdafunctionprops)
) *No description*
* **durationThresholdPercent** (number
) Threshold for the duration alarm as percentage of the function's timeout value. __*Default*__: 80
* **errorsPerMinuteThreshold** (number
) Number of allowed errors per minute. __*Default*__: 0
* **throttlesPerMinuteThreshold** (number
) Number of allowed throttles per minute. __*Default*__: 0
* **fn** ([aws_lambda.Function](#aws-cdk-lib-aws-lambda-function)
) *No description*
* **title** (string
) *No description*
* **watchful** ([IWatchful](#cdk-watchful-iwatchful)
) *No description*
## class WatchRdsAurora 🔹
__Implements__: [IConstruct](#constructs-iconstruct), [IDependable](#constructs-idependable)
__Extends__: [Construct](#constructs-construct)
### Initializer
```ts
new WatchRdsAurora(scope: Construct, id: string, props: WatchRdsAuroraProps)
```
* **scope** ([Construct](#constructs-construct)
) *No description*
* **id** (string
) *No description*
* **props** ([WatchRdsAuroraProps](#cdk-watchful-watchrdsauroraprops)
) *No description*
* **cpuMaximumThresholdPercent** (number
) Threshold for the Cpu Maximum utilization. __*Default*__: 80
* **dbBufferCacheMinimumThreshold** (number
) Threshold for the Minimum Db Buffer Cache. __*Default*__: 0.
* **dbConnectionsMaximumThreshold** (number
) Threshold for the Maximum Db Connections. __*Default*__: 0.
* **dbReplicaLagMaximumThreshold** (number
) Threshold for the Maximum Db ReplicaLag. __*Default*__: 0.
* **dbThroughputMaximumThreshold** (number
) Threshold for the Maximum Db Throughput. __*Default*__: 0.
* **cluster** ([aws_rds.DatabaseCluster](#aws-cdk-lib-aws-rds-databasecluster)
) *No description*
* **title** (string
) *No description*
* **watchful** ([IWatchful](#cdk-watchful-iwatchful)
) *No description*
## class WatchStateMachine 🔹
__Implements__: [IConstruct](#constructs-iconstruct), [IDependable](#constructs-idependable)
__Extends__: [Construct](#constructs-construct)
### Initializer
```ts
new WatchStateMachine(scope: Construct, id: string, props: WatchStateMachineProps)
```
* **scope** ([Construct](#constructs-construct)
) *No description*
* **id** (string
) *No description*
* **props** ([WatchStateMachineProps](#cdk-watchful-watchstatemachineprops)
) *No description*
* **metricFailedThreshold** (number
) Alarm when execution failures reach this threshold over 1 minute. __*Default*__: 1 any execution failure will trigger the alarm
* **stateMachine** ([aws_stepfunctions.StateMachine](#aws-cdk-lib-aws-stepfunctions-statemachine)
) *No description*
* **title** (string
) *No description*
* **watchful** ([IWatchful](#cdk-watchful-iwatchful)
) *No description*
## class Watchful 🔹
__Implements__: [IConstruct](#constructs-iconstruct), [IDependable](#constructs-idependable), [IWatchful](#cdk-watchful-iwatchful)
__Extends__: [Construct](#constructs-construct)
### Initializer
```ts
new Watchful(scope: Construct, id: string, props?: WatchfulProps)
```
* **scope** ([Construct](#constructs-construct)
) *No description*
* **id** (string
) *No description*
* **props** ([WatchfulProps](#cdk-watchful-watchfulprops)
) *No description*
* **alarmActionArns** (Array
) ARNs of actions to perform when alarms go off. __*Default*__: [] You can use `alarmActions` instead as a strongly-typed alternative.
* **alarmActions** (Array<[aws_cloudwatch.IAlarmAction](#aws-cdk-lib-aws-cloudwatch-ialarmaction)>
) CloudWatch alarm actions to perform when alarms go off. __*Optional*__
* **alarmEmail** (string
) Email address to send alarms to. __*Default*__: alarms are not sent to an email recipient.
* **alarmSns** ([aws_sns.ITopic](#aws-cdk-lib-aws-sns-itopic)
) SNS topic to send alarms to. __*Default*__: alarms are not sent to an SNS Topic.
* **alarmSqs** ([aws_sqs.IQueue](#aws-cdk-lib-aws-sqs-iqueue)
) SQS queue to send alarms to. __*Default*__: alarms are not sent to an SQS queue.
* **dashboard** (boolean
) Whether to generate CloudWatch dashboards. __*Default*__: true
* **dashboardName** (string
) The name of the CloudWatch dashboard generated by Watchful. __*Default*__: auto-generated
### Methods
#### addAlarm(alarm)🔹
```ts
addAlarm(alarm: IAlarm): void
```
* **alarm** ([aws_cloudwatch.IAlarm](#aws-cdk-lib-aws-cloudwatch-ialarm)
) *No description*
#### addSection(title, options?)🔹
```ts
addSection(title: string, options?: SectionOptions): void
```
* **title** (string
) *No description*
* **options** ([SectionOptions](#cdk-watchful-sectionoptions)
) *No description*
* **links** (Array<[QuickLink](#cdk-watchful-quicklink)>
) *No description* __*Optional*__
#### addWidgets(...widgets)🔹
```ts
addWidgets(...widgets: IWidget[]): void
```
* **widgets** ([aws_cloudwatch.IWidget](#aws-cdk-lib-aws-cloudwatch-iwidget)
) *No description*
#### watchApiGateway(title, restApi, options?)🔹
```ts
watchApiGateway(title: string, restApi: RestApi, options?: WatchApiGatewayOptions): WatchApiGateway
```
* **title** (string
) *No description*
* **restApi** ([aws_apigateway.RestApi](#aws-cdk-lib-aws-apigateway-restapi)
) *No description*
* **options** ([WatchApiGatewayOptions](#cdk-watchful-watchapigatewayoptions)
) *No description*
* **cacheGraph** (boolean
) Include a dashboard graph for caching metrics. __*Default*__: false
* **serverErrorThreshold** (number
) Alarm when 5XX errors reach this threshold over 5 minutes. __*Default*__: 1 any 5xx HTTP response will trigger the alarm
* **watchedOperations** (Array<[WatchedOperation](#cdk-watchful-watchedoperation)>
) A list of operations to monitor separately. __*Default*__: only API-level monitoring is added.
__Returns__:
* [WatchApiGateway](#cdk-watchful-watchapigateway)
#### watchDynamoTable(title, table, options?)🔹
```ts
watchDynamoTable(title: string, table: Table, options?: WatchDynamoTableOptions): WatchDynamoTable
```
* **title** (string
) *No description*
* **table** ([aws_dynamodb.Table](#aws-cdk-lib-aws-dynamodb-table)
) *No description*
* **options** ([WatchDynamoTableOptions](#cdk-watchful-watchdynamotableoptions)
) *No description*
* **readCapacityThresholdPercent** (number
) Threshold for read capacity alarm (percentage). __*Default*__: 80
* **writeCapacityThresholdPercent** (number
) Threshold for read capacity alarm (percentage). __*Default*__: 80
__Returns__:
* [WatchDynamoTable](#cdk-watchful-watchdynamotable)
#### watchEc2Ecs(title, ec2Service, targetGroup, options?)🔹
```ts
watchEc2Ecs(title: string, ec2Service: Ec2Service, targetGroup: ApplicationTargetGroup, options?: WatchEcsServiceOptions): WatchEcsService
```
* **title** (string
) *No description*
* **ec2Service** ([aws_ecs.Ec2Service](#aws-cdk-lib-aws-ecs-ec2service)
) *No description*
* **targetGroup** ([aws_elasticloadbalancingv2.ApplicationTargetGroup](#aws-cdk-lib-aws-elasticloadbalancingv2-applicationtargetgroup)
) *No description*
* **options** ([WatchEcsServiceOptions](#cdk-watchful-watchecsserviceoptions)
) *No description*
* **cpuMaximumThresholdPercent** (number
) Threshold for the Cpu Maximum utilization. __*Default*__: 80
* **memoryMaximumThresholdPercent** (number
) Threshold for the Memory Maximum utilization. __*Default*__: 0.
* **requestsErrorRateThreshold** (number
) Threshold for the Number of Request Errors. __*Default*__: 0.
* **requestsThreshold** (number
) Threshold for the Number of Requests. __*Default*__: 0.
* **targetResponseTimeThreshold** (number
) Threshold for the Target Response Time. __*Default*__: 0.
__Returns__:
* [WatchEcsService](#cdk-watchful-watchecsservice)
#### watchFargateEcs(title, fargateService, targetGroup, options?)🔹
```ts
watchFargateEcs(title: string, fargateService: FargateService, targetGroup: ApplicationTargetGroup, options?: WatchEcsServiceOptions): WatchEcsService
```
* **title** (string
) *No description*
* **fargateService** ([aws_ecs.FargateService](#aws-cdk-lib-aws-ecs-fargateservice)
) *No description*
* **targetGroup** ([aws_elasticloadbalancingv2.ApplicationTargetGroup](#aws-cdk-lib-aws-elasticloadbalancingv2-applicationtargetgroup)
) *No description*
* **options** ([WatchEcsServiceOptions](#cdk-watchful-watchecsserviceoptions)
) *No description*
* **cpuMaximumThresholdPercent** (number
) Threshold for the Cpu Maximum utilization. __*Default*__: 80
* **memoryMaximumThresholdPercent** (number
) Threshold for the Memory Maximum utilization. __*Default*__: 0.
* **requestsErrorRateThreshold** (number
) Threshold for the Number of Request Errors. __*Default*__: 0.
* **requestsThreshold** (number
) Threshold for the Number of Requests. __*Default*__: 0.
* **targetResponseTimeThreshold** (number
) Threshold for the Target Response Time. __*Default*__: 0.
__Returns__:
* [WatchEcsService](#cdk-watchful-watchecsservice)
#### watchLambdaFunction(title, fn, options?)🔹
```ts
watchLambdaFunction(title: string, fn: Function, options?: WatchLambdaFunctionOptions): WatchLambdaFunction
```
* **title** (string
) *No description*
* **fn** ([aws_lambda.Function](#aws-cdk-lib-aws-lambda-function)
) *No description*
* **options** ([WatchLambdaFunctionOptions](#cdk-watchful-watchlambdafunctionoptions)
) *No description*
* **durationThresholdPercent** (number
) Threshold for the duration alarm as percentage of the function's timeout value. __*Default*__: 80
* **errorsPerMinuteThreshold** (number
) Number of allowed errors per minute. __*Default*__: 0
* **throttlesPerMinuteThreshold** (number
) Number of allowed throttles per minute. __*Default*__: 0
__Returns__:
* [WatchLambdaFunction](#cdk-watchful-watchlambdafunction)
#### watchRdsAuroraCluster(title, cluster, options?)🔹
```ts
watchRdsAuroraCluster(title: string, cluster: DatabaseCluster, options?: WatchRdsAuroraOptions): WatchRdsAurora
```
* **title** (string
) *No description*
* **cluster** ([aws_rds.DatabaseCluster](#aws-cdk-lib-aws-rds-databasecluster)
) *No description*
* **options** ([WatchRdsAuroraOptions](#cdk-watchful-watchrdsauroraoptions)
) *No description*
* **cpuMaximumThresholdPercent** (number
) Threshold for the Cpu Maximum utilization. __*Default*__: 80
* **dbBufferCacheMinimumThreshold** (number
) Threshold for the Minimum Db Buffer Cache. __*Default*__: 0.
* **dbConnectionsMaximumThreshold** (number
) Threshold for the Maximum Db Connections. __*Default*__: 0.
* **dbReplicaLagMaximumThreshold** (number
) Threshold for the Maximum Db ReplicaLag. __*Default*__: 0.
* **dbThroughputMaximumThreshold** (number
) Threshold for the Maximum Db Throughput. __*Default*__: 0.
__Returns__:
* [WatchRdsAurora](#cdk-watchful-watchrdsaurora)
#### watchScope(scope, options?)🔹
```ts
watchScope(scope: Construct, options?: WatchfulAspectProps): void
```
* **scope** ([Construct](#constructs-construct)
) *No description*
* **options** ([WatchfulAspectProps](#cdk-watchful-watchfulaspectprops)
) *No description*
* **apiGateway** (boolean
) Automatically watch API Gateway APIs in the scope. __*Default*__: true
* **dynamodb** (boolean
) Automatically watch all Amazon DynamoDB tables in the scope. __*Default*__: true
* **ec2ecs** (boolean
) Automatically watch ApplicationLoadBalanced EC2 Ecs Services in the scope (using ECS Pattern). __*Default*__: true
* **fargateecs** (boolean
) Automatically watch ApplicationLoadBalanced Fargate Ecs Services in the scope (using ECS Pattern). __*Default*__: true
* **lambda** (boolean
) Automatically watch AWS Lambda functions in the scope. __*Default*__: true
* **rdsaurora** (boolean
) Automatically watch RDS Aurora clusters in the scope. __*Default*__: true
* **stateMachine** (boolean
) Automatically watch AWS state machines in the scope. __*Default*__: true
#### watchStateMachine(title, stateMachine, options?)🔹
```ts
watchStateMachine(title: string, stateMachine: StateMachine, options?: WatchStateMachineOptions): WatchStateMachine
```
* **title** (string
) *No description*
* **stateMachine** ([aws_stepfunctions.StateMachine](#aws-cdk-lib-aws-stepfunctions-statemachine)
) *No description*
* **options** ([WatchStateMachineOptions](#cdk-watchful-watchstatemachineoptions)
) *No description*
* **metricFailedThreshold** (number
) Alarm when execution failures reach this threshold over 1 minute. __*Default*__: 1 any execution failure will trigger the alarm
__Returns__:
* [WatchStateMachine](#cdk-watchful-watchstatemachine)
## class WatchfulAspect 🔹
A CDK aspect that can automatically watch all resources within a scope.
__Implements__: [IAspect](#aws-cdk-lib-iaspect)
### Initializer
Defines a watchful aspect.
```ts
new WatchfulAspect(watchful: Watchful, props?: WatchfulAspectProps)
```
* **watchful** ([Watchful](#cdk-watchful-watchful)
) The watchful to add those resources to.
* **props** ([WatchfulAspectProps](#cdk-watchful-watchfulaspectprops)
) Options.
* **apiGateway** (boolean
) Automatically watch API Gateway APIs in the scope. __*Default*__: true
* **dynamodb** (boolean
) Automatically watch all Amazon DynamoDB tables in the scope. __*Default*__: true
* **ec2ecs** (boolean
) Automatically watch ApplicationLoadBalanced EC2 Ecs Services in the scope (using ECS Pattern). __*Default*__: true
* **fargateecs** (boolean
) Automatically watch ApplicationLoadBalanced Fargate Ecs Services in the scope (using ECS Pattern). __*Default*__: true
* **lambda** (boolean
) Automatically watch AWS Lambda functions in the scope. __*Default*__: true
* **rdsaurora** (boolean
) Automatically watch RDS Aurora clusters in the scope. __*Default*__: true
* **stateMachine** (boolean
) Automatically watch AWS state machines in the scope. __*Default*__: true
### Methods
#### visit(node)🔹
All aspects can visit an IConstruct.
```ts
visit(node: IConstruct): void
```
* **node** ([IConstruct](#constructs-iconstruct)
) *No description*
## interface IWatchful 🔹
__Implemented by__: [Watchful](#cdk-watchful-watchful)
### Methods
#### addAlarm(alarm)🔹
```ts
addAlarm(alarm: IAlarm): void
```
* **alarm** ([aws_cloudwatch.IAlarm](#aws-cdk-lib-aws-cloudwatch-ialarm)
) *No description*
#### addSection(title, options?)🔹
```ts
addSection(title: string, options?: SectionOptions): void
```
* **title** (string
) *No description*
* **options** ([SectionOptions](#cdk-watchful-sectionoptions)
) *No description*
* **links** (Array<[QuickLink](#cdk-watchful-quicklink)>
) *No description* __*Optional*__
#### addWidgets(...widgets)🔹
```ts
addWidgets(...widgets: IWidget[]): void
```
* **widgets** ([aws_cloudwatch.IWidget](#aws-cdk-lib-aws-cloudwatch-iwidget)
) *No description*
## struct QuickLink 🔹
Name | Type | Description
-----|------|-------------
**title**🔹 | string
|
**url**🔹 | string
|
## struct SectionOptions 🔹
Name | Type | Description
-----|------|-------------
**links**?🔹 | Array<[QuickLink](#cdk-watchful-quicklink)>
| __*Optional*__
## struct WatchApiGatewayOptions 🔹
Name | Type | Description
-----|------|-------------
**cacheGraph**?🔹 | boolean
| Include a dashboard graph for caching metrics.
__*Default*__: false
**serverErrorThreshold**?🔹 | number
| Alarm when 5XX errors reach this threshold over 5 minutes.
__*Default*__: 1 any 5xx HTTP response will trigger the alarm
**watchedOperations**?🔹 | Array<[WatchedOperation](#cdk-watchful-watchedoperation)>
| A list of operations to monitor separately.
__*Default*__: only API-level monitoring is added.
## struct WatchApiGatewayProps 🔹
Name | Type | Description
-----|------|-------------
**restApi**🔹 | [aws_apigateway.RestApi](#aws-cdk-lib-aws-apigateway-restapi)
| The API Gateway REST API that is being watched.
**title**🔹 | string
| The title of this section.
**watchful**🔹 | [IWatchful](#cdk-watchful-iwatchful)
| The Watchful instance to add widgets into.
**cacheGraph**?🔹 | boolean
| Include a dashboard graph for caching metrics.
__*Default*__: false
**serverErrorThreshold**?🔹 | number
| Alarm when 5XX errors reach this threshold over 5 minutes.
__*Default*__: 1 any 5xx HTTP response will trigger the alarm
**watchedOperations**?🔹 | Array<[WatchedOperation](#cdk-watchful-watchedoperation)>
| A list of operations to monitor separately.
__*Default*__: only API-level monitoring is added.
## struct WatchDynamoTableOptions 🔹
Name | Type | Description
-----|------|-------------
**readCapacityThresholdPercent**?🔹 | number
| Threshold for read capacity alarm (percentage).
__*Default*__: 80
**writeCapacityThresholdPercent**?🔹 | number
| Threshold for read capacity alarm (percentage).
__*Default*__: 80
## struct WatchDynamoTableProps 🔹
Name | Type | Description
-----|------|-------------
**table**🔹 | [aws_dynamodb.Table](#aws-cdk-lib-aws-dynamodb-table)
|
**title**🔹 | string
|
**watchful**🔹 | [IWatchful](#cdk-watchful-iwatchful)
|
**readCapacityThresholdPercent**?🔹 | number
| Threshold for read capacity alarm (percentage).
__*Default*__: 80
**writeCapacityThresholdPercent**?🔹 | number
| Threshold for read capacity alarm (percentage).
__*Default*__: 80
## struct WatchEcsServiceOptions 🔹
Name | Type | Description
-----|------|-------------
**cpuMaximumThresholdPercent**?🔹 | number
| Threshold for the Cpu Maximum utilization.
__*Default*__: 80
**memoryMaximumThresholdPercent**?🔹 | number
| Threshold for the Memory Maximum utilization.
__*Default*__: 0.
**requestsErrorRateThreshold**?🔹 | number
| Threshold for the Number of Request Errors.
__*Default*__: 0.
**requestsThreshold**?🔹 | number
| Threshold for the Number of Requests.
__*Default*__: 0.
**targetResponseTimeThreshold**?🔹 | number
| Threshold for the Target Response Time.
__*Default*__: 0.
## struct WatchEcsServiceProps 🔹
Name | Type | Description
-----|------|-------------
**targetGroup**🔹 | [aws_elasticloadbalancingv2.ApplicationTargetGroup](#aws-cdk-lib-aws-elasticloadbalancingv2-applicationtargetgroup)
|
**title**🔹 | string
|
**watchful**🔹 | [IWatchful](#cdk-watchful-iwatchful)
|
**cpuMaximumThresholdPercent**?🔹 | number
| Threshold for the Cpu Maximum utilization.
__*Default*__: 80
**ec2Service**?🔹 | [aws_ecs.Ec2Service](#aws-cdk-lib-aws-ecs-ec2service)
| __*Optional*__
**fargateService**?🔹 | [aws_ecs.FargateService](#aws-cdk-lib-aws-ecs-fargateservice)
| __*Optional*__
**memoryMaximumThresholdPercent**?🔹 | number
| Threshold for the Memory Maximum utilization.
__*Default*__: 0.
**requestsErrorRateThreshold**?🔹 | number
| Threshold for the Number of Request Errors.
__*Default*__: 0.
**requestsThreshold**?🔹 | number
| Threshold for the Number of Requests.
__*Default*__: 0.
**targetResponseTimeThreshold**?🔹 | number
| Threshold for the Target Response Time.
__*Default*__: 0.
## struct WatchLambdaFunctionOptions 🔹
Name | Type | Description
-----|------|-------------
**durationThresholdPercent**?🔹 | number
| Threshold for the duration alarm as percentage of the function's timeout value.
__*Default*__: 80
**errorsPerMinuteThreshold**?🔹 | number
| Number of allowed errors per minute.
__*Default*__: 0
**throttlesPerMinuteThreshold**?🔹 | number
| Number of allowed throttles per minute.
__*Default*__: 0
## struct WatchLambdaFunctionProps 🔹
Name | Type | Description
-----|------|-------------
**fn**🔹 | [aws_lambda.Function](#aws-cdk-lib-aws-lambda-function)
|
**title**🔹 | string
|
**watchful**🔹 | [IWatchful](#cdk-watchful-iwatchful)
|
**durationThresholdPercent**?🔹 | number
| Threshold for the duration alarm as percentage of the function's timeout value.
__*Default*__: 80
**errorsPerMinuteThreshold**?🔹 | number
| Number of allowed errors per minute.
__*Default*__: 0
**throttlesPerMinuteThreshold**?🔹 | number
| Number of allowed throttles per minute.
__*Default*__: 0
## struct WatchRdsAuroraOptions 🔹
Name | Type | Description
-----|------|-------------
**cpuMaximumThresholdPercent**?🔹 | number
| Threshold for the Cpu Maximum utilization.
__*Default*__: 80
**dbBufferCacheMinimumThreshold**?🔹 | number
| Threshold for the Minimum Db Buffer Cache.
__*Default*__: 0.
**dbConnectionsMaximumThreshold**?🔹 | number
| Threshold for the Maximum Db Connections.
__*Default*__: 0.
**dbReplicaLagMaximumThreshold**?🔹 | number
| Threshold for the Maximum Db ReplicaLag.
__*Default*__: 0.
**dbThroughputMaximumThreshold**?🔹 | number
| Threshold for the Maximum Db Throughput.
__*Default*__: 0.
## struct WatchRdsAuroraProps 🔹
Name | Type | Description
-----|------|-------------
**cluster**🔹 | [aws_rds.DatabaseCluster](#aws-cdk-lib-aws-rds-databasecluster)
|
**title**🔹 | string
|
**watchful**🔹 | [IWatchful](#cdk-watchful-iwatchful)
|
**cpuMaximumThresholdPercent**?🔹 | number
| Threshold for the Cpu Maximum utilization.
__*Default*__: 80
**dbBufferCacheMinimumThreshold**?🔹 | number
| Threshold for the Minimum Db Buffer Cache.
__*Default*__: 0.
**dbConnectionsMaximumThreshold**?🔹 | number
| Threshold for the Maximum Db Connections.
__*Default*__: 0.
**dbReplicaLagMaximumThreshold**?🔹 | number
| Threshold for the Maximum Db ReplicaLag.
__*Default*__: 0.
**dbThroughputMaximumThreshold**?🔹 | number
| Threshold for the Maximum Db Throughput.
__*Default*__: 0.
## struct WatchStateMachineOptions 🔹
Name | Type | Description
-----|------|-------------
**metricFailedThreshold**?🔹 | number
| Alarm when execution failures reach this threshold over 1 minute.
__*Default*__: 1 any execution failure will trigger the alarm
## struct WatchStateMachineProps 🔹
Name | Type | Description
-----|------|-------------
**stateMachine**🔹 | [aws_stepfunctions.StateMachine](#aws-cdk-lib-aws-stepfunctions-statemachine)
|
**title**🔹 | string
|
**watchful**🔹 | [IWatchful](#cdk-watchful-iwatchful)
|
**metricFailedThreshold**?🔹 | number
| Alarm when execution failures reach this threshold over 1 minute.
__*Default*__: 1 any execution failure will trigger the alarm
## struct WatchedOperation 🔹
An operation (path and method) worth monitoring.
Name | Type | Description
-----|------|-------------
**httpMethod**🔹 | string
| The HTTP method for the operation (GET, POST, ...).
**resourcePath**🔹 | string
| The REST API path for this operation (/, /resource/{id}, ...).
## struct WatchfulAspectProps 🔹
Name | Type | Description
-----|------|-------------
**apiGateway**?🔹 | boolean
| Automatically watch API Gateway APIs in the scope.
__*Default*__: true
**dynamodb**?🔹 | boolean
| Automatically watch all Amazon DynamoDB tables in the scope.
__*Default*__: true
**ec2ecs**?🔹 | boolean
| Automatically watch ApplicationLoadBalanced EC2 Ecs Services in the scope (using ECS Pattern).
__*Default*__: true
**fargateecs**?🔹 | boolean
| Automatically watch ApplicationLoadBalanced Fargate Ecs Services in the scope (using ECS Pattern).
__*Default*__: true
**lambda**?🔹 | boolean
| Automatically watch AWS Lambda functions in the scope.
__*Default*__: true
**rdsaurora**?🔹 | boolean
| Automatically watch RDS Aurora clusters in the scope.
__*Default*__: true
**stateMachine**?🔹 | boolean
| Automatically watch AWS state machines in the scope.
__*Default*__: true
## struct WatchfulProps 🔹
Name | Type | Description
-----|------|-------------
**alarmActionArns**?🔹 | Array
| ARNs of actions to perform when alarms go off.
__*Default*__: [] You can use `alarmActions` instead as a strongly-typed alternative.
**alarmActions**?🔹 | Array<[aws_cloudwatch.IAlarmAction](#aws-cdk-lib-aws-cloudwatch-ialarmaction)>
| CloudWatch alarm actions to perform when alarms go off.
__*Optional*__
**alarmEmail**?🔹 | string
| Email address to send alarms to.
__*Default*__: alarms are not sent to an email recipient.
**alarmSns**?🔹 | [aws_sns.ITopic](#aws-cdk-lib-aws-sns-itopic)
| SNS topic to send alarms to.
__*Default*__: alarms are not sent to an SNS Topic.
**alarmSqs**?🔹 | [aws_sqs.IQueue](#aws-cdk-lib-aws-sqs-iqueue)
| SQS queue to send alarms to.
__*Default*__: alarms are not sent to an SQS queue.
**dashboard**?🔹 | boolean
| Whether to generate CloudWatch dashboards.
__*Default*__: true
**dashboardName**?🔹 | string
| The name of the CloudWatch dashboard generated by Watchful.
__*Default*__: auto-generated