@pulumi/scm
Version:
A Pulumi package for managing resources on Strata Cloud Manager.. Based on terraform-provider-scm: version v0.2.1
171 lines • 6.28 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.PbfRule = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* PbfRule resource
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scm from "@pulumi/scm";
*
* const exampleTag = new scm.Tag("example_tag", {
* folder: "All",
* name: "pbf-rule-tag-test-1",
* color: "Red",
* });
* // --- PBF Rule Resource with discard action---
* const examplePbfRule = new scm.PbfRule("example_pbf_rule", {
* name: "pbf-test-rule-discard",
* folder: "All",
* description: "PBF rule for forwarding specific traffic.",
* from: {
* zones: ["zone-untrust"],
* },
* sources: ["any"],
* destinations: ["any"],
* applications: ["any"],
* services: ["service-http"],
* sourceUsers: ["any"],
* action: {
* discard: {},
* },
* tags: [exampleTag.name],
* enforceSymmetricReturn: {
* enabled: false,
* },
* schedule: "non-work-hours",
* });
* // --- PBF Rule Resource with no-pbf action---
* const exampleNoPbfRule = new scm.PbfRule("example_no_pbf_rule", {
* name: "pbf-test-rule-no-pbf",
* folder: "All",
* description: "PBF rule for forwarding specific traffic",
* from: {
* zones: ["zone-untrust"],
* },
* sources: ["any"],
* destinations: ["any"],
* applications: ["any"],
* services: ["service-https"],
* sourceUsers: ["any"],
* action: {
* noPbf: {},
* },
* tags: [exampleTag.name],
* enforceSymmetricReturn: {
* enabled: false,
* },
* schedule: "non-work-hours",
* });
* // --- PBF Rule Resource with forward action---
* const exampleForwardPbfRule = new scm.PbfRule("example_forward_pbf_rule", {
* name: "pbf-test-rule-forward",
* folder: "All",
* description: "PBF rule for forwarding specific traffic",
* from: {
* zones: ["zone-untrust"],
* },
* sources: ["any"],
* destinations: ["any"],
* applications: ["any"],
* services: ["service-http"],
* sourceUsers: ["any"],
* action: {
* forward: {
* egressInterface: "ethernet1/1",
* nexthop: {
* ipAddress: "192.168.1.254",
* },
* monitor: {
* ipAddress: "8.8.8.10",
* profile: "test_tf_profile",
* disableIfUnreachable: true,
* },
* },
* },
* tags: [exampleTag.name],
* enforceSymmetricReturn: {
* enabled: true,
* },
* schedule: "non-work-hours",
* });
* ```
*/
class PbfRule extends pulumi.CustomResource {
/**
* Get an existing PbfRule 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 PbfRule(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of PbfRule. 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'] === PbfRule.__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["enforceSymmetricReturn"] = state?.enforceSymmetricReturn;
resourceInputs["folder"] = state?.folder;
resourceInputs["from"] = state?.from;
resourceInputs["name"] = state?.name;
resourceInputs["schedule"] = state?.schedule;
resourceInputs["services"] = state?.services;
resourceInputs["snippet"] = state?.snippet;
resourceInputs["sourceUsers"] = state?.sourceUsers;
resourceInputs["sources"] = state?.sources;
resourceInputs["tags"] = state?.tags;
resourceInputs["tfid"] = state?.tfid;
}
else {
const args = argsOrState;
resourceInputs["action"] = args?.action;
resourceInputs["applications"] = args?.applications;
resourceInputs["description"] = args?.description;
resourceInputs["destinations"] = args?.destinations;
resourceInputs["device"] = args?.device;
resourceInputs["enforceSymmetricReturn"] = args?.enforceSymmetricReturn;
resourceInputs["folder"] = args?.folder;
resourceInputs["from"] = args?.from;
resourceInputs["name"] = args?.name;
resourceInputs["schedule"] = args?.schedule;
resourceInputs["services"] = args?.services;
resourceInputs["snippet"] = args?.snippet;
resourceInputs["sourceUsers"] = args?.sourceUsers;
resourceInputs["sources"] = args?.sources;
resourceInputs["tags"] = args?.tags;
resourceInputs["tfid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(PbfRule.__pulumiType, name, resourceInputs, opts);
}
}
exports.PbfRule = PbfRule;
/** @internal */
PbfRule.__pulumiType = 'scm:index/pbfRule:PbfRule';
//# sourceMappingURL=pbfRule.js.map