class ApplicationCode
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.KinesisAnalyticsFlink.ApplicationCode | 
|  Java | software.amazon.awscdk.services.kinesis.analytics.flink.ApplicationCode | 
|  Python | aws_cdk.aws_kinesisanalytics_flink.ApplicationCode | 
|  TypeScript (source) | @aws-cdk/aws-kinesisanalytics-flink»ApplicationCode | 
Code configuration providing the location to a Flink application JAR file.
Example
import * as path from 'path';
import * as core from '@aws-cdk/core';
import * as flink from '../lib';
import * as cloudwatch from '@aws-cdk/aws-cloudwatch';
const app = new core.App();
const stack = new core.Stack(app, 'FlinkAppTest');
const flinkApp = new flink.Application(stack, 'App', {
  code: flink.ApplicationCode.fromAsset(path.join(__dirname, 'code-asset')),
  runtime: flink.Runtime.FLINK_1_11,
});
new cloudwatch.Alarm(stack, 'Alarm', {
  metric: flinkApp.metricFullRestarts(),
  evaluationPeriods: 1,
  threshold: 3,
});
///! hide
app.synth();
Initializer
new ApplicationCode()
Methods
| Name | Description | 
|---|---|
| bind(scope) | A method to lazily bind asset resources to the parent FlinkApplication. | 
| static from | Reference code from a local directory containing a Flink JAR file. | 
| static from | Reference code from an S3 bucket. | 
bind(scope)
public bind(scope: Construct): ApplicationCodeConfig
Parameters
- scope Construct
Returns
A method to lazily bind asset resources to the parent FlinkApplication.
static fromAsset(path, options?) 
public static fromAsset(path: string, options?: AssetOptions): ApplicationCode
Parameters
- path string— - a local directory path.
- options AssetOptions 
Returns
Reference code from a local directory containing a Flink JAR file.
static fromBucket(bucket, fileKey, objectVersion?) 
public static fromBucket(bucket: IBucket, fileKey: string, objectVersion?: string): ApplicationCode
Parameters
- bucket IBucket— - an s3 bucket.
- fileKey string— - a key pointing to a Flink JAR file.
- objectVersion string— - an optional version string for the provided fileKey.
Returns
Reference code from an S3 bucket.
