Class ApiGatewayToLambda.Builder
java.lang.Object
software.amazon.awsconstructs.services.apigatewaylambda.ApiGatewayToLambda.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ApiGatewayToLambda>
- Enclosing class:
ApiGatewayToLambda
public static final class ApiGatewayToLambda.Builder
extends Object
implements software.amazon.jsii.Builder<ApiGatewayToLambda>
A fluent builder for
ApiGatewayToLambda.-
Method Summary
Modifier and TypeMethodDescriptionapiGatewayProps(Object apiGatewayProps) Optional user-provided props to override the default props for the API.build()static ApiGatewayToLambda.BuildercreateUsagePlan(Boolean createUsagePlan) Whether to create a Usage Plan attached to the API.existingLambdaObj(software.amazon.awscdk.services.lambda.Function existingLambdaObj) Existing instance of Lambda Function object, providing both this andlambdaFunctionPropswill cause an error.lambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps) User provided props to override the default props for the Lambda function.logGroupProps(software.amazon.awscdk.services.logs.LogGroupProps logGroupProps) User provided props to override the default props for the CloudWatchLogs LogGroup.
-
Method Details
-
create
- Parameters:
scope-- represents the scope for all the resources.
id-- this is a a scope-unique id.
- Returns:
- a new instance of
ApiGatewayToLambda.Builder.
-
apiGatewayProps
Optional user-provided props to override the default props for the API.Default: - Default props are used.
- Parameters:
apiGatewayProps- Optional user-provided props to override the default props for the API. This parameter is required.- Returns:
this
-
createUsagePlan
Whether to create a Usage Plan attached to the API.Must be true if apiGatewayProps.defaultMethodOptions.apiKeyRequired is true
Default: - true (to match legacy behavior)
- Parameters:
createUsagePlan- Whether to create a Usage Plan attached to the API. This parameter is required.- Returns:
this
-
existingLambdaObj
public ApiGatewayToLambda.Builder existingLambdaObj(software.amazon.awscdk.services.lambda.Function existingLambdaObj) Existing instance of Lambda Function object, providing both this andlambdaFunctionPropswill cause an error.Default: - None
- Parameters:
existingLambdaObj- Existing instance of Lambda Function object, providing both this andlambdaFunctionPropswill cause an error. This parameter is required.- Returns:
this
-
lambdaFunctionProps
public ApiGatewayToLambda.Builder lambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps) User provided props to override the default props for the Lambda function.Default: - Default props are used.
- Parameters:
lambdaFunctionProps- User provided props to override the default props for the Lambda function. This parameter is required.- Returns:
this
-
logGroupProps
public ApiGatewayToLambda.Builder logGroupProps(software.amazon.awscdk.services.logs.LogGroupProps logGroupProps) User provided props to override the default props for the CloudWatchLogs LogGroup.Default: - Default props are used
- Parameters:
logGroupProps- User provided props to override the default props for the CloudWatchLogs LogGroup. This parameter is required.- Returns:
this
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ApiGatewayToLambda>- Returns:
- a newly built instance of
ApiGatewayToLambda.
-