ApplicationProps

class aws_cdk.aws_kinesisanalytics_flink.ApplicationProps(*, code, runtime, application_name=None, auto_scaling_enabled=None, checkpointing_enabled=None, checkpoint_interval=None, log_group=None, log_level=None, metrics_level=None, min_pause_between_checkpoints=None, parallelism=None, parallelism_per_kpu=None, property_groups=None, removal_policy=None, role=None, snapshots_enabled=None)

Bases: object

(experimental) Props for creating an Application construct.

Parameters:
  • code (ApplicationCode) – (experimental) The Flink code asset to run.

  • runtime (Runtime) – (experimental) The Flink version to use for this application.

  • application_name (Optional[str]) – (experimental) A name for your Application that is unique to an AWS account. Default: - CloudFormation-generated name

  • auto_scaling_enabled (Optional[bool]) – (experimental) Whether the Kinesis Data Analytics service can increase the parallelism of the application in response to resource usage. Default: true

  • checkpointing_enabled (Optional[bool]) – (experimental) Whether checkpointing is enabled while your application runs. Default: true

  • checkpoint_interval (Optional[Duration]) – (experimental) The interval between checkpoints. Default: 1 minute

  • log_group (Optional[ILogGroup]) – (experimental) The log group to send log entries to. Default: CDK’s default LogGroup

  • log_level (Optional[LogLevel]) – (experimental) The level of log verbosity from the Flink application. Default: FlinkLogLevel.INFO

  • metrics_level (Optional[MetricsLevel]) – (experimental) Describes the granularity of the CloudWatch metrics for an application. Use caution with Parallelism level metrics. Parallelism granularity logs metrics for each parallel thread and can quickly become expensive when parallelism is high (e.g. > 64). Default: MetricsLevel.APPLICATION

  • min_pause_between_checkpoints (Optional[Duration]) – (experimental) The minimum amount of time in to wait after a checkpoint finishes to start a new checkpoint. Default: 5 seconds

  • parallelism (Union[int, float, None]) – (experimental) The initial parallelism for the application. Kinesis Data Analytics can stop the app, increase the parallelism, and start the app again if autoScalingEnabled is true (the default value). Default: 1

  • parallelism_per_kpu (Union[int, float, None]) – (experimental) The Flink parallelism allowed per Kinesis Processing Unit (KPU). Default: 1

  • property_groups (Union[PropertyGroups, Dict[str, Any], None]) – (experimental) Configuration PropertyGroups. You can use these property groups to pass arbitrary runtime configuration values to your Flink app. Default: No property group configuration provided to the Flink app

  • removal_policy (Optional[RemovalPolicy]) – (experimental) Provide a RemovalPolicy to override the default. Default: RemovalPolicy.DESTROY

  • role (Optional[IRole]) – (experimental) A role to use to grant permissions to your application. Prefer omitting this property and using the default role. Default: - a new Role will be created

  • snapshots_enabled (Optional[bool]) – (experimental) Determines if Flink snapshots are enabled. Default: true

Stability:

experimental

ExampleMetadata:

lit=test/integ.application.lit.ts ! show infused

Example:

import path as path
import aws_cdk.core as core
import aws_cdk.aws_kinesisanalytics_flink as flink
import aws_cdk.aws_cloudwatch as cloudwatch

app = core.App()
stack = core.Stack(app, "FlinkAppTest")

flink_app = flink.Application(stack, "App",
    code=flink.ApplicationCode.from_asset(path.join(__dirname, "code-asset")),
    runtime=flink.Runtime.FLINK_1_11
)

cloudwatch.Alarm(stack, "Alarm",
    metric=flink_app.metric_full_restarts(),
    evaluation_periods=1,
    threshold=3
)

app.synth()

Attributes

application_name

(experimental) A name for your Application that is unique to an AWS account.

Default:
  • CloudFormation-generated name

Stability:

experimental

auto_scaling_enabled

(experimental) Whether the Kinesis Data Analytics service can increase the parallelism of the application in response to resource usage.

Default:

true

Stability:

experimental

checkpoint_interval

(experimental) The interval between checkpoints.

Default:

1 minute

Stability:

experimental

checkpointing_enabled

(experimental) Whether checkpointing is enabled while your application runs.

Default:

true

Stability:

experimental

code

(experimental) The Flink code asset to run.

Stability:

experimental

log_group

(experimental) The log group to send log entries to.

Default:

CDK’s default LogGroup

Stability:

experimental

log_level

(experimental) The level of log verbosity from the Flink application.

Default:

FlinkLogLevel.INFO

Stability:

experimental

metrics_level

(experimental) Describes the granularity of the CloudWatch metrics for an application.

Use caution with Parallelism level metrics. Parallelism granularity logs metrics for each parallel thread and can quickly become expensive when parallelism is high (e.g. > 64).

Default:

MetricsLevel.APPLICATION

Stability:

experimental

min_pause_between_checkpoints

(experimental) The minimum amount of time in to wait after a checkpoint finishes to start a new checkpoint.

Default:

5 seconds

Stability:

experimental

parallelism

(experimental) The initial parallelism for the application.

Kinesis Data Analytics can stop the app, increase the parallelism, and start the app again if autoScalingEnabled is true (the default value).

Default:

1

Stability:

experimental

parallelism_per_kpu

(experimental) The Flink parallelism allowed per Kinesis Processing Unit (KPU).

Default:

1

Stability:

experimental

property_groups

(experimental) Configuration PropertyGroups.

You can use these property groups to pass arbitrary runtime configuration values to your Flink app.

Default:

No property group configuration provided to the Flink app

Stability:

experimental

removal_policy

(experimental) Provide a RemovalPolicy to override the default.

Default:

RemovalPolicy.DESTROY

Stability:

experimental

role

(experimental) A role to use to grant permissions to your application.

Prefer omitting this property and using the default role.

Default:
  • a new Role will be created

Stability:

experimental

runtime

(experimental) The Flink version to use for this application.

Stability:

experimental

snapshots_enabled

(experimental) Determines if Flink snapshots are enabled.

Default:

true

Stability:

experimental