@pulumi/cloudngfwaws
Version:
A Pulumi package for creating and managing Cloud NGFW for AWS resources.
149 lines • 5.53 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.NgfwLogProfile = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Resource for NGFW log profile manipulation.
*
* ## Admin Permission Type
*
* * `Firewall`
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* import * as cloudngfwaws from "@pulumi/cloudngfwaws";
*
* 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 x = new cloudngfwaws.Ngfw("x", {
* name: "example-instance",
* vpcId: exampleVpc.id,
* accountId: "12345678",
* description: "Example description",
* endpointMode: "ServiceManaged",
* subnetMappings: [
* {
* subnetId: subnet1.id,
* },
* {
* subnetId: subnet2.id,
* },
* ],
* rulestack: "example-rulestack",
* tags: {
* Foo: "bar",
* },
* });
* const example = new cloudngfwaws.NgfwLogProfile("example", {
* ngfw: x.name,
* accountId: x.accountId,
* logDestinations: [
* {
* destinationType: "S3",
* destination: "my-s3-bucket",
* logType: "TRAFFIC",
* },
* {
* destinationType: "CloudWatchLogs",
* destination: "panw-log-group",
* logType: "THREAT",
* },
* ],
* });
* ```
*
* ## Import
*
* import name is <account_id>:<ngfw>
*
* ```sh
* $ pulumi import cloudngfwaws:index/ngfwLogProfile:NgfwLogProfile example 12345678:example-instance
* ```
*/
class NgfwLogProfile extends pulumi.CustomResource {
/**
* Get an existing NgfwLogProfile 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 NgfwLogProfile(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of NgfwLogProfile. 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'] === NgfwLogProfile.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accountId"] = state ? state.accountId : undefined;
resourceInputs["advancedThreatLog"] = state ? state.advancedThreatLog : undefined;
resourceInputs["cloudWatchMetricNamespace"] = state ? state.cloudWatchMetricNamespace : undefined;
resourceInputs["cloudwatchMetricFields"] = state ? state.cloudwatchMetricFields : undefined;
resourceInputs["logDestinations"] = state ? state.logDestinations : undefined;
resourceInputs["ngfw"] = state ? state.ngfw : undefined;
}
else {
const args = argsOrState;
if ((!args || args.accountId === undefined) && !opts.urn) {
throw new Error("Missing required property 'accountId'");
}
if ((!args || args.logDestinations === undefined) && !opts.urn) {
throw new Error("Missing required property 'logDestinations'");
}
if ((!args || args.ngfw === undefined) && !opts.urn) {
throw new Error("Missing required property 'ngfw'");
}
resourceInputs["accountId"] = args ? args.accountId : undefined;
resourceInputs["advancedThreatLog"] = args ? args.advancedThreatLog : undefined;
resourceInputs["cloudWatchMetricNamespace"] = args ? args.cloudWatchMetricNamespace : undefined;
resourceInputs["cloudwatchMetricFields"] = args ? args.cloudwatchMetricFields : undefined;
resourceInputs["logDestinations"] = args ? args.logDestinations : undefined;
resourceInputs["ngfw"] = args ? args.ngfw : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(NgfwLogProfile.__pulumiType, name, resourceInputs, opts);
}
}
exports.NgfwLogProfile = NgfwLogProfile;
/** @internal */
NgfwLogProfile.__pulumiType = 'cloudngfwaws:index/ngfwLogProfile:NgfwLogProfile';
//# sourceMappingURL=ngfwLogProfile.js.map