@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
101 lines • 4.34 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.CustomDataIdentifier = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to manage an [AWS Macie Custom Data Identifier](https://docs.aws.amazon.com/macie/latest/APIReference/custom-data-identifiers-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 exampleCustomDataIdentifier = new aws.macie.CustomDataIdentifier("example", {
* name: "NAME OF CUSTOM DATA IDENTIFIER",
* regex: "[0-9]{3}-[0-9]{2}-[0-9]{4}",
* description: "DESCRIPTION",
* maximumMatchDistance: 10,
* keywords: ["keyword"],
* ignoreWords: ["ignore"],
* }, {
* dependsOn: [test],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_macie2_custom_data_identifier` using the id. For example:
*
* ```sh
* $ pulumi import aws:macie/customDataIdentifier:CustomDataIdentifier example abcd1
* ```
*/
class CustomDataIdentifier extends pulumi.CustomResource {
/**
* Get an existing CustomDataIdentifier 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 CustomDataIdentifier(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of CustomDataIdentifier. 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'] === CustomDataIdentifier.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["description"] = state?.description;
resourceInputs["ignoreWords"] = state?.ignoreWords;
resourceInputs["keywords"] = state?.keywords;
resourceInputs["maximumMatchDistance"] = state?.maximumMatchDistance;
resourceInputs["name"] = state?.name;
resourceInputs["namePrefix"] = state?.namePrefix;
resourceInputs["regex"] = state?.regex;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
resourceInputs["description"] = args?.description;
resourceInputs["ignoreWords"] = args?.ignoreWords;
resourceInputs["keywords"] = args?.keywords;
resourceInputs["maximumMatchDistance"] = args?.maximumMatchDistance;
resourceInputs["name"] = args?.name;
resourceInputs["namePrefix"] = args?.namePrefix;
resourceInputs["regex"] = args?.regex;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(CustomDataIdentifier.__pulumiType, name, resourceInputs, opts);
}
}
exports.CustomDataIdentifier = CustomDataIdentifier;
/** @internal */
CustomDataIdentifier.__pulumiType = 'aws:macie/customDataIdentifier:CustomDataIdentifier';
//# sourceMappingURL=customDataIdentifier.js.map