@pulumi/scm
Version:
A Pulumi package for managing resources on Strata Cloud Manager.. Based on terraform-provider-scm: version v0.2.1
292 lines • 11.7 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.VulnerabilityProtectionSignature = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* VulnerabilityProtectionSignature resource
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scm from "@pulumi/scm";
*
* const scmVpSignature1 = new scm.VulnerabilityProtectionSignature("scm_vp_signature_1", {
* folder: "Shared",
* threatId: "41010",
* threatname: "scm_vp_signature_1",
* severity: "informational",
* direction: "client2server",
* affectedHost: {
* client: true,
* },
* signature: {
* standards: [
* {
* name: "basic-signature",
* },
* {
* name: "standard-signature-one",
* scope: "protocol-data-unit",
* orderFree: false,
* andCondition: [{
* name: "condition-A-or",
* orCondition: [{
* name: "pattern-A1",
* operator: {
* lessThan: {
* context: "telnet-req-client-data",
* value: "123",
* },
* },
* }],
* }],
* },
* {
* name: "standard-signature-two",
* scope: "session",
* orderFree: true,
* andCondition: [
* {
* name: "condition-B-or",
* orCondition: [
* {
* name: "pattern-B1",
* operator: {
* greaterThan: {
* context: "cip-ethernet-ip-req-class-id",
* value: "111111",
* qualifier: [
* {
* name: "Q1",
* value: "123",
* },
* {
* name: "Q2",
* value: "920",
* },
* ],
* },
* },
* },
* {
* name: "pattern-B2",
* operator: {
* equalTo: {
* context: "icmp-rsp-type",
* value: "222222",
* qualifier: [{
* name: "Q3",
* value: "567",
* }],
* },
* },
* },
* ],
* },
* {
* name: "condition-C-or",
* orCondition: [{
* name: "pattern-C1",
* operator: {
* patternMatch: {
* context: "ntlm-req-auth-v1",
* value: "1200",
* },
* },
* }],
* },
* ],
* },
* ],
* },
* });
* const scmVpSignature2 = new scm.VulnerabilityProtectionSignature("scm_vp_signature_2", {
* folder: "Shared",
* threatId: "41040",
* threatname: "scm_vp_sig_2",
* affectedHost: {
* server: true,
* },
* comment: "basic-combo-signature",
* severity: "high",
* direction: "both",
* defaultAction: {
* alert: {},
* },
* signature: {
* combination: {
* name: "combo-sig",
* orderFree: true,
* andConditions: [{
* name: "condition-C-or",
* orCondition: [{
* name: "pattern-C1",
* threatId: 10030,
* }],
* }],
* timeAttribute: {
* interval: 3600,
* threshold: 5,
* trackBy: "source-and-destination",
* },
* },
* },
* });
* const scmVpSignature3 = new scm.VulnerabilityProtectionSignature("scm_vp_signature_3", {
* folder: "Shared",
* threatId: "41030",
* threatname: "scm_vp_sig_3",
* affectedHost: {
* server: true,
* },
* bugtraqs: ["12345"],
* comment: "combo-signatures",
* cves: ["CVE-2025-9999"],
* references: ["https://example.com/exploit-details"],
* severity: "medium",
* direction: "server2client",
* vendors: ["Custom"],
* defaultAction: {
* drop: {},
* },
* signature: {
* combination: {
* name: "combo-signature-one",
* orderFree: false,
* andConditions: [
* {
* name: "condition-A-or",
* orCondition: [{
* name: "pattern-A1",
* threatId: 10001,
* }],
* },
* {
* name: "condition-B-or",
* orCondition: [
* {
* name: "pattern-B1",
* threatId: 10043,
* },
* {
* name: "pattern-B2",
* threatId: 10025,
* },
* {
* name: "pattern-B3",
* threatId: 10050,
* },
* ],
* },
* {
* name: "condition-C-or",
* orCondition: [{
* name: "pattern-C1",
* threatId: 10030,
* }],
* },
* ],
* timeAttribute: {
* interval: 3600,
* threshold: 20,
* trackBy: "source",
* },
* },
* },
* });
* ```
*/
class VulnerabilityProtectionSignature extends pulumi.CustomResource {
/**
* Get an existing VulnerabilityProtectionSignature 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 VulnerabilityProtectionSignature(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of VulnerabilityProtectionSignature. 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'] === VulnerabilityProtectionSignature.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["affectedHost"] = state?.affectedHost;
resourceInputs["bugtraqs"] = state?.bugtraqs;
resourceInputs["comment"] = state?.comment;
resourceInputs["cves"] = state?.cves;
resourceInputs["defaultAction"] = state?.defaultAction;
resourceInputs["device"] = state?.device;
resourceInputs["direction"] = state?.direction;
resourceInputs["folder"] = state?.folder;
resourceInputs["references"] = state?.references;
resourceInputs["severity"] = state?.severity;
resourceInputs["signature"] = state?.signature;
resourceInputs["snippet"] = state?.snippet;
resourceInputs["tfid"] = state?.tfid;
resourceInputs["threatId"] = state?.threatId;
resourceInputs["threatname"] = state?.threatname;
resourceInputs["vendors"] = state?.vendors;
}
else {
const args = argsOrState;
if (args?.affectedHost === undefined && !opts.urn) {
throw new Error("Missing required property 'affectedHost'");
}
if (args?.direction === undefined && !opts.urn) {
throw new Error("Missing required property 'direction'");
}
if (args?.severity === undefined && !opts.urn) {
throw new Error("Missing required property 'severity'");
}
if (args?.signature === undefined && !opts.urn) {
throw new Error("Missing required property 'signature'");
}
if (args?.threatId === undefined && !opts.urn) {
throw new Error("Missing required property 'threatId'");
}
if (args?.threatname === undefined && !opts.urn) {
throw new Error("Missing required property 'threatname'");
}
resourceInputs["affectedHost"] = args?.affectedHost;
resourceInputs["bugtraqs"] = args?.bugtraqs;
resourceInputs["comment"] = args?.comment;
resourceInputs["cves"] = args?.cves;
resourceInputs["defaultAction"] = args?.defaultAction;
resourceInputs["device"] = args?.device;
resourceInputs["direction"] = args?.direction;
resourceInputs["folder"] = args?.folder;
resourceInputs["references"] = args?.references;
resourceInputs["severity"] = args?.severity;
resourceInputs["signature"] = args?.signature;
resourceInputs["snippet"] = args?.snippet;
resourceInputs["threatId"] = args?.threatId;
resourceInputs["threatname"] = args?.threatname;
resourceInputs["vendors"] = args?.vendors;
resourceInputs["tfid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VulnerabilityProtectionSignature.__pulumiType, name, resourceInputs, opts);
}
}
exports.VulnerabilityProtectionSignature = VulnerabilityProtectionSignature;
/** @internal */
VulnerabilityProtectionSignature.__pulumiType = 'scm:index/vulnerabilityProtectionSignature:VulnerabilityProtectionSignature';
//# sourceMappingURL=vulnerabilityProtectionSignature.js.map