Skip to content

Commit e26e480

Browse files
committed
docs: example of ApiGateway use
1 parent 734254b commit e26e480

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

packages/cdkConstructs/src/constructs/RestApiGateway.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,21 @@ export class RestApiGateway extends Construct {
4848
public readonly api: RestApi
4949
public readonly role: IRole
5050

51-
/** Builds API Gateway infrastructure and validates CSOC forwarding configuration. */
51+
/**
52+
* Builds API Gateway infrastructure and validates CSOC forwarding configuration.
53+
* @example
54+
* ```ts
55+
* const api = new RestApiGateway(this, "MyApi", {
56+
* stackName: "my-service",
57+
* logRetentionInDays: 30,
58+
* mutualTlsTrustStoreKey: "truststore.pem",
59+
* forwardCsocLogs: true,
60+
* csocApiGatewayDestination: "arn:aws:logs:eu-west-2:123456789012:destination:csoc",
61+
* executionPolicies: [myLambdaInvokePolicy]
62+
* })
63+
* api.api.root.addResource("patients")
64+
* ```
65+
*/
5266
public constructor(scope: Construct, id: string, props: RestApiGatewayProps) {
5367
super(scope, id)
5468

0 commit comments

Comments
 (0)