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

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

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/application-code.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/lib/application-code.ts#L26)

## Example

```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'),
});
```

## Initializer

```ts
new ApplicationCode()
```

## Methods

- `bind(scope: Construct): ApplicationCodeConfig` — A method to lazily bind asset resources to the parent FlinkApplication.

- `fromAsset(path: string, options?: AssetOptions): ApplicationCode // chainable` (static) — Reference code from a local directory containing a Flink JAR file.

  **Parameters**

  - `path` — - a local directory path.

- `fromBucket(bucket: IBucket, fileKey: string, objectVersion?: string): ApplicationCode // chainable` (static) — Reference code from an S3 bucket.

  **Parameters**

  - `bucket` — - an s3 bucket.
  - `fileKey` — - a key pointing to a Flink JAR file.
  - `objectVersion` — - an optional version string for the provided fileKey.
