UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

140 lines 7.48 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.FlinkjarJob = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * 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 * ``` */ 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, id, state, opts) { return new FlinkjarJob(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * 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) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === FlinkjarJob.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["checkpointPath"] = state ? state.checkpointPath : undefined; resourceInputs["cuNum"] = state ? state.cuNum : undefined; resourceInputs["dependencyFiles"] = state ? state.dependencyFiles : undefined; resourceInputs["dependencyJars"] = state ? state.dependencyJars : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["entrypoint"] = state ? state.entrypoint : undefined; resourceInputs["entrypointArgs"] = state ? state.entrypointArgs : undefined; resourceInputs["feature"] = state ? state.feature : undefined; resourceInputs["flinkVersion"] = state ? state.flinkVersion : undefined; resourceInputs["image"] = state ? state.image : undefined; resourceInputs["logEnabled"] = state ? state.logEnabled : undefined; resourceInputs["mainClass"] = state ? state.mainClass : undefined; resourceInputs["managerCuNum"] = state ? state.managerCuNum : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["obsBucket"] = state ? state.obsBucket : undefined; resourceInputs["parallelNum"] = state ? state.parallelNum : undefined; resourceInputs["queueName"] = state ? state.queueName : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["restartWhenException"] = state ? state.restartWhenException : undefined; resourceInputs["resumeCheckpoint"] = state ? state.resumeCheckpoint : undefined; resourceInputs["resumeMaxNum"] = state ? state.resumeMaxNum : undefined; resourceInputs["runtimeConfig"] = state ? state.runtimeConfig : undefined; resourceInputs["smnTopic"] = state ? state.smnTopic : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tmCuNum"] = state ? state.tmCuNum : undefined; resourceInputs["tmSlotNum"] = state ? state.tmSlotNum : undefined; } else { const args = argsOrState; resourceInputs["checkpointPath"] = args ? args.checkpointPath : undefined; resourceInputs["cuNum"] = args ? args.cuNum : undefined; resourceInputs["dependencyFiles"] = args ? args.dependencyFiles : undefined; resourceInputs["dependencyJars"] = args ? args.dependencyJars : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["entrypoint"] = args ? args.entrypoint : undefined; resourceInputs["entrypointArgs"] = args ? args.entrypointArgs : undefined; resourceInputs["feature"] = args ? args.feature : undefined; resourceInputs["flinkVersion"] = args ? args.flinkVersion : undefined; resourceInputs["image"] = args ? args.image : undefined; resourceInputs["logEnabled"] = args ? args.logEnabled : undefined; resourceInputs["mainClass"] = args ? args.mainClass : undefined; resourceInputs["managerCuNum"] = args ? args.managerCuNum : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["obsBucket"] = args ? args.obsBucket : undefined; resourceInputs["parallelNum"] = args ? args.parallelNum : undefined; resourceInputs["queueName"] = args ? args.queueName : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["restartWhenException"] = args ? args.restartWhenException : undefined; resourceInputs["resumeCheckpoint"] = args ? args.resumeCheckpoint : undefined; resourceInputs["resumeMaxNum"] = args ? args.resumeMaxNum : undefined; resourceInputs["runtimeConfig"] = args ? args.runtimeConfig : undefined; resourceInputs["smnTopic"] = args ? args.smnTopic : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["tmCuNum"] = args ? args.tmCuNum : undefined; resourceInputs["tmSlotNum"] = args ? args.tmSlotNum : undefined; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(FlinkjarJob.__pulumiType, name, resourceInputs, opts); } } exports.FlinkjarJob = FlinkjarJob; /** @internal */ FlinkjarJob.__pulumiType = 'huaweicloud:Dli/flinkjarJob:FlinkjarJob'; //# sourceMappingURL=flinkjarJob.js.map