published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
The Flink Job resource allows the creation and management of Aiven Jobs.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Aiven = Pulumi.Aiven;
return await Deployment.RunAsync(() =>
{
var job = new Aiven.FlinkJob("job", new()
{
Project = aiven_flink.Flink.Project,
ServiceName = aiven_flink.Flink.Service_name,
JobName = "<JOB_NAME>",
TableIds = new[]
{
aiven_flink_table.Source.Table_id,
aiven_flink_table.Sink.Table_id,
},
Statement = @$" INSERT INTO {aiven_flink_table.Sink.Table_name}
SELECT * FROM {aiven_flink_table.Source.Table_name}
WHERE `cpu` > 50
",
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-aiven/sdk/v5/go/aiven"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := aiven.NewFlinkJob(ctx, "job", &aiven.FlinkJobArgs{
Project: pulumi.Any(aiven_flink.Flink.Project),
ServiceName: pulumi.Any(aiven_flink.Flink.Service_name),
JobName: pulumi.String("<JOB_NAME>"),
TableIds: pulumi.StringArray{
aiven_flink_table.Source.Table_id,
aiven_flink_table.Sink.Table_id,
},
Statement: pulumi.String(fmt.Sprintf(" INSERT INTO %v \n SELECT * FROM %v \n WHERE `cpu` > 50 \n", aiven_flink_table.Sink.Table_name, aiven_flink_table.Source.Table_name)),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aiven.FlinkJob;
import com.pulumi.aiven.FlinkJobArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var job = new FlinkJob("job", FlinkJobArgs.builder()
.project(aiven_flink.flink().project())
.serviceName(aiven_flink.flink().service_name())
.jobName("<JOB_NAME>")
.tableIds(
aiven_flink_table.source().table_id(),
aiven_flink_table.sink().table_id())
.statement("""
INSERT INTO %s
SELECT * FROM %s
WHERE `cpu` > 50
", aiven_flink_table.sink().table_name(),aiven_flink_table.source().table_name()))
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const job = new aiven.FlinkJob("job", {
project: aiven_flink.flink.project,
serviceName: aiven_flink.flink.service_name,
jobName: "<JOB_NAME>",
tableIds: [
aiven_flink_table.source.table_id,
aiven_flink_table.sink.table_id,
],
statement: ` INSERT INTO ${aiven_flink_table.sink.table_name}
SELECT * FROM ${aiven_flink_table.source.table_name}
WHERE `cpu` > 50
`,
});
import pulumi
import pulumi_aiven as aiven
job = aiven.FlinkJob("job",
project=aiven_flink["flink"]["project"],
service_name=aiven_flink["flink"]["service_name"],
job_name="<JOB_NAME>",
table_ids=[
aiven_flink_table["source"]["table_id"],
aiven_flink_table["sink"]["table_id"],
],
statement=f""" INSERT INTO {aiven_flink_table["sink"]["table_name"]}
SELECT * FROM {aiven_flink_table["source"]["table_name"]}
WHERE `cpu` > 50
""")
resources:
job:
type: aiven:FlinkJob
properties:
project: ${aiven_flink.flink.project}
serviceName: ${aiven_flink.flink.service_name}
jobName: <JOB_NAME>
tableIds:
- ${aiven_flink_table.source.table_id}
- ${aiven_flink_table.sink.table_id}
statement: " INSERT INTO ${aiven_flink_table.sink.table_name} \n SELECT * FROM ${aiven_flink_table.source.table_name} \n WHERE `cpu` > 50 \n"
Create FlinkJob Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FlinkJob(name: string, args: FlinkJobArgs, opts?: CustomResourceOptions);@overload
def FlinkJob(resource_name: str,
args: FlinkJobArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FlinkJob(resource_name: str,
opts: Optional[ResourceOptions] = None,
job_name: Optional[str] = None,
project: Optional[str] = None,
service_name: Optional[str] = None,
statement: Optional[str] = None,
table_ids: Optional[Sequence[str]] = None)func NewFlinkJob(ctx *Context, name string, args FlinkJobArgs, opts ...ResourceOption) (*FlinkJob, error)public FlinkJob(string name, FlinkJobArgs args, CustomResourceOptions? opts = null)
public FlinkJob(String name, FlinkJobArgs args)
public FlinkJob(String name, FlinkJobArgs args, CustomResourceOptions options)
type: aiven:FlinkJob
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args FlinkJobArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args FlinkJobArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FlinkJobArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FlinkJobArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FlinkJobArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var flinkJobResource = new Aiven.FlinkJob("flinkJobResource", new()
{
JobName = "string",
Project = "string",
ServiceName = "string",
Statement = "string",
TableIds = new[]
{
"string",
},
});
example, err := aiven.NewFlinkJob(ctx, "flinkJobResource", &aiven.FlinkJobArgs{
JobName: pulumi.String("string"),
Project: pulumi.String("string"),
ServiceName: pulumi.String("string"),
Statement: pulumi.String("string"),
TableIds: pulumi.StringArray{
pulumi.String("string"),
},
})
var flinkJobResource = new FlinkJob("flinkJobResource", FlinkJobArgs.builder()
.jobName("string")
.project("string")
.serviceName("string")
.statement("string")
.tableIds("string")
.build());
flink_job_resource = aiven.FlinkJob("flinkJobResource",
job_name="string",
project="string",
service_name="string",
statement="string",
table_ids=["string"])
const flinkJobResource = new aiven.FlinkJob("flinkJobResource", {
jobName: "string",
project: "string",
serviceName: "string",
statement: "string",
tableIds: ["string"],
});
type: aiven:FlinkJob
properties:
jobName: string
project: string
serviceName: string
statement: string
tableIds:
- string
FlinkJob Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The FlinkJob resource accepts the following input properties:
- Job
Name string - Specifies the name of the service that this job is submitted to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Project string
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Service
Name string - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Statement string
- The SQL statement to define the job. This property cannot be changed, doing so forces recreation of the resource.
- Table
Ids List<string> - A list of table ids that are required in the job runtime. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Job
Name string - Specifies the name of the service that this job is submitted to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Project string
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Service
Name string - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Statement string
- The SQL statement to define the job. This property cannot be changed, doing so forces recreation of the resource.
- Table
Ids []string - A list of table ids that are required in the job runtime. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- job
Name String - Specifies the name of the service that this job is submitted to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- project String
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name String - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- statement String
- The SQL statement to define the job. This property cannot be changed, doing so forces recreation of the resource.
- table
Ids List<String> - A list of table ids that are required in the job runtime. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- job
Name string - Specifies the name of the service that this job is submitted to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- project string
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name string - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- statement string
- The SQL statement to define the job. This property cannot be changed, doing so forces recreation of the resource.
- table
Ids string[] - A list of table ids that are required in the job runtime. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- job_
name str - Specifies the name of the service that this job is submitted to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- project str
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service_
name str - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- statement str
- The SQL statement to define the job. This property cannot be changed, doing so forces recreation of the resource.
- table_
ids Sequence[str] - A list of table ids that are required in the job runtime. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- job
Name String - Specifies the name of the service that this job is submitted to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- project String
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name String - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- statement String
- The SQL statement to define the job. This property cannot be changed, doing so forces recreation of the resource.
- table
Ids List<String> - A list of table ids that are required in the job runtime. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the FlinkJob resource produces the following output properties:
Look up Existing FlinkJob Resource
Get an existing FlinkJob resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: FlinkJobState, opts?: CustomResourceOptions): FlinkJob@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
job_id: Optional[str] = None,
job_name: Optional[str] = None,
project: Optional[str] = None,
service_name: Optional[str] = None,
state: Optional[str] = None,
statement: Optional[str] = None,
table_ids: Optional[Sequence[str]] = None) -> FlinkJobfunc GetFlinkJob(ctx *Context, name string, id IDInput, state *FlinkJobState, opts ...ResourceOption) (*FlinkJob, error)public static FlinkJob Get(string name, Input<string> id, FlinkJobState? state, CustomResourceOptions? opts = null)public static FlinkJob get(String name, Output<String> id, FlinkJobState state, CustomResourceOptions options)resources: _: type: aiven:FlinkJob get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Job
Id string - The Job ID of the flink job in the flink service.
- Job
Name string - Specifies the name of the service that this job is submitted to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Project string
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Service
Name string - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- State string
- The current state of the flink job in the flink service
- Statement string
- The SQL statement to define the job. This property cannot be changed, doing so forces recreation of the resource.
- Table
Ids List<string> - A list of table ids that are required in the job runtime. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Job
Id string - The Job ID of the flink job in the flink service.
- Job
Name string - Specifies the name of the service that this job is submitted to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Project string
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Service
Name string - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- State string
- The current state of the flink job in the flink service
- Statement string
- The SQL statement to define the job. This property cannot be changed, doing so forces recreation of the resource.
- Table
Ids []string - A list of table ids that are required in the job runtime. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- job
Id String - The Job ID of the flink job in the flink service.
- job
Name String - Specifies the name of the service that this job is submitted to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- project String
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name String - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- state String
- The current state of the flink job in the flink service
- statement String
- The SQL statement to define the job. This property cannot be changed, doing so forces recreation of the resource.
- table
Ids List<String> - A list of table ids that are required in the job runtime. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- job
Id string - The Job ID of the flink job in the flink service.
- job
Name string - Specifies the name of the service that this job is submitted to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- project string
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name string - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- state string
- The current state of the flink job in the flink service
- statement string
- The SQL statement to define the job. This property cannot be changed, doing so forces recreation of the resource.
- table
Ids string[] - A list of table ids that are required in the job runtime. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- job_
id str - The Job ID of the flink job in the flink service.
- job_
name str - Specifies the name of the service that this job is submitted to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- project str
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service_
name str - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- state str
- The current state of the flink job in the flink service
- statement str
- The SQL statement to define the job. This property cannot be changed, doing so forces recreation of the resource.
- table_
ids Sequence[str] - A list of table ids that are required in the job runtime. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- job
Id String - The Job ID of the flink job in the flink service.
- job
Name String - Specifies the name of the service that this job is submitted to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- project String
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name String - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- state String
- The current state of the flink job in the flink service
- statement String
- The SQL statement to define the job. This property cannot be changed, doing so forces recreation of the resource.
- table
Ids List<String> - A list of table ids that are required in the job runtime. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
Package Details
- Repository
- Aiven pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aivenTerraform Provider.
published on Monday, Mar 9, 2026 by Pulumi
