UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

123 lines 5.34 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.EtlTask = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage tls etl task * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.tls.EtlTask("foo", { * description: "for-tf-test", * dslType: "NORMAL", * enable: false, * fromTime: 1750649545, * script: "", * sourceTopicId: "9b756385-1dfb-4306-a094-0c88e04b34a5", * targetResources: [ * { * alias: "tf-test-1", * topicId: "a690a9b8-72c1-40a3-b8c6-f89a81d3748e", * }, * { * alias: "tf-test-2", * topicId: "bdf4f23b-a889-456c-ac5f-09d727427557", * }, * ], * taskType: "Resident", * toTime: 1750735958, * }); * ``` * * ## Import * * EtlTask can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:tls/etlTask:EtlTask default resource_id * ``` */ class EtlTask extends pulumi.CustomResource { /** * Get an existing EtlTask 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 EtlTask(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of EtlTask. 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'] === EtlTask.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["dslType"] = state ? state.dslType : undefined; resourceInputs["enable"] = state ? state.enable : undefined; resourceInputs["fromTime"] = state ? state.fromTime : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["script"] = state ? state.script : undefined; resourceInputs["sourceTopicId"] = state ? state.sourceTopicId : undefined; resourceInputs["targetResources"] = state ? state.targetResources : undefined; resourceInputs["taskType"] = state ? state.taskType : undefined; resourceInputs["toTime"] = state ? state.toTime : undefined; } else { const args = argsOrState; if ((!args || args.dslType === undefined) && !opts.urn) { throw new Error("Missing required property 'dslType'"); } if ((!args || args.enable === undefined) && !opts.urn) { throw new Error("Missing required property 'enable'"); } if ((!args || args.script === undefined) && !opts.urn) { throw new Error("Missing required property 'script'"); } if ((!args || args.sourceTopicId === undefined) && !opts.urn) { throw new Error("Missing required property 'sourceTopicId'"); } if ((!args || args.targetResources === undefined) && !opts.urn) { throw new Error("Missing required property 'targetResources'"); } if ((!args || args.taskType === undefined) && !opts.urn) { throw new Error("Missing required property 'taskType'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["dslType"] = args ? args.dslType : undefined; resourceInputs["enable"] = args ? args.enable : undefined; resourceInputs["fromTime"] = args ? args.fromTime : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["script"] = args ? args.script : undefined; resourceInputs["sourceTopicId"] = args ? args.sourceTopicId : undefined; resourceInputs["targetResources"] = args ? args.targetResources : undefined; resourceInputs["taskType"] = args ? args.taskType : undefined; resourceInputs["toTime"] = args ? args.toTime : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(EtlTask.__pulumiType, name, resourceInputs, opts); } } exports.EtlTask = EtlTask; /** @internal */ EtlTask.__pulumiType = 'volcengine:tls/etlTask:EtlTask'; //# sourceMappingURL=etlTask.js.map