Package: aws-solutions-constructs.aws-apigateway-kinesisstreams
aws-apigateway-kinesisstreams module---Reference Documentation:https://docs.aws.amazon.com/solutions/latest/constructs/LanguagePackagePythonaws_solutions_constructs.aws_apigateway_kinesisstreamsTypescript@aws-solutions-constructs/aws-apigateway-kinesisstreamsJavasoftware.amazon.awsconstructs.services.apigatewaykinesisstreamsOverviewThis AWS Solutions Construct implements an Amazon API Gateway connected to an Amazon Kinesis Data Stream pattern.Here is a minimal deployable pattern definition:Typescriptimport{Construct}from'constructs';import{Stack,StackProps}from'aws-cdk-lib';import{ApiGatewayToKinesisStreams,ApiGatewayToKinesisStreamsProps}from'@aws-solutions-constructs/aws-apigateway-kinesisstreams';newApiGatewayToKinesisStreams(this,'test-apigw-kinesis',{});Pythonfromaws_solutions_constructs.aws_apigateway_kinesisstreamsimportApiGatewayToKinesisStreamsfromaws_cdkimportStackfromconstructsimportConstructApiGatewayToKinesisStreams(self,'test-apigw-kinesis')Javaimportsoftware.constructs.Construct;importsoftware.amazon.awscdk.Stack;importsoftware.amazon.awscdk.StackProps;importsoftware.amazon.awsconstructs.services.apigatewaykinesisstreams.*;newApiGatewayToKinesisStreams(this,"test-apigw-kinesis",newApiGatewayToKinesisStreamsProps.Builder().build());Pattern Construct PropsNameTypeDescriptionapiGatewayProps?api.RestApiPropsOptional user-provided props to override the default props for the API Gateway.putRecordRequestTemplate?stringAPI Gateway request template for the PutRecord action. If not provided, a default one will be used.additionalPutRecordRequestTemplates?{ [contentType: string]: string; }Optional PutRecord Request Templates for content-types other thanapplication/json. Use theputRecordRequestTemplateproperty to set the request template for theapplication/jsoncontent-type.putRecordRequestModel?api.ModelOptionsAPI Gateway request model for the PutRecord action. If not provided, a default one will be created.putRecordIntegrationResponses?api.IntegrationResponses[]Optional, custom API Gateway Integration Response for the PutRecord action.putRecordsRequestTemplate?stringAPI Gateway request template for the PutRecords action. If not provided, a default one will be used.additionalPutRecordsRequestTemplates?{ [contentType: string]: string; }Optional PutRecords Request Templates for content-types other thanapplication/json. Use theputRecordsRequestTemplateproperty to set the request template for theapplication/jsoncontent-type.putRecordsRequestModel?api.ModelOptionsAPI Gateway request model for the PutRecords action. If not provided, a default one will be created.putRecordsIntegrationResponses?api.IntegrationResponses[]Optional, custom API Gateway Integration Response for the PutRecords action.existingStreamObj?kinesis.StreamExisting instance of Kinesis Stream, providing both this andkinesisStreamPropswill cause an error.kinesisStreamProps?kinesis.StreamPropsOptional user-provided props to override the default props for the Kinesis stream.logGroupProps?logs.LogGroupPropsUser provided props to override the default props for for the CloudWatchLogs LogGroup.createCloudWatchAlarmsbooleanWhether to create recommended CloudWatch alarms for Kinesis Data Stream. Default value is set totruePattern PropertiesNameTypeDescriptionapiGatewayapi.RestApiReturns an instance of the API Gateway REST API created by the pattern.apiGatewayRoleiam.RoleReturns an instance of the iam.Role created by the construct for API Gateway.apiGatewayCloudWatchRole?iam.RoleReturns an instance of the iam.Role created by the construct for API Gateway for CloudWatch access.apiGatewayLogGrouplogs.LogGroupReturns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch.kinesisStreamkinesis.StreamReturns an instance of the Kinesis stream created or used by the pattern.cloudwatchAlarms?cloudwatch.Alarm[]Returns an array of recommended CloudWatch Alarms created by the construct for Kinesis Data streamSample API UsageMethodRequest PathRequest BodyStream ActionDescriptionPOST/record{ "data": "Hello World!", "partitionKey": "pk001" }kinesis:PutRecordWrites a single data record into the stream.POST/records{ "records": [{ "data": "abc", "partitionKey": "pk001" }, { "data": "xyz", "partitionKey": "pk001" }] }kinesis:PutRecordsWrites multiple data records into the stream in a single call.Default settingsOut of the box implementation of the Construct without any override will set the following defaults:Amazon API GatewayDeploy an edge-optimized API endpointEnable CloudWatch logging for API GatewayConfigure least privilege access IAM role for API GatewaySet the default authorizationType for all API methods to IAMEnable X-Ray TracingValidate request body before passing data to KinesisAmazon Kinesis Data StreamConfigure least privilege access IAM role for Kinesis StreamEnable server-side encryption for Kinesis Stream using AWS Managed KMS KeyArchitecture© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.