Class ApiGatewayToKinesisStreams.Builder

java.lang.Object
software.amazon.awsconstructs.services.apigatewaykinesisstreams.ApiGatewayToKinesisStreams.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<ApiGatewayToKinesisStreams>
Enclosing class:
ApiGatewayToKinesisStreams

public static final class ApiGatewayToKinesisStreams.Builder extends Object implements software.amazon.jsii.Builder<ApiGatewayToKinesisStreams>
A fluent builder for ApiGatewayToKinesisStreams.
  • Method Details

    • create

      public static ApiGatewayToKinesisStreams.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope -
      • represents the scope for all the resources.
      This parameter is required.
      id -
      • this is a a scope-unique id.
      This parameter is required.
      Returns:
      a new instance of ApiGatewayToKinesisStreams.Builder.
    • additionalPutRecordRequestTemplates

      public ApiGatewayToKinesisStreams.Builder additionalPutRecordRequestTemplates(Map<String,String> additionalPutRecordRequestTemplates)
      Optional PutRecord Request Templates for content-types other than application/json.

      Use the putRecordRequestTemplate property to set the request template for the application/json content-type.

      Default: - None

      Parameters:
      additionalPutRecordRequestTemplates - Optional PutRecord Request Templates for content-types other than application/json. This parameter is required.
      Returns:
      this
    • additionalPutRecordsRequestTemplates

      public ApiGatewayToKinesisStreams.Builder additionalPutRecordsRequestTemplates(Map<String,String> additionalPutRecordsRequestTemplates)
      Optional PutRecords Request Templates for content-types other than application/json.

      Use the putRecordsRequestTemplate property to set the request template for the application/json content-type.

      Default: - None

      Parameters:
      additionalPutRecordsRequestTemplates - Optional PutRecords Request Templates for content-types other than application/json. This parameter is required.
      Returns:
      this
    • apiGatewayProps

      public ApiGatewayToKinesisStreams.Builder apiGatewayProps(software.amazon.awscdk.services.apigateway.RestApiProps apiGatewayProps)
      Optional user-provided props to override the default props for the API Gateway.

      Default: - Default properties are used.

      Parameters:
      apiGatewayProps - Optional user-provided props to override the default props for the API Gateway. This parameter is required.
      Returns:
      this
    • createCloudWatchAlarms

      public ApiGatewayToKinesisStreams.Builder createCloudWatchAlarms(Boolean createCloudWatchAlarms)
      Whether to create recommended CloudWatch alarms.

      Default: - Alarms are created

      Parameters:
      createCloudWatchAlarms - Whether to create recommended CloudWatch alarms. This parameter is required.
      Returns:
      this
    • existingStreamObj

      public ApiGatewayToKinesisStreams.Builder existingStreamObj(software.amazon.awscdk.services.kinesis.Stream existingStreamObj)
      Existing instance of Kinesis Stream, providing both this and kinesisStreamProps will cause an error.

      Default: - None

      Parameters:
      existingStreamObj - Existing instance of Kinesis Stream, providing both this and kinesisStreamProps will cause an error. This parameter is required.
      Returns:
      this
    • kinesisStreamProps

      public ApiGatewayToKinesisStreams.Builder kinesisStreamProps(software.amazon.awscdk.services.kinesis.StreamProps kinesisStreamProps)
      Optional user-provided props to override the default props for the Kinesis Data Stream.

      Default: - Default properties are used.

      Parameters:
      kinesisStreamProps - Optional user-provided props to override the default props for the Kinesis Data Stream. This parameter is required.
      Returns:
      this
    • logGroupProps

      public ApiGatewayToKinesisStreams.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
    • putRecordIntegrationResponses

      public ApiGatewayToKinesisStreams.Builder putRecordIntegrationResponses(List<? extends software.amazon.awscdk.services.apigateway.IntegrationResponse> putRecordIntegrationResponses)
      Optional, custom API Gateway Integration Response for the PutRecord action.

      Default: - [{statusCode:"200"},{statusCode:"500",responseTemplates:{"text/html":"Error"},selectionPattern:"500"}]

      Parameters:
      putRecordIntegrationResponses - Optional, custom API Gateway Integration Response for the PutRecord action. This parameter is required.
      Returns:
      this
    • putRecordRequestModel

      public ApiGatewayToKinesisStreams.Builder putRecordRequestModel(software.amazon.awscdk.services.apigateway.ModelOptions putRecordRequestModel)
      API Gateway request model for the PutRecord action.

      If not provided, a default one will be created.

      Default: - {"$schema":"http://json-schema.org/draft-04/schema#","title":"PutRecord proxy single-record payload","type":"object", "required":["data","partitionKey"],"properties":{"data":{"type":"string"},"partitionKey":{"type":"string"}}}

      Parameters:
      putRecordRequestModel - API Gateway request model for the PutRecord action. This parameter is required.
      Returns:
      this
    • putRecordRequestTemplate

      public ApiGatewayToKinesisStreams.Builder putRecordRequestTemplate(String putRecordRequestTemplate)
      API Gateway request template for the PutRecord action.

      If not provided, a default one will be used.

      Default: - { "StreamName": "${this.kinesisStream.streamName}", "Data": "$util.base64Encode($input.json('$.data'))", "PartitionKey": "$input.path('$.partitionKey')" }

      Parameters:
      putRecordRequestTemplate - API Gateway request template for the PutRecord action. This parameter is required.
      Returns:
      this
    • putRecordsIntegrationResponses

      public ApiGatewayToKinesisStreams.Builder putRecordsIntegrationResponses(List<? extends software.amazon.awscdk.services.apigateway.IntegrationResponse> putRecordsIntegrationResponses)
      Optional, custom API Gateway Integration Response for the PutRecord action.

      Default: - [{statusCode:"200"},{statusCode:"500",responseTemplates:{"text/html":"Error"},selectionPattern:"500"}]

      Parameters:
      putRecordsIntegrationResponses - Optional, custom API Gateway Integration Response for the PutRecord action. This parameter is required.
      Returns:
      this
    • putRecordsRequestModel

      public ApiGatewayToKinesisStreams.Builder putRecordsRequestModel(software.amazon.awscdk.services.apigateway.ModelOptions putRecordsRequestModel)
      API Gateway request model for the PutRecords action.

      If not provided, a default one will be created.

      Default: - {"$schema":"http://json-schema.org/draft-04/schema#","title":"PutRecords proxy payload data","type":"object","required":["records"], "properties":{"records":{"type":"array","items":{"type":"object", "required":["data","partitionKey"],"properties":{"data":{"type":"string"},"partitionKey":{"type":"string"}}}}}}

      Parameters:
      putRecordsRequestModel - API Gateway request model for the PutRecords action. This parameter is required.
      Returns:
      this
    • putRecordsRequestTemplate

      public ApiGatewayToKinesisStreams.Builder putRecordsRequestTemplate(String putRecordsRequestTemplate)
      API Gateway request template for the PutRecords action for the default application/json content-type.

      If not provided, a default one will be used.

      Default: - { "StreamName": "${this.kinesisStream.streamName}", "Records": [ #foreach($elem in $input.path('$.records')) { "Data": "$util.base64Encode($elem.data)", "PartitionKey": "$elem.partitionKey"}#if($foreach.hasNext),#end #end ] }

      Parameters:
      putRecordsRequestTemplate - API Gateway request template for the PutRecords action for the default application/json content-type. This parameter is required.
      Returns:
      this
    • build

      Specified by:
      build in interface software.amazon.jsii.Builder<ApiGatewayToKinesisStreams>
      Returns:
      a newly built instance of ApiGatewayToKinesisStreams.