Skip to content

Commit 734254b

Browse files
committed
docs: JS doc
1 parent b500519 commit 734254b

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

packages/cdkConstructs/src/constructs/RestApiGateway.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,26 @@ import {ApiGateway as ApiGatewayTarget} from "aws-cdk-lib/aws-route53-targets"
2929
import {NagSuppressions} from "cdk-nag"
3030

3131
export interface RestApiGatewayProps {
32+
/** Stack name, used as prefix for resource naming and DNS records. */
3233
readonly stackName: string
34+
/** Shared retention period for API and deployment-related log groups. */
3335
readonly logRetentionInDays: number
36+
/** Truststore object key to enable mTLS; leave undefined to disable mTLS. */
3437
readonly mutualTlsTrustStoreKey: string | undefined
38+
/** Enables creation of a second subscription filter to forward logs to CSOC. */
3539
readonly forwardCsocLogs: boolean
40+
/** Destination ARN used by the optional CSOC subscription filter. */
3641
readonly csocApiGatewayDestination: string
42+
/** Managed policies attached to the API Gateway execution role. */
3743
readonly executionPolicies: Array<IManagedPolicy>
3844
}
3945

46+
/** Creates a regional REST API with standard logging, DNS, and optional mTLS/CSOC integration. */
4047
export class RestApiGateway extends Construct {
4148
public readonly api: RestApi
4249
public readonly role: IRole
4350

51+
/** Builds API Gateway infrastructure and validates CSOC forwarding configuration. */
4452
public constructor(scope: Construct, id: string, props: RestApiGatewayProps) {
4553
super(scope, id)
4654

packages/cdkConstructs/src/constructs/RestApiGateway/LambdaEndpoint.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,28 @@ import {HttpMethod, IFunction} from "aws-cdk-lib/aws-lambda"
44
import {Construct} from "constructs"
55

66
export interface LambdaFunctionHolder {
7+
/** Lambda invoked by this API resource method. */
78
readonly function: IFunction
89
}
910

1011
export interface LambdaEndpointProps {
12+
/** Parent API resource under which this endpoint path is created. */
1113
parentResource: IResource
14+
/** Path segment added beneath the parent resource. */
1215
readonly resourceName: string
16+
/** HTTP method exposed on the created API resource. */
1317
readonly method: HttpMethod
18+
/** Role assumed by API Gateway when invoking the integration Lambda. */
1419
restApiGatewayRole: IRole
20+
/** Lambda reference used by the generated integration. */
1521
lambdaFunction: LambdaFunctionHolder
1622
}
1723

24+
/** Adds a child API resource and wires it to a Lambda integration with explicit credentials. */
1825
export class LambdaEndpoint extends Construct {
1926
resource: IResource
2027

28+
/** Creates the resource/method pair and stores the resulting API resource handle. */
2129
public constructor(scope: Construct, id: string, props: LambdaEndpointProps) {
2230
super(scope, id)
2331

packages/cdkConstructs/src/constructs/RestApiGateway/accessLogFormat.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {AccessLogFormat} from "aws-cdk-lib/aws-apigateway"
22

3+
/** Returns the structured API Gateway access log schema expected by platform observability pipelines. */
34
export const accessLogFormat = () => {
45
return AccessLogFormat.custom(JSON.stringify({
56
requestId: "$context.requestId",

0 commit comments

Comments
 (0)