Skip to content

Commit a1df570

Browse files
authored
feat(cognito): make grant() available on IUserPool (#20799)
Added in #20285 but missing on `IUserPool` ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 2566017 commit a1df570

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/@aws-cdk/aws-cognito/lib/user-pool.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,12 @@ export interface IUserPool extends IResource {
703703
* Register an identity provider with this user pool.
704704
*/
705705
registerIdentityProvider(provider: IUserPoolIdentityProvider): void;
706+
707+
/**
708+
* Adds an IAM policy statement associated with this user pool to an
709+
* IAM principal's policy.
710+
*/
711+
grant(grantee: IGrantable, ...actions: string[]): Grant;
706712
}
707713

708714
abstract class UserPoolBase extends Resource implements IUserPool {
@@ -735,10 +741,6 @@ abstract class UserPoolBase extends Resource implements IUserPool {
735741
this.identityProviders.push(provider);
736742
}
737743

738-
/**
739-
* Adds an IAM policy statement associated with this user pool to an
740-
* IAM principal's policy.
741-
*/
742744
public grant(grantee: IGrantable, ...actions: string[]): Grant {
743745
return Grant.addToPrincipal({
744746
grantee,

0 commit comments

Comments
 (0)