Class OpenApiGatewayToLambdaProps.Builder
java.lang.Object
software.amazon.awsconstructs.services.openapigatewaylambda.OpenApiGatewayToLambdaProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<OpenApiGatewayToLambdaProps>
- Enclosing interface:
OpenApiGatewayToLambdaProps
public static final class OpenApiGatewayToLambdaProps.Builder
extends Object
implements software.amazon.jsii.Builder<OpenApiGatewayToLambdaProps>
A builder for
OpenApiGatewayToLambdaProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapiDefinitionAsset(software.amazon.awscdk.services.s3.assets.Asset apiDefinitionAsset) Sets the value ofOpenApiGatewayToLambdaProps.getApiDefinitionAsset()apiDefinitionBucket(software.amazon.awscdk.services.s3.IBucket apiDefinitionBucket) Sets the value ofOpenApiGatewayToLambdaProps.getApiDefinitionBucket()apiDefinitionKey(String apiDefinitionKey) Sets the value ofOpenApiGatewayToLambdaProps.getApiDefinitionKey()apiGatewayProps(software.amazon.awscdk.services.apigateway.RestApiBaseProps apiGatewayProps) Sets the value ofOpenApiGatewayToLambdaProps.getApiGatewayProps()apiIntegrations(List<? extends ApiIntegration> apiIntegrations) Sets the value ofOpenApiGatewayToLambdaProps.getApiIntegrations()build()Builds the configured instance.internalTransformMemorySize(Number internalTransformMemorySize) Sets the value ofOpenApiGatewayToLambdaProps.getInternalTransformMemorySize()internalTransformTimeout(software.amazon.awscdk.Duration internalTransformTimeout) Sets the value ofOpenApiGatewayToLambdaProps.getInternalTransformTimeout()logGroupProps(software.amazon.awscdk.services.logs.LogGroupProps logGroupProps) Sets the value ofOpenApiGatewayToLambdaProps.getLogGroupProps()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiIntegrations
public OpenApiGatewayToLambdaProps.Builder apiIntegrations(List<? extends ApiIntegration> apiIntegrations) Sets the value ofOpenApiGatewayToLambdaProps.getApiIntegrations()- Parameters:
apiIntegrations- One or more key-value pairs that contain an id for the api integration and either an existing lambda function or an instance of the LambdaProps. This parameter is required. Example: const apiIntegrations: ApiIntegration[] = [ { id: 'MessagesHandler', lambdaFunctionProps: { runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(${__dirname}/messages-lambda), } }, { id: 'PhotosHandler', existingLambdaObj: new lambda.Function(this, 'PhotosLambda', { runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(${__dirname}/photos-lambda), }) } ]- Returns:
this
-
apiDefinitionAsset
public OpenApiGatewayToLambdaProps.Builder apiDefinitionAsset(software.amazon.awscdk.services.s3.assets.Asset apiDefinitionAsset) Sets the value ofOpenApiGatewayToLambdaProps.getApiDefinitionAsset()- Parameters:
apiDefinitionAsset- Local file asset of the OpenAPI spec file.- Returns:
this
-
apiDefinitionBucket
public OpenApiGatewayToLambdaProps.Builder apiDefinitionBucket(software.amazon.awscdk.services.s3.IBucket apiDefinitionBucket) Sets the value ofOpenApiGatewayToLambdaProps.getApiDefinitionBucket()- Parameters:
apiDefinitionBucket- S3 Bucket where the OpenAPI spec file is located. When specifying this property, apiDefinitionKey must also be specified.- Returns:
this
-
apiDefinitionKey
Sets the value ofOpenApiGatewayToLambdaProps.getApiDefinitionKey()- Parameters:
apiDefinitionKey- S3 Object name of the OpenAPI spec file. When specifying this property, apiDefinitionBucket must also be specified.- Returns:
this
-
apiGatewayProps
public OpenApiGatewayToLambdaProps.Builder apiGatewayProps(software.amazon.awscdk.services.apigateway.RestApiBaseProps apiGatewayProps) Sets the value ofOpenApiGatewayToLambdaProps.getApiGatewayProps()- Parameters:
apiGatewayProps- Optional user-provided props to override the default props for the API.- Returns:
this
-
internalTransformMemorySize
public OpenApiGatewayToLambdaProps.Builder internalTransformMemorySize(Number internalTransformMemorySize) Sets the value ofOpenApiGatewayToLambdaProps.getInternalTransformMemorySize()- Parameters:
internalTransformMemorySize- Optional user-defined memory size for the Lambda function custom resource installed to do the OpenAPI definition transformation. This setting does not affect the deployed architecture - only the ability for the Construct to complete its work.Defaults to 1024 MiB, but for larger files (hundreds of megabytes or gigabytes in size) this value may need to be increased.
- Returns:
this
-
internalTransformTimeout
public OpenApiGatewayToLambdaProps.Builder internalTransformTimeout(software.amazon.awscdk.Duration internalTransformTimeout) Sets the value ofOpenApiGatewayToLambdaProps.getInternalTransformTimeout()- Parameters:
internalTransformTimeout- Optional user-defined timeout for the Lambda function custom resource installed to do the OpenAPI definition transformation. This setting does not affect the deployed architecture - only the ability for the Construct to complete its work.Defaults to 1 minute, but for larger files (hundreds of megabytes or gigabytes in size) this value may need to be increased.
- Returns:
this
-
logGroupProps
public OpenApiGatewayToLambdaProps.Builder logGroupProps(software.amazon.awscdk.services.logs.LogGroupProps logGroupProps) Sets the value ofOpenApiGatewayToLambdaProps.getLogGroupProps()- Parameters:
logGroupProps- User provided props to override the default props for the CloudWatchLogs LogGroup.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<OpenApiGatewayToLambdaProps>- Returns:
- a new instance of
OpenApiGatewayToLambdaProps - Throws:
NullPointerException- if any required attribute was not provided
-