UNPKG

@pulumi/aws

Version:

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

137 lines 5.09 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.FindingAggregator = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a Security Hub finding aggregator. Security Hub needs to be enabled in a region in order for the aggregator to pull through findings. * * ## Example Usage * * ### All Regions Usage * * The following example will enable the aggregator for every region. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.securityhub.Account("example", {}); * const exampleFindingAggregator = new aws.securityhub.FindingAggregator("example", {linkingMode: "ALL_REGIONS"}, { * dependsOn: [example], * }); * ``` * * ### All Regions Except Specified Regions Usage * * The following example will enable the aggregator for every region except those specified in `specifiedRegions`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.securityhub.Account("example", {}); * const exampleFindingAggregator = new aws.securityhub.FindingAggregator("example", { * linkingMode: "ALL_REGIONS_EXCEPT_SPECIFIED", * specifiedRegions: [ * "eu-west-1", * "eu-west-2", * ], * }, { * dependsOn: [example], * }); * ``` * * ### Specified Regions Usage * * The following example will enable the aggregator for every region specified in `specifiedRegions`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.securityhub.Account("example", {}); * const exampleFindingAggregator = new aws.securityhub.FindingAggregator("example", { * linkingMode: "SPECIFIED_REGIONS", * specifiedRegions: [ * "eu-west-1", * "eu-west-2", * ], * }, { * dependsOn: [example], * }); * ``` * * ### No Regions Usage * * The following example will enable the aggregator but not link any AWS Regions to the home Region. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.securityhub.Account("example", {}); * const exampleFindingAggregator = new aws.securityhub.FindingAggregator("example", {linkingMode: "NO_REGIONS"}, { * dependsOn: [example], * }); * ``` * * ## Import * * Using `pulumi import`, import an existing Security Hub finding aggregator using the `arn`. For example: * * ```sh * $ pulumi import aws:securityhub/findingAggregator:FindingAggregator example arn:aws:securityhub:eu-west-1:123456789098:finding-aggregator/abcd1234-abcd-1234-1234-abcdef123456 * ``` */ class FindingAggregator extends pulumi.CustomResource { /** * Get an existing FindingAggregator 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 FindingAggregator(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of FindingAggregator. 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'] === FindingAggregator.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["linkingMode"] = state?.linkingMode; resourceInputs["region"] = state?.region; resourceInputs["specifiedRegions"] = state?.specifiedRegions; } else { const args = argsOrState; if (args?.linkingMode === undefined && !opts.urn) { throw new Error("Missing required property 'linkingMode'"); } resourceInputs["linkingMode"] = args?.linkingMode; resourceInputs["region"] = args?.region; resourceInputs["specifiedRegions"] = args?.specifiedRegions; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(FindingAggregator.__pulumiType, name, resourceInputs, opts); } } exports.FindingAggregator = FindingAggregator; /** @internal */ FindingAggregator.__pulumiType = 'aws:securityhub/findingAggregator:FindingAggregator'; //# sourceMappingURL=findingAggregator.js.map