UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

110 lines 4.6 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.ImportTask = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage tls import task * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.tls.ImportTask("foo", { * description: "tf-test", * importSourceInfo: { * kafkaSourceInfo: { * encode: "UTF-8", * host: "1.1.1.1", * initialOffset: 0, * timeSourceDefault: 1, * topic: "topic-1,topic-2,topic-3", * }, * }, * sourceType: "kafka", * targetInfo: { * extractRule: { * unMatchLogKey: "key-failed", * unMatchUpLoadSwitch: true, * }, * logType: "json_log", * region: "cn-beijing", * }, * taskName: "tf-test-task-name-kafka", * topicId: "b966e41a-d6a6-4999-bd75-39xxxxxxx", * }); * ``` * * ## Import * * ImportTask can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:tls/importTask:ImportTask default resource_id * ``` */ class ImportTask extends pulumi.CustomResource { /** * Get an existing ImportTask 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 ImportTask(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ImportTask. 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'] === ImportTask.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["importSourceInfo"] = state ? state.importSourceInfo : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["sourceType"] = state ? state.sourceType : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["targetInfo"] = state ? state.targetInfo : undefined; resourceInputs["taskName"] = state ? state.taskName : undefined; resourceInputs["topicId"] = state ? state.topicId : undefined; } else { const args = argsOrState; if ((!args || args.importSourceInfo === undefined) && !opts.urn) { throw new Error("Missing required property 'importSourceInfo'"); } if ((!args || args.targetInfo === undefined) && !opts.urn) { throw new Error("Missing required property 'targetInfo'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["importSourceInfo"] = args ? args.importSourceInfo : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["sourceType"] = args ? args.sourceType : undefined; resourceInputs["status"] = args ? args.status : undefined; resourceInputs["targetInfo"] = args ? args.targetInfo : undefined; resourceInputs["taskName"] = args ? args.taskName : undefined; resourceInputs["topicId"] = args ? args.topicId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ImportTask.__pulumiType, name, resourceInputs, opts); } } exports.ImportTask = ImportTask; /** @internal */ ImportTask.__pulumiType = 'volcengine:tls/importTask:ImportTask'; //# sourceMappingURL=importTask.js.map