-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow specifying regions/accounts at a more granular level
- Loading branch information
1 parent
f8778a1
commit e845d15
Showing
46 changed files
with
4,966 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,33 @@ | ||
import { MetricFactory } from "./MetricFactory"; | ||
|
||
export interface BaseMetricFactoryProps { | ||
// TODO: this will eventually include other common things like account/region | ||
/** | ||
* 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< | ||
PropsType extends BaseMetricFactoryProps | ||
> { | ||
protected readonly metricFactory: MetricFactory; | ||
protected readonly account?: string; | ||
protected readonly region?: string; | ||
|
||
constructor(metricFactory: MetricFactory, _props: PropsType) { | ||
constructor(metricFactory: MetricFactory, props: PropsType) { | ||
this.metricFactory = metricFactory; | ||
this.account = props.account; | ||
this.region = props.region; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.