UNPKG

@pulumi/cloudngfwaws

Version:

A Pulumi package for creating and managing Cloud NGFW for AWS resources.

153 lines 6.73 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.Ngfw = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as cloudngfwaws from "@pulumi/cloudngfwaws"; * * const rs = new cloudngfwaws.CommitRulestack("rs", {rulestack: "my-rulestack"}); * const exampleVpc = new aws.index.Vpc("example", { * cidrBlock: "172.16.0.0/16", * tags: { * name: "tf-example", * }, * }); * const subnet1 = new aws.index.Subnet("subnet1", { * vpcId: myVpc.id, * cidrBlock: "172.16.10.0/24", * availabilityZone: "us-west-2a", * tags: { * name: "tf-example", * }, * }); * const subnet2 = new aws.index.Subnet("subnet2", { * vpcId: myVpc.id, * cidrBlock: "172.16.20.0/24", * availabilityZone: "us-west-2b", * tags: { * name: "tf-example", * }, * }); * const example = new cloudngfwaws.Ngfw("example", { * name: "example-instance", * vpcId: exampleVpc.id, * accountId: "12345678", * description: "Example description", * linkId: "Link-81e80ccc-357a-4e4e-8325-1ed1d830cba5", * endpointMode: "ServiceManaged", * subnetMappings: [ * { * subnetId: subnet1.id, * }, * { * subnetId: subnet2.id, * }, * ], * rulestack: rs.rulestack, * tags: { * Foo: "bar", * }, * }); * ``` * * ## Import * * import name is <account_id>:<name> * * ```sh * $ pulumi import cloudngfwaws:index/ngfw:Ngfw example 12345678:example-instance * ``` */ class Ngfw extends pulumi.CustomResource { /** * Get an existing Ngfw 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 Ngfw(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Ngfw. 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'] === Ngfw.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accountId"] = state ? state.accountId : undefined; resourceInputs["appIdVersion"] = state ? state.appIdVersion : undefined; resourceInputs["automaticUpgradeAppIdVersion"] = state ? state.automaticUpgradeAppIdVersion : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["endpointMode"] = state ? state.endpointMode : undefined; resourceInputs["endpointServiceName"] = state ? state.endpointServiceName : undefined; resourceInputs["firewallId"] = state ? state.firewallId : undefined; resourceInputs["globalRulestack"] = state ? state.globalRulestack : undefined; resourceInputs["linkId"] = state ? state.linkId : undefined; resourceInputs["linkStatus"] = state ? state.linkStatus : undefined; resourceInputs["multiVpc"] = state ? state.multiVpc : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["rulestack"] = state ? state.rulestack : undefined; resourceInputs["statuses"] = state ? state.statuses : undefined; resourceInputs["subnetMappings"] = state ? state.subnetMappings : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["updateToken"] = state ? state.updateToken : undefined; resourceInputs["vpcId"] = state ? state.vpcId : undefined; } else { const args = argsOrState; if ((!args || args.endpointMode === undefined) && !opts.urn) { throw new Error("Missing required property 'endpointMode'"); } if ((!args || args.subnetMappings === undefined) && !opts.urn) { throw new Error("Missing required property 'subnetMappings'"); } if ((!args || args.vpcId === undefined) && !opts.urn) { throw new Error("Missing required property 'vpcId'"); } resourceInputs["accountId"] = args ? args.accountId : undefined; resourceInputs["appIdVersion"] = args ? args.appIdVersion : undefined; resourceInputs["automaticUpgradeAppIdVersion"] = args ? args.automaticUpgradeAppIdVersion : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["endpointMode"] = args ? args.endpointMode : undefined; resourceInputs["globalRulestack"] = args ? args.globalRulestack : undefined; resourceInputs["linkId"] = args ? args.linkId : undefined; resourceInputs["multiVpc"] = args ? args.multiVpc : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["rulestack"] = args ? args.rulestack : undefined; resourceInputs["subnetMappings"] = args ? args.subnetMappings : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["vpcId"] = args ? args.vpcId : undefined; resourceInputs["endpointServiceName"] = undefined /*out*/; resourceInputs["firewallId"] = undefined /*out*/; resourceInputs["linkStatus"] = undefined /*out*/; resourceInputs["statuses"] = undefined /*out*/; resourceInputs["updateToken"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Ngfw.__pulumiType, name, resourceInputs, opts); } } exports.Ngfw = Ngfw; /** @internal */ Ngfw.__pulumiType = 'cloudngfwaws:index/ngfw:Ngfw'; //# sourceMappingURL=ngfw.js.map