UNPKG

@pulumi/aws

Version:

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

99 lines 3.72 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.Filter = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS Inspector Filter. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.inspector2.Filter("example", { * name: "test", * action: "NONE", * filterCriterias: [{ * awsAccountIds: [{ * comparison: "EQUALS", * value: "111222333444", * }], * }], * }); * ``` * * ## Import * * Using `pulumi import`, import Inspector Filter using the `arn`. For example: * * ```sh * $ pulumi import aws:inspector2/filter:Filter example "arn:aws:inspector2:us-east-1:111222333444:owner/111222333444/filter/abcdefgh12345678" * ``` */ class Filter extends pulumi.CustomResource { /** * Get an existing Filter 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 Filter(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Filter. 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'] === Filter.__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["filterCriterias"] = state?.filterCriterias; resourceInputs["name"] = state?.name; resourceInputs["reason"] = state?.reason; 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'"); } resourceInputs["action"] = args?.action; resourceInputs["description"] = args?.description; resourceInputs["filterCriterias"] = args?.filterCriterias; resourceInputs["name"] = args?.name; resourceInputs["reason"] = args?.reason; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Filter.__pulumiType, name, resourceInputs, opts); } } exports.Filter = Filter; /** @internal */ Filter.__pulumiType = 'aws:inspector2/filter:Filter'; //# sourceMappingURL=filter.js.map