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>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • apiIntegrations

      public OpenApiGatewayToLambdaProps.Builder apiIntegrations(List<? extends ApiIntegration> apiIntegrations)
      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)
      Parameters:
      apiDefinitionAsset - Local file asset of the OpenAPI spec file.
      Returns:
      this
    • apiDefinitionBucket

      public OpenApiGatewayToLambdaProps.Builder apiDefinitionBucket(software.amazon.awscdk.services.s3.IBucket apiDefinitionBucket)
      Parameters:
      apiDefinitionBucket - S3 Bucket where the OpenAPI spec file is located. When specifying this property, apiDefinitionKey must also be specified.
      Returns:
      this
    • apiDefinitionJson

      public OpenApiGatewayToLambdaProps.Builder apiDefinitionJson(Object apiDefinitionJson)
      Parameters:
      apiDefinitionJson - OpenAPI specification represented in a JSON object to be embedded in the CloudFormation template. IMPORTANT - Including the spec in the template introduces a risk of the template growing too big, but there are some use cases that require an embedded spec. Unless your use case explicitly requires an embedded spec you should pass your spec as an S3 asset.
      Returns:
      this
    • apiDefinitionKey

      public OpenApiGatewayToLambdaProps.Builder apiDefinitionKey(String apiDefinitionKey)
      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)
      Parameters:
      apiGatewayProps - Optional user-provided props to override the default props for the API.
      Returns:
      this
    • internalTransformMemorySize

      public OpenApiGatewayToLambdaProps.Builder internalTransformMemorySize(Number internalTransformMemorySize)
      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)
      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)
      Parameters:
      logGroupProps - User provided props to override the default props for the CloudWatchLogs LogGroup.
      Returns:
      this
    • build

      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<OpenApiGatewayToLambdaProps>
      Returns:
      a new instance of OpenApiGatewayToLambdaProps
      Throws:
      NullPointerException - if any required attribute was not provided