UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

126 lines 6.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.Function = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage vefaas function * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.vefaas.Function("foo", { * description: "123131231", * exclusiveMode: false, * requestTimeout: 30, * runtime: "golang/v1", * }); * ``` * * ## Import * * VefaasFunction can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:vefaas/function:Function default resource_id * ``` */ class Function extends pulumi.CustomResource { /** * Get an existing Function 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 Function(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Function. 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'] === Function.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["codeSize"] = state ? state.codeSize : undefined; resourceInputs["codeSizeLimit"] = state ? state.codeSizeLimit : undefined; resourceInputs["command"] = state ? state.command : undefined; resourceInputs["cpuStrategy"] = state ? state.cpuStrategy : undefined; resourceInputs["creationTime"] = state ? state.creationTime : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["envs"] = state ? state.envs : undefined; resourceInputs["exclusiveMode"] = state ? state.exclusiveMode : undefined; resourceInputs["initializerSec"] = state ? state.initializerSec : undefined; resourceInputs["lastUpdateTime"] = state ? state.lastUpdateTime : undefined; resourceInputs["maxConcurrency"] = state ? state.maxConcurrency : undefined; resourceInputs["memoryMb"] = state ? state.memoryMb : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["nasStorage"] = state ? state.nasStorage : undefined; resourceInputs["owner"] = state ? state.owner : undefined; resourceInputs["port"] = state ? state.port : undefined; resourceInputs["requestTimeout"] = state ? state.requestTimeout : undefined; resourceInputs["runtime"] = state ? state.runtime : undefined; resourceInputs["source"] = state ? state.source : undefined; resourceInputs["sourceAccessConfig"] = state ? state.sourceAccessConfig : undefined; resourceInputs["sourceLocation"] = state ? state.sourceLocation : undefined; resourceInputs["sourceType"] = state ? state.sourceType : undefined; resourceInputs["tlsConfig"] = state ? state.tlsConfig : undefined; resourceInputs["tosMountConfig"] = state ? state.tosMountConfig : undefined; resourceInputs["triggersCount"] = state ? state.triggersCount : undefined; resourceInputs["vpcConfig"] = state ? state.vpcConfig : undefined; } else { const args = argsOrState; if ((!args || args.runtime === undefined) && !opts.urn) { throw new Error("Missing required property 'runtime'"); } resourceInputs["command"] = args ? args.command : undefined; resourceInputs["cpuStrategy"] = args ? args.cpuStrategy : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["envs"] = args ? args.envs : undefined; resourceInputs["exclusiveMode"] = args ? args.exclusiveMode : undefined; resourceInputs["initializerSec"] = args ? args.initializerSec : undefined; resourceInputs["maxConcurrency"] = args ? args.maxConcurrency : undefined; resourceInputs["memoryMb"] = args ? args.memoryMb : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["nasStorage"] = args ? args.nasStorage : undefined; resourceInputs["port"] = args ? args.port : undefined; resourceInputs["requestTimeout"] = args ? args.requestTimeout : undefined; resourceInputs["runtime"] = args ? args.runtime : undefined; resourceInputs["source"] = args ? args.source : undefined; resourceInputs["sourceAccessConfig"] = args ? args.sourceAccessConfig : undefined; resourceInputs["sourceType"] = args ? args.sourceType : undefined; resourceInputs["tlsConfig"] = args ? args.tlsConfig : undefined; resourceInputs["tosMountConfig"] = args ? args.tosMountConfig : undefined; resourceInputs["vpcConfig"] = args ? args.vpcConfig : undefined; resourceInputs["codeSize"] = undefined /*out*/; resourceInputs["codeSizeLimit"] = undefined /*out*/; resourceInputs["creationTime"] = undefined /*out*/; resourceInputs["lastUpdateTime"] = undefined /*out*/; resourceInputs["owner"] = undefined /*out*/; resourceInputs["sourceLocation"] = undefined /*out*/; resourceInputs["triggersCount"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Function.__pulumiType, name, resourceInputs, opts); } } exports.Function = Function; /** @internal */ Function.__pulumiType = 'volcengine:vefaas/function:Function'; //# sourceMappingURL=function.js.map