Skip to content

fix(aws-cdk-lib): make grants factory methods public#36317

Merged
mergify[bot] merged 1 commit intomainfrom
mrgrain/feat/aws-cdk-lib/make-grants-factory-public
Dec 6, 2025
Merged

fix(aws-cdk-lib): make grants factory methods public#36317
mergify[bot] merged 1 commit intomainfrom
mrgrain/feat/aws-cdk-lib/make-grants-factory-public

Conversation

@mrgrain
Copy link
Copy Markdown
Contributor

@mrgrain mrgrain commented Dec 6, 2025

Issue # (if applicable)

N/A

Reason for this change

The grants factory methods BucketGrants.fromBucket() and StateMachineGrants.fromStateMachine() were marked as internal but are useful for construct authors who want to create custom grant patterns or extend existing grant functionality.

Description of changes

  • Removed @internal JSDoc markers from factory methods
  • Renamed methods from _fromBucket to fromBucket and _fromStateMachine to fromStateMachine to follow public API naming conventions
  • Updated all internal usages to use the new public method names

This change makes it possible for construct authors to create grants objects for custom resources that implement IBucketRef or IStateMachineRef.

Describe any new or updated permissions being added

No new or updated IAM permissions are being added. This change only exposes existing grant functionality through a public API.

Description of how you validated changes

Existing unit tests continue to pass with the renamed methods.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added the p2 label Dec 6, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team December 6, 2025 03:01
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Dec 6, 2025
@mrgrain mrgrain changed the title feat(aws-cdk-lib): make grants factory methods public fix(aws-cdk-lib): make grants factory methods public Dec 6, 2025
@mrgrain mrgrain added pr-linter/exempt-test The PR linter will not require test changes pr-linter/exempt-integ-test The PR linter will not require integ test changes labels Dec 6, 2025
Make BucketGrants.fromBucket() and StateMachineGrants.fromStateMachine() public APIs by removing @internal markers and underscore prefixes.
@mrgrain mrgrain force-pushed the mrgrain/feat/aws-cdk-lib/make-grants-factory-public branch from ea891a0 to cbe4491 Compare December 6, 2025 03:02
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 6, 2025

TestsPassed ❌️SkippedFailed
Security Guardian Results0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 6, 2025

TestsPassed ❌️SkippedFailed
Security Guardian Results with resolved templates0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Dec 6, 2025
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Dec 6, 2025

Merge Queue Status

✅ The pull request has been merged

This pull request spent 5 seconds in the queue, with no time running CI.
The checks were run in-place.

Required conditions to merge

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Dec 6, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 7dde625 into main Dec 6, 2025
29 of 30 checks passed
@mergify mergify bot deleted the mrgrain/feat/aws-cdk-lib/make-grants-factory-public branch December 6, 2025 10:58
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 6, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 6, 2025
@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Dec 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes pr-linter/exempt-test The PR linter will not require test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants