Skip to content

Commit

Permalink
docs(core): add missing cfnOptions in README (#5490)
Browse files Browse the repository at this point in the history
`condition` is available under `cfnOptions` in `CfnResource`.
  • Loading branch information
jogold authored and mergify[bot] committed Dec 19, 2019
1 parent 746ba32 commit 93c2ddb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@aws-cdk/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,15 @@ stack.partition;

CloudFormation resources can also specify [resource
attributes][cfn-resource-attributes]. The `CfnResource` class allows
accessing those though the `cfnOptions` property:
accessing those through the `cfnOptions` property:

```ts
const rawBucket = new s3.CfnBucket(this, 'Bucket', { /* ... */ });
// -or-
const rawBucket = bucket.node.defaultChild as s3.CfnBucket;

// then
rawBucket.condition = new CfnCondition(this, 'EnableBucket', { /* ... */ });
rawBucket.cfnOptions.condition = new CfnCondition(this, 'EnableBucket', { /* ... */ });
rawBucket.cfnOptions.metadata = {
metadataKey: 'MetadataValue',
};
Expand Down

0 comments on commit 93c2ddb

Please sign in to comment.