UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

81 lines 4.36 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.PartnerAttachment = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); class PartnerAttachment extends pulumi.CustomResource { /** * Get an existing PartnerAttachment 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 PartnerAttachment(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of PartnerAttachment. 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'] === PartnerAttachment.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["bgp"] = state ? state.bgp : undefined; resourceInputs["childrens"] = state ? state.childrens : undefined; resourceInputs["connectionBandwidthInMbps"] = state ? state.connectionBandwidthInMbps : undefined; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["naasProvider"] = state ? state.naasProvider : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["parentUuid"] = state ? state.parentUuid : undefined; resourceInputs["redundancyZone"] = state ? state.redundancyZone : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["state"] = state ? state.state : undefined; resourceInputs["vpcIds"] = state ? state.vpcIds : undefined; } else { const args = argsOrState; if ((!args || args.connectionBandwidthInMbps === undefined) && !opts.urn) { throw new Error("Missing required property 'connectionBandwidthInMbps'"); } if ((!args || args.naasProvider === undefined) && !opts.urn) { throw new Error("Missing required property 'naasProvider'"); } if ((!args || args.region === undefined) && !opts.urn) { throw new Error("Missing required property 'region'"); } if ((!args || args.vpcIds === undefined) && !opts.urn) { throw new Error("Missing required property 'vpcIds'"); } resourceInputs["bgp"] = args ? args.bgp : undefined; resourceInputs["connectionBandwidthInMbps"] = args ? args.connectionBandwidthInMbps : undefined; resourceInputs["naasProvider"] = args ? args.naasProvider : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["parentUuid"] = args ? args.parentUuid : undefined; resourceInputs["redundancyZone"] = args ? args.redundancyZone : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["vpcIds"] = args ? args.vpcIds : undefined; resourceInputs["childrens"] = undefined /*out*/; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(PartnerAttachment.__pulumiType, name, resourceInputs, opts); } } exports.PartnerAttachment = PartnerAttachment; /** @internal */ PartnerAttachment.__pulumiType = 'digitalocean:index/partnerAttachment:PartnerAttachment'; //# sourceMappingURL=partnerAttachment.js.map