@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
451 lines (450 loc) • 21.1 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
* Manages spark job resource of DLI within HuaweiCloud
*
* ## Example Usage
* ### Submit a new spark job with jar packages
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const _default = new huaweicloud.dli.SparkJob("default", {
* queueName: _var.queue_name,
* appName: "driver_package/driver_behavior.jar",
* mainClass: "driver_behavior",
* specification: "B",
* maxRetries: 20,
* });
* ```
*/
export declare class SparkJob extends pulumi.CustomResource {
/**
* Get an existing SparkJob 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?: SparkJobState, opts?: pulumi.CustomResourceOptions): SparkJob;
/**
* Returns true if the given object is an instance of SparkJob. 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 SparkJob;
/**
* Specifies the name of the package that is of the JAR or python file type and
* has been uploaded to the DLI resource management system.
* The OBS paths are allowed, for example, `obs://<bucket name>/<package name>`.
* Changing this parameter will submit a new spark job.
*/
readonly appName: pulumi.Output<string>;
/**
* Specifies the input parameters of the main class.
* Changing this parameter will submit a new spark job.
*/
readonly appParameters: pulumi.Output<string | undefined>;
/**
* Specifies the configuration items of the DLI spark.
* Please following the document of Spark [configurations](https://spark.apache.org/docs/latest/configuration.html) for
* this argument. If you want to enable the `access metadata` of DLI spark in HuaweiCloud, please set
* `spark.dli.metaAccess.enable` to `true`. Changing this parameter will submit a new spark job.
*/
readonly configurations: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Time of the DLI spark job submit.
*/
readonly createdAt: pulumi.Output<string>;
/**
* Specifies a list of package resource objects.
* The object structure is documented below.
* Changing this parameter will submit a new spark job.
*/
readonly dependentPackages: pulumi.Output<outputs.Dli.SparkJobDependentPackage[] | undefined>;
/**
* Specifies the number of CPU cores of the Spark application driver.
* The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
readonly driverCores: pulumi.Output<number | undefined>;
/**
* Specifies the driver memory of the spark application.
* The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
readonly driverMemory: pulumi.Output<string | undefined>;
/**
* Specifies the number of CPU cores of each executor in the Spark
* application. The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
readonly executorCores: pulumi.Output<number | undefined>;
/**
* Specifies the executor memory of the spark application.
* application. The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
readonly executorMemory: pulumi.Output<string | undefined>;
/**
* Specifies the number of executors in a spark application.
* The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
readonly executors: pulumi.Output<number | undefined>;
/**
* Specifies a list of the other dependencies name which has been uploaded to the
* DLI resource management system. The OBS paths are allowed, for example, `obs://<bucket name>/<dependent files>`.
* Changing this parameter will submit a new spark job.
*/
readonly files: pulumi.Output<string[] | undefined>;
/**
* Specifies a list of the jar package name which has been uploaded to the DLI
* resource management system. The OBS paths are allowed, for example, `obs://<bucket name>/<package name>`.
* Changing this parameter will submit a new spark job.
*/
readonly jars: pulumi.Output<string[] | undefined>;
/**
* Specifies the main class of the spark job.
* Required if the `appName` is the JAR type.
* Changing this parameter will submit a new spark job.
*/
readonly mainClass: pulumi.Output<string | undefined>;
/**
* Specifies the maximum retry times.
* The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
readonly maxRetries: pulumi.Output<number | undefined>;
/**
* Specifies a list of modules that depend on system resources.
* The dependent modules and corresponding services are as follows.
* Changing this parameter will submit a new spark job.
* + **sys.datasource.hbase**: CloudTable/MRS HBase
* + **sys.datasource.opentsdb**: CloudTable/MRS OpenTSDB
* + **sys.datasource.rds**: RDS MySQL
* + **sys.datasource.css**: CSS
*/
readonly modules: pulumi.Output<string[] | undefined>;
/**
* Specifies the spark job name.
* The value contains a maximum of 128 characters.
* Changing this parameter will submit a new spark job.
*/
readonly name: pulumi.Output<string>;
/**
* The owner of the spark job.
*/
readonly owner: pulumi.Output<string>;
/**
* Specifies a list of the python file name which has been uploaded to the
* DLI resource management system. The OBS paths are allowed, for example, `obs://<bucket name>/<python file name>`.
* Changing this parameter will submit a new spark job.
*/
readonly pythonFiles: pulumi.Output<string[] | undefined>;
/**
* Specifies the DLI queue name.
* Changing this parameter will submit a new spark job.
*/
readonly queueName: pulumi.Output<string>;
/**
* Specifies the region in which to submit a spark job.
* If omitted, the provider-level region will be used.
* Changing this parameter will submit a new spark job.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the compute resource type for spark application.
* The available types and related specifications are as follows, default to minimum configuration (type **A**).
* Changing this parameter will submit a new spark job.
*/
readonly specification: pulumi.Output<string | undefined>;
/**
* Create a SparkJob 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: SparkJobArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering SparkJob resources.
*/
export interface SparkJobState {
/**
* Specifies the name of the package that is of the JAR or python file type and
* has been uploaded to the DLI resource management system.
* The OBS paths are allowed, for example, `obs://<bucket name>/<package name>`.
* Changing this parameter will submit a new spark job.
*/
appName?: pulumi.Input<string>;
/**
* Specifies the input parameters of the main class.
* Changing this parameter will submit a new spark job.
*/
appParameters?: pulumi.Input<string>;
/**
* Specifies the configuration items of the DLI spark.
* Please following the document of Spark [configurations](https://spark.apache.org/docs/latest/configuration.html) for
* this argument. If you want to enable the `access metadata` of DLI spark in HuaweiCloud, please set
* `spark.dli.metaAccess.enable` to `true`. Changing this parameter will submit a new spark job.
*/
configurations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Time of the DLI spark job submit.
*/
createdAt?: pulumi.Input<string>;
/**
* Specifies a list of package resource objects.
* The object structure is documented below.
* Changing this parameter will submit a new spark job.
*/
dependentPackages?: pulumi.Input<pulumi.Input<inputs.Dli.SparkJobDependentPackage>[]>;
/**
* Specifies the number of CPU cores of the Spark application driver.
* The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
driverCores?: pulumi.Input<number>;
/**
* Specifies the driver memory of the spark application.
* The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
driverMemory?: pulumi.Input<string>;
/**
* Specifies the number of CPU cores of each executor in the Spark
* application. The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
executorCores?: pulumi.Input<number>;
/**
* Specifies the executor memory of the spark application.
* application. The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
executorMemory?: pulumi.Input<string>;
/**
* Specifies the number of executors in a spark application.
* The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
executors?: pulumi.Input<number>;
/**
* Specifies a list of the other dependencies name which has been uploaded to the
* DLI resource management system. The OBS paths are allowed, for example, `obs://<bucket name>/<dependent files>`.
* Changing this parameter will submit a new spark job.
*/
files?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies a list of the jar package name which has been uploaded to the DLI
* resource management system. The OBS paths are allowed, for example, `obs://<bucket name>/<package name>`.
* Changing this parameter will submit a new spark job.
*/
jars?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the main class of the spark job.
* Required if the `appName` is the JAR type.
* Changing this parameter will submit a new spark job.
*/
mainClass?: pulumi.Input<string>;
/**
* Specifies the maximum retry times.
* The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
maxRetries?: pulumi.Input<number>;
/**
* Specifies a list of modules that depend on system resources.
* The dependent modules and corresponding services are as follows.
* Changing this parameter will submit a new spark job.
* + **sys.datasource.hbase**: CloudTable/MRS HBase
* + **sys.datasource.opentsdb**: CloudTable/MRS OpenTSDB
* + **sys.datasource.rds**: RDS MySQL
* + **sys.datasource.css**: CSS
*/
modules?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the spark job name.
* The value contains a maximum of 128 characters.
* Changing this parameter will submit a new spark job.
*/
name?: pulumi.Input<string>;
/**
* The owner of the spark job.
*/
owner?: pulumi.Input<string>;
/**
* Specifies a list of the python file name which has been uploaded to the
* DLI resource management system. The OBS paths are allowed, for example, `obs://<bucket name>/<python file name>`.
* Changing this parameter will submit a new spark job.
*/
pythonFiles?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the DLI queue name.
* Changing this parameter will submit a new spark job.
*/
queueName?: pulumi.Input<string>;
/**
* Specifies the region in which to submit a spark job.
* If omitted, the provider-level region will be used.
* Changing this parameter will submit a new spark job.
*/
region?: pulumi.Input<string>;
/**
* Specifies the compute resource type for spark application.
* The available types and related specifications are as follows, default to minimum configuration (type **A**).
* Changing this parameter will submit a new spark job.
*/
specification?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a SparkJob resource.
*/
export interface SparkJobArgs {
/**
* Specifies the name of the package that is of the JAR or python file type and
* has been uploaded to the DLI resource management system.
* The OBS paths are allowed, for example, `obs://<bucket name>/<package name>`.
* Changing this parameter will submit a new spark job.
*/
appName: pulumi.Input<string>;
/**
* Specifies the input parameters of the main class.
* Changing this parameter will submit a new spark job.
*/
appParameters?: pulumi.Input<string>;
/**
* Specifies the configuration items of the DLI spark.
* Please following the document of Spark [configurations](https://spark.apache.org/docs/latest/configuration.html) for
* this argument. If you want to enable the `access metadata` of DLI spark in HuaweiCloud, please set
* `spark.dli.metaAccess.enable` to `true`. Changing this parameter will submit a new spark job.
*/
configurations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies a list of package resource objects.
* The object structure is documented below.
* Changing this parameter will submit a new spark job.
*/
dependentPackages?: pulumi.Input<pulumi.Input<inputs.Dli.SparkJobDependentPackage>[]>;
/**
* Specifies the number of CPU cores of the Spark application driver.
* The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
driverCores?: pulumi.Input<number>;
/**
* Specifies the driver memory of the spark application.
* The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
driverMemory?: pulumi.Input<string>;
/**
* Specifies the number of CPU cores of each executor in the Spark
* application. The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
executorCores?: pulumi.Input<number>;
/**
* Specifies the executor memory of the spark application.
* application. The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
executorMemory?: pulumi.Input<string>;
/**
* Specifies the number of executors in a spark application.
* The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
executors?: pulumi.Input<number>;
/**
* Specifies a list of the other dependencies name which has been uploaded to the
* DLI resource management system. The OBS paths are allowed, for example, `obs://<bucket name>/<dependent files>`.
* Changing this parameter will submit a new spark job.
*/
files?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies a list of the jar package name which has been uploaded to the DLI
* resource management system. The OBS paths are allowed, for example, `obs://<bucket name>/<package name>`.
* Changing this parameter will submit a new spark job.
*/
jars?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the main class of the spark job.
* Required if the `appName` is the JAR type.
* Changing this parameter will submit a new spark job.
*/
mainClass?: pulumi.Input<string>;
/**
* Specifies the maximum retry times.
* The default value of this value corresponds to the configuration of the selected `specification`.
* If you set this value instead of the default value, `specification` will be invalid.
* Changing this parameter will submit a new spark job.
*/
maxRetries?: pulumi.Input<number>;
/**
* Specifies a list of modules that depend on system resources.
* The dependent modules and corresponding services are as follows.
* Changing this parameter will submit a new spark job.
* + **sys.datasource.hbase**: CloudTable/MRS HBase
* + **sys.datasource.opentsdb**: CloudTable/MRS OpenTSDB
* + **sys.datasource.rds**: RDS MySQL
* + **sys.datasource.css**: CSS
*/
modules?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the spark job name.
* The value contains a maximum of 128 characters.
* Changing this parameter will submit a new spark job.
*/
name?: pulumi.Input<string>;
/**
* Specifies a list of the python file name which has been uploaded to the
* DLI resource management system. The OBS paths are allowed, for example, `obs://<bucket name>/<python file name>`.
* Changing this parameter will submit a new spark job.
*/
pythonFiles?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the DLI queue name.
* Changing this parameter will submit a new spark job.
*/
queueName: pulumi.Input<string>;
/**
* Specifies the region in which to submit a spark job.
* If omitted, the provider-level region will be used.
* Changing this parameter will submit a new spark job.
*/
region?: pulumi.Input<string>;
/**
* Specifies the compute resource type for spark application.
* The available types and related specifications are as follows, default to minimum configuration (type **A**).
* Changing this parameter will submit a new spark job.
*/
specification?: pulumi.Input<string>;
}