> **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.
# IApplication

An interface expressing the public properties on both an imported and CDK-created Flink application.

Extends: IApplication
Extends: IResource, IConnectable, IGrantable
Implemented by: Application

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

## Properties

- `applicationArn`: string — The application ARN.

- `applicationName`: string — The name of the Flink application.

- `connections`: [Connections](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Connections.html) — The network connections associated with this resource.

- `env`: [ResourceEnvironment](/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html) — The environment this resource belongs to.

  For resources that are created and managed in a Stack (those created by
  creating new class instances like `new Role()`, `new Bucket()`, etc.), this
  is always the same as the environment of the stack they belong to.

  For referenced resources (those obtained from referencing methods like
  `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
  different than the stack they were imported into.

- `grantPrincipal`: [IPrincipal](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IPrincipal.html) — The principal to grant permissions to.

- `node`: [Node](/cdk/api/v2/docs/constructs.Node.html) — The tree node.

- `role`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The application IAM role.

- `stack`: [Stack](/cdk/api/v2/docs/aws-cdk-lib.Stack.html) — The stack in which this resource is defined.

## Methods

- `addToRolePolicy(policyStatement: PolicyStatement): boolean` — Convenience method for adding a policy statement to the application role.

- `applyRemovalPolicy(policy: RemovalPolicy): void` — Apply the given removal policy to this resource.

  The Removal Policy controls what happens to this resource when it stops
  being managed by CloudFormation, either because you've removed it from the
  CDK application or because you've made a change that requires the resource
  to be replaced.

  The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
  account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).

- `metric(metricName: string, props?: MetricOptions): Metric` — Return a CloudWatch metric associated with this Flink application.

  **Parameters**

  - `metricName` — The name of the metric.
  - `props` — Customization properties.

- `metricBackPressuredTimeMsPerSecond(props?: MetricOptions): Metric` — The time (in milliseconds) this task or operator is back pressured per second.

  Units: Milliseconds

  Reporting Level: Operator, Task, Parallelism

- `metricBusyTimePerMsPerSecond(props?: MetricOptions): Metric` — The time (in milliseconds) this task or operator is busy (neither idle nor back pressured) per second.

  Can be NaN, if the value could not be
  calculated.

  Units: Milliseconds

  Reporting Level: Operator, Task, Parallelism

- `metricCpuUtilization(props?: MetricOptions): Metric` — The overall percentage of CPU utilization across task managers.

  For
  example, if there are five task managers, Kinesis Data Analytics publishes
  five samples of this metric per reporting interval.

  Units: Percentage

  Reporting Level: Application

- `metricCurrentInputWatermark(props?: MetricOptions): Metric` — The last watermark this application/operator/task/thread has received.

  Units: Milliseconds

  Reporting Level: Application, Operator, Task, Parallelism

- `metricCurrentOutputWatermark(props?: MetricOptions): Metric` — The last watermark this application/operator/task/thread has received.

  Units: Milliseconds

  Reporting Level: Application, Operator, Task, Parallelism

- `metricDowntime(props?: MetricOptions): Metric` — The time elapsed during an outage for failing/recovering jobs.

  Units: Milliseconds

  Reporting Level: Application

- `metricFullRestarts(props?: MetricOptions): Metric` — The total number of times this job has fully restarted since it was submitted.

  This metric does not measure fine-grained restarts.

  Units: Count

  Reporting Level: Application

- `metricHeapMemoryUtilization(props?: MetricOptions): Metric` — Overall heap memory utilization across task managers.

  For example, if there
  are five task managers, Kinesis Data Analytics publishes five samples of
  this metric per reporting interval.

  Units: Percentage

  Reporting Level: Application

- `metricIdleTimeMsPerSecond(props?: MetricOptions): Metric` — The time (in milliseconds) this task or operator is idle (has no data to process) per second.

  Idle time excludes back pressured time, so if the task
  is back pressured it is not idle.

  Units: Milliseconds

  Reporting Level: Operator, Task, Parallelism

- `metricKpus(props?: MetricOptions): Metric` — The number of Kinesis Processing Units that are used to run your stream processing application.

  The average number of KPUs used each hour
  determines the billing for your application.

  Units: Count

  Reporting Level: Application

- `metricLastCheckpointDuration(props?: MetricOptions): Metric` — The time it took to complete the last checkpoint.

  Units: Milliseconds

  Reporting Level: Application

- `metricLastCheckpointSize(props?: MetricOptions): Metric` — The total size of the last checkpoint.

  Units: Bytes

  Reporting Level: Application

- `metricManagedMemoryTotal(props?: MetricOptions): Metric` — The total amount of managed memory.

  Units: Bytes

  Reporting Level: Application, Operator, Task, Parallelism

- `metricManagedMemoryUsed(props?: MetricOptions): Metric` — The amount of managed memory currently used.

  Units: Bytes

  Reporting Level: Application, Operator, Task, Parallelism

- `metricManagedMemoryUtilization(props?: MetricOptions): Metric` — Derived from managedMemoryUsed/managedMemoryTotal.

  Units: Percentage

  Reporting Level: Application, Operator, Task, Parallelism

- `metricNumberOfFailedCheckpoints(props?: MetricOptions): Metric` — The number of times checkpointing has failed.

  Units: Count

  Reporting Level: Application

- `metricNumLateRecordsDropped(props?: MetricOptions): Metric` — The number of records this operator or task has dropped due to arriving late.

  Units: Count

  Reporting Level: Application, Operator, Task, Parallelism

- `metricNumRecordsIn(props?: MetricOptions): Metric` — The total number of records this application, operator, or task has received.

  Units: Count

  Reporting Level: Application, Operator, Task, Parallelism

- `metricNumRecordsInPerSecond(props?: MetricOptions): Metric` — The total number of records this application, operator or task has received per second.

  Units: Count/Second

  Reporting Level: Application, Operator, Task, Parallelism

- `metricNumRecordsOut(props?: MetricOptions): Metric` — The total number of records this application, operator or task has emitted.

  Units: Count

  Reporting Level: Application, Operator, Task, Parallelism

- `metricNumRecordsOutPerSecond(props?: MetricOptions): Metric` — The total number of records this application, operator or task has emitted per second.

  Units: Count/Second

  Reporting Level: Application, Operator, Task, Parallelism

- `metricOldGenerationGCCount(props?: MetricOptions): Metric` — The total number of old garbage collection operations that have occurred across all task managers.

  Units: Count

  Reporting Level: Application

- `metricOldGenerationGCTime(props?: MetricOptions): Metric` — The total time spent performing old garbage collection operations.

  Units: Milliseconds

  Reporting Level: Application

- `metricThreadsCount(props?: MetricOptions): Metric` — The total number of live threads used by the application.

  Units: Count

  Reporting Level: Application

- `metricUptime(props?: MetricOptions): Metric` — The time that the job has been running without interruption.

  Units: Milliseconds

  Reporting Level: Application

- `with(...mixins: IMixin[]): IConstruct` — Applies one or more mixins to this construct.

  Mixins are applied in order. The list of constructs is captured at the
  start of the call, so constructs added by a mixin will not be visited.

  **Parameters**

  - `mixins` — The mixins to apply.

  **Returns:** This construct for chaining
