UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

118 lines 5.67 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.Invocation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage ecs invocation * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.ecs.Invocation("foo", { * commandId: "cmd-ychkepkhtim0tr3b****", * frequency: "5m", * instanceIds: ["i-ychmz92487l8j00o****"], * invocationDescription: "tf", * invocationName: "tf-test", * launchTime: "2023-06-20T09:48:00Z", * recurrenceEndTime: "2023-06-20T09:59:00Z", * repeatMode: "Rate", * timeout: 90, * username: "root", * workingDir: "/home", * }); * ``` * * ## Import * * EcsInvocation can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:ecs/invocation:Invocation default ivk-ychnxnm45dl8j0mm**** * ``` */ class Invocation extends pulumi.CustomResource { /** * Get an existing Invocation 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 Invocation(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Invocation. 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'] === Invocation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["commandId"] = state ? state.commandId : undefined; resourceInputs["endTime"] = state ? state.endTime : undefined; resourceInputs["frequency"] = state ? state.frequency : undefined; resourceInputs["instanceIds"] = state ? state.instanceIds : undefined; resourceInputs["invocationDescription"] = state ? state.invocationDescription : undefined; resourceInputs["invocationName"] = state ? state.invocationName : undefined; resourceInputs["invocationStatus"] = state ? state.invocationStatus : undefined; resourceInputs["launchTime"] = state ? state.launchTime : undefined; resourceInputs["recurrenceEndTime"] = state ? state.recurrenceEndTime : undefined; resourceInputs["repeatMode"] = state ? state.repeatMode : undefined; resourceInputs["startTime"] = state ? state.startTime : undefined; resourceInputs["timeout"] = state ? state.timeout : undefined; resourceInputs["username"] = state ? state.username : undefined; resourceInputs["workingDir"] = state ? state.workingDir : undefined; } else { const args = argsOrState; if ((!args || args.commandId === undefined) && !opts.urn) { throw new Error("Missing required property 'commandId'"); } if ((!args || args.instanceIds === undefined) && !opts.urn) { throw new Error("Missing required property 'instanceIds'"); } if ((!args || args.invocationName === undefined) && !opts.urn) { throw new Error("Missing required property 'invocationName'"); } if ((!args || args.username === undefined) && !opts.urn) { throw new Error("Missing required property 'username'"); } resourceInputs["commandId"] = args ? args.commandId : undefined; resourceInputs["frequency"] = args ? args.frequency : undefined; resourceInputs["instanceIds"] = args ? args.instanceIds : undefined; resourceInputs["invocationDescription"] = args ? args.invocationDescription : undefined; resourceInputs["invocationName"] = args ? args.invocationName : undefined; resourceInputs["launchTime"] = args ? args.launchTime : undefined; resourceInputs["recurrenceEndTime"] = args ? args.recurrenceEndTime : undefined; resourceInputs["repeatMode"] = args ? args.repeatMode : undefined; resourceInputs["timeout"] = args ? args.timeout : undefined; resourceInputs["username"] = args ? args.username : undefined; resourceInputs["workingDir"] = args ? args.workingDir : undefined; resourceInputs["endTime"] = undefined /*out*/; resourceInputs["invocationStatus"] = undefined /*out*/; resourceInputs["startTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Invocation.__pulumiType, name, resourceInputs, opts); } } exports.Invocation = Invocation; /** @internal */ Invocation.__pulumiType = 'volcengine:ecs/invocation:Invocation'; //# sourceMappingURL=invocation.js.map