@pulumi/cloudngfwaws
Version:
A Pulumi package for creating and managing Cloud NGFW for AWS resources.
83 lines • 3.98 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.CommitRulestack = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Resource for committing the rulestack config.
*
* !> **NOTE:** This resource should be placed in a separate plan as the plan that configures the rulestack and its contents. If you do not, you will have perpetual configuration drift and will need to run your plan twice so the commit is performed. Placing instances of this resource with instances of NGFW resources (such as `cloudngfwaws.Ngfw`) is fine.
*
* ## Admin Permission Type
*
* * `Rulestack` (for `scope="Local"`)
* * `Global Rulestack` (for `scope="Global"`)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudngfwaws from "@pulumi/cloudngfwaws";
*
* const example = new cloudngfwaws.CommitRulestack("example", {rulestack: "my-rulestack"});
* ```
*/
class CommitRulestack extends pulumi.CustomResource {
/**
* Get an existing CommitRulestack 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 CommitRulestack(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of CommitRulestack. 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'] === CommitRulestack.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["commitErrors"] = state ? state.commitErrors : undefined;
resourceInputs["commitStatus"] = state ? state.commitStatus : undefined;
resourceInputs["rulestack"] = state ? state.rulestack : undefined;
resourceInputs["scope"] = state ? state.scope : undefined;
resourceInputs["state"] = state ? state.state : undefined;
resourceInputs["validationErrors"] = state ? state.validationErrors : undefined;
resourceInputs["validationStatus"] = state ? state.validationStatus : undefined;
}
else {
const args = argsOrState;
if ((!args || args.rulestack === undefined) && !opts.urn) {
throw new Error("Missing required property 'rulestack'");
}
resourceInputs["rulestack"] = args ? args.rulestack : undefined;
resourceInputs["scope"] = args ? args.scope : undefined;
resourceInputs["state"] = args ? args.state : undefined;
resourceInputs["commitErrors"] = undefined /*out*/;
resourceInputs["commitStatus"] = undefined /*out*/;
resourceInputs["validationErrors"] = undefined /*out*/;
resourceInputs["validationStatus"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(CommitRulestack.__pulumiType, name, resourceInputs, opts);
}
}
exports.CommitRulestack = CommitRulestack;
/** @internal */
CommitRulestack.__pulumiType = 'cloudngfwaws:index/commitRulestack:CommitRulestack';
//# sourceMappingURL=commitRulestack.js.map