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)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
- Resource
Id string - workspace
- Deployment
Id string - deploymentId
- Local
Variables List<Pulumi.Ali Cloud. Realtime Compute. Inputs. Job Local Variable> - Local variables See
local_variablesbelow. - Resource
Queue stringName 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 Pulumi.Ali Cloud. Realtime Compute. Inputs. Job Restore Strategy - Restore strategy See
restore_strategybelow. - Status
Pulumi.
Ali Cloud. Realtime Compute. Inputs. Job Status - job status See
statusbelow. - Stop
Strategy string
- Namespace string
- namespace
- Resource
Id string - workspace
- Deployment
Id string - deploymentId
- Local
Variables []JobLocal Variable Args - Local variables See
local_variablesbelow. - Resource
Queue stringName 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 JobRestore Strategy Args - Restore strategy See
restore_strategybelow. - Status
Job
Status Args - job status See
statusbelow. - Stop
Strategy string
- namespace String
- namespace
- resource
Id String - workspace
- deployment
Id String - deploymentId
- local
Variables List<JobLocal Variable> - Local variables See
local_variablesbelow. - resource
Queue StringName 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 JobRestore Strategy - Restore strategy See
restore_strategybelow. - status
Job
Status - job status See
statusbelow. - stop
Strategy String
- namespace string
- namespace
- resource
Id string - workspace
- deployment
Id string - deploymentId
- local
Variables JobLocal Variable[] - Local variables See
local_variablesbelow. - resource
Queue stringName 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 JobRestore Strategy - Restore strategy See
restore_strategybelow. - status
Job
Status - job status See
statusbelow. - stop
Strategy string
- namespace str
- namespace
- resource_
id str - workspace
- deployment_
id str - deploymentId
- local_
variables Sequence[JobLocal Variable Args] - Local variables See
local_variablesbelow. - resource_
queue_ strname 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 JobRestore Strategy Args - Restore strategy See
restore_strategybelow. - status
Job
Status Args - job status See
statusbelow. - stop_
strategy str
- namespace String
- namespace
- resource
Id String - workspace
- deployment
Id String - deploymentId
- local
Variables List<Property Map> - Local variables See
local_variablesbelow. - resource
Queue StringName 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 Property Map - Restore strategy See
restore_strategybelow. - status Property Map
- job status See
statusbelow. - stop
Strategy String
Outputs
All input properties are implicitly available as output properties. Additionally, the Job resource produces the following output properties:
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) -> Jobfunc 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.
- Deployment
Id string - deploymentId
- Job
Id string - The first ID of the resource
- Local
Variables List<Pulumi.Ali Cloud. Realtime Compute. Inputs. Job Local Variable> - Local variables See
local_variablesbelow. - Namespace string
- namespace
- Resource
Id string - workspace
- Resource
Queue stringName 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 Pulumi.Ali Cloud. Realtime Compute. Inputs. Job Restore Strategy - Restore strategy See
restore_strategybelow. - Status
Pulumi.
Ali Cloud. Realtime Compute. Inputs. Job Status - job status See
statusbelow. - Stop
Strategy string
- Deployment
Id string - deploymentId
- Job
Id string - The first ID of the resource
- Local
Variables []JobLocal Variable Args - Local variables See
local_variablesbelow. - Namespace string
- namespace
- Resource
Id string - workspace
- Resource
Queue stringName 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 JobRestore Strategy Args - Restore strategy See
restore_strategybelow. - Status
Job
Status Args - job status See
statusbelow. - Stop
Strategy string
- deployment
Id String - deploymentId
- job
Id String - The first ID of the resource
- local
Variables List<JobLocal Variable> - Local variables See
local_variablesbelow. - namespace String
- namespace
- resource
Id String - workspace
- resource
Queue StringName 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 JobRestore Strategy - Restore strategy See
restore_strategybelow. - status
Job
Status - job status See
statusbelow. - stop
Strategy String
- deployment
Id string - deploymentId
- job
Id string - The first ID of the resource
- local
Variables JobLocal Variable[] - Local variables See
local_variablesbelow. - namespace string
- namespace
- resource
Id string - workspace
- resource
Queue stringName 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 JobRestore Strategy - Restore strategy See
restore_strategybelow. - status
Job
Status - job status See
statusbelow. - stop
Strategy string
- deployment_
id str - deploymentId
- job_
id str - The first ID of the resource
- local_
variables Sequence[JobLocal Variable Args] - Local variables See
local_variablesbelow. - namespace str
- namespace
- resource_
id str - workspace
- resource_
queue_ strname 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 JobRestore Strategy Args - Restore strategy See
restore_strategybelow. - status
Job
Status Args - job status See
statusbelow. - stop_
strategy str
- deployment
Id String - deploymentId
- job
Id String - The first ID of the resource
- local
Variables List<Property Map> - Local variables See
local_variablesbelow. - namespace String
- namespace
- resource
Id String - workspace
- resource
Queue StringName 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 Property Map - Restore strategy See
restore_strategybelow. - status Property Map
- job status See
statusbelow. - stop
Strategy String
Supporting Types
JobLocalVariable, JobLocalVariableArgs
JobRestoreStrategy, JobRestoreStrategyArgs
- Allow
Non boolRestored State - Stateless startup
- Job
Start intTime In Ms - 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
- Savepoint
Id string - SavepointId
- Allow
Non boolRestored State - Stateless startup
- Job
Start intTime In Ms - 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
- Savepoint
Id string - SavepointId
- allow
Non BooleanRestored State - Stateless startup
- job
Start IntegerTime In Ms - 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
- savepoint
Id String - SavepointId
- allow
Non booleanRestored State - Stateless startup
- job
Start numberTime In Ms - 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
- savepoint
Id string - SavepointId
- allow_
non_ boolrestored_ state - Stateless startup
- job_
start_ inttime_ in_ ms - 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
- allow
Non BooleanRestored State - Stateless startup
- job
Start NumberTime In Ms - 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
- savepoint
Id String - SavepointId
JobStatus, JobStatusArgs
- Current
Job stringStatus - Job current status
- Failure
Pulumi.
Ali Cloud. Realtime Compute. Inputs. Job Status Failure - Job failure information
- Health
Score int - Job Run Health Score
- Risk
Level string - Risk level, which indicates the risk level of the operation status of the job.
- Running
Pulumi.
Ali Cloud. Realtime Compute. Inputs. Job Status Running - job running status, which has value when the job is Running.
- Current
Job stringStatus - Job current status
- Failure
Job
Status Failure - Job failure information
- Health
Score int - Job Run Health Score
- Risk
Level string - Risk level, which indicates the risk level of the operation status of the job.
- Running
Job
Status Running - job running status, which has value when the job is Running.
- current
Job StringStatus - Job current status
- failure
Job
Status Failure - Job failure information
- health
Score Integer - Job Run Health Score
- risk
Level String - Risk level, which indicates the risk level of the operation status of the job.
- running
Job
Status Running - job running status, which has value when the job is Running.
- current
Job stringStatus - Job current status
- failure
Job
Status Failure - Job failure information
- health
Score number - Job Run Health Score
- risk
Level string - Risk level, which indicates the risk level of the operation status of the job.
- running
Job
Status Running - job running status, which has value when the job is Running.
- current_
job_ strstatus - Job current status
- failure
Job
Status Failure - 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
Job
Status Running - job running status, which has value when the job is Running.
- current
Job StringStatus - Job current status
- failure Property Map
- Job failure information
- health
Score Number - Job Run Health Score
- risk
Level 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
JobStatusRunning, JobStatusRunningArgs
- Observed
Flink intJob Restarts - Number of job restarts
- Observed
Flink stringJob Status - Flink job status
- Observed
Flink intJob Restarts - Number of job restarts
- Observed
Flink stringJob Status - Flink job status
- observed
Flink IntegerJob Restarts - Number of job restarts
- observed
Flink StringJob Status - Flink job status
- observed
Flink numberJob Restarts - Number of job restarts
- observed
Flink stringJob Status - Flink job status
- observed_
flink_ intjob_ restarts - Number of job restarts
- observed_
flink_ strjob_ status - Flink job status
- observed
Flink NumberJob Restarts - Number of job restarts
- observed
Flink StringJob Status - 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
alicloudTerraform Provider.
