-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cloudwatch): expose dashboardName property on the L2 Dashboard construct #17721
Conversation
@@ -108,6 +113,8 @@ export class Dashboard extends Resource { | |||
}), | |||
}); | |||
|
|||
this.dashboardName = dashboard.dashboardName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the dashboard name is the resource physicalName
you need to use getResourceNameAttribute
.
This will ensure that if a name is not passed the Ref
value will be used (and resolved at deploy time).
Take a look at examples such as S3 bucketName
, autoscaling autoScalingGroupName
@@ -161,6 +161,21 @@ describe('Dashboard', () => { | |||
|
|||
}); | |||
|
|||
test('DashboardName is exposed correctly when provided', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tests is redundant, If this member visibility change it will be caught by the API compatibility check.
I have marked the PR as no test required so it will pass the linter, lets remove this test
Pull request has been modified.
Updated on fa90485:
|
@NetaNir any updates here? |
@@ -108,6 +113,9 @@ export class Dashboard extends Resource { | |||
}), | |||
}); | |||
|
|||
this.dashboardName = this.getResourceNameAttribute(dashboard.ref); | |||
// dashboard.dashboardName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
Pull request has been modified.
Pull request has been modified.
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Exposes
dashboardName
property onDashboard
construct.closes issue #17648
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license