All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awsconstructs.services.apigatewaykinesisstreams.ApiGatewayToKinesisStreams Maven / Gradle / Ivy

package software.amazon.awsconstructs.services.apigatewaykinesisstreams;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.106.0 (build e852934)", date = "2024-12-24T18:32:46.871Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.apigatewaykinesisstreams.$Module.class, fqn = "@aws-solutions-constructs/aws-apigateway-kinesisstreams.ApiGatewayToKinesisStreams")
public class ApiGatewayToKinesisStreams extends software.constructs.Construct {

    protected ApiGatewayToKinesisStreams(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected ApiGatewayToKinesisStreams(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * @param scope 
  • represents the scope for all the resources.
This parameter is required. * @param id
  • this is a a scope-unique id.
This parameter is required. * @param props
  • user provided props for the construct.
This parameter is required. */ public ApiGatewayToKinesisStreams(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awsconstructs.services.apigatewaykinesisstreams.ApiGatewayToKinesisStreamsProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apigateway.RestApi getApiGateway() { return software.amazon.jsii.Kernel.get(this, "apiGateway", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apigateway.RestApi.class)); } public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.logs.LogGroup getApiGatewayLogGroup() { return software.amazon.jsii.Kernel.get(this, "apiGatewayLogGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.logs.LogGroup.class)); } public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.Role getApiGatewayRole() { return software.amazon.jsii.Kernel.get(this, "apiGatewayRole", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.Role.class)); } public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.kinesis.Stream getKinesisStream() { return software.amazon.jsii.Kernel.get(this, "kinesisStream", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.kinesis.Stream.class)); } public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.iam.Role getApiGatewayCloudWatchRole() { return software.amazon.jsii.Kernel.get(this, "apiGatewayCloudWatchRole", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.Role.class)); } public @org.jetbrains.annotations.Nullable java.util.List getCloudwatchAlarms() { return java.util.Optional.ofNullable((java.util.List)(software.amazon.jsii.Kernel.get(this, "cloudwatchAlarms", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Alarm.class))))).map(java.util.Collections::unmodifiableList).orElse(null); } /** * A fluent builder for {@link software.amazon.awsconstructs.services.apigatewaykinesisstreams.ApiGatewayToKinesisStreams}. */ public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param scope
  • represents the scope for all the resources.
This parameter is required. * @param id
  • this is a a scope-unique id.
This parameter is required. */ public static Builder create(final software.constructs.Construct scope, final java.lang.String id) { return new Builder(scope, id); } private final software.constructs.Construct scope; private final java.lang.String id; private final software.amazon.awsconstructs.services.apigatewaykinesisstreams.ApiGatewayToKinesisStreamsProps.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; this.props = new software.amazon.awsconstructs.services.apigatewaykinesisstreams.ApiGatewayToKinesisStreamsProps.Builder(); } /** * 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 *

* @return {@code this} * @param additionalPutRecordRequestTemplates Optional PutRecord Request Templates for content-types other than application/json. This parameter is required. */ public Builder additionalPutRecordRequestTemplates(final java.util.Map additionalPutRecordRequestTemplates) { this.props.additionalPutRecordRequestTemplates(additionalPutRecordRequestTemplates); return this; } /** * 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 *

* @return {@code this} * @param additionalPutRecordsRequestTemplates Optional PutRecords Request Templates for content-types other than application/json. This parameter is required. */ public Builder additionalPutRecordsRequestTemplates(final java.util.Map additionalPutRecordsRequestTemplates) { this.props.additionalPutRecordsRequestTemplates(additionalPutRecordsRequestTemplates); return this; } /** * Optional user-provided props to override the default props for the API Gateway. *

* Default: - Default properties are used. *

* @return {@code this} * @param apiGatewayProps Optional user-provided props to override the default props for the API Gateway. This parameter is required. */ public Builder apiGatewayProps(final software.amazon.awscdk.services.apigateway.RestApiProps apiGatewayProps) { this.props.apiGatewayProps(apiGatewayProps); return this; } /** * Whether to create recommended CloudWatch alarms. *

* Default: - Alarms are created *

* @return {@code this} * @param createCloudWatchAlarms Whether to create recommended CloudWatch alarms. This parameter is required. */ public Builder createCloudWatchAlarms(final java.lang.Boolean createCloudWatchAlarms) { this.props.createCloudWatchAlarms(createCloudWatchAlarms); return this; } /** * Existing instance of Kinesis Stream, providing both this and kinesisStreamProps will cause an error. *

* Default: - None *

* @return {@code this} * @param existingStreamObj Existing instance of Kinesis Stream, providing both this and kinesisStreamProps will cause an error. This parameter is required. */ public Builder existingStreamObj(final software.amazon.awscdk.services.kinesis.Stream existingStreamObj) { this.props.existingStreamObj(existingStreamObj); return this; } /** * Optional user-provided props to override the default props for the Kinesis Data Stream. *

* Default: - Default properties are used. *

* @return {@code this} * @param kinesisStreamProps Optional user-provided props to override the default props for the Kinesis Data Stream. This parameter is required. */ public Builder kinesisStreamProps(final software.amazon.awscdk.services.kinesis.StreamProps kinesisStreamProps) { this.props.kinesisStreamProps(kinesisStreamProps); return this; } /** * User provided props to override the default props for the CloudWatchLogs LogGroup. *

* Default: - Default props are used *

* @return {@code this} * @param logGroupProps User provided props to override the default props for the CloudWatchLogs LogGroup. This parameter is required. */ public Builder logGroupProps(final software.amazon.awscdk.services.logs.LogGroupProps logGroupProps) { this.props.logGroupProps(logGroupProps); return this; } /** * Optional, custom API Gateway Integration Response for the PutRecord action. *

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

* @return {@code this} * @param putRecordIntegrationResponses Optional, custom API Gateway Integration Response for the PutRecord action. This parameter is required. */ public Builder putRecordIntegrationResponses(final java.util.List putRecordIntegrationResponses) { this.props.putRecordIntegrationResponses(putRecordIntegrationResponses); return this; } /** * Optional, custom API Gateway Method Responses for the PutRecord action. *

* Default: - [ * { * statusCode: "200", * responseParameters: { * "method.response.header.Content-Type": true * } * }, * { * statusCode: "500", * responseParameters: { * "method.response.header.Content-Type": true * }, * } * ] *

* @return {@code this} * @param putRecordMethodResponses Optional, custom API Gateway Method Responses for the PutRecord action. This parameter is required. */ public Builder putRecordMethodResponses(final java.util.List putRecordMethodResponses) { this.props.putRecordMethodResponses(putRecordMethodResponses); return this; } /** * 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"}}} *

* @return {@code this} * @param putRecordRequestModel API Gateway request model for the PutRecord action. This parameter is required. */ public Builder putRecordRequestModel(final software.amazon.awscdk.services.apigateway.ModelOptions putRecordRequestModel) { this.props.putRecordRequestModel(putRecordRequestModel); return this; } /** * 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')" } *

* @return {@code this} * @param putRecordRequestTemplate API Gateway request template for the PutRecord action. This parameter is required. */ public Builder putRecordRequestTemplate(final java.lang.String putRecordRequestTemplate) { this.props.putRecordRequestTemplate(putRecordRequestTemplate); return this; } /** * Optional, custom API Gateway Integration Response for the PutRecords action. *

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

* @return {@code this} * @param putRecordsIntegrationResponses Optional, custom API Gateway Integration Response for the PutRecords action. This parameter is required. */ public Builder putRecordsIntegrationResponses(final java.util.List putRecordsIntegrationResponses) { this.props.putRecordsIntegrationResponses(putRecordsIntegrationResponses); return this; } /** * Optional, custom API Gateway Method Responses for the PutRecord action. *

* Default: - [ * { * statusCode: "200", * responseParameters: { * "method.response.header.Content-Type": true * } * }, * { * statusCode: "500", * responseParameters: { * "method.response.header.Content-Type": true * }, * } * ] *

* @return {@code this} * @param putRecordsMethodResponses Optional, custom API Gateway Method Responses for the PutRecord action. This parameter is required. */ public Builder putRecordsMethodResponses(final java.util.List putRecordsMethodResponses) { this.props.putRecordsMethodResponses(putRecordsMethodResponses); return this; } /** * 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"}}}}}} *

* @return {@code this} * @param putRecordsRequestModel API Gateway request model for the PutRecords action. This parameter is required. */ public Builder putRecordsRequestModel(final software.amazon.awscdk.services.apigateway.ModelOptions putRecordsRequestModel) { this.props.putRecordsRequestModel(putRecordsRequestModel); return this; } /** * 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 ] } *

* @return {@code this} * @param putRecordsRequestTemplate API Gateway request template for the PutRecords action for the default application/json content-type. This parameter is required. */ public Builder putRecordsRequestTemplate(final java.lang.String putRecordsRequestTemplate) { this.props.putRecordsRequestTemplate(putRecordsRequestTemplate); return this; } /** * @return a newly built instance of {@link software.amazon.awsconstructs.services.apigatewaykinesisstreams.ApiGatewayToKinesisStreams}. */ @Override public software.amazon.awsconstructs.services.apigatewaykinesisstreams.ApiGatewayToKinesisStreams build() { return new software.amazon.awsconstructs.services.apigatewaykinesisstreams.ApiGatewayToKinesisStreams( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy