Skip to content

Commit 1227c6e

Browse files
authored
Merge branch 'master' into huijbers/construct-hub-link
2 parents d20764d + df9814f commit 1227c6e

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

packages/@aws-cdk/aws-cloudwatch/lib/dashboard.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ export interface DashboardProps {
7575
* A CloudWatch dashboard
7676
*/
7777
export class Dashboard extends Resource {
78+
/**
79+
* ARN of this dashboard
80+
*
81+
* @attribute
82+
*/
83+
public readonly dashboardArn: string;
84+
7885
private readonly rows: IWidget[] = [];
7986

8087
constructor(scope: Construct, id: string, props: DashboardProps = {}) {
@@ -111,6 +118,12 @@ export class Dashboard extends Resource {
111118
(props.widgets || []).forEach(row => {
112119
this.addWidgets(...row);
113120
});
121+
122+
this.dashboardArn = Stack.of(this).formatArn({
123+
service: 'cloudwatch',
124+
resource: 'dashboard',
125+
resourceName: this.physicalName,
126+
});
114127
}
115128

116129
/**

0 commit comments

Comments
 (0)