UNPKG

@pulumi/scm

Version:

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

148 lines 5.71 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.QosPolicyRule = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * QosPolicyRule resource * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scm from "@pulumi/scm"; * * // --- 2. ANCHOR QOS POLICY RULE (Used for relative positioning) --- * const anchorQosRule = new scm.QosPolicyRule("anchor_qos_rule", { * name: "anchor-qos-rule", * description: "Base rule for testing 'before' and 'after' positioning.", * folder: "All", * position: "pre", * action: { * "class": "2", * }, * schedule: "non-work-hours", * dscpTos: { * codepoints: [{ * name: "Set-EF", * type: { * ef: {}, * }, * }], * }, * }); * // --- 3. ABSOLUTE POSITIONING Examples ("top" and "bottom") --- * const ruleTopQosRule = new scm.QosPolicyRule("rule_top_qos_rule", { * name: "top-absolute-qos-rule", * description: "Placed at the very TOP of the QoS rulebase (Highest Priority).", * folder: "All", * position: "pre", * relativePosition: "top", * action: { * "class": "2", * }, * }); * const ruleBottomQosRule = new scm.QosPolicyRule("rule_bottom_qos_rule", { * name: "bottom-absolute-qos-rule", * description: "Placed at the very BOTTOM of the QoS rulebase (Lowest Priority)", * folder: "All", * position: "pre", * relativePosition: "bottom", * action: { * "class": "3", * }, * }); * // --- 4. RELATIVE POSITIONING Examples ("before" and "after") --- * const ruleBeforeAnchorQos = new scm.QosPolicyRule("rule_before_anchor_qos", { * name: "before-anchor-qos-rule", * description: "Positioned immediately BEFORE the anchor-qos-rule.", * folder: "All", * position: "pre", * relativePosition: "before", * targetRule: anchorQosRule.id, * action: { * "class": "5", * }, * }); * const ruleAfterAnchorQos = new scm.QosPolicyRule("rule_after_anchor_qos", { * name: "after-anchor-qos-rule", * description: "Positioned immediately AFTER the anchor-qos-rule.", * folder: "All", * position: "pre", * relativePosition: "after", * targetRule: anchorQosRule.id, * action: { * "class": "4", * }, * }); * ``` */ class QosPolicyRule extends pulumi.CustomResource { /** * Get an existing QosPolicyRule 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 QosPolicyRule(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of QosPolicyRule. 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'] === QosPolicyRule.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["action"] = state?.action; resourceInputs["description"] = state?.description; resourceInputs["device"] = state?.device; resourceInputs["dscpTos"] = state?.dscpTos; resourceInputs["folder"] = state?.folder; resourceInputs["name"] = state?.name; resourceInputs["position"] = state?.position; resourceInputs["relativePosition"] = state?.relativePosition; resourceInputs["schedule"] = state?.schedule; resourceInputs["snippet"] = state?.snippet; resourceInputs["targetRule"] = state?.targetRule; resourceInputs["tfid"] = state?.tfid; } else { const args = argsOrState; if (args?.action === undefined && !opts.urn) { throw new Error("Missing required property 'action'"); } resourceInputs["action"] = args?.action; resourceInputs["description"] = args?.description; resourceInputs["device"] = args?.device; resourceInputs["dscpTos"] = args?.dscpTos; resourceInputs["folder"] = args?.folder; resourceInputs["name"] = args?.name; resourceInputs["position"] = args?.position; resourceInputs["relativePosition"] = args?.relativePosition; resourceInputs["schedule"] = args?.schedule; resourceInputs["snippet"] = args?.snippet; resourceInputs["targetRule"] = args?.targetRule; resourceInputs["tfid"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(QosPolicyRule.__pulumiType, name, resourceInputs, opts); } } exports.QosPolicyRule = QosPolicyRule; /** @internal */ QosPolicyRule.__pulumiType = 'scm:index/qosPolicyRule:QosPolicyRule'; //# sourceMappingURL=qosPolicyRule.js.map