UNPKG

@ediri/vultr

Version:

A Pulumi package for creating and managing Vultr cloud resources.

92 lines 4.08 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.ContainerRegistry = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Create and update a Vultr container registry. * * ## Example Usage * * Create a new container registry: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vultr from "@ediri/vultr"; * * const vcr1 = new vultr.ContainerRegistry("vcr1", { * plan: "start_up", * "public": false, * region: "sjc", * }); * ``` * * The `name` for container registries must be all lowercase and only contain alphanumeric characters. */ class ContainerRegistry extends pulumi.CustomResource { /** * Get an existing ContainerRegistry 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 ContainerRegistry(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ContainerRegistry. 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'] === ContainerRegistry.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["containerRegistryURN"] = state ? state.containerRegistryURN : undefined; resourceInputs["dateCreated"] = state ? state.dateCreated : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["plan"] = state ? state.plan : undefined; resourceInputs["public"] = state ? state.public : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["rootUser"] = state ? state.rootUser : undefined; resourceInputs["storage"] = state ? state.storage : undefined; } else { const args = argsOrState; if ((!args || args.plan === undefined) && !opts.urn) { throw new Error("Missing required property 'plan'"); } if ((!args || args.public === undefined) && !opts.urn) { throw new Error("Missing required property 'public'"); } if ((!args || args.region === undefined) && !opts.urn) { throw new Error("Missing required property 'region'"); } resourceInputs["name"] = args ? args.name : undefined; resourceInputs["plan"] = args ? args.plan : undefined; resourceInputs["public"] = args ? args.public : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["containerRegistryURN"] = undefined /*out*/; resourceInputs["dateCreated"] = undefined /*out*/; resourceInputs["rootUser"] = undefined /*out*/; resourceInputs["storage"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ContainerRegistry.__pulumiType, name, resourceInputs, opts); } } exports.ContainerRegistry = ContainerRegistry; /** @internal */ ContainerRegistry.__pulumiType = 'vultr:index/containerRegistry:ContainerRegistry'; //# sourceMappingURL=containerRegistry.js.map