Class ApiGatewayToKinesisStreams.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ApiGatewayToKinesisStreams>
- Enclosing class:
ApiGatewayToKinesisStreams
ApiGatewayToKinesisStreams.-
Method Summary
Modifier and TypeMethodDescriptionadditionalPutRecordRequestTemplates(Map<String, String> additionalPutRecordRequestTemplates) Optional PutRecord Request Templates for content-types other thanapplication/json.additionalPutRecordsRequestTemplates(Map<String, String> additionalPutRecordsRequestTemplates) Optional PutRecords Request Templates for content-types other thanapplication/json.apiGatewayProps(software.amazon.awscdk.services.apigateway.RestApiProps apiGatewayProps) Optional user-provided props to override the default props for the API Gateway.build()createCloudWatchAlarms(Boolean createCloudWatchAlarms) Whether to create recommended CloudWatch alarms.existingStreamObj(software.amazon.awscdk.services.kinesis.Stream existingStreamObj) Existing instance of Kinesis Stream, providing both this andkinesisStreamPropswill cause an error.kinesisStreamProps(software.amazon.awscdk.services.kinesis.StreamProps kinesisStreamProps) Optional user-provided props to override the default props for the Kinesis Data Stream.logGroupProps(software.amazon.awscdk.services.logs.LogGroupProps logGroupProps) User provided props to override the default props for the CloudWatchLogs LogGroup.putRecordIntegrationResponses(List<? extends software.amazon.awscdk.services.apigateway.IntegrationResponse> putRecordIntegrationResponses) Optional, custom API Gateway Integration Response for the PutRecord action.putRecordRequestModel(software.amazon.awscdk.services.apigateway.ModelOptions putRecordRequestModel) API Gateway request model for the PutRecord action.putRecordRequestTemplate(String putRecordRequestTemplate) API Gateway request template for the PutRecord action.putRecordsIntegrationResponses(List<? extends software.amazon.awscdk.services.apigateway.IntegrationResponse> putRecordsIntegrationResponses) Optional, custom API Gateway Integration Response for the PutRecord action.putRecordsRequestModel(software.amazon.awscdk.services.apigateway.ModelOptions putRecordsRequestModel) API Gateway request model for the PutRecords action.putRecordsRequestTemplate(String putRecordsRequestTemplate) API Gateway request template for the PutRecords action for the defaultapplication/jsoncontent-type.
-
Method Details
-
create
public static ApiGatewayToKinesisStreams.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope-- represents the scope for all the resources.
id-- this is a a scope-unique id.
- Returns:
- a new instance of
ApiGatewayToKinesisStreams.Builder.
-
additionalPutRecordRequestTemplates
public ApiGatewayToKinesisStreams.Builder additionalPutRecordRequestTemplates(Map<String, String> additionalPutRecordRequestTemplates) Optional PutRecord Request Templates for content-types other thanapplication/json.Use the
putRecordRequestTemplateproperty to set the request template for theapplication/jsoncontent-type.Default: - None
- Parameters:
additionalPutRecordRequestTemplates- Optional PutRecord Request Templates for content-types other thanapplication/json. This parameter is required.- Returns:
this
-
additionalPutRecordsRequestTemplates
public ApiGatewayToKinesisStreams.Builder additionalPutRecordsRequestTemplates(Map<String, String> additionalPutRecordsRequestTemplates) Optional PutRecords Request Templates for content-types other thanapplication/json.Use the
putRecordsRequestTemplateproperty to set the request template for theapplication/jsoncontent-type.Default: - None
- Parameters:
additionalPutRecordsRequestTemplates- Optional PutRecords Request Templates for content-types other thanapplication/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
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 andkinesisStreamPropswill cause an error.Default: - None
- Parameters:
existingStreamObj- Existing instance of Kinesis Stream, providing both this andkinesisStreamPropswill 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
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 defaultapplication/jsoncontent-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 defaultapplication/jsoncontent-type. This parameter is required.- Returns:
this
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ApiGatewayToKinesisStreams>- Returns:
- a newly built instance of
ApiGatewayToKinesisStreams.
-