@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
100 lines • 4.56 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.BandwidthPackage = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@volcengine/pulumi";
*
* const foo = new volcengine.bandwidth_package.BandwidthPackage("foo", {
* bandwidth: 10,
* bandwidthPackageName: "acc-test-bp",
* billingType: "PostPaidByBandwidth",
* description: "acc-test",
* isp: "BGP",
* protocol: "IPv4",
* securityProtectionTypes: ["AntiDDoS_Enhanced"],
* tags: [{
* key: "k1",
* value: "v1",
* }],
* });
* ```
*
* ## Import
*
* BandwidthPackage can be imported using the id, e.g.
*
* ```sh
* $ pulumi import volcengine:bandwidth_package/bandwidthPackage:BandwidthPackage default bwp-2zeo05qre24nhrqpy****
* ```
*/
class BandwidthPackage extends pulumi.CustomResource {
/**
* Get an existing BandwidthPackage 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 BandwidthPackage(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of BandwidthPackage. 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'] === BandwidthPackage.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["bandwidth"] = state ? state.bandwidth : undefined;
resourceInputs["bandwidthPackageName"] = state ? state.bandwidthPackageName : undefined;
resourceInputs["billingType"] = state ? state.billingType : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["isp"] = state ? state.isp : undefined;
resourceInputs["period"] = state ? state.period : undefined;
resourceInputs["projectName"] = state ? state.projectName : undefined;
resourceInputs["protocol"] = state ? state.protocol : undefined;
resourceInputs["securityProtectionTypes"] = state ? state.securityProtectionTypes : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
}
else {
const args = argsOrState;
if ((!args || args.bandwidth === undefined) && !opts.urn) {
throw new Error("Missing required property 'bandwidth'");
}
resourceInputs["bandwidth"] = args ? args.bandwidth : undefined;
resourceInputs["bandwidthPackageName"] = args ? args.bandwidthPackageName : undefined;
resourceInputs["billingType"] = args ? args.billingType : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["isp"] = args ? args.isp : undefined;
resourceInputs["period"] = args ? args.period : undefined;
resourceInputs["projectName"] = args ? args.projectName : undefined;
resourceInputs["protocol"] = args ? args.protocol : undefined;
resourceInputs["securityProtectionTypes"] = args ? args.securityProtectionTypes : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(BandwidthPackage.__pulumiType, name, resourceInputs, opts);
}
}
exports.BandwidthPackage = BandwidthPackage;
/** @internal */
BandwidthPackage.__pulumiType = 'volcengine:bandwidth_package/bandwidthPackage:BandwidthPackage';
//# sourceMappingURL=bandwidthPackage.js.map