Skip to content
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

(iam): from_role_name is missing in python #19116

Closed
magicpotion opened this issue Feb 23, 2022 · 4 comments
Closed

(iam): from_role_name is missing in python #19116

magicpotion opened this issue Feb 23, 2022 · 4 comments
Assignees
Labels
guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged.

Comments

@magicpotion
Copy link

General Issue

from_role_name is missing in python

The Question

self.role = aws_iam.Role.from_role_name( self, id='role', role_name='ExampleRole' )

AttributeError: type object 'Role' has no attribute 'from_role_name'

https://docs.aws.amazon.com/cdk/api/v1/python/aws_cdk.aws_iam/Role.html#aws_cdk.aws_iam.Role.from_role_name

CDK CLI Version

2.8.0

Framework Version

No response

Node.js Version

No response

OS

No response

Language

Python

Language Version

No response

Other information

No response

@magicpotion magicpotion added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Feb 23, 2022
@peterwoodworth
Copy link
Contributor

This feature is new to v2.13.0. You'll have to update to this version if you want to use this feature 🙂

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@magicpotion
Copy link
Author

magicpotion commented Feb 23, 2022

Thanks,
May I know where is it specified in changelog?
https://github.com/aws/aws-cdk/releases/tag/v2.13.0

and how can we check in documentation, which method is available since which version?

@peterwoodworth
Copy link
Contributor

It was added in #14225 as part of another feature, so this is understandably tricky to find :)

Unfortunately, I don't think there's a super quick or user friendly way to check became available in which version if the change isn't directly called out in the changelog.

What I did was I checked the git blame of the function in the source code https://github.com/aws/aws-cdk/blob/v1.145.0/packages/@aws-cdk/aws-iam/lib/role.ts#L283
I checked the commit which created it, and saw it was merged only 8 days ago. So it was pretty easy to figure out it's only on the most recent version.

however if the change is a lot older, you can check this by viewing the version tags on the commit which created the functionality you're checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

4 participants