UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

135 lines 5.11 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.LoggingConfiguration = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an AWS Network Firewall Logging Configuration Resource * * ## Example Usage * * ### Logging to S3 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkfirewall.LoggingConfiguration("example", { * firewallArn: exampleAwsNetworkfirewallFirewall.arn, * loggingConfiguration: { * logDestinationConfigs: [{ * logDestination: { * bucketName: exampleAwsS3Bucket.bucket, * prefix: "example", * }, * logDestinationType: "S3", * logType: "FLOW", * }], * }, * }); * ``` * * ### Logging to CloudWatch * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkfirewall.LoggingConfiguration("example", { * firewallArn: exampleAwsNetworkfirewallFirewall.arn, * loggingConfiguration: { * logDestinationConfigs: [{ * logDestination: { * logGroup: exampleAwsCloudwatchLogGroup.name, * }, * logDestinationType: "CloudWatchLogs", * logType: "ALERT", * }], * }, * }); * ``` * * ### Logging to Kinesis Data Firehose * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkfirewall.LoggingConfiguration("example", { * firewallArn: exampleAwsNetworkfirewallFirewall.arn, * loggingConfiguration: { * logDestinationConfigs: [{ * logDestination: { * deliveryStream: exampleAwsKinesisFirehoseDeliveryStream.name, * }, * logDestinationType: "KinesisDataFirehose", * logType: "TLS", * }], * }, * }); * ``` * * ## Import * * Using `pulumi import`, import Network Firewall Logging Configurations using the `firewall_arn`. For example: * * ```sh * $ pulumi import aws:networkfirewall/loggingConfiguration:LoggingConfiguration example arn:aws:network-firewall:us-west-1:123456789012:firewall/example * ``` */ class LoggingConfiguration extends pulumi.CustomResource { /** * Get an existing LoggingConfiguration 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 LoggingConfiguration(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of LoggingConfiguration. 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'] === LoggingConfiguration.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["enableMonitoringDashboard"] = state?.enableMonitoringDashboard; resourceInputs["firewallArn"] = state?.firewallArn; resourceInputs["loggingConfiguration"] = state?.loggingConfiguration; resourceInputs["region"] = state?.region; } else { const args = argsOrState; if (args?.firewallArn === undefined && !opts.urn) { throw new Error("Missing required property 'firewallArn'"); } if (args?.loggingConfiguration === undefined && !opts.urn) { throw new Error("Missing required property 'loggingConfiguration'"); } resourceInputs["enableMonitoringDashboard"] = args?.enableMonitoringDashboard; resourceInputs["firewallArn"] = args?.firewallArn; resourceInputs["loggingConfiguration"] = args?.loggingConfiguration; resourceInputs["region"] = args?.region; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(LoggingConfiguration.__pulumiType, name, resourceInputs, opts); } } exports.LoggingConfiguration = LoggingConfiguration; /** @internal */ LoggingConfiguration.__pulumiType = 'aws:networkfirewall/loggingConfiguration:LoggingConfiguration'; //# sourceMappingURL=loggingConfiguration.js.map