@pulumi/scm
Version:
A Pulumi package for managing resources on Strata Cloud Manager.. Based on terraform-provider-scm: version v0.2.1
124 lines • 6.06 kB
JavaScript
;
// *** 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.SdwanRule = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* SdwanRule resource
*/
class SdwanRule extends pulumi.CustomResource {
/**
* Get an existing SdwanRule 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 SdwanRule(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of SdwanRule. 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'] === SdwanRule.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["action"] = state?.action;
resourceInputs["applications"] = state?.applications;
resourceInputs["description"] = state?.description;
resourceInputs["destinations"] = state?.destinations;
resourceInputs["device"] = state?.device;
resourceInputs["disabled"] = state?.disabled;
resourceInputs["errorCorrectionProfile"] = state?.errorCorrectionProfile;
resourceInputs["folder"] = state?.folder;
resourceInputs["froms"] = state?.froms;
resourceInputs["name"] = state?.name;
resourceInputs["negateDestination"] = state?.negateDestination;
resourceInputs["negateSource"] = state?.negateSource;
resourceInputs["pathQualityProfile"] = state?.pathQualityProfile;
resourceInputs["position"] = state?.position;
resourceInputs["saasQualityProfile"] = state?.saasQualityProfile;
resourceInputs["services"] = state?.services;
resourceInputs["snippet"] = state?.snippet;
resourceInputs["sourceUsers"] = state?.sourceUsers;
resourceInputs["sources"] = state?.sources;
resourceInputs["tags"] = state?.tags;
resourceInputs["tfid"] = state?.tfid;
resourceInputs["tos"] = state?.tos;
}
else {
const args = argsOrState;
if (args?.action === undefined && !opts.urn) {
throw new Error("Missing required property 'action'");
}
if (args?.applications === undefined && !opts.urn) {
throw new Error("Missing required property 'applications'");
}
if (args?.destinations === undefined && !opts.urn) {
throw new Error("Missing required property 'destinations'");
}
if (args?.froms === undefined && !opts.urn) {
throw new Error("Missing required property 'froms'");
}
if (args?.pathQualityProfile === undefined && !opts.urn) {
throw new Error("Missing required property 'pathQualityProfile'");
}
if (args?.position === undefined && !opts.urn) {
throw new Error("Missing required property 'position'");
}
if (args?.services === undefined && !opts.urn) {
throw new Error("Missing required property 'services'");
}
if (args?.sourceUsers === undefined && !opts.urn) {
throw new Error("Missing required property 'sourceUsers'");
}
if (args?.sources === undefined && !opts.urn) {
throw new Error("Missing required property 'sources'");
}
if (args?.tos === undefined && !opts.urn) {
throw new Error("Missing required property 'tos'");
}
resourceInputs["action"] = args?.action;
resourceInputs["applications"] = args?.applications;
resourceInputs["description"] = args?.description;
resourceInputs["destinations"] = args?.destinations;
resourceInputs["device"] = args?.device;
resourceInputs["disabled"] = args?.disabled;
resourceInputs["errorCorrectionProfile"] = args?.errorCorrectionProfile;
resourceInputs["folder"] = args?.folder;
resourceInputs["froms"] = args?.froms;
resourceInputs["name"] = args?.name;
resourceInputs["negateDestination"] = args?.negateDestination;
resourceInputs["negateSource"] = args?.negateSource;
resourceInputs["pathQualityProfile"] = args?.pathQualityProfile;
resourceInputs["position"] = args?.position;
resourceInputs["saasQualityProfile"] = args?.saasQualityProfile;
resourceInputs["services"] = args?.services;
resourceInputs["snippet"] = args?.snippet;
resourceInputs["sourceUsers"] = args?.sourceUsers;
resourceInputs["sources"] = args?.sources;
resourceInputs["tags"] = args?.tags;
resourceInputs["tos"] = args?.tos;
resourceInputs["tfid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SdwanRule.__pulumiType, name, resourceInputs, opts);
}
}
exports.SdwanRule = SdwanRule;
/** @internal */
SdwanRule.__pulumiType = 'scm:index/sdwanRule:SdwanRule';
//# sourceMappingURL=sdwanRule.js.map