UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

156 lines 8.83 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.FlinksqlJob = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a flink sql job resource 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 sql = config.requireObject("sql"); * const jobName = config.requireObject("jobName"); * const test = new huaweicloud.dli.FlinksqlJob("test", { * type: "flink_sql_job", * sql: sql, * }); * ``` * * ## Import * * Clusters can be imported by their `id`. For example, bash * * ```sh * $ pulumi import huaweicloud:Dli/flinksqlJob:FlinksqlJob test 12345 * ``` * * Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`static_estimator`, `graph_type`. It is generally recommended running `terraform plan` after importing the resource. You can then decide if changes should be applied to the resource, or the resource definition should be updated to align with the resource. Also you can ignore changes as below. hcl resource "huaweicloud_cae_component" "test" { * * ... * * lifecycle { * * ignore_changes = [ * * static_estimator, graph_type, * * ] * * } } */ class FlinksqlJob extends pulumi.CustomResource { /** * Get an existing FlinksqlJob 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 FlinksqlJob(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of FlinksqlJob. 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'] === FlinksqlJob.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["checkpointEnabled"] = state ? state.checkpointEnabled : undefined; resourceInputs["checkpointInterval"] = state ? state.checkpointInterval : undefined; resourceInputs["checkpointMode"] = state ? state.checkpointMode : undefined; resourceInputs["cuNumber"] = state ? state.cuNumber : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["dirtyDataStrategy"] = state ? state.dirtyDataStrategy : undefined; resourceInputs["edgeGroupIds"] = state ? state.edgeGroupIds : undefined; resourceInputs["flinkVersion"] = state ? state.flinkVersion : undefined; resourceInputs["graphType"] = state ? state.graphType : undefined; resourceInputs["idleStateRetention"] = state ? state.idleStateRetention : undefined; resourceInputs["logEnabled"] = state ? state.logEnabled : undefined; resourceInputs["managerCuNumber"] = state ? state.managerCuNumber : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["obsBucket"] = state ? state.obsBucket : undefined; resourceInputs["operatorConfig"] = state ? state.operatorConfig : undefined; resourceInputs["parallelNumber"] = state ? state.parallelNumber : 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["runMode"] = state ? state.runMode : undefined; resourceInputs["runtimeConfig"] = state ? state.runtimeConfig : undefined; resourceInputs["smnTopic"] = state ? state.smnTopic : undefined; resourceInputs["sql"] = state ? state.sql : undefined; resourceInputs["staticEstimator"] = state ? state.staticEstimator : undefined; resourceInputs["staticEstimatorConfig"] = state ? state.staticEstimatorConfig : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["streamGraph"] = state ? state.streamGraph : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tmCus"] = state ? state.tmCus : undefined; resourceInputs["tmSlotNum"] = state ? state.tmSlotNum : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["udfJarUrl"] = state ? state.udfJarUrl : undefined; } else { const args = argsOrState; resourceInputs["checkpointEnabled"] = args ? args.checkpointEnabled : undefined; resourceInputs["checkpointInterval"] = args ? args.checkpointInterval : undefined; resourceInputs["checkpointMode"] = args ? args.checkpointMode : undefined; resourceInputs["cuNumber"] = args ? args.cuNumber : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["dirtyDataStrategy"] = args ? args.dirtyDataStrategy : undefined; resourceInputs["edgeGroupIds"] = args ? args.edgeGroupIds : undefined; resourceInputs["flinkVersion"] = args ? args.flinkVersion : undefined; resourceInputs["graphType"] = args ? args.graphType : undefined; resourceInputs["idleStateRetention"] = args ? args.idleStateRetention : undefined; resourceInputs["logEnabled"] = args ? args.logEnabled : undefined; resourceInputs["managerCuNumber"] = args ? args.managerCuNumber : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["obsBucket"] = args ? args.obsBucket : undefined; resourceInputs["operatorConfig"] = args ? args.operatorConfig : undefined; resourceInputs["parallelNumber"] = args ? args.parallelNumber : 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["runMode"] = args ? args.runMode : undefined; resourceInputs["runtimeConfig"] = args ? args.runtimeConfig : undefined; resourceInputs["smnTopic"] = args ? args.smnTopic : undefined; resourceInputs["sql"] = args ? args.sql : undefined; resourceInputs["staticEstimator"] = args ? args.staticEstimator : undefined; resourceInputs["staticEstimatorConfig"] = args ? args.staticEstimatorConfig : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["tmCus"] = args ? args.tmCus : undefined; resourceInputs["tmSlotNum"] = args ? args.tmSlotNum : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["udfJarUrl"] = args ? args.udfJarUrl : undefined; resourceInputs["status"] = undefined /*out*/; resourceInputs["streamGraph"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(FlinksqlJob.__pulumiType, name, resourceInputs, opts); } } exports.FlinksqlJob = FlinksqlJob; /** @internal */ FlinksqlJob.__pulumiType = 'huaweicloud:Dli/flinksqlJob:FlinksqlJob'; //# sourceMappingURL=flinksqlJob.js.map