1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. realtimecompute
  5. Job
Alibaba Cloud v3.94.0 published on Tuesday, Feb 3, 2026 by Pulumi
alicloud logo
Alibaba Cloud v3.94.0 published on Tuesday, Feb 3, 2026 by Pulumi

    Provides a Realtime Compute Job resource.

    For information about Realtime Compute Job and how to use it, see What is Job.

    NOTE: Available since v1.265.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = new alicloud.vpc.Network("default", {
        isDefault: false,
        cidrBlock: "172.16.0.0/16",
        vpcName: "example-tf-vpc-deployment",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        isDefault: false,
        vpcId: _default.id,
        zoneId: "cn-beijing-g",
        cidrBlock: "172.16.0.0/24",
        vswitchName: "example-tf-vSwitch-deployment",
    });
    const defaultBucket = new alicloud.oss.Bucket("default", {});
    const defaultVvpInstance = new alicloud.realtimecompute.VvpInstance("default", {
        vvpInstanceName: "code-example-tf-deployment",
        storage: {
            oss: {
                bucket: defaultBucket.id,
            },
        },
        vpcId: _default.id,
        vswitchIds: [defaultSwitch.id],
        resourceSpec: {
            cpu: 8,
            memoryGb: 32,
        },
        paymentType: "PayAsYouGo",
        zoneId: defaultSwitch.zoneId,
    });
    const createDeployment9 = new alicloud.realtimecompute.Deployment("create_Deployment9", {
        deploymentName: "tf-example-deployment-sql-56",
        engineVersion: "vvr-8.0.10-flink-1.17",
        resourceId: defaultVvpInstance.resourceId,
        executionMode: "STREAMING",
        deploymentTarget: {
            mode: "PER_JOB",
            name: "default-queue",
        },
        namespace: pulumi.interpolate`${defaultVvpInstance.vvpInstanceName}-default`,
        artifact: {
            kind: "SQLSCRIPT",
            sqlArtifact: {
                sqlScript: "create temporary table `datagen` ( id varchar, name varchar ) with ( 'connector' = 'datagen' );  create temporary table `blackhole` ( id varchar, name varchar ) with ( 'connector' = 'blackhole' );  insert into blackhole select * from datagen;",
            },
        },
    });
    const defaultJob = new alicloud.realtimecompute.Job("default", {
        localVariables: [{
            value: "qq",
            name: "tt",
        }],
        restoreStrategy: {
            kind: "NONE",
            jobStartTimeInMs: 1763694521254,
        },
        namespace: pulumi.interpolate`${defaultVvpInstance.vvpInstanceName}-default`,
        stopStrategy: "NONE",
        deploymentId: createDeployment9.deploymentId,
        resourceQueueName: "default-queue",
        status: {
            currentJobStatus: "CANCELLED",
        },
        resourceId: defaultVvpInstance.resourceId,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.vpc.Network("default",
        is_default=False,
        cidr_block="172.16.0.0/16",
        vpc_name="example-tf-vpc-deployment")
    default_switch = alicloud.vpc.Switch("default",
        is_default=False,
        vpc_id=default.id,
        zone_id="cn-beijing-g",
        cidr_block="172.16.0.0/24",
        vswitch_name="example-tf-vSwitch-deployment")
    default_bucket = alicloud.oss.Bucket("default")
    default_vvp_instance = alicloud.realtimecompute.VvpInstance("default",
        vvp_instance_name="code-example-tf-deployment",
        storage={
            "oss": {
                "bucket": default_bucket.id,
            },
        },
        vpc_id=default.id,
        vswitch_ids=[default_switch.id],
        resource_spec={
            "cpu": 8,
            "memory_gb": 32,
        },
        payment_type="PayAsYouGo",
        zone_id=default_switch.zone_id)
    create_deployment9 = alicloud.realtimecompute.Deployment("create_Deployment9",
        deployment_name="tf-example-deployment-sql-56",
        engine_version="vvr-8.0.10-flink-1.17",
        resource_id=default_vvp_instance.resource_id,
        execution_mode="STREAMING",
        deployment_target={
            "mode": "PER_JOB",
            "name": "default-queue",
        },
        namespace=default_vvp_instance.vvp_instance_name.apply(lambda vvp_instance_name: f"{vvp_instance_name}-default"),
        artifact={
            "kind": "SQLSCRIPT",
            "sql_artifact": {
                "sql_script": "create temporary table `datagen` ( id varchar, name varchar ) with ( 'connector' = 'datagen' );  create temporary table `blackhole` ( id varchar, name varchar ) with ( 'connector' = 'blackhole' );  insert into blackhole select * from datagen;",
            },
        })
    default_job = alicloud.realtimecompute.Job("default",
        local_variables=[{
            "value": "qq",
            "name": "tt",
        }],
        restore_strategy={
            "kind": "NONE",
            "job_start_time_in_ms": 1763694521254,
        },
        namespace=default_vvp_instance.vvp_instance_name.apply(lambda vvp_instance_name: f"{vvp_instance_name}-default"),
        stop_strategy="NONE",
        deployment_id=create_deployment9.deployment_id,
        resource_queue_name="default-queue",
        status={
            "current_job_status": "CANCELLED",
        },
        resource_id=default_vvp_instance.resource_id)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/realtimecompute"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			IsDefault: pulumi.Bool(false),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    			VpcName:   pulumi.String("example-tf-vpc-deployment"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			IsDefault:   pulumi.Bool(false),
    			VpcId:       _default.ID(),
    			ZoneId:      pulumi.String("cn-beijing-g"),
    			CidrBlock:   pulumi.String("172.16.0.0/24"),
    			VswitchName: pulumi.String("example-tf-vSwitch-deployment"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultBucket, err := oss.NewBucket(ctx, "default", nil)
    		if err != nil {
    			return err
    		}
    		defaultVvpInstance, err := realtimecompute.NewVvpInstance(ctx, "default", &realtimecompute.VvpInstanceArgs{
    			VvpInstanceName: pulumi.String("code-example-tf-deployment"),
    			Storage: &realtimecompute.VvpInstanceStorageArgs{
    				Oss: &realtimecompute.VvpInstanceStorageOssArgs{
    					Bucket: defaultBucket.ID(),
    				},
    			},
    			VpcId: _default.ID(),
    			VswitchIds: pulumi.StringArray{
    				defaultSwitch.ID(),
    			},
    			ResourceSpec: &realtimecompute.VvpInstanceResourceSpecArgs{
    				Cpu:      pulumi.Int(8),
    				MemoryGb: pulumi.Int(32),
    			},
    			PaymentType: pulumi.String("PayAsYouGo"),
    			ZoneId:      defaultSwitch.ZoneId,
    		})
    		if err != nil {
    			return err
    		}
    		createDeployment9, err := realtimecompute.NewDeployment(ctx, "create_Deployment9", &realtimecompute.DeploymentArgs{
    			DeploymentName: pulumi.String("tf-example-deployment-sql-56"),
    			EngineVersion:  pulumi.String("vvr-8.0.10-flink-1.17"),
    			ResourceId:     defaultVvpInstance.ResourceId,
    			ExecutionMode:  pulumi.String("STREAMING"),
    			DeploymentTarget: &realtimecompute.DeploymentDeploymentTargetArgs{
    				Mode: pulumi.String("PER_JOB"),
    				Name: pulumi.String("default-queue"),
    			},
    			Namespace: defaultVvpInstance.VvpInstanceName.ApplyT(func(vvpInstanceName string) (string, error) {
    				return fmt.Sprintf("%v-default", vvpInstanceName), nil
    			}).(pulumi.StringOutput),
    			Artifact: &realtimecompute.DeploymentArtifactArgs{
    				Kind: pulumi.String("SQLSCRIPT"),
    				SqlArtifact: &realtimecompute.DeploymentArtifactSqlArtifactArgs{
    					SqlScript: pulumi.String("create temporary table `datagen` ( id varchar, name varchar ) with ( 'connector' = 'datagen' );  create temporary table `blackhole` ( id varchar, name varchar ) with ( 'connector' = 'blackhole' );  insert into blackhole select * from datagen;"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = realtimecompute.NewJob(ctx, "default", &realtimecompute.JobArgs{
    			LocalVariables: realtimecompute.JobLocalVariableArray{
    				&realtimecompute.JobLocalVariableArgs{
    					Value: pulumi.String("qq"),
    					Name:  pulumi.String("tt"),
    				},
    			},
    			RestoreStrategy: &realtimecompute.JobRestoreStrategyArgs{
    				Kind:             pulumi.String("NONE"),
    				JobStartTimeInMs: pulumi.Int(1763694521254),
    			},
    			Namespace: defaultVvpInstance.VvpInstanceName.ApplyT(func(vvpInstanceName string) (string, error) {
    				return fmt.Sprintf("%v-default", vvpInstanceName), nil
    			}).(pulumi.StringOutput),
    			StopStrategy:      pulumi.String("NONE"),
    			DeploymentId:      createDeployment9.DeploymentId,
    			ResourceQueueName: pulumi.String("default-queue"),
    			Status: &realtimecompute.JobStatusArgs{
    				CurrentJobStatus: pulumi.String("CANCELLED"),
    			},
    			ResourceId: defaultVvpInstance.ResourceId,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = new AliCloud.Vpc.Network("default", new()
        {
            IsDefault = false,
            CidrBlock = "172.16.0.0/16",
            VpcName = "example-tf-vpc-deployment",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            IsDefault = false,
            VpcId = @default.Id,
            ZoneId = "cn-beijing-g",
            CidrBlock = "172.16.0.0/24",
            VswitchName = "example-tf-vSwitch-deployment",
        });
    
        var defaultBucket = new AliCloud.Oss.Bucket("default");
    
        var defaultVvpInstance = new AliCloud.RealtimeCompute.VvpInstance("default", new()
        {
            VvpInstanceName = "code-example-tf-deployment",
            Storage = new AliCloud.RealtimeCompute.Inputs.VvpInstanceStorageArgs
            {
                Oss = new AliCloud.RealtimeCompute.Inputs.VvpInstanceStorageOssArgs
                {
                    Bucket = defaultBucket.Id,
                },
            },
            VpcId = @default.Id,
            VswitchIds = new[]
            {
                defaultSwitch.Id,
            },
            ResourceSpec = new AliCloud.RealtimeCompute.Inputs.VvpInstanceResourceSpecArgs
            {
                Cpu = 8,
                MemoryGb = 32,
            },
            PaymentType = "PayAsYouGo",
            ZoneId = defaultSwitch.ZoneId,
        });
    
        var createDeployment9 = new AliCloud.RealtimeCompute.Deployment("create_Deployment9", new()
        {
            DeploymentName = "tf-example-deployment-sql-56",
            EngineVersion = "vvr-8.0.10-flink-1.17",
            ResourceId = defaultVvpInstance.ResourceId,
            ExecutionMode = "STREAMING",
            DeploymentTarget = new AliCloud.RealtimeCompute.Inputs.DeploymentDeploymentTargetArgs
            {
                Mode = "PER_JOB",
                Name = "default-queue",
            },
            Namespace = defaultVvpInstance.VvpInstanceName.Apply(vvpInstanceName => $"{vvpInstanceName}-default"),
            Artifact = new AliCloud.RealtimeCompute.Inputs.DeploymentArtifactArgs
            {
                Kind = "SQLSCRIPT",
                SqlArtifact = new AliCloud.RealtimeCompute.Inputs.DeploymentArtifactSqlArtifactArgs
                {
                    SqlScript = "create temporary table `datagen` ( id varchar, name varchar ) with ( 'connector' = 'datagen' );  create temporary table `blackhole` ( id varchar, name varchar ) with ( 'connector' = 'blackhole' );  insert into blackhole select * from datagen;",
                },
            },
        });
    
        var defaultJob = new AliCloud.RealtimeCompute.Job("default", new()
        {
            LocalVariables = new[]
            {
                new AliCloud.RealtimeCompute.Inputs.JobLocalVariableArgs
                {
                    Value = "qq",
                    Name = "tt",
                },
            },
            RestoreStrategy = new AliCloud.RealtimeCompute.Inputs.JobRestoreStrategyArgs
            {
                Kind = "NONE",
                JobStartTimeInMs = 1763694521254,
            },
            Namespace = defaultVvpInstance.VvpInstanceName.Apply(vvpInstanceName => $"{vvpInstanceName}-default"),
            StopStrategy = "NONE",
            DeploymentId = createDeployment9.DeploymentId,
            ResourceQueueName = "default-queue",
            Status = new AliCloud.RealtimeCompute.Inputs.JobStatusArgs
            {
                CurrentJobStatus = "CANCELLED",
            },
            ResourceId = defaultVvpInstance.ResourceId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.oss.Bucket;
    import com.pulumi.alicloud.realtimecompute.VvpInstance;
    import com.pulumi.alicloud.realtimecompute.VvpInstanceArgs;
    import com.pulumi.alicloud.realtimecompute.inputs.VvpInstanceStorageArgs;
    import com.pulumi.alicloud.realtimecompute.inputs.VvpInstanceStorageOssArgs;
    import com.pulumi.alicloud.realtimecompute.inputs.VvpInstanceResourceSpecArgs;
    import com.pulumi.alicloud.realtimecompute.Deployment;
    import com.pulumi.alicloud.realtimecompute.DeploymentArgs;
    import com.pulumi.alicloud.realtimecompute.inputs.DeploymentDeploymentTargetArgs;
    import com.pulumi.alicloud.realtimecompute.inputs.DeploymentArtifactArgs;
    import com.pulumi.alicloud.realtimecompute.inputs.DeploymentArtifactSqlArtifactArgs;
    import com.pulumi.alicloud.realtimecompute.Job;
    import com.pulumi.alicloud.realtimecompute.JobArgs;
    import com.pulumi.alicloud.realtimecompute.inputs.JobLocalVariableArgs;
    import com.pulumi.alicloud.realtimecompute.inputs.JobRestoreStrategyArgs;
    import com.pulumi.alicloud.realtimecompute.inputs.JobStatusArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            var default_ = new Network("default", NetworkArgs.builder()
                .isDefault(false)
                .cidrBlock("172.16.0.0/16")
                .vpcName("example-tf-vpc-deployment")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
                .isDefault(false)
                .vpcId(default_.id())
                .zoneId("cn-beijing-g")
                .cidrBlock("172.16.0.0/24")
                .vswitchName("example-tf-vSwitch-deployment")
                .build());
    
            var defaultBucket = new Bucket("defaultBucket");
    
            var defaultVvpInstance = new VvpInstance("defaultVvpInstance", VvpInstanceArgs.builder()
                .vvpInstanceName("code-example-tf-deployment")
                .storage(VvpInstanceStorageArgs.builder()
                    .oss(VvpInstanceStorageOssArgs.builder()
                        .bucket(defaultBucket.id())
                        .build())
                    .build())
                .vpcId(default_.id())
                .vswitchIds(defaultSwitch.id())
                .resourceSpec(VvpInstanceResourceSpecArgs.builder()
                    .cpu(8)
                    .memoryGb(32)
                    .build())
                .paymentType("PayAsYouGo")
                .zoneId(defaultSwitch.zoneId())
                .build());
    
            var createDeployment9 = new Deployment("createDeployment9", DeploymentArgs.builder()
                .deploymentName("tf-example-deployment-sql-56")
                .engineVersion("vvr-8.0.10-flink-1.17")
                .resourceId(defaultVvpInstance.resourceId())
                .executionMode("STREAMING")
                .deploymentTarget(DeploymentDeploymentTargetArgs.builder()
                    .mode("PER_JOB")
                    .name("default-queue")
                    .build())
                .namespace(defaultVvpInstance.vvpInstanceName().applyValue(_vvpInstanceName -> String.format("%s-default", _vvpInstanceName)))
                .artifact(DeploymentArtifactArgs.builder()
                    .kind("SQLSCRIPT")
                    .sqlArtifact(DeploymentArtifactSqlArtifactArgs.builder()
                        .sqlScript("create temporary table `datagen` ( id varchar, name varchar ) with ( 'connector' = 'datagen' );  create temporary table `blackhole` ( id varchar, name varchar ) with ( 'connector' = 'blackhole' );  insert into blackhole select * from datagen;")
                        .build())
                    .build())
                .build());
    
            var defaultJob = new Job("defaultJob", JobArgs.builder()
                .localVariables(JobLocalVariableArgs.builder()
                    .value("qq")
                    .name("tt")
                    .build())
                .restoreStrategy(JobRestoreStrategyArgs.builder()
                    .kind("NONE")
                    .jobStartTimeInMs(1763694521254)
                    .build())
                .namespace(defaultVvpInstance.vvpInstanceName().applyValue(_vvpInstanceName -> String.format("%s-default", _vvpInstanceName)))
                .stopStrategy("NONE")
                .deploymentId(createDeployment9.deploymentId())
                .resourceQueueName("default-queue")
                .status(JobStatusArgs.builder()
                    .currentJobStatus("CANCELLED")
                    .build())
                .resourceId(defaultVvpInstance.resourceId())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default:
        type: alicloud:vpc:Network
        properties:
          isDefault: false
          cidrBlock: 172.16.0.0/16
          vpcName: example-tf-vpc-deployment
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          isDefault: false
          vpcId: ${default.id}
          zoneId: cn-beijing-g
          cidrBlock: 172.16.0.0/24
          vswitchName: example-tf-vSwitch-deployment
      defaultBucket:
        type: alicloud:oss:Bucket
        name: default
      defaultVvpInstance:
        type: alicloud:realtimecompute:VvpInstance
        name: default
        properties:
          vvpInstanceName: code-example-tf-deployment
          storage:
            oss:
              bucket: ${defaultBucket.id}
          vpcId: ${default.id}
          vswitchIds:
            - ${defaultSwitch.id}
          resourceSpec:
            cpu: '8'
            memoryGb: '32'
          paymentType: PayAsYouGo
          zoneId: ${defaultSwitch.zoneId}
      createDeployment9:
        type: alicloud:realtimecompute:Deployment
        name: create_Deployment9
        properties:
          deploymentName: tf-example-deployment-sql-56
          engineVersion: vvr-8.0.10-flink-1.17
          resourceId: ${defaultVvpInstance.resourceId}
          executionMode: STREAMING
          deploymentTarget:
            mode: PER_JOB
            name: default-queue
          namespace: ${defaultVvpInstance.vvpInstanceName}-default
          artifact:
            kind: SQLSCRIPT
            sqlArtifact:
              sqlScript: create temporary table `datagen` ( id varchar, name varchar ) with ( 'connector' = 'datagen' );  create temporary table `blackhole` ( id varchar, name varchar ) with ( 'connector' = 'blackhole' );  insert into blackhole select * from datagen;
      defaultJob:
        type: alicloud:realtimecompute:Job
        name: default
        properties:
          localVariables:
            - value: qq
              name: tt
          restoreStrategy:
            kind: NONE
            jobStartTimeInMs: '1763694521254'
          namespace: ${defaultVvpInstance.vvpInstanceName}-default
          stopStrategy: NONE
          deploymentId: ${createDeployment9.deploymentId}
          resourceQueueName: default-queue
          status:
            currentJobStatus: CANCELLED
          resourceId: ${defaultVvpInstance.resourceId}
    

    📚 Need more examples? VIEW MORE EXAMPLES

    Create Job Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Job(name: string, args: JobArgs, opts?: CustomResourceOptions);
    @overload
    def Job(resource_name: str,
            args: JobArgs,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Job(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            namespace: Optional[str] = None,
            resource_id: Optional[str] = None,
            deployment_id: Optional[str] = None,
            local_variables: Optional[Sequence[JobLocalVariableArgs]] = None,
            resource_queue_name: Optional[str] = None,
            restore_strategy: Optional[JobRestoreStrategyArgs] = None,
            status: Optional[JobStatusArgs] = None,
            stop_strategy: Optional[str] = None)
    func NewJob(ctx *Context, name string, args JobArgs, opts ...ResourceOption) (*Job, error)
    public Job(string name, JobArgs args, CustomResourceOptions? opts = null)
    public Job(String name, JobArgs args)
    public Job(String name, JobArgs args, CustomResourceOptions options)
    
    type: alicloud:realtimecompute:Job
    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 JobArgs
    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 JobArgs
    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 JobArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args JobArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args JobArgs
    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 jobResource = new AliCloud.RealtimeCompute.Job("jobResource", new()
    {
        Namespace = "string",
        ResourceId = "string",
        DeploymentId = "string",
        LocalVariables = new[]
        {
            new AliCloud.RealtimeCompute.Inputs.JobLocalVariableArgs
            {
                Name = "string",
                Value = "string",
            },
        },
        ResourceQueueName = "string",
        RestoreStrategy = new AliCloud.RealtimeCompute.Inputs.JobRestoreStrategyArgs
        {
            AllowNonRestoredState = false,
            JobStartTimeInMs = 0,
            Kind = "string",
            SavepointId = "string",
        },
        Status = new AliCloud.RealtimeCompute.Inputs.JobStatusArgs
        {
            CurrentJobStatus = "string",
            Failure = new AliCloud.RealtimeCompute.Inputs.JobStatusFailureArgs
            {
                FailedAt = 0,
                Message = "string",
                Reason = "string",
            },
            HealthScore = 0,
            RiskLevel = "string",
            Running = new AliCloud.RealtimeCompute.Inputs.JobStatusRunningArgs
            {
                ObservedFlinkJobRestarts = 0,
                ObservedFlinkJobStatus = "string",
            },
        },
        StopStrategy = "string",
    });
    
    example, err := realtimecompute.NewJob(ctx, "jobResource", &realtimecompute.JobArgs{
    	Namespace:    pulumi.String("string"),
    	ResourceId:   pulumi.String("string"),
    	DeploymentId: pulumi.String("string"),
    	LocalVariables: realtimecompute.JobLocalVariableArray{
    		&realtimecompute.JobLocalVariableArgs{
    			Name:  pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	ResourceQueueName: pulumi.String("string"),
    	RestoreStrategy: &realtimecompute.JobRestoreStrategyArgs{
    		AllowNonRestoredState: pulumi.Bool(false),
    		JobStartTimeInMs:      pulumi.Int(0),
    		Kind:                  pulumi.String("string"),
    		SavepointId:           pulumi.String("string"),
    	},
    	Status: &realtimecompute.JobStatusArgs{
    		CurrentJobStatus: pulumi.String("string"),
    		Failure: &realtimecompute.JobStatusFailureArgs{
    			FailedAt: pulumi.Int(0),
    			Message:  pulumi.String("string"),
    			Reason:   pulumi.String("string"),
    		},
    		HealthScore: pulumi.Int(0),
    		RiskLevel:   pulumi.String("string"),
    		Running: &realtimecompute.JobStatusRunningArgs{
    			ObservedFlinkJobRestarts: pulumi.Int(0),
    			ObservedFlinkJobStatus:   pulumi.String("string"),
    		},
    	},
    	StopStrategy: pulumi.String("string"),
    })
    
    var jobResource = new com.pulumi.alicloud.realtimecompute.Job("jobResource", com.pulumi.alicloud.realtimecompute.JobArgs.builder()
        .namespace("string")
        .resourceId("string")
        .deploymentId("string")
        .localVariables(JobLocalVariableArgs.builder()
            .name("string")
            .value("string")
            .build())
        .resourceQueueName("string")
        .restoreStrategy(JobRestoreStrategyArgs.builder()
            .allowNonRestoredState(false)
            .jobStartTimeInMs(0)
            .kind("string")
            .savepointId("string")
            .build())
        .status(JobStatusArgs.builder()
            .currentJobStatus("string")
            .failure(JobStatusFailureArgs.builder()
                .failedAt(0)
                .message("string")
                .reason("string")
                .build())
            .healthScore(0)
            .riskLevel("string")
            .running(JobStatusRunningArgs.builder()
                .observedFlinkJobRestarts(0)
                .observedFlinkJobStatus("string")
                .build())
            .build())
        .stopStrategy("string")
        .build());
    
    job_resource = alicloud.realtimecompute.Job("jobResource",
        namespace="string",
        resource_id="string",
        deployment_id="string",
        local_variables=[{
            "name": "string",
            "value": "string",
        }],
        resource_queue_name="string",
        restore_strategy={
            "allow_non_restored_state": False,
            "job_start_time_in_ms": 0,
            "kind": "string",
            "savepoint_id": "string",
        },
        status={
            "current_job_status": "string",
            "failure": {
                "failed_at": 0,
                "message": "string",
                "reason": "string",
            },
            "health_score": 0,
            "risk_level": "string",
            "running": {
                "observed_flink_job_restarts": 0,
                "observed_flink_job_status": "string",
            },
        },
        stop_strategy="string")
    
    const jobResource = new alicloud.realtimecompute.Job("jobResource", {
        namespace: "string",
        resourceId: "string",
        deploymentId: "string",
        localVariables: [{
            name: "string",
            value: "string",
        }],
        resourceQueueName: "string",
        restoreStrategy: {
            allowNonRestoredState: false,
            jobStartTimeInMs: 0,
            kind: "string",
            savepointId: "string",
        },
        status: {
            currentJobStatus: "string",
            failure: {
                failedAt: 0,
                message: "string",
                reason: "string",
            },
            healthScore: 0,
            riskLevel: "string",
            running: {
                observedFlinkJobRestarts: 0,
                observedFlinkJobStatus: "string",
            },
        },
        stopStrategy: "string",
    });
    
    type: alicloud:realtimecompute:Job
    properties:
        deploymentId: string
        localVariables:
            - name: string
              value: string
        namespace: string
        resourceId: string
        resourceQueueName: string
        restoreStrategy:
            allowNonRestoredState: false
            jobStartTimeInMs: 0
            kind: string
            savepointId: string
        status:
            currentJobStatus: string
            failure:
                failedAt: 0
                message: string
                reason: string
            healthScore: 0
            riskLevel: string
            running:
                observedFlinkJobRestarts: 0
                observedFlinkJobStatus: string
        stopStrategy: string
    

    Job 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 Job resource accepts the following input properties:

    Namespace string
    namespace
    ResourceId string
    workspace
    DeploymentId string
    deploymentId
    LocalVariables List<Pulumi.AliCloud.RealtimeCompute.Inputs.JobLocalVariable>
    Local variables See local_variables below.
    ResourceQueueName string

    Resource Queue for Job Run

    NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

    RestoreStrategy Pulumi.AliCloud.RealtimeCompute.Inputs.JobRestoreStrategy
    Restore strategy See restore_strategy below.
    Status Pulumi.AliCloud.RealtimeCompute.Inputs.JobStatus
    job status See status below.
    StopStrategy string
    Namespace string
    namespace
    ResourceId string
    workspace
    DeploymentId string
    deploymentId
    LocalVariables []JobLocalVariableArgs
    Local variables See local_variables below.
    ResourceQueueName string

    Resource Queue for Job Run

    NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

    RestoreStrategy JobRestoreStrategyArgs
    Restore strategy See restore_strategy below.
    Status JobStatusArgs
    job status See status below.
    StopStrategy string
    namespace String
    namespace
    resourceId String
    workspace
    deploymentId String
    deploymentId
    localVariables List<JobLocalVariable>
    Local variables See local_variables below.
    resourceQueueName String

    Resource Queue for Job Run

    NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

    restoreStrategy JobRestoreStrategy
    Restore strategy See restore_strategy below.
    status JobStatus
    job status See status below.
    stopStrategy String
    namespace string
    namespace
    resourceId string
    workspace
    deploymentId string
    deploymentId
    localVariables JobLocalVariable[]
    Local variables See local_variables below.
    resourceQueueName string

    Resource Queue for Job Run

    NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

    restoreStrategy JobRestoreStrategy
    Restore strategy See restore_strategy below.
    status JobStatus
    job status See status below.
    stopStrategy string
    namespace str
    namespace
    resource_id str
    workspace
    deployment_id str
    deploymentId
    local_variables Sequence[JobLocalVariableArgs]
    Local variables See local_variables below.
    resource_queue_name str

    Resource Queue for Job Run

    NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

    restore_strategy JobRestoreStrategyArgs
    Restore strategy See restore_strategy below.
    status JobStatusArgs
    job status See status below.
    stop_strategy str
    namespace String
    namespace
    resourceId String
    workspace
    deploymentId String
    deploymentId
    localVariables List<Property Map>
    Local variables See local_variables below.
    resourceQueueName String

    Resource Queue for Job Run

    NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

    restoreStrategy Property Map
    Restore strategy See restore_strategy below.
    status Property Map
    job status See status below.
    stopStrategy String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Job resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    JobId string
    The first ID of the resource
    Id string
    The provider-assigned unique ID for this managed resource.
    JobId string
    The first ID of the resource
    id String
    The provider-assigned unique ID for this managed resource.
    jobId String
    The first ID of the resource
    id string
    The provider-assigned unique ID for this managed resource.
    jobId string
    The first ID of the resource
    id str
    The provider-assigned unique ID for this managed resource.
    job_id str
    The first ID of the resource
    id String
    The provider-assigned unique ID for this managed resource.
    jobId String
    The first ID of the resource

    Look up Existing Job Resource

    Get an existing Job 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?: JobState, opts?: CustomResourceOptions): Job
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            deployment_id: Optional[str] = None,
            job_id: Optional[str] = None,
            local_variables: Optional[Sequence[JobLocalVariableArgs]] = None,
            namespace: Optional[str] = None,
            resource_id: Optional[str] = None,
            resource_queue_name: Optional[str] = None,
            restore_strategy: Optional[JobRestoreStrategyArgs] = None,
            status: Optional[JobStatusArgs] = None,
            stop_strategy: Optional[str] = None) -> Job
    func GetJob(ctx *Context, name string, id IDInput, state *JobState, opts ...ResourceOption) (*Job, error)
    public static Job Get(string name, Input<string> id, JobState? state, CustomResourceOptions? opts = null)
    public static Job get(String name, Output<String> id, JobState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:realtimecompute:Job    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.
    The following state arguments are supported:
    DeploymentId string
    deploymentId
    JobId string
    The first ID of the resource
    LocalVariables List<Pulumi.AliCloud.RealtimeCompute.Inputs.JobLocalVariable>
    Local variables See local_variables below.
    Namespace string
    namespace
    ResourceId string
    workspace
    ResourceQueueName string

    Resource Queue for Job Run

    NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

    RestoreStrategy Pulumi.AliCloud.RealtimeCompute.Inputs.JobRestoreStrategy
    Restore strategy See restore_strategy below.
    Status Pulumi.AliCloud.RealtimeCompute.Inputs.JobStatus
    job status See status below.
    StopStrategy string
    DeploymentId string
    deploymentId
    JobId string
    The first ID of the resource
    LocalVariables []JobLocalVariableArgs
    Local variables See local_variables below.
    Namespace string
    namespace
    ResourceId string
    workspace
    ResourceQueueName string

    Resource Queue for Job Run

    NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

    RestoreStrategy JobRestoreStrategyArgs
    Restore strategy See restore_strategy below.
    Status JobStatusArgs
    job status See status below.
    StopStrategy string
    deploymentId String
    deploymentId
    jobId String
    The first ID of the resource
    localVariables List<JobLocalVariable>
    Local variables See local_variables below.
    namespace String
    namespace
    resourceId String
    workspace
    resourceQueueName String

    Resource Queue for Job Run

    NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

    restoreStrategy JobRestoreStrategy
    Restore strategy See restore_strategy below.
    status JobStatus
    job status See status below.
    stopStrategy String
    deploymentId string
    deploymentId
    jobId string
    The first ID of the resource
    localVariables JobLocalVariable[]
    Local variables See local_variables below.
    namespace string
    namespace
    resourceId string
    workspace
    resourceQueueName string

    Resource Queue for Job Run

    NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

    restoreStrategy JobRestoreStrategy
    Restore strategy See restore_strategy below.
    status JobStatus
    job status See status below.
    stopStrategy string
    deployment_id str
    deploymentId
    job_id str
    The first ID of the resource
    local_variables Sequence[JobLocalVariableArgs]
    Local variables See local_variables below.
    namespace str
    namespace
    resource_id str
    workspace
    resource_queue_name str

    Resource Queue for Job Run

    NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

    restore_strategy JobRestoreStrategyArgs
    Restore strategy See restore_strategy below.
    status JobStatusArgs
    job status See status below.
    stop_strategy str
    deploymentId String
    deploymentId
    jobId String
    The first ID of the resource
    localVariables List<Property Map>
    Local variables See local_variables below.
    namespace String
    namespace
    resourceId String
    workspace
    resourceQueueName String

    Resource Queue for Job Run

    NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

    restoreStrategy Property Map
    Restore strategy See restore_strategy below.
    status Property Map
    job status See status below.
    stopStrategy String

    Supporting Types

    JobLocalVariable, JobLocalVariableArgs

    Name string
    Local variables name
    Value string
    Local variables value
    Name string
    Local variables name
    Value string
    Local variables value
    name String
    Local variables name
    value String
    Local variables value
    name string
    Local variables name
    value string
    Local variables value
    name str
    Local variables name
    value str
    Local variables value
    name String
    Local variables name
    value String
    Local variables value

    JobRestoreStrategy, JobRestoreStrategyArgs

    AllowNonRestoredState bool
    Stateless startup
    JobStartTimeInMs int
    Stateless start time. When stateless start is selected, you can set this parameter to enable all source tables that support startTime to read data from this time.
    Kind string
    Restore type
    SavepointId string
    SavepointId
    AllowNonRestoredState bool
    Stateless startup
    JobStartTimeInMs int
    Stateless start time. When stateless start is selected, you can set this parameter to enable all source tables that support startTime to read data from this time.
    Kind string
    Restore type
    SavepointId string
    SavepointId
    allowNonRestoredState Boolean
    Stateless startup
    jobStartTimeInMs Integer
    Stateless start time. When stateless start is selected, you can set this parameter to enable all source tables that support startTime to read data from this time.
    kind String
    Restore type
    savepointId String
    SavepointId
    allowNonRestoredState boolean
    Stateless startup
    jobStartTimeInMs number
    Stateless start time. When stateless start is selected, you can set this parameter to enable all source tables that support startTime to read data from this time.
    kind string
    Restore type
    savepointId string
    SavepointId
    allow_non_restored_state bool
    Stateless startup
    job_start_time_in_ms int
    Stateless start time. When stateless start is selected, you can set this parameter to enable all source tables that support startTime to read data from this time.
    kind str
    Restore type
    savepoint_id str
    SavepointId
    allowNonRestoredState Boolean
    Stateless startup
    jobStartTimeInMs Number
    Stateless start time. When stateless start is selected, you can set this parameter to enable all source tables that support startTime to read data from this time.
    kind String
    Restore type
    savepointId String
    SavepointId

    JobStatus, JobStatusArgs

    CurrentJobStatus string
    Job current status
    Failure Pulumi.AliCloud.RealtimeCompute.Inputs.JobStatusFailure
    Job failure information
    HealthScore int
    Job Run Health Score
    RiskLevel string
    Risk level, which indicates the risk level of the operation status of the job.
    Running Pulumi.AliCloud.RealtimeCompute.Inputs.JobStatusRunning
    job running status, which has value when the job is Running.
    CurrentJobStatus string
    Job current status
    Failure JobStatusFailure
    Job failure information
    HealthScore int
    Job Run Health Score
    RiskLevel string
    Risk level, which indicates the risk level of the operation status of the job.
    Running JobStatusRunning
    job running status, which has value when the job is Running.
    currentJobStatus String
    Job current status
    failure JobStatusFailure
    Job failure information
    healthScore Integer
    Job Run Health Score
    riskLevel String
    Risk level, which indicates the risk level of the operation status of the job.
    running JobStatusRunning
    job running status, which has value when the job is Running.
    currentJobStatus string
    Job current status
    failure JobStatusFailure
    Job failure information
    healthScore number
    Job Run Health Score
    riskLevel string
    Risk level, which indicates the risk level of the operation status of the job.
    running JobStatusRunning
    job running status, which has value when the job is Running.
    current_job_status str
    Job current status
    failure JobStatusFailure
    Job failure information
    health_score int
    Job Run Health Score
    risk_level str
    Risk level, which indicates the risk level of the operation status of the job.
    running JobStatusRunning
    job running status, which has value when the job is Running.
    currentJobStatus String
    Job current status
    failure Property Map
    Job failure information
    healthScore Number
    Job Run Health Score
    riskLevel String
    Risk level, which indicates the risk level of the operation status of the job.
    running Property Map
    job running status, which has value when the job is Running.

    JobStatusFailure, JobStatusFailureArgs

    FailedAt int
    Job failure time
    Message string
    Failure Information Details
    Reason string
    Failure Reason
    FailedAt int
    Job failure time
    Message string
    Failure Information Details
    Reason string
    Failure Reason
    failedAt Integer
    Job failure time
    message String
    Failure Information Details
    reason String
    Failure Reason
    failedAt number
    Job failure time
    message string
    Failure Information Details
    reason string
    Failure Reason
    failed_at int
    Job failure time
    message str
    Failure Information Details
    reason str
    Failure Reason
    failedAt Number
    Job failure time
    message String
    Failure Information Details
    reason String
    Failure Reason

    JobStatusRunning, JobStatusRunningArgs

    ObservedFlinkJobRestarts int
    Number of job restarts
    ObservedFlinkJobStatus string
    Flink job status
    ObservedFlinkJobRestarts int
    Number of job restarts
    ObservedFlinkJobStatus string
    Flink job status
    observedFlinkJobRestarts Integer
    Number of job restarts
    observedFlinkJobStatus String
    Flink job status
    observedFlinkJobRestarts number
    Number of job restarts
    observedFlinkJobStatus string
    Flink job status
    observed_flink_job_restarts int
    Number of job restarts
    observed_flink_job_status str
    Flink job status
    observedFlinkJobRestarts Number
    Number of job restarts
    observedFlinkJobStatus String
    Flink job status

    Import

    Realtime Compute Job can be imported using the id, e.g.

    $ pulumi import alicloud:realtimecompute/job:Job example <resource_id>:<namespace>:<job_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.94.0 published on Tuesday, Feb 3, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate