UNPKG

@pulumi/aws

Version:

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

119 lines 5.9 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, Object.assign(Object.assign({}, 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 ? state.createdAt : undefined; resourceInputs["customDataIdentifierIds"] = state ? state.customDataIdentifierIds : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["initialRun"] = state ? state.initialRun : undefined; resourceInputs["jobArn"] = state ? state.jobArn : undefined; resourceInputs["jobId"] = state ? state.jobId : undefined; resourceInputs["jobStatus"] = state ? state.jobStatus : undefined; resourceInputs["jobType"] = state ? state.jobType : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["namePrefix"] = state ? state.namePrefix : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["s3JobDefinition"] = state ? state.s3JobDefinition : undefined; resourceInputs["samplingPercentage"] = state ? state.samplingPercentage : undefined; resourceInputs["scheduleFrequency"] = state ? state.scheduleFrequency : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["userPausedDetails"] = state ? state.userPausedDetails : undefined; } else { const args = argsOrState; if ((!args || args.jobType === undefined) && !opts.urn) { throw new Error("Missing required property 'jobType'"); } if ((!args || args.s3JobDefinition === undefined) && !opts.urn) { throw new Error("Missing required property 's3JobDefinition'"); } resourceInputs["customDataIdentifierIds"] = args ? args.customDataIdentifierIds : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["initialRun"] = args ? args.initialRun : undefined; resourceInputs["jobStatus"] = args ? args.jobStatus : undefined; resourceInputs["jobType"] = args ? args.jobType : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["namePrefix"] = args ? args.namePrefix : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["s3JobDefinition"] = args ? args.s3JobDefinition : undefined; resourceInputs["samplingPercentage"] = args ? args.samplingPercentage : undefined; resourceInputs["scheduleFrequency"] = args ? args.scheduleFrequency : undefined; resourceInputs["tags"] = args ? args.tags : undefined; 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