Skip to content

Commit

Permalink
doc(iam): update references to addManagedPolicy (#3511)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirskiy authored and Elad Ben-Israel committed Aug 6, 2019
1 parent 75d06fd commit fd02fc0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-iam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ the policy either by calling `xxx.attachInlinePolicy(policy)` or `policy.attachT

[attaching policies to user and group](test/example.attaching.lit.ts)

Managed policies can be attached using `xxx.attachManagedPolicy(arn)`:
Managed policies can be attached using `xxx.addManagedPolicy(ManagedPolicy.fromAwsManagedPolicyName(policyName))`:

[attaching managed policies](test/example.managedpolicy.lit.ts)

Expand Down
5 changes: 3 additions & 2 deletions packages/@aws-cdk/aws-iam/lib/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ export interface GroupProps {
readonly groupName?: string;

/**
* A list managed policies associated with this role.
* A list of managed policies associated with this role.
*
* You can add managed policies later using `attachManagedPolicy(policy)`.
* You can add managed policies later using
* `addManagedPolicy(ManagedPolicy.fromAwsManagedPolicyName(policyName))`.
*
* @default - No managed policies.
*/
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-iam/lib/role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export interface RoleProps {
/**
* A list of managed policies associated with this role.
*
* You can add managed policies later using `attachManagedPolicy(arn)`.
* You can add managed policies later using
* `addManagedPolicy(ManagedPolicy.fromAwsManagedPolicyName(policyName))`.
*
* @default - No managed policies.
*/
Expand Down
5 changes: 3 additions & 2 deletions packages/@aws-cdk/aws-iam/lib/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ export interface UserProps {
readonly groups?: IGroup[];

/**
* A list managed policies associated with this role.
* A list of managed policies associated with this role.
*
* You can add managed policies later using `attachManagedPolicy(policy)`.
* You can add managed policies later using
* `addManagedPolicy(ManagedPolicy.fromAwsManagedPolicyName(policyName))`.
*
* @default - No managed policies.
*/
Expand Down

0 comments on commit fd02fc0

Please sign in to comment.