UNPKG

@ediri/vultr

Version:

A Pulumi package for creating and managing Vultr cloud resources.

80 lines 3.29 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Inference = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a Vultr Serverless Inference resource. This can be used to create, read, modify, and delete managed inference subscriptions on your Vultr account. * * ## Example Usage * * Create a new inference subscription: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vultr from "@ediri/vultr"; * * const myInferenceSubscription = new vultr.Inference("myInferenceSubscription", {label: "my_inference_label"}); * ``` * * ## Import * * Inference subscriptions can be imported using the subscription's `ID`, e.g. * * ```sh * $ pulumi import vultr:index/inference:Inference my_inference_subscription b6a859c5-b299-49dd-8888-b1abbc517d08 * ``` */ class Inference extends pulumi.CustomResource { /** * Get an existing Inference 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 Inference(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Inference. 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'] === Inference.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["apiKey"] = state ? state.apiKey : undefined; resourceInputs["dateCreated"] = state ? state.dateCreated : undefined; resourceInputs["label"] = state ? state.label : undefined; resourceInputs["usage"] = state ? state.usage : undefined; } else { const args = argsOrState; if ((!args || args.label === undefined) && !opts.urn) { throw new Error("Missing required property 'label'"); } resourceInputs["label"] = args ? args.label : undefined; resourceInputs["apiKey"] = undefined /*out*/; resourceInputs["dateCreated"] = undefined /*out*/; resourceInputs["usage"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Inference.__pulumiType, name, resourceInputs, opts); } } exports.Inference = Inference; /** @internal */ Inference.__pulumiType = 'vultr:index/inference:Inference'; //# sourceMappingURL=inference.js.map