(cloudfront): (Replace intanceof Role with Role.isRole method) #24447
Labels
@aws-cdk/aws-cloudfront
Related to Amazon CloudFront
@aws-cdk/pipelines
CDK Pipelines library
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
Describe the feature
I create
Role.isRole()
method at #24340 (#24340 (comment))But below points use
instanceof iam.Role
.aws-cdk/packages/@aws-cdk/aws-cloudfront/lib/web-distribution.ts
Line 1056 in 3d7505b
aws-cdk/packages/@aws-cdk/aws-cloudfront/lib/private/cache-behavior.ts
Line 78 in 3d7505b
aws-cdk/packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function.ts
Line 253 in 3d7505b
aws-cdk/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts
Line 767 in 3d7505b
Use Case
Since instanceOf is not a product to be used for strict type determination, it is better to replace it.
fyi: https://github.com/aws/aws-cdk/pull/20564/files#diff-fe41afc44afd9acb16980754990f93acb596ed37662296575ea2fbe1c5531b50R203-R206
Proposed Solution
No response
Other Information
No response
Acknowledgements
CDK version used
2.67.0
Environment details (OS name and version, etc.)
macOS Big Sur
The text was updated successfully, but these errors were encountered: