From 8935e889e6e9efc36f40b568acceac73acc04d43 Mon Sep 17 00:00:00 2001 From: Eugene Cheung Date: Thu, 20 Jun 2024 16:27:17 -0400 Subject: [PATCH] feat: allow specifying regions/accounts at a more granular level --- API.md | 2786 ++++++++++++++++- lib/common/metric/BaseMetricFactory.ts | 26 + lib/common/metric/MetricFactory.ts | 18 +- lib/common/metric/index.ts | 1 + lib/common/monitoring/Monitoring.ts | 4 +- .../CertificateManagerMetricFactory.ts | 14 +- .../aws-apigateway/ApiGatewayMetricFactory.ts | 28 +- .../ApiGatewayV2HttpApiMetricFactory.ts | 8 +- .../aws-appsync/AppSyncMetricFactory.ts | 8 +- .../CloudFrontDistributionMetricFactory.ts | 8 +- .../CloudWatchLogsMetricFactory.ts | 8 +- .../CodeBuildProjectMetricFactory.ts | 8 +- .../aws-docdb/DocumentDbMetricFactory.ts | 8 +- ...oTableGlobalSecondaryIndexMetricFactory.ts | 8 +- .../aws-dynamo/DynamoTableMetricFactory.ts | 8 +- .../aws-ec2/AutoScalingGroupMetricFactory.ts | 8 +- lib/monitoring/aws-ec2/EC2MetricFactory.ts | 8 +- .../BaseServiceMetricFactory.ts | 8 +- .../ElastiCacheClusterMetricFactory.ts | 8 +- .../aws-glue/GlueJobMetricFactory.ts | 8 +- .../KinesisDataStreamMetricFactory.ts | 8 +- .../KinesisFirehoseMetricFactory.ts | 8 +- .../KinesisDataAnalyticsMetricFactory.ts | 8 +- .../aws-lambda/LambdaFunctionMetricFactory.ts | 8 +- .../ApplicationLoadBalancerMetricFactory.ts | 7 +- .../NetworkLoadBalancerMetricFactory.ts | 7 +- .../OpenSearchClusterMetricFactory.ts | 8 +- .../aws-rds/RdsClusterMetricFactory.ts | 8 +- .../aws-rds/RdsInstanceMetricFactory.ts | 8 +- .../RedshiftClusterMetricFactory.ts | 8 +- .../aws-s3/S3BucketMetricFactory.ts | 8 +- .../SecretsManagerSecretMetricFactory.ts | 8 +- .../aws-sns/SnsTopicMetricFactory.ts | 8 +- .../aws-sqs/SqsQueueMetricFactory.ts | 8 +- .../StepFunctionActivityMetricFactory.ts | 8 +- ...pFunctionLambdaIntegrationMetricFactory.ts | 8 +- .../StepFunctionMetricFactory.ts | 8 +- ...FunctionServiceIntegrationMetricFactory.ts | 8 +- .../SyntheticsCanaryMetricFactory.ts | 18 +- .../aws-wafv2/WafV2MetricFactory.ts | 18 +- 40 files changed, 3029 insertions(+), 130 deletions(-) create mode 100644 lib/common/metric/BaseMetricFactory.ts diff --git a/API.md b/API.md index e7f51b17..004b0545 100644 --- a/API.md +++ b/API.md @@ -4524,6 +4524,8 @@ const apiGatewayMetricFactoryProps: ApiGatewayMetricFactoryProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | api | aws-cdk-lib.aws_apigateway.IRestApi | API to monitor. | | apiMethod | string | On undefined value is not set in dimensions. | | apiResource | string | On undefined value is not set in dimensions. | @@ -4533,6 +4535,36 @@ const apiGatewayMetricFactoryProps: ApiGatewayMetricFactoryProps = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `api`Required ```typescript @@ -4616,6 +4648,8 @@ const apiGatewayMonitoringOptions: ApiGatewayMonitoringOptions = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -4653,6 +4687,36 @@ const apiGatewayMonitoringOptions: ApiGatewayMonitoringOptions = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -5044,6 +5108,8 @@ const apiGatewayMonitoringProps: ApiGatewayMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | api | aws-cdk-lib.aws_apigateway.IRestApi | API to monitor. | | apiMethod | string | On undefined value is not set in dimensions. | | apiResource | string | On undefined value is not set in dimensions. | @@ -5087,6 +5153,36 @@ const apiGatewayMonitoringProps: ApiGatewayMonitoringProps = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `api`Required ```typescript @@ -5643,6 +5739,8 @@ const apiGatewayV2HttpApiMonitoringProps: ApiGatewayV2HttpApiMonitoringProps = { | apiStage | string | *No description.* | | fillTpsWithZeroes | boolean | *No description.* | | rateComputationMethod | RateComputationMethod | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -5767,6 +5865,36 @@ public readonly rateComputationMethod: RateComputationMethod; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -6358,6 +6486,8 @@ const apiGatewayV2MonitoringOptions: ApiGatewayV2MonitoringOptions = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -6415,6 +6545,36 @@ const apiGatewayV2MonitoringOptions: ApiGatewayV2MonitoringOptions = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -7125,6 +7285,8 @@ const appSyncMonitoringOptions: AppSyncMonitoringOptions = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -7144,6 +7306,36 @@ const appSyncMonitoringOptions: AppSyncMonitoringOptions = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -7346,6 +7538,8 @@ const appSyncMonitoringProps: AppSyncMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -7368,6 +7562,36 @@ const appSyncMonitoringProps: AppSyncMonitoringProps = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -7608,6 +7832,8 @@ const auroraClusterMonitoringOptions: AuroraClusterMonitoringOptions = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -7622,6 +7848,36 @@ const auroraClusterMonitoringOptions: AuroraClusterMonitoringOptions = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -7776,6 +8032,8 @@ const auroraClusterMonitoringProps: AuroraClusterMonitoringProps = { ... } | --- | --- | --- | | cluster | aws-cdk-lib.aws_rds.IDatabaseCluster \| aws-cdk-lib.aws_rds.ServerlessCluster | database cluster (either this or `clusterIdentifier` need to be specified). | | clusterIdentifier | string | database cluster identifier (either this or `cluster` need to be specified). | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -7816,6 +8074,36 @@ database cluster identifier (either this or `cluster` need to be specified). --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -7996,6 +8284,8 @@ const autoScalingGroupMonitoringOptions: AutoScalingGroupMonitoringOptions = { . | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -8006,6 +8296,36 @@ const autoScalingGroupMonitoringOptions: AutoScalingGroupMonitoringOptions = { . --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -8119,6 +8439,8 @@ const autoScalingGroupMonitoringProps: AutoScalingGroupMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | | autoScalingGroup | aws-cdk-lib.aws_autoscaling.IAutoScalingGroup | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -8139,6 +8461,36 @@ public readonly autoScalingGroup: IAutoScalingGroup; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -8913,6 +9265,55 @@ https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-cl --- +### BaseMetricFactoryProps + +#### Initializer + +```typescript +import { BaseMetricFactoryProps } from 'cdk-monitoring-constructs' + +const baseMetricFactoryProps: BaseMetricFactoryProps = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | + +--- + +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ### BaseMonitoringProps Base class for properties passed to each monitoring construct. @@ -8931,6 +9332,8 @@ const baseMonitoringProps: BaseMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -8941,6 +9344,36 @@ const baseMonitoringProps: BaseMonitoringProps = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -9166,6 +9599,8 @@ const billingMonitoringOptions: BillingMonitoringOptions = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -9177,6 +9612,36 @@ const billingMonitoringOptions: BillingMonitoringOptions = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -9299,6 +9764,8 @@ const billingMonitoringProps: BillingMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -9310,6 +9777,36 @@ const billingMonitoringProps: BillingMonitoringProps = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -9432,10 +9929,42 @@ const certificateManagerMetricFactoryProps: CertificateManagerMetricFactoryProps | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | certificate | aws-cdk-lib.aws_certificatemanager.ICertificate | *No description.* | --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `certificate`Required ```typescript @@ -9460,6 +9989,8 @@ const certificateManagerMonitoringOptions: CertificateManagerMonitoringOptions = | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -9471,6 +10002,36 @@ const certificateManagerMonitoringOptions: CertificateManagerMonitoringOptions = --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -9593,6 +10154,8 @@ const certificateManagerMonitoringProps: CertificateManagerMonitoringProps = { . | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -9605,6 +10168,36 @@ const certificateManagerMonitoringProps: CertificateManagerMonitoringProps = { . --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -10198,6 +10791,8 @@ const cloudFrontDistributionMonitoringOptions: CloudFrontDistributionMonitoringO | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -10208,6 +10803,36 @@ const cloudFrontDistributionMonitoringOptions: CloudFrontDistributionMonitoringO --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -10324,6 +10949,8 @@ const cloudFrontDistributionMonitoringProps: CloudFrontDistributionMonitoringPro | additionalMetricsEnabled | boolean | Generate dashboard charts for additional CloudFront distribution metrics. | | fillTpsWithZeroes | boolean | *No description.* | | rateComputationMethod | RateComputationMethod | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -10386,6 +11013,36 @@ public readonly rateComputationMethod: RateComputationMethod; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -10596,6 +11253,8 @@ const codeBuildProjectMonitoringOptions: CodeBuildProjectMonitoringOptions = { . | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -10611,6 +11270,36 @@ const codeBuildProjectMonitoringOptions: CodeBuildProjectMonitoringOptions = { . --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -10776,6 +11465,8 @@ const codeBuildProjectMonitoringProps: CodeBuildProjectMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | | project | aws-cdk-lib.aws_codebuild.IProject | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -10801,6 +11492,36 @@ public readonly project: IProject; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -11672,6 +12393,8 @@ const customEc2ServiceMonitoringProps: CustomEc2ServiceMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -11696,6 +12419,36 @@ const customEc2ServiceMonitoringProps: CustomEc2ServiceMonitoringProps = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -11965,6 +12718,8 @@ const customFargateServiceMonitoringProps: CustomFargateServiceMonitoringProps = | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -11989,6 +12744,36 @@ const customFargateServiceMonitoringProps: CustomFargateServiceMonitoringProps = --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -12809,6 +13594,8 @@ const customMonitoringProps: CustomMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -12823,6 +13610,36 @@ const customMonitoringProps: CustomMonitoringProps = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -14264,6 +15081,8 @@ const documentDbMonitoringOptions: DocumentDbMonitoringOptions = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -14275,6 +15094,36 @@ const documentDbMonitoringOptions: DocumentDbMonitoringOptions = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -14398,6 +15247,8 @@ const documentDbMonitoringProps: DocumentDbMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | | cluster | aws-cdk-lib.aws_docdb.IDatabaseCluster | database cluster. | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -14421,6 +15272,36 @@ database cluster. --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -15145,6 +16026,8 @@ const dynamoTableGlobalSecondaryIndexMonitoringProps: DynamoTableGlobalSecondary | --- | --- | --- | | globalSecondaryIndexName | string | *No description.* | | table | aws-cdk-lib.aws_dynamodb.ITable | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -15177,6 +16060,36 @@ public readonly table: ITable; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -15353,6 +16266,8 @@ const dynamoTableMonitoringOptions: DynamoTableMonitoringOptions = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -15378,6 +16293,36 @@ const dynamoTableMonitoringOptions: DynamoTableMonitoringOptions = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -15642,6 +16587,8 @@ const dynamoTableMonitoringProps: DynamoTableMonitoringProps = { ... } | --- | --- | --- | | table | aws-cdk-lib.aws_dynamodb.ITable | table to monitor. | | billingMode | aws-cdk-lib.aws_dynamodb.BillingMode | table billing mode. | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -15692,6 +16639,36 @@ table billing mode. --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -15959,6 +16936,8 @@ const ec2ApplicationLoadBalancerMonitoringProps: Ec2ApplicationLoadBalancerMonit | invertStatisticsOfTaskCountEnabled | boolean | Invert the statistics of `HealthyHostCount` and `UnHealthyHostCount`. | | applicationLoadBalancer | aws-cdk-lib.aws_elasticloadbalancingv2.IApplicationLoadBalancer | *No description.* | | applicationTargetGroup | aws-cdk-lib.aws_elasticloadbalancingv2.IApplicationTargetGroup | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -16020,6 +16999,36 @@ public readonly applicationTargetGroup: IApplicationTargetGroup; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -16316,6 +17325,8 @@ const eC2MonitoringOptions: EC2MonitoringOptions = { ... } | --- | --- | --- | | autoScalingGroup | aws-cdk-lib.aws_autoscaling.IAutoScalingGroup | Auto-Scaling Group to monitor. | | instanceIds | string[] | Selected IDs of EC2 instances to monitor. | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -16352,6 +17363,36 @@ Selected IDs of EC2 instances to monitor. --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -16466,6 +17507,8 @@ const eC2MonitoringProps: EC2MonitoringProps = { ... } | --- | --- | --- | | autoScalingGroup | aws-cdk-lib.aws_autoscaling.IAutoScalingGroup | Auto-Scaling Group to monitor. | | instanceIds | string[] | Selected IDs of EC2 instances to monitor. | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -16502,6 +17545,36 @@ Selected IDs of EC2 instances to monitor. --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -16619,6 +17692,8 @@ const ec2NetworkLoadBalancerMonitoringProps: Ec2NetworkLoadBalancerMonitoringPro | invertStatisticsOfTaskCountEnabled | boolean | Invert the statistics of `HealthyHostCount` and `UnHealthyHostCount`. | | networkLoadBalancer | aws-cdk-lib.aws_elasticloadbalancingv2.INetworkLoadBalancer | *No description.* | | networkTargetGroup | aws-cdk-lib.aws_elasticloadbalancingv2.INetworkTargetGroup | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -16680,6 +17755,36 @@ public readonly networkTargetGroup: INetworkTargetGroup; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -16931,6 +18036,8 @@ const ec2ServiceMonitoringProps: Ec2ServiceMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -16953,6 +18060,36 @@ const ec2ServiceMonitoringProps: Ec2ServiceMonitoringProps = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -17233,6 +18370,8 @@ const elastiCacheClusterMonitoringOptions: ElastiCacheClusterMonitoringOptions = | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -17250,6 +18389,36 @@ const elastiCacheClusterMonitoringOptions: ElastiCacheClusterMonitoringOptions = --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -17450,6 +18619,8 @@ const elastiCacheClusterMonitoringProps: ElastiCacheClusterMonitoringProps = { . | **Name** | **Type** | **Description** | | --- | --- | --- | | clusterId | string | Cluster to monitor. | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -17480,6 +18651,36 @@ Cluster to monitor. --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -18402,6 +19603,8 @@ const fargateApplicationLoadBalancerMonitoringProps: FargateApplicationLoadBalan | invertStatisticsOfTaskCountEnabled | boolean | Invert the statistics of `HealthyHostCount` and `UnHealthyHostCount`. | | applicationLoadBalancer | aws-cdk-lib.aws_elasticloadbalancingv2.IApplicationLoadBalancer | *No description.* | | applicationTargetGroup | aws-cdk-lib.aws_elasticloadbalancingv2.IApplicationTargetGroup | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -18463,6 +19666,36 @@ public readonly applicationTargetGroup: IApplicationTargetGroup; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -18717,6 +19950,8 @@ const fargateNetworkLoadBalancerMonitoringProps: FargateNetworkLoadBalancerMonit | invertStatisticsOfTaskCountEnabled | boolean | Invert the statistics of `HealthyHostCount` and `UnHealthyHostCount`. | | networkLoadBalancer | aws-cdk-lib.aws_elasticloadbalancingv2.INetworkLoadBalancer | *No description.* | | networkTargetGroup | aws-cdk-lib.aws_elasticloadbalancingv2.INetworkTargetGroup | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -18778,6 +20013,36 @@ public readonly networkTargetGroup: INetworkTargetGroup; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -19029,6 +20294,8 @@ const fargateServiceMonitoringProps: FargateServiceMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -19051,6 +20318,36 @@ const fargateServiceMonitoringProps: FargateServiceMonitoringProps = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -19693,6 +20990,8 @@ const fluentBitMonitoringProps: FluentBitMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | | namespace | string | Namespace that metrics will be emitted to. | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -19718,6 +21017,36 @@ Namespace that metrics will be emitted to. --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -20258,6 +21587,8 @@ const glueJobMonitoringOptions: GlueJobMonitoringOptions = { ... } | --- | --- | --- | | jobName | string | *No description.* | | rateComputationMethod | RateComputationMethod | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -20293,6 +21624,36 @@ public readonly rateComputationMethod: RateComputationMethod; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -20447,6 +21808,8 @@ const glueJobMonitoringProps: GlueJobMonitoringProps = { ... } | --- | --- | --- | | jobName | string | *No description.* | | rateComputationMethod | RateComputationMethod | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -20482,6 +21845,36 @@ public readonly rateComputationMethod: RateComputationMethod; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -22816,6 +24209,8 @@ const kinesisDataAnalyticsMonitoringOptions: KinesisDataAnalyticsMonitoringOptio | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -22828,6 +24223,36 @@ const kinesisDataAnalyticsMonitoringOptions: KinesisDataAnalyticsMonitoringOptio --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -22961,6 +24386,8 @@ const kinesisDataAnalyticsMonitoringProps: KinesisDataAnalyticsMonitoringProps = | **Name** | **Type** | **Description** | | --- | --- | --- | | application | string | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -22983,6 +24410,36 @@ public readonly application: string; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -23143,6 +24600,8 @@ const kinesisDataStreamMonitoringOptions: KinesisDataStreamMonitoringOptions = { | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -23159,6 +24618,36 @@ const kinesisDataStreamMonitoringOptions: KinesisDataStreamMonitoringOptions = { --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -23332,6 +24821,8 @@ const kinesisDataStreamMonitoringProps: KinesisDataStreamMonitoringProps = { ... | **Name** | **Type** | **Description** | | --- | --- | --- | | streamName | string | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -23358,6 +24849,36 @@ public readonly streamName: string; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -23558,6 +25079,8 @@ const kinesisFirehoseMonitoringOptions: KinesisFirehoseMonitoringOptions = { ... | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -23572,6 +25095,36 @@ const kinesisFirehoseMonitoringOptions: KinesisFirehoseMonitoringOptions = { ... --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -23725,6 +25278,8 @@ const kinesisFirehoseMonitoringProps: KinesisFirehoseMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | | deliveryStreamName | string | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -23749,6 +25304,36 @@ public readonly deliveryStreamName: string; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -23970,6 +25555,8 @@ const lambdaFunctionMonitoringOptions: LambdaFunctionMonitoringOptions = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -24001,6 +25588,36 @@ const lambdaFunctionMonitoringOptions: LambdaFunctionMonitoringOptions = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -24327,6 +25944,8 @@ const lambdaFunctionMonitoringProps: LambdaFunctionMonitoringProps = { ... } | fillTpsWithZeroes | boolean | *No description.* | | lambdaInsightsEnabled | boolean | Generate dashboard charts for Lambda Insights metrics. | | rateComputationMethod | RateComputationMethod | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -24406,6 +26025,36 @@ public readonly rateComputationMethod: RateComputationMethod; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -25448,6 +27097,8 @@ const logMonitoringProps: LogMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -25464,6 +27115,36 @@ const logMonitoringProps: LogMonitoringProps = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -30675,9 +32356,9 @@ const metricFactoryDefaults: MetricFactoryDefaults = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | | account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | namespace | string | Each metric exists in a namespace. | | period | aws-cdk-lib.Duration | Metric period. | -| region | string | Region where the metrics exist. | --- @@ -30696,6 +32377,21 @@ Account where the metrics exist. --- +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `namespace`Optional ```typescript @@ -30725,21 +32421,6 @@ Default value is used if not defined. --- -##### `region`Optional - -```typescript -public readonly region: string; -``` - -- *Type:* string -- *Default:* The region configured by the construct holding the Monitoring construct - -Region where the metrics exist. - -> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) - ---- - ### MetricFactoryProps #### Initializer @@ -34242,6 +35923,8 @@ const networkLoadBalancerMonitoringProps: NetworkLoadBalancerMonitoringProps = { | invertStatisticsOfTaskCountEnabled | boolean | Invert the statistics of `HealthyHostCount` and `UnHealthyHostCount`. | | networkLoadBalancer | aws-cdk-lib.aws_elasticloadbalancingv2.INetworkLoadBalancer | *No description.* | | networkTargetGroup | aws-cdk-lib.aws_elasticloadbalancingv2.INetworkTargetGroup | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -34295,6 +35978,36 @@ public readonly networkTargetGroup: INetworkTargetGroup; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -35576,6 +37289,8 @@ const openSearchClusterMonitoringOptions: OpenSearchClusterMonitoringOptions = { | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -35603,6 +37318,36 @@ const openSearchClusterMonitoringOptions: OpenSearchClusterMonitoringOptions = { --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -35888,6 +37633,8 @@ const openSearchClusterMonitoringProps: OpenSearchClusterMonitoringProps = { ... | domain | aws-cdk-lib.aws_elasticsearch.IDomain \| aws-cdk-lib.aws_elasticsearch.CfnDomain \| aws-cdk-lib.aws_opensearchservice.IDomain \| aws-cdk-lib.aws_opensearchservice.CfnDomain | *No description.* | | fillTpsWithZeroes | boolean | *No description.* | | rateComputationMethod | RateComputationMethod | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -35947,6 +37694,36 @@ public readonly rateComputationMethod: RateComputationMethod; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -37665,6 +39442,8 @@ const queueProcessingEc2ServiceMonitoringProps: QueueProcessingEc2ServiceMonitor | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -37679,6 +39458,36 @@ const queueProcessingEc2ServiceMonitoringProps: QueueProcessingEc2ServiceMonitor --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -37831,6 +39640,8 @@ const queueProcessingFargateServiceMonitoringProps: QueueProcessingFargateServic | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -37845,6 +39656,36 @@ const queueProcessingFargateServiceMonitoringProps: QueueProcessingFargateServic --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -38042,6 +39883,8 @@ const rdsClusterMonitoringOptions: RdsClusterMonitoringOptions = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -38056,6 +39899,36 @@ const rdsClusterMonitoringOptions: RdsClusterMonitoringOptions = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -38210,6 +40083,8 @@ const rdsClusterMonitoringProps: RdsClusterMonitoringProps = { ... } | --- | --- | --- | | cluster | aws-cdk-lib.aws_rds.IDatabaseCluster \| aws-cdk-lib.aws_rds.ServerlessCluster | database cluster (either this or `clusterIdentifier` need to be specified). | | clusterIdentifier | string | database cluster identifier (either this or `cluster` need to be specified). | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -38250,6 +40125,36 @@ database cluster identifier (either this or `cluster` need to be specified). --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -38432,6 +40337,8 @@ const rdsInstanceMonitoringOptions: RdsInstanceMonitoringOptions = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -38446,6 +40353,36 @@ const rdsInstanceMonitoringOptions: RdsInstanceMonitoringOptions = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -38599,6 +40536,8 @@ const rdsInstanceMonitoringProps: RdsInstanceMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | | instance | aws-cdk-lib.aws_rds.IDatabaseInstance | database instance. | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -38625,6 +40564,36 @@ database instance. --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -39523,6 +41492,8 @@ const redshiftClusterMonitoringOptions: RedshiftClusterMonitoringOptions = { ... | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -39538,6 +41509,36 @@ const redshiftClusterMonitoringOptions: RedshiftClusterMonitoringOptions = { ... --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -39701,6 +41702,8 @@ const redshiftClusterMonitoringProps: RedshiftClusterMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | | clusterIdentifier | string | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -39726,6 +41729,36 @@ public readonly clusterIdentifier: string; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -40645,6 +42678,8 @@ const s3BucketMonitoringOptions: S3BucketMonitoringOptions = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -40655,6 +42690,36 @@ const s3BucketMonitoringOptions: S3BucketMonitoringOptions = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -40769,6 +42834,8 @@ const s3BucketMonitoringProps: S3BucketMonitoringProps = { ... } | --- | --- | --- | | bucket | aws-cdk-lib.aws_s3.IBucket | *No description.* | | storageType | StorageType | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -40799,6 +42866,36 @@ public readonly storageType: StorageType; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -40911,6 +43008,8 @@ const secretsManagerMonitoringOptions: SecretsManagerMonitoringOptions = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -40924,6 +43023,36 @@ const secretsManagerMonitoringOptions: SecretsManagerMonitoringOptions = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -41066,6 +43195,8 @@ const secretsManagerMonitoringProps: SecretsManagerMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -41079,6 +43210,36 @@ const secretsManagerMonitoringProps: SecretsManagerMonitoringProps = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -41249,6 +43410,8 @@ const secretsManagerSecretMonitoringOptions: SecretsManagerSecretMonitoringOptio | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -41263,6 +43426,36 @@ const secretsManagerSecretMonitoringOptions: SecretsManagerSecretMonitoringOptio --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -41423,6 +43616,8 @@ const secretsManagerSecretMonitoringProps: SecretsManagerSecretMonitoringProps = | **Name** | **Type** | **Description** | | --- | --- | --- | | secret | aws-cdk-lib.aws_secretsmanager.ISecret | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -41447,6 +43642,36 @@ public readonly secret: ISecret; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -41606,6 +43831,8 @@ const simpleEc2ServiceMonitoringProps: SimpleEc2ServiceMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -41623,6 +43850,36 @@ const simpleEc2ServiceMonitoringProps: SimpleEc2ServiceMonitoringProps = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -41815,6 +44072,8 @@ const simpleFargateServiceMonitoringProps: SimpleFargateServiceMonitoringProps = | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -41832,6 +44091,36 @@ const simpleFargateServiceMonitoringProps: SimpleFargateServiceMonitoringProps = --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -42202,6 +44491,8 @@ const snsTopicMonitoringOptions: SnsTopicMonitoringOptions = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -42215,6 +44506,36 @@ const snsTopicMonitoringOptions: SnsTopicMonitoringOptions = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -42358,6 +44679,8 @@ const snsTopicMonitoringProps: SnsTopicMonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | | topic | aws-cdk-lib.aws_sns.ITopic | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -42381,6 +44704,36 @@ public readonly topic: ITopic; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -42557,6 +44910,8 @@ const sqsQueueMonitoringOptions: SqsQueueMonitoringOptions = { ... } | addQueueMaxTimeToDrainMessagesAlarm | {[ key: string ]: MaxTimeToDrainThreshold} | *No description.* | | addQueueMinIncomingMessagesAlarm | {[ key: string ]: MinIncomingMessagesCountThreshold} | *No description.* | | addQueueMinSizeAlarm | {[ key: string ]: MinMessageCountThreshold} | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -42627,6 +44982,36 @@ public readonly addQueueMinSizeAlarm: {[ key: string ]: MinMessageCountThreshold --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -42746,6 +45131,8 @@ const sqsQueueMonitoringProps: SqsQueueMonitoringProps = { ... } | addQueueMaxTimeToDrainMessagesAlarm | {[ key: string ]: MaxTimeToDrainThreshold} | *No description.* | | addQueueMinIncomingMessagesAlarm | {[ key: string ]: MinIncomingMessagesCountThreshold} | *No description.* | | addQueueMinSizeAlarm | {[ key: string ]: MinMessageCountThreshold} | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -42826,6 +45213,36 @@ public readonly addQueueMinSizeAlarm: {[ key: string ]: MinMessageCountThreshold --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -42945,6 +45362,8 @@ const sqsQueueMonitoringWithDlqProps: SqsQueueMonitoringWithDlqProps = { ... } | addQueueMaxTimeToDrainMessagesAlarm | {[ key: string ]: MaxTimeToDrainThreshold} | *No description.* | | addQueueMinIncomingMessagesAlarm | {[ key: string ]: MinIncomingMessagesCountThreshold} | *No description.* | | addQueueMinSizeAlarm | {[ key: string ]: MinMessageCountThreshold} | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -43030,6 +45449,36 @@ public readonly addQueueMinSizeAlarm: {[ key: string ]: MinMessageCountThreshold --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -43244,6 +45693,8 @@ const stepFunctionActivityMonitoringProps: StepFunctionActivityMonitoringProps = | --- | --- | --- | | activity | aws-cdk-lib.aws_stepfunctions.IActivity | *No description.* | | rateComputationMethod | RateComputationMethod | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -43281,6 +45732,36 @@ public readonly rateComputationMethod: RateComputationMethod; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -43495,6 +45976,8 @@ const stepFunctionLambdaIntegrationMonitoringProps: StepFunctionLambdaIntegratio | --- | --- | --- | | lambdaFunction | aws-cdk-lib.aws_lambda.IFunction | *No description.* | | rateComputationMethod | RateComputationMethod | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -43532,6 +46015,36 @@ public readonly rateComputationMethod: RateComputationMethod; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -43744,6 +46257,8 @@ const stepFunctionMonitoringOptions: StepFunctionMonitoringOptions = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -43763,6 +46278,36 @@ const stepFunctionMonitoringOptions: StepFunctionMonitoringOptions = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -43969,6 +46514,8 @@ const stepFunctionMonitoringProps: StepFunctionMonitoringProps = { ... } | --- | --- | --- | | stateMachine | aws-cdk-lib.aws_stepfunctions.IStateMachine | *No description.* | | rateComputationMethod | RateComputationMethod | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -44009,6 +46556,36 @@ public readonly rateComputationMethod: RateComputationMethod; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -44255,6 +46832,8 @@ const stepFunctionServiceIntegrationMonitoringProps: StepFunctionServiceIntegrat | --- | --- | --- | | serviceIntegrationResourceArn | string | *No description.* | | rateComputationMethod | RateComputationMethod | *No description.* | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -44292,6 +46871,36 @@ public readonly rateComputationMethod: RateComputationMethod; --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -44508,6 +47117,8 @@ const syntheticsCanaryMonitoringOptions: SyntheticsCanaryMonitoringOptions = { . | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -44523,6 +47134,36 @@ const syntheticsCanaryMonitoringOptions: SyntheticsCanaryMonitoringOptions = { . --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -44687,6 +47328,8 @@ const syntheticsCanaryMonitoringProps: SyntheticsCanaryMonitoringProps = { ... } | --- | --- | --- | | canary | aws-cdk-lib.aws_synthetics.Canary | CloudWatch Canary to monitor. | | rateComputationMethod | RateComputationMethod | Method used to calculate relative rates. | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -44727,6 +47370,36 @@ Method used to calculate relative rates. --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -46477,6 +49150,8 @@ const wafV2MonitoringOptions: WafV2MonitoringOptions = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | +| account | string | Account where the metrics exist. | +| region | string | Region where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -46487,6 +49162,36 @@ const wafV2MonitoringOptions: WafV2MonitoringOptions = { ... } --- +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `region`Optional + +```typescript +public readonly region: string; +``` + +- *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct + +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + ##### `alarmFriendlyName`Optional ```typescript @@ -46600,7 +49305,8 @@ const wafV2MonitoringProps: WafV2MonitoringProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | | acl | aws-cdk-lib.aws_wafv2.CfnWebACL | *No description.* | -| region | string | Required if acl has a "REGIONAL" scope. | +| region | string | Region where the metrics exist. | +| account | string | Account where the metrics exist. | | alarmFriendlyName | string | Plain name, used in naming alarms. | | humanReadableName | string | Human-readable name is a freeform string, used as a caption or description. | | localAlarmNamePrefixOverride | string | If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. | @@ -46630,8 +49336,26 @@ public readonly region: string; ``` - *Type:* string +- *Default:* The region configured by the construct holding the Monitoring construct -Required if acl has a "REGIONAL" scope. +Region where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) + +--- + +##### `account`Optional + +```typescript +public readonly account: string; +``` + +- *Type:* string +- *Default:* The account configured by the construct holding the Monitoring construct + +Account where the metrics exist. + +> [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) --- @@ -50709,6 +53433,32 @@ public getStateMachineUrl(stateMachineArn: string): string +### BaseMetricFactory + +#### Initializers + +```typescript +import { BaseMetricFactory } from 'cdk-monitoring-constructs' + +new BaseMetricFactory(props: BaseMetricFactoryProps) +``` + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| props | BaseMetricFactoryProps | *No description.* | + +--- + +##### `props`Required + +- *Type:* BaseMetricFactoryProps + +--- + + + + + ### BaseServiceMetricFactory Metric factory for a base service (parent class for e.g. Fargate and EC2 services). diff --git a/lib/common/metric/BaseMetricFactory.ts b/lib/common/metric/BaseMetricFactory.ts new file mode 100644 index 00000000..579269ec --- /dev/null +++ b/lib/common/metric/BaseMetricFactory.ts @@ -0,0 +1,26 @@ +export interface BaseMetricFactoryProps { + /** + * Region where the metrics exist. + * + * @default The region configured by the construct holding the Monitoring construct + * @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html + */ + readonly region?: string; + /** + * Account where the metrics exist. + * + * @default The account configured by the construct holding the Monitoring construct + * @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html + */ + readonly account?: string; +} + +export abstract class BaseMetricFactory { + protected readonly account?: string; + protected readonly region?: string; + + constructor(props: BaseMetricFactoryProps) { + this.account = props.account; + this.region = props.region; + } +} diff --git a/lib/common/metric/MetricFactory.ts b/lib/common/metric/MetricFactory.ts index 115b3b2e..a4edac9f 100644 --- a/lib/common/metric/MetricFactory.ts +++ b/lib/common/metric/MetricFactory.ts @@ -10,6 +10,7 @@ import { AnomalyDetectionMathExpression } from "./AnomalyDetectionMathExpression import { MetricStatistic } from "./MetricStatistic"; import { MetricWithAlarmSupport } from "./MetricWithAlarmSupport"; import { RateComputationMethod } from "./RateComputationMethod"; +import { BaseMetricFactoryProps } from "./BaseMetricFactory"; /** * The most common default metric period used at Amazon is currently 5 minutes. @@ -19,7 +20,7 @@ export const DefaultMetricPeriod = Duration.minutes(5); /** * These are the globals used for each metric, unless there is some kind of override. */ -export interface MetricFactoryDefaults { +export interface MetricFactoryDefaults extends BaseMetricFactoryProps { /** * Each metric exists in a namespace. AWS Services have their own namespace, but here you can specify your custom one. */ @@ -30,21 +31,6 @@ export interface MetricFactoryDefaults { * @default - DefaultMetricPeriod */ readonly period?: Duration; - - /** - * Region where the metrics exist. - * - * @default The region configured by the construct holding the Monitoring construct - * @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html - */ - readonly region?: string; - /** - * Account where the metrics exist. - * - * @default The account configured by the construct holding the Monitoring construct - * @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html - */ - readonly account?: string; } export interface MetricFactoryProps { diff --git a/lib/common/metric/index.ts b/lib/common/metric/index.ts index 0d8aa780..18c6e081 100644 --- a/lib/common/metric/index.ts +++ b/lib/common/metric/index.ts @@ -1,4 +1,5 @@ export * from "./AnomalyDetectionMathExpression"; +export * from "./BaseMetricFactory"; export * from "./MetricFactory"; export * from "./MetricStatistic"; export * from "./MetricWithAlarmSupport"; diff --git a/lib/common/monitoring/Monitoring.ts b/lib/common/monitoring/Monitoring.ts index 282b066b..d3332c62 100644 --- a/lib/common/monitoring/Monitoring.ts +++ b/lib/common/monitoring/Monitoring.ts @@ -9,6 +9,7 @@ import { UserProvidedNames, } from "../../dashboard"; import { AlarmWithAnnotation } from "../alarm"; +import { BaseMetricFactoryProps } from "../metric"; export interface IAlarmConsumer { consume(alarms: AlarmWithAnnotation[]): void; @@ -19,7 +20,8 @@ export interface IAlarmConsumer { * It contains (mostly optional) properties to specify naming, placement, and so on. */ export interface BaseMonitoringProps - extends UserProvidedNames, + extends BaseMetricFactoryProps, + UserProvidedNames, MonitoringDashboardsOverrideProps { /** * Calls provided function to process all alarms created. diff --git a/lib/monitoring/aws-acm/CertificateManagerMetricFactory.ts b/lib/monitoring/aws-acm/CertificateManagerMetricFactory.ts index 4c7b765d..1769bfb2 100644 --- a/lib/monitoring/aws-acm/CertificateManagerMetricFactory.ts +++ b/lib/monitoring/aws-acm/CertificateManagerMetricFactory.ts @@ -2,6 +2,8 @@ import { ICertificate } from "aws-cdk-lib/aws-certificatemanager"; import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { + BaseMetricFactory, + BaseMetricFactoryProps, MetricFactory, MetricStatistic, MetricWithAlarmSupport, @@ -9,18 +11,21 @@ import { const Namespace = "AWS/CertificateManager"; -export interface CertificateManagerMetricFactoryProps { +export interface CertificateManagerMetricFactoryProps extends BaseMetricFactoryProps { readonly certificate: ICertificate; } -export class CertificateManagerMetricFactory { +export class CertificateManagerMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly dimensionsMap: DimensionsMap; + protected readonly region?: string; constructor( metricFactory: MetricFactory, props: CertificateManagerMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.dimensionsMap = { CertificateArn: props.certificate.certificateArn, @@ -34,7 +39,10 @@ export class CertificateManagerMetricFactory { "Days to expiry", this.dimensionsMap, undefined, - Namespace + Namespace, + undefined, + this.region, + this.account, ); } } diff --git a/lib/monitoring/aws-apigateway/ApiGatewayMetricFactory.ts b/lib/monitoring/aws-apigateway/ApiGatewayMetricFactory.ts index f916e4c2..aa696fc3 100644 --- a/lib/monitoring/aws-apigateway/ApiGatewayMetricFactory.ts +++ b/lib/monitoring/aws-apigateway/ApiGatewayMetricFactory.ts @@ -2,6 +2,8 @@ import { IRestApi } from "aws-cdk-lib/aws-apigateway"; import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { + BaseMetricFactory, + BaseMetricFactoryProps, getLatencyTypeLabel, getLatencyTypeStatistic, LatencyType, @@ -12,7 +14,7 @@ import { const ApiGatewayNamespace = "AWS/ApiGateway"; -export interface ApiGatewayMetricFactoryProps { +export interface ApiGatewayMetricFactoryProps extends BaseMetricFactoryProps { /** * API to monitor */ @@ -39,7 +41,7 @@ export interface ApiGatewayMetricFactoryProps { readonly rateComputationMethod?: RateComputationMethod; } -export class ApiGatewayMetricFactory { +export class ApiGatewayMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly fillTpsWithZeroes: boolean; protected readonly rateComputationMethod: RateComputationMethod; @@ -49,6 +51,8 @@ export class ApiGatewayMetricFactory { metricFactory: MetricFactory, props: ApiGatewayMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.fillTpsWithZeroes = props.fillTpsWithZeroes ?? true; this.rateComputationMethod = @@ -91,7 +95,10 @@ export class ApiGatewayMetricFactory { "Count", this.dimensionsMap, undefined, - ApiGatewayNamespace + ApiGatewayNamespace, + undefined, + this.region, + this.account, ); } @@ -102,7 +109,10 @@ export class ApiGatewayMetricFactory { "4XX Error", this.dimensionsMap, undefined, - ApiGatewayNamespace + ApiGatewayNamespace, + undefined, + this.region, + this.account, ); } @@ -123,7 +133,10 @@ export class ApiGatewayMetricFactory { "5XX Fault", this.dimensionsMap, undefined, - ApiGatewayNamespace + ApiGatewayNamespace, + undefined, + this.region, + this.account, ); } @@ -166,7 +179,10 @@ export class ApiGatewayMetricFactory { label, this.dimensionsMap, undefined, - ApiGatewayNamespace + ApiGatewayNamespace, + undefined, + this.region, + this.account, ); } } diff --git a/lib/monitoring/aws-apigatewayv2/ApiGatewayV2HttpApiMetricFactory.ts b/lib/monitoring/aws-apigatewayv2/ApiGatewayV2HttpApiMetricFactory.ts index 659a6429..17858897 100644 --- a/lib/monitoring/aws-apigatewayv2/ApiGatewayV2HttpApiMetricFactory.ts +++ b/lib/monitoring/aws-apigatewayv2/ApiGatewayV2HttpApiMetricFactory.ts @@ -2,6 +2,8 @@ import { IHttpApi } from "aws-cdk-lib/aws-apigatewayv2"; import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { + BaseMetricFactory, + BaseMetricFactoryProps, getLatencyTypeLabel, getLatencyTypeStatistic, LatencyType, @@ -12,7 +14,7 @@ import { const ApiGatewayNamespace = "AWS/ApiGateway"; -export interface ApiGatewayV2HttpApiMetricFactoryProps { +export interface ApiGatewayV2HttpApiMetricFactoryProps extends BaseMetricFactoryProps { readonly api: IHttpApi; /** * @default - $default @@ -36,7 +38,7 @@ export interface ApiGatewayV2HttpApiMetricFactoryProps { readonly rateComputationMethod?: RateComputationMethod; } -export class ApiGatewayV2HttpApiMetricFactory { +export class ApiGatewayV2HttpApiMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly fillTpsWithZeroes: boolean; protected readonly rateComputationMethod: RateComputationMethod; @@ -46,6 +48,8 @@ export class ApiGatewayV2HttpApiMetricFactory { metricFactory: MetricFactory, props: ApiGatewayV2HttpApiMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.fillTpsWithZeroes = props.fillTpsWithZeroes ?? true; this.rateComputationMethod = diff --git a/lib/monitoring/aws-appsync/AppSyncMetricFactory.ts b/lib/monitoring/aws-appsync/AppSyncMetricFactory.ts index 9b38dccc..5bc84bf4 100644 --- a/lib/monitoring/aws-appsync/AppSyncMetricFactory.ts +++ b/lib/monitoring/aws-appsync/AppSyncMetricFactory.ts @@ -2,6 +2,8 @@ import { IGraphqlApi } from "aws-cdk-lib/aws-appsync"; import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { + BaseMetricFactory, + BaseMetricFactoryProps, MetricFactory, MetricStatistic, RateComputationMethod, @@ -9,7 +11,7 @@ import { const Namespace = "AWS/AppSync"; -export interface AppSyncMetricFactoryProps { +export interface AppSyncMetricFactoryProps extends BaseMetricFactoryProps { /** * the GraphQL API to monitor */ @@ -26,13 +28,15 @@ export interface AppSyncMetricFactoryProps { readonly rateComputationMethod?: RateComputationMethod; } -export class AppSyncMetricFactory { +export class AppSyncMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly fillTpsWithZeroes: boolean; protected readonly rateComputationMethod: RateComputationMethod; protected readonly dimensionsMap: DimensionsMap; constructor(metricFactory: MetricFactory, props: AppSyncMetricFactoryProps) { + super(props); + this.metricFactory = metricFactory; this.fillTpsWithZeroes = props.fillTpsWithZeroes ?? true; this.rateComputationMethod = diff --git a/lib/monitoring/aws-cloudfront/CloudFrontDistributionMetricFactory.ts b/lib/monitoring/aws-cloudfront/CloudFrontDistributionMetricFactory.ts index 28ae1a3c..3011bc2f 100644 --- a/lib/monitoring/aws-cloudfront/CloudFrontDistributionMetricFactory.ts +++ b/lib/monitoring/aws-cloudfront/CloudFrontDistributionMetricFactory.ts @@ -2,6 +2,8 @@ import { IDistribution } from "aws-cdk-lib/aws-cloudfront"; import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { + BaseMetricFactory, + BaseMetricFactoryProps, MetricFactory, MetricStatistic, RateComputationMethod, @@ -11,7 +13,7 @@ const CloudFrontNamespace = "AWS/CloudFront"; const CloudFrontGlobalRegion = "Global"; const CloudFrontDefaultMetricRegion = "us-east-1"; -export interface CloudFrontDistributionMetricFactoryProps { +export interface CloudFrontDistributionMetricFactoryProps extends BaseMetricFactoryProps { readonly distribution: IDistribution; /** @@ -39,7 +41,7 @@ export interface CloudFrontDistributionMetricFactoryProps { * To get the CloudFront metrics from the CloudWatch API, you must use the US East (N. Virginia) Region (us-east-1). * https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/programming-cloudwatch-metrics.html */ -export class CloudFrontDistributionMetricFactory { +export class CloudFrontDistributionMetricFactory extends BaseMetricFactory { private readonly metricFactory: MetricFactory; private readonly fillTpsWithZeroes: boolean; private readonly rateComputationMethod: RateComputationMethod; @@ -49,6 +51,8 @@ export class CloudFrontDistributionMetricFactory { metricFactory: MetricFactory, props: CloudFrontDistributionMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.fillTpsWithZeroes = props.fillTpsWithZeroes ?? true; this.rateComputationMethod = diff --git a/lib/monitoring/aws-cloudwatch/CloudWatchLogsMetricFactory.ts b/lib/monitoring/aws-cloudwatch/CloudWatchLogsMetricFactory.ts index 9cee162d..50ca220c 100644 --- a/lib/monitoring/aws-cloudwatch/CloudWatchLogsMetricFactory.ts +++ b/lib/monitoring/aws-cloudwatch/CloudWatchLogsMetricFactory.ts @@ -1,17 +1,17 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; const CloudWatchLogsNamespace = "AWS/Logs"; -export interface CloudWatchLogsMetricFactoryProps { +export interface CloudWatchLogsMetricFactoryProps extends BaseMetricFactoryProps { /** * Name of the log group to monitor. */ readonly logGroupName: string; } -export class CloudWatchLogsMetricFactory { +export class CloudWatchLogsMetricFactory extends BaseMetricFactory { private readonly metricFactory: MetricFactory; private readonly dimensionsMap: DimensionsMap; @@ -19,6 +19,8 @@ export class CloudWatchLogsMetricFactory { metricFactory: MetricFactory, props: CloudWatchLogsMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.dimensionsMap = { LogGroupName: props.logGroupName, diff --git a/lib/monitoring/aws-codebuild/CodeBuildProjectMetricFactory.ts b/lib/monitoring/aws-codebuild/CodeBuildProjectMetricFactory.ts index 03e8186e..36f11a5f 100644 --- a/lib/monitoring/aws-codebuild/CodeBuildProjectMetricFactory.ts +++ b/lib/monitoring/aws-codebuild/CodeBuildProjectMetricFactory.ts @@ -1,13 +1,13 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { IProject } from "aws-cdk-lib/aws-codebuild"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; -export interface CodeBuildProjectMetricFactoryProps { +export interface CodeBuildProjectMetricFactoryProps extends BaseMetricFactoryProps { readonly project: IProject; } -export class CodeBuildProjectMetricFactory { +export class CodeBuildProjectMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly dimensionsMap: DimensionsMap; protected readonly project: IProject; @@ -16,6 +16,8 @@ export class CodeBuildProjectMetricFactory { metricFactory: MetricFactory, props: CodeBuildProjectMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.project = props.project; this.dimensionsMap = { diff --git a/lib/monitoring/aws-docdb/DocumentDbMetricFactory.ts b/lib/monitoring/aws-docdb/DocumentDbMetricFactory.ts index 03da55d4..530e7954 100644 --- a/lib/monitoring/aws-docdb/DocumentDbMetricFactory.ts +++ b/lib/monitoring/aws-docdb/DocumentDbMetricFactory.ts @@ -2,6 +2,8 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { IDatabaseCluster } from "aws-cdk-lib/aws-docdb"; import { + BaseMetricFactory, + BaseMetricFactoryProps, getLatencyTypeLabel, getLatencyTypeStatistic, LatencyType, @@ -11,14 +13,14 @@ import { const DocumentDbNamespace = "AWS/DocDB"; -export interface DocumentDbMetricFactoryProps { +export interface DocumentDbMetricFactoryProps extends BaseMetricFactoryProps { /** * database cluster */ readonly cluster: IDatabaseCluster; } -export class DocumentDbMetricFactory { +export class DocumentDbMetricFactory extends BaseMetricFactory { readonly clusterIdentifier: string; protected readonly metricFactory: MetricFactory; protected readonly dimensionsMap: DimensionsMap; @@ -27,6 +29,8 @@ export class DocumentDbMetricFactory { metricFactory: MetricFactory, props: DocumentDbMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.clusterIdentifier = props.cluster.clusterIdentifier; this.dimensionsMap = { DBClusterIdentifier: this.clusterIdentifier }; diff --git a/lib/monitoring/aws-dynamo/DynamoTableGlobalSecondaryIndexMetricFactory.ts b/lib/monitoring/aws-dynamo/DynamoTableGlobalSecondaryIndexMetricFactory.ts index ead3114d..e81603a5 100644 --- a/lib/monitoring/aws-dynamo/DynamoTableGlobalSecondaryIndexMetricFactory.ts +++ b/lib/monitoring/aws-dynamo/DynamoTableGlobalSecondaryIndexMetricFactory.ts @@ -1,16 +1,16 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { ITable } from "aws-cdk-lib/aws-dynamodb"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; const DynamoDbNamespace = "AWS/DynamoDB"; -export interface DynamoTableGlobalSecondaryIndexMetricFactoryProps { +export interface DynamoTableGlobalSecondaryIndexMetricFactoryProps extends BaseMetricFactoryProps { readonly table: ITable; readonly globalSecondaryIndexName: string; } -export class DynamoTableGlobalSecondaryIndexMetricFactory { +export class DynamoTableGlobalSecondaryIndexMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly table: ITable; protected readonly dimensionsMap: DimensionsMap; @@ -19,6 +19,8 @@ export class DynamoTableGlobalSecondaryIndexMetricFactory { metricFactory: MetricFactory, props: DynamoTableGlobalSecondaryIndexMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.table = props.table; this.dimensionsMap = { diff --git a/lib/monitoring/aws-dynamo/DynamoTableMetricFactory.ts b/lib/monitoring/aws-dynamo/DynamoTableMetricFactory.ts index e3536eb9..24e81a2a 100644 --- a/lib/monitoring/aws-dynamo/DynamoTableMetricFactory.ts +++ b/lib/monitoring/aws-dynamo/DynamoTableMetricFactory.ts @@ -1,7 +1,7 @@ import { IMetric } from "aws-cdk-lib/aws-cloudwatch"; import { BillingMode, ITable, Operation } from "aws-cdk-lib/aws-dynamodb"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; const DynamoDbNamespace = "AWS/DynamoDB"; const ProvisionedLabel = "Provisioned"; @@ -9,7 +9,7 @@ const ConsumedLabel = "Consumed"; const ReadThrottleEventsLabel = "Read"; const WriteThrottleEventsLabel = "Write"; -export interface DynamoTableMetricFactoryProps { +export interface DynamoTableMetricFactoryProps extends BaseMetricFactoryProps { /** * table to monitor */ @@ -22,7 +22,7 @@ export interface DynamoTableMetricFactoryProps { readonly billingMode?: BillingMode; } -export class DynamoTableMetricFactory { +export class DynamoTableMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly table: ITable; @@ -30,6 +30,8 @@ export class DynamoTableMetricFactory { metricFactory: MetricFactory, props: DynamoTableMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.table = props.table; } diff --git a/lib/monitoring/aws-ec2/AutoScalingGroupMetricFactory.ts b/lib/monitoring/aws-ec2/AutoScalingGroupMetricFactory.ts index d239a3e8..ffd6ac08 100644 --- a/lib/monitoring/aws-ec2/AutoScalingGroupMetricFactory.ts +++ b/lib/monitoring/aws-ec2/AutoScalingGroupMetricFactory.ts @@ -1,15 +1,15 @@ import { IAutoScalingGroup } from "aws-cdk-lib/aws-autoscaling"; import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; const AutoScalingNamespace = "AWS/AutoScaling"; -export interface AutoScalingGroupMetricFactoryProps { +export interface AutoScalingGroupMetricFactoryProps extends BaseMetricFactoryProps { readonly autoScalingGroup: IAutoScalingGroup; } -export class AutoScalingGroupMetricFactory { +export class AutoScalingGroupMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly dimensionsMap: DimensionsMap; @@ -17,6 +17,8 @@ export class AutoScalingGroupMetricFactory { metricFactory: MetricFactory, props: AutoScalingGroupMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.dimensionsMap = { AutoScalingGroupName: props.autoScalingGroup.autoScalingGroupName, diff --git a/lib/monitoring/aws-ec2/EC2MetricFactory.ts b/lib/monitoring/aws-ec2/EC2MetricFactory.ts index a422ae2e..dd2e079d 100644 --- a/lib/monitoring/aws-ec2/EC2MetricFactory.ts +++ b/lib/monitoring/aws-ec2/EC2MetricFactory.ts @@ -1,7 +1,7 @@ import { IAutoScalingGroup } from "aws-cdk-lib/aws-autoscaling"; import { DimensionsMap, IMetric } from "aws-cdk-lib/aws-cloudwatch"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; const EC2Namespace = "AWS/EC2"; @@ -123,7 +123,7 @@ function resolveStrategy( } } -export interface EC2MetricFactoryProps { +export interface EC2MetricFactoryProps extends BaseMetricFactoryProps { /** * Auto-Scaling Group to monitor. * @default - no Auto-Scaling Group filter @@ -136,11 +136,13 @@ export interface EC2MetricFactoryProps { readonly instanceIds?: string[]; } -export class EC2MetricFactory { +export class EC2MetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly strategy: IEC2MetricFactoryStrategy; constructor(metricFactory: MetricFactory, props: EC2MetricFactoryProps) { + super(props); + this.metricFactory = metricFactory; this.strategy = resolveStrategy(props); } diff --git a/lib/monitoring/aws-ecs-patterns/BaseServiceMetricFactory.ts b/lib/monitoring/aws-ecs-patterns/BaseServiceMetricFactory.ts index 5113f722..4c9702a6 100644 --- a/lib/monitoring/aws-ecs-patterns/BaseServiceMetricFactory.ts +++ b/lib/monitoring/aws-ecs-patterns/BaseServiceMetricFactory.ts @@ -1,7 +1,7 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { IBaseService } from "aws-cdk-lib/aws-ecs"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; const EcsNamespace = "AWS/ECS"; const EcsContainerInsightsNamespace = "ECS/ContainerInsights"; @@ -9,14 +9,14 @@ const EcsContainerInsightsNamespace = "ECS/ContainerInsights"; /** * Props to create BaseServiceMetricFactory. */ -export interface BaseServiceMetricFactoryProps { +export interface BaseServiceMetricFactoryProps extends BaseMetricFactoryProps { readonly service: IBaseService; } /** * Metric factory for a base service (parent class for e.g. Fargate and EC2 services). */ -export class BaseServiceMetricFactory { +export class BaseServiceMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly dimensionsMap: DimensionsMap; /** @@ -28,6 +28,8 @@ export class BaseServiceMetricFactory { metricFactory: MetricFactory, props: BaseServiceMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.dimensionsMap = { ClusterName: props.service.cluster.clusterName, diff --git a/lib/monitoring/aws-elasticache/ElastiCacheClusterMetricFactory.ts b/lib/monitoring/aws-elasticache/ElastiCacheClusterMetricFactory.ts index 89c13b8c..0a87125b 100644 --- a/lib/monitoring/aws-elasticache/ElastiCacheClusterMetricFactory.ts +++ b/lib/monitoring/aws-elasticache/ElastiCacheClusterMetricFactory.ts @@ -1,6 +1,6 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; const Namespace = "AWS/ElastiCache"; @@ -9,7 +9,7 @@ export enum ElastiCacheClusterType { REDIS, } -export interface ElastiCacheClusterMetricFactoryProps { +export interface ElastiCacheClusterMetricFactoryProps extends BaseMetricFactoryProps { /** * Cluster to monitor * @default - monitor all clusters @@ -20,7 +20,7 @@ export interface ElastiCacheClusterMetricFactoryProps { /** * @see https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/CacheMetrics.html */ -export class ElastiCacheClusterMetricFactory { +export class ElastiCacheClusterMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly dimensionsMap: DimensionsMap; @@ -28,6 +28,8 @@ export class ElastiCacheClusterMetricFactory { metricFactory: MetricFactory, props: ElastiCacheClusterMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.dimensionsMap = {}; if (props.clusterId) { diff --git a/lib/monitoring/aws-glue/GlueJobMetricFactory.ts b/lib/monitoring/aws-glue/GlueJobMetricFactory.ts index ea1b982a..cd83eebb 100644 --- a/lib/monitoring/aws-glue/GlueJobMetricFactory.ts +++ b/lib/monitoring/aws-glue/GlueJobMetricFactory.ts @@ -1,6 +1,8 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { + BaseMetricFactory, + BaseMetricFactoryProps, MetricFactory, MetricStatistic, RateComputationMethod, @@ -8,7 +10,7 @@ import { const GlueNamespace = "Glue"; -export interface GlueJobMetricFactoryProps { +export interface GlueJobMetricFactoryProps extends BaseMetricFactoryProps { readonly jobName: string; /** * @default - average @@ -16,13 +18,15 @@ export interface GlueJobMetricFactoryProps { readonly rateComputationMethod?: RateComputationMethod; } -export class GlueJobMetricFactory { +export class GlueJobMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly rateComputationMethod: RateComputationMethod; protected readonly dimensionsMap: DimensionsMap; protected readonly typeCountDimensionsMap: DimensionsMap; constructor(metricFactory: MetricFactory, props: GlueJobMetricFactoryProps) { + super(props); + this.metricFactory = metricFactory; this.rateComputationMethod = props.rateComputationMethod ?? RateComputationMethod.AVERAGE; diff --git a/lib/monitoring/aws-kinesis/KinesisDataStreamMetricFactory.ts b/lib/monitoring/aws-kinesis/KinesisDataStreamMetricFactory.ts index 5933d01d..8187aa93 100644 --- a/lib/monitoring/aws-kinesis/KinesisDataStreamMetricFactory.ts +++ b/lib/monitoring/aws-kinesis/KinesisDataStreamMetricFactory.ts @@ -1,17 +1,17 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; const DataStreamNamespace = "AWS/Kinesis"; -export interface KinesisDataStreamMetricFactoryProps { +export interface KinesisDataStreamMetricFactoryProps extends BaseMetricFactoryProps { readonly streamName: string; } /** * @see https://docs.aws.amazon.com/streams/latest/dev/monitoring-with-cloudwatch.html */ -export class KinesisDataStreamMetricFactory { +export class KinesisDataStreamMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly dimensionsMap: DimensionsMap; @@ -19,6 +19,8 @@ export class KinesisDataStreamMetricFactory { metricFactory: MetricFactory, props: KinesisDataStreamMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.dimensionsMap = { StreamName: props.streamName, diff --git a/lib/monitoring/aws-kinesis/KinesisFirehoseMetricFactory.ts b/lib/monitoring/aws-kinesis/KinesisFirehoseMetricFactory.ts index d778a474..c3c98e0a 100644 --- a/lib/monitoring/aws-kinesis/KinesisFirehoseMetricFactory.ts +++ b/lib/monitoring/aws-kinesis/KinesisFirehoseMetricFactory.ts @@ -1,17 +1,17 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; const FirehoseNamespace = "AWS/Firehose"; -export interface KinesisFirehoseMetricFactoryProps { +export interface KinesisFirehoseMetricFactoryProps extends BaseMetricFactoryProps { readonly deliveryStreamName: string; } /** * @see https://docs.aws.amazon.com/firehose/latest/dev/monitoring-with-cloudwatch-metrics.html */ -export class KinesisFirehoseMetricFactory { +export class KinesisFirehoseMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly dimensionsMap: DimensionsMap; @@ -19,6 +19,8 @@ export class KinesisFirehoseMetricFactory { metricFactory: MetricFactory, props: KinesisFirehoseMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.dimensionsMap = { DeliveryStreamName: props.deliveryStreamName, diff --git a/lib/monitoring/aws-kinesisanalytics/KinesisDataAnalyticsMetricFactory.ts b/lib/monitoring/aws-kinesisanalytics/KinesisDataAnalyticsMetricFactory.ts index 6c53aa1c..cc3c080b 100644 --- a/lib/monitoring/aws-kinesisanalytics/KinesisDataAnalyticsMetricFactory.ts +++ b/lib/monitoring/aws-kinesisanalytics/KinesisDataAnalyticsMetricFactory.ts @@ -1,8 +1,8 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; -export interface KinesisDataAnalyticsMetricFactoryProps { +export interface KinesisDataAnalyticsMetricFactoryProps extends BaseMetricFactoryProps { readonly application: string; } @@ -18,7 +18,7 @@ interface MetricsSpec { /** * @see https://docs.aws.amazon.com/kinesisanalytics/latest/java/metrics-dimensions.html */ -export class KinesisDataAnalyticsMetricFactory { +export class KinesisDataAnalyticsMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly dimensionsMap: DimensionsMap; @@ -26,6 +26,8 @@ export class KinesisDataAnalyticsMetricFactory { metricFactory: MetricFactory, props: KinesisDataAnalyticsMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.dimensionsMap = { Application: props.application, diff --git a/lib/monitoring/aws-lambda/LambdaFunctionMetricFactory.ts b/lib/monitoring/aws-lambda/LambdaFunctionMetricFactory.ts index 8aa54234..7af2da2a 100644 --- a/lib/monitoring/aws-lambda/LambdaFunctionMetricFactory.ts +++ b/lib/monitoring/aws-lambda/LambdaFunctionMetricFactory.ts @@ -1,6 +1,8 @@ import { IFunction } from "aws-cdk-lib/aws-lambda"; import { + BaseMetricFactory, + BaseMetricFactoryProps, LatencyType, MetricFactory, MetricStatistic, @@ -9,7 +11,7 @@ import { getLatencyTypeStatistic, } from "../../common"; -export interface LambdaFunctionMetricFactoryProps { +export interface LambdaFunctionMetricFactoryProps extends BaseMetricFactoryProps { readonly lambdaFunction: IFunction; /** * @default - true @@ -30,7 +32,7 @@ export interface LambdaFunctionMetricFactoryProps { readonly lambdaInsightsEnabled?: boolean; } -export class LambdaFunctionMetricFactory { +export class LambdaFunctionMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly lambdaFunction: IFunction; protected readonly fillTpsWithZeroes: boolean; @@ -40,6 +42,8 @@ export class LambdaFunctionMetricFactory { metricFactory: MetricFactory, props: LambdaFunctionMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.lambdaFunction = props.lambdaFunction; this.fillTpsWithZeroes = props.fillTpsWithZeroes ?? true; diff --git a/lib/monitoring/aws-loadbalancing/ApplicationLoadBalancerMetricFactory.ts b/lib/monitoring/aws-loadbalancing/ApplicationLoadBalancerMetricFactory.ts index 0c9bca6b..538cd54b 100644 --- a/lib/monitoring/aws-loadbalancing/ApplicationLoadBalancerMetricFactory.ts +++ b/lib/monitoring/aws-loadbalancing/ApplicationLoadBalancerMetricFactory.ts @@ -8,6 +8,8 @@ import { BaseLoadBalancerMetricFactoryProps, } from "./LoadBalancerMetricFactory"; import { + BaseMetricFactory, + BaseMetricFactoryProps, HealthyMetricColor, MetricFactory, MetricStatistic, @@ -18,7 +20,7 @@ import { * Props to create ApplicationLoadBalancerMetricFactory. */ export interface ApplicationLoadBalancerMetricFactoryProps - extends BaseLoadBalancerMetricFactoryProps { + extends BaseLoadBalancerMetricFactoryProps, BaseMetricFactoryProps { readonly applicationLoadBalancer: IApplicationLoadBalancer; readonly applicationTargetGroup: IApplicationTargetGroup; } @@ -27,6 +29,7 @@ export interface ApplicationLoadBalancerMetricFactoryProps * Metric factory to create metrics for application load-balanced service. */ export class ApplicationLoadBalancerMetricFactory + extends BaseMetricFactory implements ILoadBalancerMetricFactory { protected readonly metricFactory: MetricFactory; @@ -38,6 +41,8 @@ export class ApplicationLoadBalancerMetricFactory metricFactory: MetricFactory, props: ApplicationLoadBalancerMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.applicationLoadBalancer = props.applicationLoadBalancer; this.applicationTargetGroup = props.applicationTargetGroup; diff --git a/lib/monitoring/aws-loadbalancing/NetworkLoadBalancerMetricFactory.ts b/lib/monitoring/aws-loadbalancing/NetworkLoadBalancerMetricFactory.ts index 6dec32f8..739c22e6 100644 --- a/lib/monitoring/aws-loadbalancing/NetworkLoadBalancerMetricFactory.ts +++ b/lib/monitoring/aws-loadbalancing/NetworkLoadBalancerMetricFactory.ts @@ -8,6 +8,8 @@ import { BaseLoadBalancerMetricFactoryProps, } from "./LoadBalancerMetricFactory"; import { + BaseMetricFactory, + BaseMetricFactoryProps, HealthyMetricColor, MetricFactory, MetricStatistic, @@ -18,7 +20,7 @@ import { * Props to create NetworkLoadBalancerMetricFactory. */ export interface NetworkLoadBalancerMetricFactoryProps - extends BaseLoadBalancerMetricFactoryProps { + extends BaseLoadBalancerMetricFactoryProps, BaseMetricFactoryProps { readonly networkLoadBalancer: INetworkLoadBalancer; readonly networkTargetGroup: INetworkTargetGroup; } @@ -27,6 +29,7 @@ export interface NetworkLoadBalancerMetricFactoryProps * Metric factory to create metrics for network load-balanced service. */ export class NetworkLoadBalancerMetricFactory + extends BaseMetricFactory implements ILoadBalancerMetricFactory { protected readonly metricFactory: MetricFactory; @@ -38,6 +41,8 @@ export class NetworkLoadBalancerMetricFactory metricFactory: MetricFactory, props: NetworkLoadBalancerMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.networkLoadBalancer = props.networkLoadBalancer; this.networkTargetGroup = props.networkTargetGroup; diff --git a/lib/monitoring/aws-opensearch/OpenSearchClusterMetricFactory.ts b/lib/monitoring/aws-opensearch/OpenSearchClusterMetricFactory.ts index 237d781f..7973c290 100644 --- a/lib/monitoring/aws-opensearch/OpenSearchClusterMetricFactory.ts +++ b/lib/monitoring/aws-opensearch/OpenSearchClusterMetricFactory.ts @@ -5,12 +5,14 @@ import { OpenSearchBackportedMetrics, } from "./OpenSearchBackportedMetrics"; import { + BaseMetricFactory, + BaseMetricFactoryProps, MetricFactory, MetricStatistic, RateComputationMethod, } from "../../common"; -export interface OpenSearchClusterMetricFactoryProps { +export interface OpenSearchClusterMetricFactoryProps extends BaseMetricFactoryProps { readonly domain: Domain; /** * @default - true @@ -22,7 +24,7 @@ export interface OpenSearchClusterMetricFactoryProps { readonly rateComputationMethod?: RateComputationMethod; } -export class OpenSearchClusterMetricFactory { +export class OpenSearchClusterMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly domainMetrics: OpenSearchBackportedMetrics; protected readonly fillTpsWithZeroes: boolean; @@ -32,6 +34,8 @@ export class OpenSearchClusterMetricFactory { metricFactory: MetricFactory, props: OpenSearchClusterMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.domainMetrics = new OpenSearchBackportedMetrics(props.domain); this.fillTpsWithZeroes = props.fillTpsWithZeroes ?? true; diff --git a/lib/monitoring/aws-rds/RdsClusterMetricFactory.ts b/lib/monitoring/aws-rds/RdsClusterMetricFactory.ts index 04dcf9b7..f3e1e4cb 100644 --- a/lib/monitoring/aws-rds/RdsClusterMetricFactory.ts +++ b/lib/monitoring/aws-rds/RdsClusterMetricFactory.ts @@ -1,11 +1,11 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { IDatabaseCluster, ServerlessCluster } from "aws-cdk-lib/aws-rds"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; const RdsNamespace = "AWS/RDS"; -export interface RdsClusterMetricFactoryProps { +export interface RdsClusterMetricFactoryProps extends BaseMetricFactoryProps { /** * database cluster identifier (either this or `cluster` need to be specified) * @deprecated please use `cluster` instead @@ -17,7 +17,7 @@ export interface RdsClusterMetricFactoryProps { readonly cluster?: IDatabaseCluster | ServerlessCluster; } -export class RdsClusterMetricFactory { +export class RdsClusterMetricFactory extends BaseMetricFactory { readonly clusterIdentifier: string; readonly cluster?: IDatabaseCluster | ServerlessCluster; protected readonly metricFactory: MetricFactory; @@ -27,6 +27,8 @@ export class RdsClusterMetricFactory { metricFactory: MetricFactory, props: RdsClusterMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.cluster = props.cluster; this.clusterIdentifier = diff --git a/lib/monitoring/aws-rds/RdsInstanceMetricFactory.ts b/lib/monitoring/aws-rds/RdsInstanceMetricFactory.ts index a6b13f0f..eb5b9ed3 100644 --- a/lib/monitoring/aws-rds/RdsInstanceMetricFactory.ts +++ b/lib/monitoring/aws-rds/RdsInstanceMetricFactory.ts @@ -2,6 +2,8 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { IDatabaseInstance } from "aws-cdk-lib/aws-rds"; import { + BaseMetricFactory, + BaseMetricFactoryProps, LatencyType, MetricFactory, MetricStatistic, @@ -11,14 +13,14 @@ import { const RdsNamespace = "AWS/RDS"; -export interface RdsInstanceMetricFactoryProps { +export interface RdsInstanceMetricFactoryProps extends BaseMetricFactoryProps { /** * database instance */ readonly instance: IDatabaseInstance; } -export class RdsInstanceMetricFactory { +export class RdsInstanceMetricFactory extends BaseMetricFactory { readonly instanceIdentifier: string; readonly instance: IDatabaseInstance; protected readonly metricFactory: MetricFactory; @@ -28,6 +30,8 @@ export class RdsInstanceMetricFactory { metricFactory: MetricFactory, props: RdsInstanceMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.instance = props.instance; this.instanceIdentifier = props.instance.instanceIdentifier; diff --git a/lib/monitoring/aws-redshift/RedshiftClusterMetricFactory.ts b/lib/monitoring/aws-redshift/RedshiftClusterMetricFactory.ts index 3c0f6077..9849e0bc 100644 --- a/lib/monitoring/aws-redshift/RedshiftClusterMetricFactory.ts +++ b/lib/monitoring/aws-redshift/RedshiftClusterMetricFactory.ts @@ -1,16 +1,16 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; const RedshiftNamespace = "AWS/Redshift"; type QueryLatencyClass = "short" | "medium" | "long"; -export interface RedshiftClusterMetricFactoryProps { +export interface RedshiftClusterMetricFactoryProps extends BaseMetricFactoryProps { readonly clusterIdentifier: string; } -export class RedshiftClusterMetricFactory { +export class RedshiftClusterMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly dimensionsMap: DimensionsMap; @@ -18,6 +18,8 @@ export class RedshiftClusterMetricFactory { metricFactory: MetricFactory, props: RedshiftClusterMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.dimensionsMap = { ClusterIdentifier: props.clusterIdentifier, diff --git a/lib/monitoring/aws-s3/S3BucketMetricFactory.ts b/lib/monitoring/aws-s3/S3BucketMetricFactory.ts index 1f0f86f3..b0953a66 100644 --- a/lib/monitoring/aws-s3/S3BucketMetricFactory.ts +++ b/lib/monitoring/aws-s3/S3BucketMetricFactory.ts @@ -1,6 +1,6 @@ import { IBucket } from "aws-cdk-lib/aws-s3"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; const Namespace = "AWS/S3"; @@ -23,16 +23,18 @@ export enum StorageType { STANDARD_STORAGE = "StandardStorage", } -export interface S3BucketMetricFactoryProps { +export interface S3BucketMetricFactoryProps extends BaseMetricFactoryProps { readonly bucket: IBucket; readonly storageType?: StorageType; } -export class S3BucketMetricFactory { +export class S3BucketMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly props: S3BucketMetricFactoryProps; constructor(metricFactory: MetricFactory, props: S3BucketMetricFactoryProps) { + super(props); + this.metricFactory = metricFactory; this.props = props; } diff --git a/lib/monitoring/aws-secretsmanager/SecretsManagerSecretMetricFactory.ts b/lib/monitoring/aws-secretsmanager/SecretsManagerSecretMetricFactory.ts index e0b66ff1..427358a2 100644 --- a/lib/monitoring/aws-secretsmanager/SecretsManagerSecretMetricFactory.ts +++ b/lib/monitoring/aws-secretsmanager/SecretsManagerSecretMetricFactory.ts @@ -1,13 +1,13 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { ISecret } from "aws-cdk-lib/aws-secretsmanager"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; -export interface SecretsManagerSecretMetricFactoryProps { +export interface SecretsManagerSecretMetricFactoryProps extends BaseMetricFactoryProps { readonly secret: ISecret; } -export class SecretsManagerSecretMetricFactory { +export class SecretsManagerSecretMetricFactory extends BaseMetricFactory { static readonly Namespace = "SecretsManager"; static readonly MetricNameDaysSinceLastChange = "DaysSinceLastChange"; static readonly MetricNameDaysSinceLastRotation = "DaysSinceLastRotation"; @@ -19,6 +19,8 @@ export class SecretsManagerSecretMetricFactory { metricFactory: MetricFactory, props: SecretsManagerSecretMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.secret = props.secret; this.dimensionsMap = { diff --git a/lib/monitoring/aws-sns/SnsTopicMetricFactory.ts b/lib/monitoring/aws-sns/SnsTopicMetricFactory.ts index 64fef54c..c7594f87 100644 --- a/lib/monitoring/aws-sns/SnsTopicMetricFactory.ts +++ b/lib/monitoring/aws-sns/SnsTopicMetricFactory.ts @@ -1,16 +1,18 @@ import { ITopic } from "aws-cdk-lib/aws-sns"; -import { MetricFactory } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory } from "../../common"; -export interface SnsTopicMetricFactoryProps { +export interface SnsTopicMetricFactoryProps extends BaseMetricFactoryProps { readonly topic: ITopic; } -export class SnsTopicMetricFactory { +export class SnsTopicMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly topic: ITopic; constructor(metricFactory: MetricFactory, props: SnsTopicMetricFactoryProps) { + super(props); + this.metricFactory = metricFactory; this.topic = props.topic; } diff --git a/lib/monitoring/aws-sqs/SqsQueueMetricFactory.ts b/lib/monitoring/aws-sqs/SqsQueueMetricFactory.ts index 2b8e1ca2..c9f7cfa4 100644 --- a/lib/monitoring/aws-sqs/SqsQueueMetricFactory.ts +++ b/lib/monitoring/aws-sqs/SqsQueueMetricFactory.ts @@ -1,16 +1,18 @@ import { IQueue } from "aws-cdk-lib/aws-sqs"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; -export interface SqsQueueMetricFactoryProps { +export interface SqsQueueMetricFactoryProps extends BaseMetricFactoryProps { readonly queue: IQueue; } -export class SqsQueueMetricFactory { +export class SqsQueueMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly queue: IQueue; constructor(metricFactory: MetricFactory, props: SqsQueueMetricFactoryProps) { + super(props); + this.metricFactory = metricFactory; this.queue = props.queue; } diff --git a/lib/monitoring/aws-step-functions/StepFunctionActivityMetricFactory.ts b/lib/monitoring/aws-step-functions/StepFunctionActivityMetricFactory.ts index e333c405..1e06c02b 100644 --- a/lib/monitoring/aws-step-functions/StepFunctionActivityMetricFactory.ts +++ b/lib/monitoring/aws-step-functions/StepFunctionActivityMetricFactory.ts @@ -2,6 +2,8 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { IActivity } from "aws-cdk-lib/aws-stepfunctions"; import { + BaseMetricFactory, + BaseMetricFactoryProps, MetricFactory, MetricStatistic, RateComputationMethod, @@ -9,7 +11,7 @@ import { const Namespace = "AWS/States"; -export interface StepFunctionActivityMetricFactoryProps { +export interface StepFunctionActivityMetricFactoryProps extends BaseMetricFactoryProps { readonly activity: IActivity; /** * @default - average @@ -17,7 +19,7 @@ export interface StepFunctionActivityMetricFactoryProps { readonly rateComputationMethod?: RateComputationMethod; } -export class StepFunctionActivityMetricFactory { +export class StepFunctionActivityMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly rateComputationMethod: RateComputationMethod; protected readonly dimensionsMap: DimensionsMap; @@ -26,6 +28,8 @@ export class StepFunctionActivityMetricFactory { metricFactory: MetricFactory, props: StepFunctionActivityMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.rateComputationMethod = RateComputationMethod.AVERAGE; this.dimensionsMap = { diff --git a/lib/monitoring/aws-step-functions/StepFunctionLambdaIntegrationMetricFactory.ts b/lib/monitoring/aws-step-functions/StepFunctionLambdaIntegrationMetricFactory.ts index c20ff2dc..9c84e6e2 100644 --- a/lib/monitoring/aws-step-functions/StepFunctionLambdaIntegrationMetricFactory.ts +++ b/lib/monitoring/aws-step-functions/StepFunctionLambdaIntegrationMetricFactory.ts @@ -2,6 +2,8 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { IFunction } from "aws-cdk-lib/aws-lambda"; import { + BaseMetricFactory, + BaseMetricFactoryProps, MetricFactory, MetricStatistic, RateComputationMethod, @@ -9,7 +11,7 @@ import { const Namespace = "AWS/States"; -export interface StepFunctionLambdaIntegrationMetricFactoryProps { +export interface StepFunctionLambdaIntegrationMetricFactoryProps extends BaseMetricFactoryProps { readonly lambdaFunction: IFunction; /** * @default - average @@ -17,7 +19,7 @@ export interface StepFunctionLambdaIntegrationMetricFactoryProps { readonly rateComputationMethod?: RateComputationMethod; } -export class StepFunctionLambdaIntegrationMetricFactory { +export class StepFunctionLambdaIntegrationMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly rateComputationMethod: RateComputationMethod; protected readonly dimensionsMap: DimensionsMap; @@ -26,6 +28,8 @@ export class StepFunctionLambdaIntegrationMetricFactory { metricFactory: MetricFactory, props: StepFunctionLambdaIntegrationMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.rateComputationMethod = RateComputationMethod.AVERAGE; this.dimensionsMap = { diff --git a/lib/monitoring/aws-step-functions/StepFunctionMetricFactory.ts b/lib/monitoring/aws-step-functions/StepFunctionMetricFactory.ts index b337e10c..805ac414 100644 --- a/lib/monitoring/aws-step-functions/StepFunctionMetricFactory.ts +++ b/lib/monitoring/aws-step-functions/StepFunctionMetricFactory.ts @@ -2,6 +2,8 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { IStateMachine } from "aws-cdk-lib/aws-stepfunctions"; import { + BaseMetricFactory, + BaseMetricFactoryProps, MetricFactory, MetricStatistic, RateComputationMethod, @@ -9,7 +11,7 @@ import { const Namespace = "AWS/States"; -export interface StepFunctionMetricFactoryProps { +export interface StepFunctionMetricFactoryProps extends BaseMetricFactoryProps { readonly stateMachine: IStateMachine; /** * @default - average @@ -17,7 +19,7 @@ export interface StepFunctionMetricFactoryProps { readonly rateComputationMethod?: RateComputationMethod; } -export class StepFunctionMetricFactory { +export class StepFunctionMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly rateComputationMethod: RateComputationMethod; protected readonly dimensionsMap: DimensionsMap; @@ -26,6 +28,8 @@ export class StepFunctionMetricFactory { metricFactory: MetricFactory, props: StepFunctionMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.rateComputationMethod = RateComputationMethod.AVERAGE; this.dimensionsMap = { diff --git a/lib/monitoring/aws-step-functions/StepFunctionServiceIntegrationMetricFactory.ts b/lib/monitoring/aws-step-functions/StepFunctionServiceIntegrationMetricFactory.ts index e806b5bf..030b6579 100644 --- a/lib/monitoring/aws-step-functions/StepFunctionServiceIntegrationMetricFactory.ts +++ b/lib/monitoring/aws-step-functions/StepFunctionServiceIntegrationMetricFactory.ts @@ -1,6 +1,8 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { + BaseMetricFactory, + BaseMetricFactoryProps, MetricFactory, MetricStatistic, RateComputationMethod, @@ -8,7 +10,7 @@ import { const Namespace = "AWS/States"; -export interface StepFunctionServiceIntegrationMetricFactoryProps { +export interface StepFunctionServiceIntegrationMetricFactoryProps extends BaseMetricFactoryProps { readonly serviceIntegrationResourceArn: string; /** * @default - average @@ -16,7 +18,7 @@ export interface StepFunctionServiceIntegrationMetricFactoryProps { readonly rateComputationMethod?: RateComputationMethod; } -export class StepFunctionServiceIntegrationMetricFactory { +export class StepFunctionServiceIntegrationMetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly rateComputationMethod: RateComputationMethod; protected readonly dimensionsMap: DimensionsMap; @@ -25,6 +27,8 @@ export class StepFunctionServiceIntegrationMetricFactory { metricFactory: MetricFactory, props: StepFunctionServiceIntegrationMetricFactoryProps ) { + super(props); + this.metricFactory = metricFactory; this.rateComputationMethod = RateComputationMethod.AVERAGE; this.dimensionsMap = { diff --git a/lib/monitoring/aws-synthetics/SyntheticsCanaryMetricFactory.ts b/lib/monitoring/aws-synthetics/SyntheticsCanaryMetricFactory.ts index a8f6e78b..b721835f 100644 --- a/lib/monitoring/aws-synthetics/SyntheticsCanaryMetricFactory.ts +++ b/lib/monitoring/aws-synthetics/SyntheticsCanaryMetricFactory.ts @@ -1,6 +1,8 @@ import { DimensionsMap } from "aws-cdk-lib/aws-cloudwatch"; import { Canary } from "aws-cdk-lib/aws-synthetics"; import { + BaseMetricFactory, + BaseMetricFactoryProps, MetricFactory, MetricStatistic, RateComputationMethod, @@ -8,7 +10,7 @@ import { const MetricNamespace = "CloudWatchSynthetics"; -export interface SyntheticsCanaryMetricFactoryProps { +export interface SyntheticsCanaryMetricFactoryProps extends BaseMetricFactoryProps { /** * CloudWatch Canary to monitor */ @@ -20,7 +22,7 @@ export interface SyntheticsCanaryMetricFactoryProps { readonly rateComputationMethod?: RateComputationMethod; } -export class SyntheticsCanaryMetricFactory { +export class SyntheticsCanaryMetricFactory extends BaseMetricFactory { protected readonly canary: Canary; protected readonly metricFactory: MetricFactory; protected readonly rateComputationMethod: RateComputationMethod; @@ -30,6 +32,8 @@ export class SyntheticsCanaryMetricFactory { metricFactory: MetricFactory, props: SyntheticsCanaryMetricFactoryProps ) { + super(props); + this.canary = props.canary; this.metricFactory = metricFactory; this.rateComputationMethod = @@ -64,7 +68,10 @@ export class SyntheticsCanaryMetricFactory { "4xx", this.dimensionsMap, undefined, - MetricNamespace + MetricNamespace, + undefined, + this.region, + this.account, ); } @@ -85,7 +92,10 @@ export class SyntheticsCanaryMetricFactory { "5xx", this.dimensionsMap, undefined, - MetricNamespace + MetricNamespace, + undefined, + this.region, + this.account, ); } diff --git a/lib/monitoring/aws-wafv2/WafV2MetricFactory.ts b/lib/monitoring/aws-wafv2/WafV2MetricFactory.ts index b6106494..41b05d9b 100644 --- a/lib/monitoring/aws-wafv2/WafV2MetricFactory.ts +++ b/lib/monitoring/aws-wafv2/WafV2MetricFactory.ts @@ -1,11 +1,11 @@ import { DimensionHash } from "aws-cdk-lib/aws-cloudwatch"; import { CfnWebACL } from "aws-cdk-lib/aws-wafv2"; -import { MetricFactory, MetricStatistic } from "../../common"; +import { BaseMetricFactory, BaseMetricFactoryProps, MetricFactory, MetricStatistic } from "../../common"; const MetricNamespace = "AWS/WAFV2"; const AllRulesDimensionValue = "ALL"; -export interface WafV2MetricFactoryProps { +export interface WafV2MetricFactoryProps extends BaseMetricFactoryProps { readonly acl: CfnWebACL; /** @@ -17,11 +17,13 @@ export interface WafV2MetricFactoryProps { /** * https://docs.aws.amazon.com/waf/latest/developerguide/monitoring-cloudwatch.html */ -export class WafV2MetricFactory { +export class WafV2MetricFactory extends BaseMetricFactory { protected readonly metricFactory: MetricFactory; protected readonly dimensions: DimensionHash; constructor(metricFactory: MetricFactory, props: WafV2MetricFactoryProps) { + super(props); + this.metricFactory = metricFactory; this.dimensions = { Rule: AllRulesDimensionValue, @@ -37,7 +39,10 @@ export class WafV2MetricFactory { "Allowed", this.dimensions, undefined, - MetricNamespace + MetricNamespace, + undefined, + this.region, + this.account, ); } @@ -48,7 +53,10 @@ export class WafV2MetricFactory { "Blocked", this.dimensions, undefined, - MetricNamespace + MetricNamespace, + undefined, + this.region, + this.account, ); }