@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
480 lines (479 loc) • 19 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a flink job resource which type is `Flink Jar` within HuaweiCloud DLI.
*
* ## Example Usage
* ### Create a flink job
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const name = config.requireObject("name");
* const queueName = config.requireObject("queueName");
* const jarObsPath = config.requireObject("jarObsPath");
* const entrypointArgs = config.requireObject("entrypointArgs");
* const testPackage = new huaweicloud.dli.Package("testPackage", {
* groupName: "jarPackage",
* type: "jar",
* objectPath: jarObsPath,
* });
* const testFlinkjarJob = new huaweicloud.dli.FlinkjarJob("testFlinkjarJob", {
* queueName: queueName,
* entrypoint: pulumi.all([testPackage.groupName, testPackage.objectName]).apply(([groupName, objectName]) => `${groupName}/${objectName}`),
* entrypointArgs: entrypointArgs,
* tags: {
* foo: "bar",
* key: "value",
* },
* });
* ```
*
* ## Import
*
* The job can be imported by `id`. For example, bash
*
* ```sh
* $ pulumi import huaweicloud:Dli/flinkjarJob:FlinkjarJob test 12345
* ```
*/
export declare class FlinkjarJob extends pulumi.CustomResource {
/**
* Get an existing FlinkjarJob resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FlinkjarJobState, opts?: pulumi.CustomResourceOptions): FlinkjarJob;
/**
* Returns true if the given object is an instance of FlinkjarJob. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is FlinkjarJob;
/**
* Specifies storage address of the checkpoint in the JAR file of the user.
* The path must be unique.
*/
readonly checkpointPath: pulumi.Output<string | undefined>;
/**
* Specifies number of CUs selected for a job. The default value is `2`.
*/
readonly cuNum: pulumi.Output<number | undefined>;
/**
* Specifies dependency files. It is the name of the package that has been
* uploaded to the DLI.
*/
readonly dependencyFiles: pulumi.Output<string[] | undefined>;
/**
* Specifies other dependency jars. It is the name of the package that
* has been uploaded to the DLI.
*/
readonly dependencyJars: pulumi.Output<string[] | undefined>;
/**
* Specifies job description. Length range: `1` to `512` characters.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Specifies the JAR file where the job main class is located. It is the name of the
* package that has been uploaded to the DLI.
*/
readonly entrypoint: pulumi.Output<string | undefined>;
/**
* Specifies job entry arguments. Multiple arguments are separated by spaces.
* The arguments are keys followed by values. Keys have to start with '-' or '--'.
*/
readonly entrypointArgs: pulumi.Output<string | undefined>;
/**
* Specifies job feature. Type of the Flink image used by a job.
* + **basic**: indicates that the basic Flink image provided by DLI is used.
* + **custom**: indicates that the user-defined Flink image is used.
*/
readonly feature: pulumi.Output<string>;
/**
* Specifies flink version. This parameter is valid only when feature is set
* to basic. You can use this parameter with the feature parameter to specify the version of the DLI basic Flink image
* used for job running. The options are as follows: `1.10` and `1.7`.
*/
readonly flinkVersion: pulumi.Output<string>;
/**
* Specifies custom image. The format is Organization name/Image name:Image version.
* This parameter is valid only when feature is set to `custom`. You can use this parameter with the feature parameter
* to specify a user-defined Flink image for job running. For details about how to use custom images, see the
* Data Lake Insight User Guide <https://support.huaweicloud.com/en-us/usermanual-dli/dli_01_0494.html>.
*/
readonly image: pulumi.Output<string | undefined>;
/**
* Specifies whether to enable the function of uploading job logs to users' OBS buckets.
* The default value is `false`.
*/
readonly logEnabled: pulumi.Output<boolean | undefined>;
/**
* Specifies job entry class. Default main class is specified by the Manifest file
* of the application.
*/
readonly mainClass: pulumi.Output<string | undefined>;
/**
* Specifies number of CUs in the JobManager selected for a job.
* The default value is `1`.
*/
readonly managerCuNum: pulumi.Output<number | undefined>;
/**
* Specifies the name of the job. Length range: `1` to `57` characters.
* Which may consist of letters, digits, underscores (_) and hyphens (-).
*/
readonly name: pulumi.Output<string>;
/**
* Specifies OBS path. OBS path where users are authorized to save the log.
* This parameter is valid only when `logEnabled` is set to `true`.
*/
readonly obsBucket: pulumi.Output<string | undefined>;
/**
* Specifies number of parallel for a job. The default value is `1`.
*/
readonly parallelNum: pulumi.Output<number | undefined>;
/**
* Specifies the name of DLI queue which this job run in. The type of queue
* must be `general`.
*/
readonly queueName: pulumi.Output<string>;
/**
* The region in which to create the DLI flink job resource. If omitted, the
* provider-level region will be used. Changing this parameter will create a new resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies whether to enable the function of restart upon exceptions.
* The default value is `false`.
*/
readonly restartWhenException: pulumi.Output<boolean | undefined>;
/**
* Specifies whether the abnormal restart is recovered from the checkpoint.
*/
readonly resumeCheckpoint: pulumi.Output<boolean | undefined>;
/**
* Specifies maximum number of retry times upon exceptions. The unit is
* `times/hour`. Value range: `-1` or greater than `0`. The default value is `-1`, indicating that the number of times is
* unlimited.
*/
readonly resumeMaxNum: pulumi.Output<number | undefined>;
/**
* Specifies customizes optimization parameters when a Flink job is running.
*/
readonly runtimeConfig: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Specifies SMN topic. If a job fails, the system will send a message to users
* subscribed to the SMN topic.
*/
readonly smnTopic: pulumi.Output<string | undefined>;
/**
* The Job status.
*/
readonly status: pulumi.Output<string>;
/**
* Specifies the key/value pairs to associate with the resource.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Specifies number of CUs for each TaskManager. The default value is `1`.
*/
readonly tmCuNum: pulumi.Output<number | undefined>;
/**
* Specifies number of slots in each TaskManager.
* The default value is `(parallel_num * tm_cu_num) / (cu_num - manager_cu_num)`.
*/
readonly tmSlotNum: pulumi.Output<number>;
/**
* Create a FlinkjarJob resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: FlinkjarJobArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering FlinkjarJob resources.
*/
export interface FlinkjarJobState {
/**
* Specifies storage address of the checkpoint in the JAR file of the user.
* The path must be unique.
*/
checkpointPath?: pulumi.Input<string>;
/**
* Specifies number of CUs selected for a job. The default value is `2`.
*/
cuNum?: pulumi.Input<number>;
/**
* Specifies dependency files. It is the name of the package that has been
* uploaded to the DLI.
*/
dependencyFiles?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies other dependency jars. It is the name of the package that
* has been uploaded to the DLI.
*/
dependencyJars?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies job description. Length range: `1` to `512` characters.
*/
description?: pulumi.Input<string>;
/**
* Specifies the JAR file where the job main class is located. It is the name of the
* package that has been uploaded to the DLI.
*/
entrypoint?: pulumi.Input<string>;
/**
* Specifies job entry arguments. Multiple arguments are separated by spaces.
* The arguments are keys followed by values. Keys have to start with '-' or '--'.
*/
entrypointArgs?: pulumi.Input<string>;
/**
* Specifies job feature. Type of the Flink image used by a job.
* + **basic**: indicates that the basic Flink image provided by DLI is used.
* + **custom**: indicates that the user-defined Flink image is used.
*/
feature?: pulumi.Input<string>;
/**
* Specifies flink version. This parameter is valid only when feature is set
* to basic. You can use this parameter with the feature parameter to specify the version of the DLI basic Flink image
* used for job running. The options are as follows: `1.10` and `1.7`.
*/
flinkVersion?: pulumi.Input<string>;
/**
* Specifies custom image. The format is Organization name/Image name:Image version.
* This parameter is valid only when feature is set to `custom`. You can use this parameter with the feature parameter
* to specify a user-defined Flink image for job running. For details about how to use custom images, see the
* Data Lake Insight User Guide <https://support.huaweicloud.com/en-us/usermanual-dli/dli_01_0494.html>.
*/
image?: pulumi.Input<string>;
/**
* Specifies whether to enable the function of uploading job logs to users' OBS buckets.
* The default value is `false`.
*/
logEnabled?: pulumi.Input<boolean>;
/**
* Specifies job entry class. Default main class is specified by the Manifest file
* of the application.
*/
mainClass?: pulumi.Input<string>;
/**
* Specifies number of CUs in the JobManager selected for a job.
* The default value is `1`.
*/
managerCuNum?: pulumi.Input<number>;
/**
* Specifies the name of the job. Length range: `1` to `57` characters.
* Which may consist of letters, digits, underscores (_) and hyphens (-).
*/
name?: pulumi.Input<string>;
/**
* Specifies OBS path. OBS path where users are authorized to save the log.
* This parameter is valid only when `logEnabled` is set to `true`.
*/
obsBucket?: pulumi.Input<string>;
/**
* Specifies number of parallel for a job. The default value is `1`.
*/
parallelNum?: pulumi.Input<number>;
/**
* Specifies the name of DLI queue which this job run in. The type of queue
* must be `general`.
*/
queueName?: pulumi.Input<string>;
/**
* The region in which to create the DLI flink job resource. If omitted, the
* provider-level region will be used. Changing this parameter will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies whether to enable the function of restart upon exceptions.
* The default value is `false`.
*/
restartWhenException?: pulumi.Input<boolean>;
/**
* Specifies whether the abnormal restart is recovered from the checkpoint.
*/
resumeCheckpoint?: pulumi.Input<boolean>;
/**
* Specifies maximum number of retry times upon exceptions. The unit is
* `times/hour`. Value range: `-1` or greater than `0`. The default value is `-1`, indicating that the number of times is
* unlimited.
*/
resumeMaxNum?: pulumi.Input<number>;
/**
* Specifies customizes optimization parameters when a Flink job is running.
*/
runtimeConfig?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies SMN topic. If a job fails, the system will send a message to users
* subscribed to the SMN topic.
*/
smnTopic?: pulumi.Input<string>;
/**
* The Job status.
*/
status?: pulumi.Input<string>;
/**
* Specifies the key/value pairs to associate with the resource.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies number of CUs for each TaskManager. The default value is `1`.
*/
tmCuNum?: pulumi.Input<number>;
/**
* Specifies number of slots in each TaskManager.
* The default value is `(parallel_num * tm_cu_num) / (cu_num - manager_cu_num)`.
*/
tmSlotNum?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a FlinkjarJob resource.
*/
export interface FlinkjarJobArgs {
/**
* Specifies storage address of the checkpoint in the JAR file of the user.
* The path must be unique.
*/
checkpointPath?: pulumi.Input<string>;
/**
* Specifies number of CUs selected for a job. The default value is `2`.
*/
cuNum?: pulumi.Input<number>;
/**
* Specifies dependency files. It is the name of the package that has been
* uploaded to the DLI.
*/
dependencyFiles?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies other dependency jars. It is the name of the package that
* has been uploaded to the DLI.
*/
dependencyJars?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies job description. Length range: `1` to `512` characters.
*/
description?: pulumi.Input<string>;
/**
* Specifies the JAR file where the job main class is located. It is the name of the
* package that has been uploaded to the DLI.
*/
entrypoint?: pulumi.Input<string>;
/**
* Specifies job entry arguments. Multiple arguments are separated by spaces.
* The arguments are keys followed by values. Keys have to start with '-' or '--'.
*/
entrypointArgs?: pulumi.Input<string>;
/**
* Specifies job feature. Type of the Flink image used by a job.
* + **basic**: indicates that the basic Flink image provided by DLI is used.
* + **custom**: indicates that the user-defined Flink image is used.
*/
feature?: pulumi.Input<string>;
/**
* Specifies flink version. This parameter is valid only when feature is set
* to basic. You can use this parameter with the feature parameter to specify the version of the DLI basic Flink image
* used for job running. The options are as follows: `1.10` and `1.7`.
*/
flinkVersion?: pulumi.Input<string>;
/**
* Specifies custom image. The format is Organization name/Image name:Image version.
* This parameter is valid only when feature is set to `custom`. You can use this parameter with the feature parameter
* to specify a user-defined Flink image for job running. For details about how to use custom images, see the
* Data Lake Insight User Guide <https://support.huaweicloud.com/en-us/usermanual-dli/dli_01_0494.html>.
*/
image?: pulumi.Input<string>;
/**
* Specifies whether to enable the function of uploading job logs to users' OBS buckets.
* The default value is `false`.
*/
logEnabled?: pulumi.Input<boolean>;
/**
* Specifies job entry class. Default main class is specified by the Manifest file
* of the application.
*/
mainClass?: pulumi.Input<string>;
/**
* Specifies number of CUs in the JobManager selected for a job.
* The default value is `1`.
*/
managerCuNum?: pulumi.Input<number>;
/**
* Specifies the name of the job. Length range: `1` to `57` characters.
* Which may consist of letters, digits, underscores (_) and hyphens (-).
*/
name?: pulumi.Input<string>;
/**
* Specifies OBS path. OBS path where users are authorized to save the log.
* This parameter is valid only when `logEnabled` is set to `true`.
*/
obsBucket?: pulumi.Input<string>;
/**
* Specifies number of parallel for a job. The default value is `1`.
*/
parallelNum?: pulumi.Input<number>;
/**
* Specifies the name of DLI queue which this job run in. The type of queue
* must be `general`.
*/
queueName?: pulumi.Input<string>;
/**
* The region in which to create the DLI flink job resource. If omitted, the
* provider-level region will be used. Changing this parameter will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies whether to enable the function of restart upon exceptions.
* The default value is `false`.
*/
restartWhenException?: pulumi.Input<boolean>;
/**
* Specifies whether the abnormal restart is recovered from the checkpoint.
*/
resumeCheckpoint?: pulumi.Input<boolean>;
/**
* Specifies maximum number of retry times upon exceptions. The unit is
* `times/hour`. Value range: `-1` or greater than `0`. The default value is `-1`, indicating that the number of times is
* unlimited.
*/
resumeMaxNum?: pulumi.Input<number>;
/**
* Specifies customizes optimization parameters when a Flink job is running.
*/
runtimeConfig?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies SMN topic. If a job fails, the system will send a message to users
* subscribed to the SMN topic.
*/
smnTopic?: pulumi.Input<string>;
/**
* Specifies the key/value pairs to associate with the resource.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies number of CUs for each TaskManager. The default value is `1`.
*/
tmCuNum?: pulumi.Input<number>;
/**
* Specifies number of slots in each TaskManager.
* The default value is `(parallel_num * tm_cu_num) / (cu_num - manager_cu_num)`.
*/
tmSlotNum?: pulumi.Input<number>;
}