Skip to content

Commit

Permalink
docs: improved 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 7a96bdc commit 61811bf
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/@aws-cdk/aws-appsync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,15 @@ To obtain the GraphQL API's log group as a `logs.ILogGroup` use the `logGroup` p
```ts
import * as logs from '@aws-cdk/aws-logs';

new GraphqlApi(this, 'api', {
name: 'api',
logConfig: {
retention: logs.RetentionDays.ONE_WEEK,
},
const logConfig: LogConfig = {
retention: RetentionDays.ONE_WEEK,
};

new GraphqlApi(this, 'GraphqlApi', {
authorizationConfig: {},
name: 'myApi',
schema: Schema.fromAsset(join(__dirname, 'myApi.graphql')),
logConfig,
});
```

Expand Down

0 comments on commit 61811bf

Please sign in to comment.