> **Experimental**
>
> `@aws-cdk/aws-kinesisanalytics-flink-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# ApplicationProps

Props for creating an Application construct.

Used as props by: [Application](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-kinesisanalytics-flink-alpha.Application.html)

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/application.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/lib/application.ts#L762)

## Example

TypeScript:

```ts
declare const bucket: s3.Bucket;
const flinkApp = new flink.Application(this, 'Application', {
  propertyGroups: {
    FlinkApplicationProperties: {
      inputStreamName: 'my-input-kinesis-stream',
      outputStreamName: 'my-output-kinesis-stream',
    },
  },
  // ...
  runtime: flink.Runtime.FLINK_2_2,
  code: flink.ApplicationCode.fromBucket(bucket, 'my-app.jar'),
});
```

Python:

```python
# bucket: s3.Bucket

flink_app = flink.Application(self, "Application",
    property_groups={
        "FlinkApplicationProperties": {
            "input_stream_name": "my-input-kinesis-stream",
            "output_stream_name": "my-output-kinesis-stream"
        }
    },
    # ...
    runtime=flink.Runtime.FLINK_2_2,
    code=flink.ApplicationCode.from_bucket(bucket, "my-app.jar")
)
```

Java:

```java
Bucket bucket;

Application flinkApp = Application.Builder.create(this, "Application")
        .propertyGroups(Map.of(
                "FlinkApplicationProperties", Map.of(
                        "inputStreamName", "my-input-kinesis-stream",
                        "outputStreamName", "my-output-kinesis-stream")))
        // ...
        .runtime(Runtime.FLINK_2_2)
        .code(ApplicationCode.fromBucket(bucket, "my-app.jar"))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.KinesisAnalyticsFlink.Alpha
Bucket bucket;

var flinkApp = new Application(this, "Application", new ApplicationProps {
    PropertyGroups = new Dictionary<string, IDictionary<string, string>> {
        { "FlinkApplicationProperties", new Dictionary<string, string> {
            { "inputStreamName", "my-input-kinesis-stream" },
            { "outputStreamName", "my-output-kinesis-stream" }
        } }
    },
    // ...
    Runtime = Runtime.FLINK_2_2,
    Code = ApplicationCode.FromBucket(bucket, "my-app.jar")
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkkinesisanalyticsflinkalpha/v2
var bucket Bucket

flinkApp := flink.NewApplication(this, jsii.String("Application"), &ApplicationProps{
	PropertyGroups: map[string]map[string]*string{
		"FlinkApplicationProperties": map[string]*string{
			"inputStreamName": jsii.String("my-input-kinesis-stream"),
			"outputStreamName": jsii.String("my-output-kinesis-stream"),
		},
	},
	// ...
	Runtime: flink.Runtime_FLINK_2_2(),
	Code: flink.ApplicationCode_FromBucket(bucket, jsii.String("my-app.jar")),
})
```

## Properties

- `applicationName`: string — A name for your Application that is unique to an AWS account.

  **Default:** CloudFormation-generated name

- `autoScalingEnabled`: boolean = true — Whether the Kinesis Data Analytics service can increase the parallelism of the application in response to resource usage.

- `checkpointingEnabled`: boolean = true — Whether checkpointing is enabled while your application runs.

- `checkpointInterval`: [Duration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — The interval between checkpoints.

  **Default:** 1 minute

- `code`: [ApplicationCode](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-kinesisanalytics-flink-alpha.ApplicationCode.html) (required) — The Flink code asset to run.

- `logGroup`: [ILogGroup](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.ILogGroup.html) — The log group to send log entries to.

  **Default:** CDK's default LogGroup

- `logLevel`: [LogLevel](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-kinesisanalytics-flink-alpha.LogLevel.html) = FlinkLogLevel.INFO — The level of log verbosity from the Flink application.

- `metricsLevel`: [MetricsLevel](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-kinesisanalytics-flink-alpha.MetricsLevel.html) = MetricsLevel.APPLICATION — 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).

- `minPauseBetweenCheckpoints`: [Duration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — The minimum amount of time in to wait after a checkpoint finishes to start a new checkpoint.

  **Default:** 5 seconds

- `parallelism`: number = 1 — 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).

- `parallelismPerKpu`: number = 1 — The Flink parallelism allowed per Kinesis Processing Unit (KPU).

- `propertyGroups`: { [key: string]: { [key: string]: string } } — Configuration PropertyGroups.

  **Default:** No property group configuration provided to the Flink app

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

- `removalPolicy`: [RemovalPolicy](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.RemovalPolicy.html) = RemovalPolicy.DESTROY — Provide a RemovalPolicy to override the default.

- `role`: [IRole](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — A role to use to grant permissions to your application.

  **Default:** a new Role will be created

  Prefer omitting
  this property and using the default role.

- `runtime`: [Runtime](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-kinesisanalytics-flink-alpha.Runtime.html) (required) — The Flink version to use for this application.

- `securityGroups`: [ISecurityGroup](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.ISecurityGroup.html)[] — Security groups to use with a provided VPC.

  **Default:** a new security group is created for this application.

- `snapshotsEnabled`: boolean = true — Determines if Flink snapshots are enabled.

- `vpc`: [IVpc](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html) — Deploy the Flink application in a VPC.

  **Default:** no VPC

- `vpcSubnets`: [SubnetSelection](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.SubnetSelection.html) — Choose which VPC subnets to use.

  **Default:** SubnetType.PRIVATE_WITH_EGRESS subnets
