@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
88 lines • 3.51 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.Vpc = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to manage veenedge vpc
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@volcengine/pulumi";
*
* const foo = new volcengine.veenedge.Vpc("foo", {
* clusterName: "b****t02",
* vpcName: "tf-test-2",
* });
* ```
*
* ## Import
*
* VPC can be imported using the id, e.g.
*
* ```sh
* $ pulumi import volcengine:veenedge/vpc:Vpc default vpc-mizl7m1k
* ```
* If you need to create a VPC, you need to apply for permission from the administrator in advance.
* You can only delete the vpc from web consul
*/
class Vpc extends pulumi.CustomResource {
/**
* Get an existing Vpc 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 Vpc(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Vpc. 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'] === Vpc.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["cidr"] = state ? state.cidr : undefined;
resourceInputs["clusterName"] = state ? state.clusterName : undefined;
resourceInputs["desc"] = state ? state.desc : undefined;
resourceInputs["vpcName"] = state ? state.vpcName : undefined;
}
else {
const args = argsOrState;
if ((!args || args.clusterName === undefined) && !opts.urn) {
throw new Error("Missing required property 'clusterName'");
}
if ((!args || args.desc === undefined) && !opts.urn) {
throw new Error("Missing required property 'desc'");
}
if ((!args || args.vpcName === undefined) && !opts.urn) {
throw new Error("Missing required property 'vpcName'");
}
resourceInputs["cidr"] = args ? args.cidr : undefined;
resourceInputs["clusterName"] = args ? args.clusterName : undefined;
resourceInputs["desc"] = args ? args.desc : undefined;
resourceInputs["vpcName"] = args ? args.vpcName : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Vpc.__pulumiType, name, resourceInputs, opts);
}
}
exports.Vpc = Vpc;
/** @internal */
Vpc.__pulumiType = 'volcengine:veenedge/vpc:Vpc';
//# sourceMappingURL=vpc.js.map