Skip to content

Commit

Permalink
docs: add an example of log retention
Browse files Browse the repository at this point in the history
  • Loading branch information
nikovirtala committed Aug 3, 2022
1 parent d2ad889 commit 7a96bdc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/@aws-cdk/aws-appsync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,17 @@ log data set to never expire. If you want to set a different expiration period,
To obtain the GraphQL API's log group as a `logs.ILogGroup` use the `logGroup` property of the
`GraphqlApi` construct.

```ts
import * as logs from '@aws-cdk/aws-logs';

new GraphqlApi(this, 'api', {
name: 'api',
logConfig: {
retention: logs.RetentionDays.ONE_WEEK,
},
});
```

## Schema

Every GraphQL Api needs a schema to define the Api. CDK offers `appsync.Schema`
Expand Down

0 comments on commit 7a96bdc

Please sign in to comment.