@aws-cdk_aws-kinesisanalytics-flink-alpha.ApplicationCode

class ApplicationCode ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Kinesisanalytics.Flink.Alpha.ApplicationCode
Gogithub.com/aws/aws-cdk-go/awscdkkinesisanalyticsflinkalpha/v2#ApplicationCode
Javasoftware.amazon.awscdk.services.kinesisanalytics.flink.alpha.ApplicationCode
Pythonaws_cdk.aws_kinesisanalytics_flink_alpha.ApplicationCode
TypeScript (source)@aws-cdk/aws-kinesisanalytics-flink-alpha ยป ApplicationCode

Code configuration providing the location to a Flink application JAR file.

Example

import * as path from 'path';
import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch';
import * as core from 'aws-cdk-lib';
import * as flink from '../lib';

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

NameDescription
bind(scope)๐Ÿ”นA method to lazily bind asset resources to the parent FlinkApplication.
static fromAsset(path, options?)๐Ÿ”นReference code from a local directory containing a Flink JAR file.
static fromBucket(bucket, fileKey, objectVersion?)๐Ÿ”นReference code from an S3 bucket.

bind(scope)๐Ÿ”น

public bind(scope: Construct): ApplicationCodeConfig

Parameters

  • scope Construct

Returns

  • ApplicationCodeConfig

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

  • ApplicationCode

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

  • ApplicationCode

Reference code from an S3 bucket.