Skip to content

Commit

Permalink
Add README entry (required)
Browse files Browse the repository at this point in the history
  • Loading branch information
zakwalters committed Mar 25, 2020
1 parent ea625aa commit 9a32cd6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/@aws-cdk/aws-iam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@ const role = new iam.Role(this, 'MyRole', {
});
```
The `PrincipalWithConditions` class can be used to add conditions to a
principal, especially those that don't take a `conditions` parameter in their
constructor. The `principal.withConditions()` method can be used to create a
`PrincipalWithConditions` from an existing principal, for example:
```ts
const principal = new iam.AccountPrincipal('123456789000')
.withConditions({ StringEquals: { foo: "baz" } });
```
### Parsing JSON Policy Documents
The `PolicyDocument.fromJson` and `PolicyStatement.fromJson` static methods can be used to parse JSON objects. For example:
Expand Down

0 comments on commit 9a32cd6

Please sign in to comment.