Skip to content

aws-cdk-lib: Names.uniqueId should take IConstruct instead of Construct as parameter #20584

@schabe77

Description

@schabe77

Describe the feature

Names.uniqueId only accepts Constructs. The method internally only works with Construct's nodes which can also be determined for IConstructs (Node.of). So it should be o.k. to pass an IConstruct.

Use Case

I use the Java-CDK and want to create a uniqueId of an IOpenIdConnectProvider, which is an IConstruct but no Construct.
In Java it's impossible to do compile that, in TypeScript it works without problems.

Proposed Solution

change the parameter type from Construct to IConstruct

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.26.0

Environment details (OS name and version, etc.)

Windows / Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    aws-cdk-libRelated to the aws-cdk-lib packageeffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.good first issueRelated to contributions. See CONTRIBUTING.mdp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions