UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

102 lines 4.72 kB
"use strict"; // *** 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.Address = 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.eip.Address("foo", { * bandwidth: 1, * billingType: "PostPaidByBandwidth", * description: "acc-test", * isp: "ChinaUnicom", * projectName: "default", * }); * ``` * * ## Import * * Eip address can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:eip/address:Address default eip-274oj9a8rs9a87fap8sf9515b * ``` */ class Address extends pulumi.CustomResource { /** * Get an existing Address 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 Address(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Address. 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'] === Address.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["bandwidth"] = state ? state.bandwidth : undefined; resourceInputs["billingType"] = state ? state.billingType : undefined; resourceInputs["deletedTime"] = state ? state.deletedTime : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["eipAddress"] = state ? state.eipAddress : undefined; resourceInputs["expiredTime"] = state ? state.expiredTime : undefined; resourceInputs["isp"] = state ? state.isp : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["overdueTime"] = state ? state.overdueTime : undefined; resourceInputs["period"] = state ? state.period : undefined; resourceInputs["projectName"] = state ? state.projectName : undefined; resourceInputs["securityProtectionTypes"] = state ? state.securityProtectionTypes : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["tags"] = state ? state.tags : undefined; } else { const args = argsOrState; if ((!args || args.billingType === undefined) && !opts.urn) { throw new Error("Missing required property 'billingType'"); } resourceInputs["bandwidth"] = args ? args.bandwidth : undefined; resourceInputs["billingType"] = args ? args.billingType : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["isp"] = args ? args.isp : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["period"] = args ? args.period : undefined; resourceInputs["projectName"] = args ? args.projectName : undefined; resourceInputs["securityProtectionTypes"] = args ? args.securityProtectionTypes : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["deletedTime"] = undefined /*out*/; resourceInputs["eipAddress"] = undefined /*out*/; resourceInputs["expiredTime"] = undefined /*out*/; resourceInputs["overdueTime"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Address.__pulumiType, name, resourceInputs, opts); } } exports.Address = Address; /** @internal */ Address.__pulumiType = 'volcengine:eip/address:Address'; //# sourceMappingURL=address.js.map