UNPKG

@pulumi/aws

Version:

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

107 lines 4.3 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.FindingsFilter = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage an [Amazon Macie Findings Filter](https://docs.aws.amazon.com/macie/latest/APIReference/findingsfilters-id.html). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.macie2.Account("example", {}); * const test = new aws.macie.FindingsFilter("test", { * name: "NAME OF THE FINDINGS FILTER", * description: "DESCRIPTION", * position: 1, * action: "ARCHIVE", * findingCriteria: { * criterions: [{ * field: "region", * eqs: [current.region], * }], * }, * }, { * dependsOn: [testAwsMacie2Account], * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_macie2_findings_filter` using the id. For example: * * ```sh * $ pulumi import aws:macie/findingsFilter:FindingsFilter example abcd1 * ``` */ class FindingsFilter extends pulumi.CustomResource { /** * Get an existing FindingsFilter 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 FindingsFilter(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of FindingsFilter. 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'] === FindingsFilter.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["action"] = state?.action; resourceInputs["arn"] = state?.arn; resourceInputs["description"] = state?.description; resourceInputs["findingCriteria"] = state?.findingCriteria; resourceInputs["name"] = state?.name; resourceInputs["namePrefix"] = state?.namePrefix; resourceInputs["position"] = state?.position; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.action === undefined && !opts.urn) { throw new Error("Missing required property 'action'"); } if (args?.findingCriteria === undefined && !opts.urn) { throw new Error("Missing required property 'findingCriteria'"); } resourceInputs["action"] = args?.action; resourceInputs["description"] = args?.description; resourceInputs["findingCriteria"] = args?.findingCriteria; resourceInputs["name"] = args?.name; resourceInputs["namePrefix"] = args?.namePrefix; resourceInputs["position"] = args?.position; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(FindingsFilter.__pulumiType, name, resourceInputs, opts); } } exports.FindingsFilter = FindingsFilter; /** @internal */ FindingsFilter.__pulumiType = 'aws:macie/findingsFilter:FindingsFilter'; //# sourceMappingURL=findingsFilter.js.map