import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Kinesis Analytics v2 Application. * This resource can be used to manage both Kinesis Data Analytics for SQL applications and Kinesis Data Analytics for Apache Flink applications. * * > **Note:** Kinesis Data Analytics for SQL applications created using this resource cannot currently be viewed in the AWS Console. To manage Kinesis Data Analytics for SQL applications that can also be viewed in the AWS Console, use the `aws.kinesis.AnalyticsApplication` resource. * * ## Example Usage * * ### Apache Flink Application * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.s3.Bucket("example", {bucket: "example-flink-application"}); * const exampleBucketObjectv2 = new aws.s3.BucketObjectv2("example", { * bucket: example.id, * key: "example-flink-application", * source: new pulumi.asset.FileAsset("flink-app.jar"), * }); * const exampleApplication = new aws.kinesisanalyticsv2.Application("example", { * applicationConfiguration: { * applicationCodeConfiguration: { * codeContent: { * s3ContentLocation: { * bucketArn: example.arn, * fileKey: exampleBucketObjectv2.key, * }, * }, * codeContentType: "ZIPFILE", * }, * environmentProperties: { * propertyGroups: [ * { * propertyGroupId: "PROPERTY-GROUP-1", * propertyMap: { * Key1: "Value1", * }, * }, * { * propertyGroupId: "PROPERTY-GROUP-2", * propertyMap: { * KeyA: "ValueA", * KeyB: "ValueB", * }, * }, * ], * }, * flinkApplicationConfiguration: { * checkpointConfiguration: { * configurationType: "DEFAULT", * }, * monitoringConfiguration: { * configurationType: "CUSTOM", * logLevel: "DEBUG", * metricsLevel: "TASK", * }, * parallelismConfiguration: { * autoScalingEnabled: true, * configurationType: "CUSTOM", * parallelism: 10, * parallelismPerKpu: 4, * }, * }, * }, * name: "example-flink-application", * runtimeEnvironment: "FLINK-1_8", * serviceExecutionRole: exampleAwsIamRole.arn, * tags: { * Environment: "test", * }, * }); * ``` * * ### SQL Application * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.cloudwatch.LogGroup("example", {name: "example-sql-application"}); * const exampleLogStream = new aws.cloudwatch.LogStream("example", { * name: "example-sql-application", * logGroupName: example.name, * }); * const exampleApplication = new aws.kinesisanalyticsv2.Application("example", { * applicationConfiguration: { * applicationCodeConfiguration: { * codeContent: { * textContent: "SELECT 1;\n", * }, * codeContentType: "PLAINTEXT", * }, * sqlApplicationConfiguration: { * input: { * inputParallelism: { * count: 3, * }, * inputSchema: { * recordFormat: { * mappingParameters: { * csvMappingParameters: { * recordColumnDelimiter: ",", * recordRowDelimiter: "\n", * }, * }, * recordFormatType: "CSV", * }, * recordColumns: [ * { * name: "COLUMN_1", * sqlType: "VARCHAR(8)", * mapping: "MAPPING-1", * }, * { * name: "COLUMN_2", * sqlType: "DOUBLE", * }, * ], * recordEncoding: "UTF-8", * }, * kinesisStreamsInput: { * resourceArn: exampleAwsKinesisStream.arn, * }, * namePrefix: "PREFIX_1", * }, * referenceDataSource: { * referenceSchema: { * recordFormat: { * mappingParameters: { * jsonMappingParameters: { * recordRowPath: "$", * }, * }, * recordFormatType: "JSON", * }, * recordColumns: [{ * name: "COLUMN_1", * sqlType: "INTEGER", * }], * }, * s3ReferenceDataSource: { * bucketArn: exampleAwsS3Bucket.arn, * fileKey: "KEY-1", * }, * tableName: "TABLE-1", * }, * outputs: [ * { * destinationSchema: { * recordFormatType: "JSON", * }, * lambdaOutput: { * resourceArn: exampleAwsLambdaFunction.arn, * }, * name: "OUTPUT_1", * }, * { * destinationSchema: { * recordFormatType: "CSV", * }, * kinesisFirehoseOutput: { * resourceArn: exampleAwsKinesisFirehoseDeliveryStream.arn, * }, * name: "OUTPUT_2", * }, * ], * }, * }, * cloudwatchLoggingOptions: { * logStreamArn: exampleLogStream.arn, * }, * name: "example-sql-application", * runtimeEnvironment: "SQL-1_0", * serviceExecutionRole: exampleAwsIamRole.arn, * }); * ``` * * ### VPC Configuration * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.s3.Bucket("example", {bucket: "example-flink-application"}); * const exampleBucketObjectv2 = new aws.s3.BucketObjectv2("example", { * bucket: example.id, * key: "example-flink-application", * source: new pulumi.asset.FileAsset("flink-app.jar"), * }); * const exampleApplication = new aws.kinesisanalyticsv2.Application("example", { * applicationConfiguration: { * applicationCodeConfiguration: { * codeContent: { * s3ContentLocation: { * bucketArn: example.arn, * fileKey: exampleBucketObjectv2.key, * }, * }, * codeContentType: "ZIPFILE", * }, * vpcConfiguration: { * securityGroupIds: [ * exampleAwsSecurityGroup[0].id, * exampleAwsSecurityGroup[1].id, * ], * subnetIds: [exampleAwsSubnet.id], * }, * }, * name: "example-flink-application", * runtimeEnvironment: "FLINK-1_8", * serviceExecutionRole: exampleAwsIamRole.arn, * }); * ``` * * ## Import * * Using `pulumi import`, import `aws.kinesisanalyticsv2.Application` using the application ARN. For example: * * ```sh * $ pulumi import aws:kinesisanalyticsv2/application:Application example arn:aws:kinesisanalytics:us-west-2:123456789012:application/example-sql-application * ``` */ export declare class Application extends pulumi.CustomResource { /** * Get an existing Application resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ApplicationState, opts?: pulumi.CustomResourceOptions): Application; /** * Check whether an existing Application resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: ApplicationState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of Application. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Application; /** * Application configuration. See `applicationConfiguration` Block below. */ readonly applicationConfiguration: pulumi.Output; /** * Application's mode. Valid values are `STREAMING`, `INTERACTIVE`. */ readonly applicationMode: pulumi.Output; /** * ARN of the application. */ readonly arn: pulumi.Output; /** * CloudWatch log stream to monitor application configuration errors. See `cloudwatchLoggingOptions` Block below. */ readonly cloudwatchLoggingOptions: pulumi.Output; /** * Current timestamp when the application was created. */ readonly createTimestamp: pulumi.Output; /** * Summary description of the application. */ readonly description: pulumi.Output; /** * Whether to force stop an unresponsive Flink-based application. */ readonly forceStop: pulumi.Output; /** * Current timestamp when the application was last updated. */ readonly lastUpdateTimestamp: pulumi.Output; /** * Name of the application. */ readonly name: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Runtime environment for the application. Valid values: `SQL-1_0`, `FLINK-1_6`, `FLINK-1_8`, `FLINK-1_11`, `FLINK-1_13`, `FLINK-1_15`, `FLINK-1_18`, `FLINK-1_19`, `FLINK-1_20`, `FLINK-2_2`, `FLINK-2_3`. */ readonly runtimeEnvironment: pulumi.Output; /** * ARN of the IAM role used by the application to access Kinesis data streams, Kinesis Data Firehose delivery streams, Amazon S3 objects, and other external resources. * * The following arguments are optional: */ readonly serviceExecutionRole: pulumi.Output; /** * Whether to start or stop the application. */ readonly startApplication: pulumi.Output; /** * Status of the application. */ readonly status: pulumi.Output; /** * Map of tags to assign to the application. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Current application version. Kinesis Data Analytics updates the `versionId` each time the application is updated. */ readonly versionId: pulumi.Output; /** * Create a Application resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ApplicationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Application resources. */ export interface ApplicationState { /** * Application configuration. See `applicationConfiguration` Block below. */ applicationConfiguration?: pulumi.Input; /** * Application's mode. Valid values are `STREAMING`, `INTERACTIVE`. */ applicationMode?: pulumi.Input; /** * ARN of the application. */ arn?: pulumi.Input; /** * CloudWatch log stream to monitor application configuration errors. See `cloudwatchLoggingOptions` Block below. */ cloudwatchLoggingOptions?: pulumi.Input; /** * Current timestamp when the application was created. */ createTimestamp?: pulumi.Input; /** * Summary description of the application. */ description?: pulumi.Input; /** * Whether to force stop an unresponsive Flink-based application. */ forceStop?: pulumi.Input; /** * Current timestamp when the application was last updated. */ lastUpdateTimestamp?: pulumi.Input; /** * Name of the application. */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Runtime environment for the application. Valid values: `SQL-1_0`, `FLINK-1_6`, `FLINK-1_8`, `FLINK-1_11`, `FLINK-1_13`, `FLINK-1_15`, `FLINK-1_18`, `FLINK-1_19`, `FLINK-1_20`, `FLINK-2_2`, `FLINK-2_3`. */ runtimeEnvironment?: pulumi.Input; /** * ARN of the IAM role used by the application to access Kinesis data streams, Kinesis Data Firehose delivery streams, Amazon S3 objects, and other external resources. * * The following arguments are optional: */ serviceExecutionRole?: pulumi.Input; /** * Whether to start or stop the application. */ startApplication?: pulumi.Input; /** * Status of the application. */ status?: pulumi.Input; /** * Map of tags to assign to the application. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Current application version. Kinesis Data Analytics updates the `versionId` each time the application is updated. */ versionId?: pulumi.Input; } /** * The set of arguments for constructing a Application resource. */ export interface ApplicationArgs { /** * Application configuration. See `applicationConfiguration` Block below. */ applicationConfiguration?: pulumi.Input; /** * Application's mode. Valid values are `STREAMING`, `INTERACTIVE`. */ applicationMode?: pulumi.Input; /** * CloudWatch log stream to monitor application configuration errors. See `cloudwatchLoggingOptions` Block below. */ cloudwatchLoggingOptions?: pulumi.Input; /** * Summary description of the application. */ description?: pulumi.Input; /** * Whether to force stop an unresponsive Flink-based application. */ forceStop?: pulumi.Input; /** * Name of the application. */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Runtime environment for the application. Valid values: `SQL-1_0`, `FLINK-1_6`, `FLINK-1_8`, `FLINK-1_11`, `FLINK-1_13`, `FLINK-1_15`, `FLINK-1_18`, `FLINK-1_19`, `FLINK-1_20`, `FLINK-2_2`, `FLINK-2_3`. */ runtimeEnvironment: pulumi.Input; /** * ARN of the IAM role used by the application to access Kinesis data streams, Kinesis Data Firehose delivery streams, Amazon S3 objects, and other external resources. * * The following arguments are optional: */ serviceExecutionRole: pulumi.Input; /** * Whether to start or stop the application. */ startApplication?: pulumi.Input; /** * Map of tags to assign to the application. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; } //# sourceMappingURL=application.d.ts.map