UNPKG

@pulumi/scm

Version:

A Pulumi package for managing resources on Strata Cloud Manager.. Based on terraform-provider-scm: version v0.2.1

98 lines 3.9 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.Layer2Subinterface = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Layer2Subinterface resource * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scm from "@pulumi/scm"; * * // * // Creates a ethernet interface used as parent-interface for subsequent examples * // * const scmParentInterface = new scm.EthernetInterface("scm_parent_interface", { * name: "$scm_parent_interface", * comment: "Managed by Pulumi", * folder: "ngfw-shared", * layer2: {}, * }); * // * // Creates a layer2 sub-interface with vlan tag 100 * // * const scmLayer2Subinterface = new scm.Layer2Subinterface("scm_layer2_subinterface", { * name: "$scm_parent_interface.100", * comment: "Managed by Pulumi", * folder: "ngfw-shared", * vlanTag: "100", * parentInterface: "$scm_parent_interface", * }, { * dependsOn: [scmParentInterface], * }); * ``` */ class Layer2Subinterface extends pulumi.CustomResource { /** * Get an existing Layer2Subinterface 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 Layer2Subinterface(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Layer2Subinterface. 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'] === Layer2Subinterface.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["comment"] = state?.comment; resourceInputs["device"] = state?.device; resourceInputs["folder"] = state?.folder; resourceInputs["name"] = state?.name; resourceInputs["parentInterface"] = state?.parentInterface; resourceInputs["snippet"] = state?.snippet; resourceInputs["tfid"] = state?.tfid; resourceInputs["vlanTag"] = state?.vlanTag; } else { const args = argsOrState; if (args?.vlanTag === undefined && !opts.urn) { throw new Error("Missing required property 'vlanTag'"); } resourceInputs["comment"] = args?.comment; resourceInputs["device"] = args?.device; resourceInputs["folder"] = args?.folder; resourceInputs["name"] = args?.name; resourceInputs["parentInterface"] = args?.parentInterface; resourceInputs["snippet"] = args?.snippet; resourceInputs["vlanTag"] = args?.vlanTag; resourceInputs["tfid"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Layer2Subinterface.__pulumiType, name, resourceInputs, opts); } } exports.Layer2Subinterface = Layer2Subinterface; /** @internal */ Layer2Subinterface.__pulumiType = 'scm:index/layer2Subinterface:Layer2Subinterface'; //# sourceMappingURL=layer2Subinterface.js.map