UNPKG

@pulumi/aws

Version:

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

119 lines 5.31 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.ClassificationJob = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage an [AWS Macie Classification Job](https://docs.aws.amazon.com/macie/latest/APIReference/jobs.html). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.macie2.Account("test", {}); * const testClassificationJob = new aws.macie2.ClassificationJob("test", { * jobType: "ONE_TIME", * name: "NAME OF THE CLASSIFICATION JOB", * s3JobDefinition: { * bucketDefinitions: [{ * accountId: "ACCOUNT ID", * buckets: ["S3 BUCKET NAME"], * }], * }, * }, { * dependsOn: [test], * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_macie2_classification_job` using the id. For example: * * ```sh * $ pulumi import aws:macie2/classificationJob:ClassificationJob example abcd1 * ``` */ class ClassificationJob extends pulumi.CustomResource { /** * Get an existing ClassificationJob 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 ClassificationJob(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ClassificationJob. 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'] === ClassificationJob.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createdAt"] = state?.createdAt; resourceInputs["customDataIdentifierIds"] = state?.customDataIdentifierIds; resourceInputs["description"] = state?.description; resourceInputs["initialRun"] = state?.initialRun; resourceInputs["jobArn"] = state?.jobArn; resourceInputs["jobId"] = state?.jobId; resourceInputs["jobStatus"] = state?.jobStatus; resourceInputs["jobType"] = state?.jobType; resourceInputs["name"] = state?.name; resourceInputs["namePrefix"] = state?.namePrefix; resourceInputs["region"] = state?.region; resourceInputs["s3JobDefinition"] = state?.s3JobDefinition; resourceInputs["samplingPercentage"] = state?.samplingPercentage; resourceInputs["scheduleFrequency"] = state?.scheduleFrequency; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["userPausedDetails"] = state?.userPausedDetails; } else { const args = argsOrState; if (args?.jobType === undefined && !opts.urn) { throw new Error("Missing required property 'jobType'"); } if (args?.s3JobDefinition === undefined && !opts.urn) { throw new Error("Missing required property 's3JobDefinition'"); } resourceInputs["customDataIdentifierIds"] = args?.customDataIdentifierIds; resourceInputs["description"] = args?.description; resourceInputs["initialRun"] = args?.initialRun; resourceInputs["jobStatus"] = args?.jobStatus; resourceInputs["jobType"] = args?.jobType; resourceInputs["name"] = args?.name; resourceInputs["namePrefix"] = args?.namePrefix; resourceInputs["region"] = args?.region; resourceInputs["s3JobDefinition"] = args?.s3JobDefinition; resourceInputs["samplingPercentage"] = args?.samplingPercentage; resourceInputs["scheduleFrequency"] = args?.scheduleFrequency; resourceInputs["tags"] = args?.tags; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["jobArn"] = undefined /*out*/; resourceInputs["jobId"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["userPausedDetails"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ClassificationJob.__pulumiType, name, resourceInputs, opts); } } exports.ClassificationJob = ClassificationJob; /** @internal */ ClassificationJob.__pulumiType = 'aws:macie2/classificationJob:ClassificationJob'; //# sourceMappingURL=classificationJob.js.map