UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

82 lines 4.62 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.Port = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); class Port extends pulumi.CustomResource { /** * Get an existing Port 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 Port(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Port. 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'] === Port.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["adminStateUp"] = state ? state.adminStateUp : undefined; resourceInputs["allFixedIps"] = state ? state.allFixedIps : undefined; resourceInputs["allSecurityGroupIds"] = state ? state.allSecurityGroupIds : undefined; resourceInputs["allowedAddressPairs"] = state ? state.allowedAddressPairs : undefined; resourceInputs["deviceId"] = state ? state.deviceId : undefined; resourceInputs["deviceOwner"] = state ? state.deviceOwner : undefined; resourceInputs["extraDhcpOptions"] = state ? state.extraDhcpOptions : undefined; resourceInputs["fixedIps"] = state ? state.fixedIps : undefined; resourceInputs["macAddress"] = state ? state.macAddress : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["networkId"] = state ? state.networkId : undefined; resourceInputs["noSecurityGroups"] = state ? state.noSecurityGroups : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["securityGroupIds"] = state ? state.securityGroupIds : undefined; resourceInputs["tenantId"] = state ? state.tenantId : undefined; resourceInputs["valueSpecs"] = state ? state.valueSpecs : undefined; } else { const args = argsOrState; if ((!args || args.networkId === undefined) && !opts.urn) { throw new Error("Missing required property 'networkId'"); } resourceInputs["adminStateUp"] = args ? args.adminStateUp : undefined; resourceInputs["allowedAddressPairs"] = args ? args.allowedAddressPairs : undefined; resourceInputs["deviceId"] = args ? args.deviceId : undefined; resourceInputs["deviceOwner"] = args ? args.deviceOwner : undefined; resourceInputs["extraDhcpOptions"] = args ? args.extraDhcpOptions : undefined; resourceInputs["fixedIps"] = args ? args.fixedIps : undefined; resourceInputs["macAddress"] = args ? args.macAddress : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["networkId"] = args ? args.networkId : undefined; resourceInputs["noSecurityGroups"] = args ? args.noSecurityGroups : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["securityGroupIds"] = args ? args.securityGroupIds : undefined; resourceInputs["tenantId"] = args ? args.tenantId : undefined; resourceInputs["valueSpecs"] = args ? args.valueSpecs : undefined; resourceInputs["allFixedIps"] = undefined /*out*/; resourceInputs["allSecurityGroupIds"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Port.__pulumiType, name, resourceInputs, opts); } } exports.Port = Port; /** @internal */ Port.__pulumiType = 'huaweicloud:Vpc/port:Port'; //# sourceMappingURL=port.js.map