@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
110 lines • 5.35 kB
JavaScript
;
// *** 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.Workspace = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to manage vmp workspace
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@volcengine/pulumi";
*
* const foo = new volcengine.vmp.Workspace("foo", {
* deleteProtectionEnabled: false,
* description: "acc-test",
* instanceTypeId: "vmp.standard.15d",
* password: "Pass123456",
* projectName: "default",
* tags: [{
* key: "k1",
* value: "v1",
* }],
* username: "admin123",
* });
* ```
*
* ## Import
*
* Workspace can be imported using the id, e.g.
*
* ```sh
* $ pulumi import volcengine:vmp/workspace:Workspace default 60dde3ca-951c-4c05-8777-e5a7caa07ad6
* ```
*/
class Workspace extends pulumi.CustomResource {
/**
* Get an existing Workspace 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 Workspace(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Workspace. 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'] === Workspace.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["deleteProtectionEnabled"] = state ? state.deleteProtectionEnabled : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["instanceTypeId"] = state ? state.instanceTypeId : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["overdueReclaimTime"] = state ? state.overdueReclaimTime : undefined;
resourceInputs["password"] = state ? state.password : undefined;
resourceInputs["projectName"] = state ? state.projectName : undefined;
resourceInputs["prometheusPushIntranetEndpoint"] = state ? state.prometheusPushIntranetEndpoint : undefined;
resourceInputs["prometheusQueryIntranetEndpoint"] = state ? state.prometheusQueryIntranetEndpoint : undefined;
resourceInputs["prometheusWriteIntranetEndpoint"] = state ? state.prometheusWriteIntranetEndpoint : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["username"] = state ? state.username : undefined;
}
else {
const args = argsOrState;
if ((!args || args.instanceTypeId === undefined) && !opts.urn) {
throw new Error("Missing required property 'instanceTypeId'");
}
resourceInputs["deleteProtectionEnabled"] = args ? args.deleteProtectionEnabled : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["instanceTypeId"] = args ? args.instanceTypeId : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined;
resourceInputs["projectName"] = args ? args.projectName : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["username"] = args ? args.username : undefined;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["overdueReclaimTime"] = undefined /*out*/;
resourceInputs["prometheusPushIntranetEndpoint"] = undefined /*out*/;
resourceInputs["prometheusQueryIntranetEndpoint"] = undefined /*out*/;
resourceInputs["prometheusWriteIntranetEndpoint"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["password"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Workspace.__pulumiType, name, resourceInputs, opts);
}
}
exports.Workspace = Workspace;
/** @internal */
Workspace.__pulumiType = 'volcengine:vmp/workspace:Workspace';
//# sourceMappingURL=workspace.js.map