UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

135 lines 6.45 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.ScheduleSqlTask = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage tls schedule sql task * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.tls.ScheduleSqlTask("foo", { * description: "tf-test", * destRegion: "cn-beijing", * destTopicId: "b966e41a-d6a6-4999-bd75-39962xxxxxx", * processEndTime: 1751295600, * processSqlDelay: 60, * processStartTime: 1751212980, * processTimeWindow: "@m-15m,@m", * query: "* | SELECT * limit 10000", * requestCycle: { * cronTab: "0 10 * * *", * cronTimeZone: "GMT+08:00", * time: 1, * type: "CronTab", * }, * status: 1, * taskName: "tf-test", * topicId: "8ba48bd7-2493-4300-b1d0-cb760bxxxxxx", * }); * ``` * * ## Import * * ScheduleSqlTask can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:tls/scheduleSqlTask:ScheduleSqlTask default resource_id * ``` */ class ScheduleSqlTask extends pulumi.CustomResource { /** * Get an existing ScheduleSqlTask 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 ScheduleSqlTask(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ScheduleSqlTask. 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'] === ScheduleSqlTask.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["destRegion"] = state ? state.destRegion : undefined; resourceInputs["destTopicId"] = state ? state.destTopicId : undefined; resourceInputs["processEndTime"] = state ? state.processEndTime : undefined; resourceInputs["processSqlDelay"] = state ? state.processSqlDelay : undefined; resourceInputs["processStartTime"] = state ? state.processStartTime : undefined; resourceInputs["processTimeWindow"] = state ? state.processTimeWindow : undefined; resourceInputs["query"] = state ? state.query : undefined; resourceInputs["requestCycle"] = state ? state.requestCycle : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["taskName"] = state ? state.taskName : undefined; resourceInputs["topicId"] = state ? state.topicId : undefined; } else { const args = argsOrState; if ((!args || args.destTopicId === undefined) && !opts.urn) { throw new Error("Missing required property 'destTopicId'"); } if ((!args || args.processSqlDelay === undefined) && !opts.urn) { throw new Error("Missing required property 'processSqlDelay'"); } if ((!args || args.processStartTime === undefined) && !opts.urn) { throw new Error("Missing required property 'processStartTime'"); } if ((!args || args.processTimeWindow === undefined) && !opts.urn) { throw new Error("Missing required property 'processTimeWindow'"); } if ((!args || args.query === undefined) && !opts.urn) { throw new Error("Missing required property 'query'"); } if ((!args || args.requestCycle === undefined) && !opts.urn) { throw new Error("Missing required property 'requestCycle'"); } if ((!args || args.status === undefined) && !opts.urn) { throw new Error("Missing required property 'status'"); } if ((!args || args.taskName === undefined) && !opts.urn) { throw new Error("Missing required property 'taskName'"); } if ((!args || args.topicId === undefined) && !opts.urn) { throw new Error("Missing required property 'topicId'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["destRegion"] = args ? args.destRegion : undefined; resourceInputs["destTopicId"] = args ? args.destTopicId : undefined; resourceInputs["processEndTime"] = args ? args.processEndTime : undefined; resourceInputs["processSqlDelay"] = args ? args.processSqlDelay : undefined; resourceInputs["processStartTime"] = args ? args.processStartTime : undefined; resourceInputs["processTimeWindow"] = args ? args.processTimeWindow : undefined; resourceInputs["query"] = args ? args.query : undefined; resourceInputs["requestCycle"] = args ? args.requestCycle : undefined; resourceInputs["status"] = args ? args.status : undefined; resourceInputs["taskName"] = args ? args.taskName : undefined; resourceInputs["topicId"] = args ? args.topicId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ScheduleSqlTask.__pulumiType, name, resourceInputs, opts); } } exports.ScheduleSqlTask = ScheduleSqlTask; /** @internal */ ScheduleSqlTask.__pulumiType = 'volcengine:tls/scheduleSqlTask:ScheduleSqlTask'; //# sourceMappingURL=scheduleSqlTask.js.map