ClassificationJobArgs

data class ClassificationJobArgs(val customDataIdentifierIds: Output<List<String>>? = null, val description: Output<String>? = null, val initialRun: Output<Boolean>? = null, val jobStatus: Output<String>? = null, val jobType: Output<String>? = null, val name: Output<String>? = null, val namePrefix: Output<String>? = null, val s3JobDefinition: Output<ClassificationJobS3JobDefinitionArgs>? = null, val samplingPercentage: Output<Int>? = null, val scheduleFrequency: Output<ClassificationJobScheduleFrequencyArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<ClassificationJobArgs>

Provides a resource to manage an AWS Macie Classification Job.

Example Usage

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 pulumi
import pulumi_aws as aws
test = aws.macie2.Account("test")
test_classification_job = aws.macie2.ClassificationJob("test",
job_type="ONE_TIME",
name="NAME OF THE CLASSIFICATION JOB",
s3_job_definition={
"bucket_definitions": [{
"account_id": "ACCOUNT ID",
"buckets": ["S3 BUCKET NAME"],
}],
},
opts = pulumi.ResourceOptions(depends_on=[test]))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = new Aws.Macie2.Account("test");
var testClassificationJob = new Aws.Macie2.ClassificationJob("test", new()
{
JobType = "ONE_TIME",
Name = "NAME OF THE CLASSIFICATION JOB",
S3JobDefinition = new Aws.Macie2.Inputs.ClassificationJobS3JobDefinitionArgs
{
BucketDefinitions = new[]
{
new Aws.Macie2.Inputs.ClassificationJobS3JobDefinitionBucketDefinitionArgs
{
AccountId = "ACCOUNT ID",
Buckets = new[]
{
"S3 BUCKET NAME",
},
},
},
},
}, new CustomResourceOptions
{
DependsOn =
{
test,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/macie2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
test, err := macie2.NewAccount(ctx, "test", nil)
if err != nil {
return err
}
_, err = macie2.NewClassificationJob(ctx, "test", &macie2.ClassificationJobArgs{
JobType: pulumi.String("ONE_TIME"),
Name: pulumi.String("NAME OF THE CLASSIFICATION JOB"),
S3JobDefinition: &macie2.ClassificationJobS3JobDefinitionArgs{
BucketDefinitions: macie2.ClassificationJobS3JobDefinitionBucketDefinitionArray{
&macie2.ClassificationJobS3JobDefinitionBucketDefinitionArgs{
AccountId: pulumi.String("ACCOUNT ID"),
Buckets: pulumi.StringArray{
pulumi.String("S3 BUCKET NAME"),
},
},
},
},
}, pulumi.DependsOn([]pulumi.Resource{
test,
}))
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.macie2.Account;
import com.pulumi.aws.macie2.ClassificationJob;
import com.pulumi.aws.macie2.ClassificationJobArgs;
import com.pulumi.aws.macie2.inputs.ClassificationJobS3JobDefinitionArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var test = new Account("test");
var testClassificationJob = new ClassificationJob("testClassificationJob", ClassificationJobArgs.builder()
.jobType("ONE_TIME")
.name("NAME OF THE CLASSIFICATION JOB")
.s3JobDefinition(ClassificationJobS3JobDefinitionArgs.builder()
.bucketDefinitions(ClassificationJobS3JobDefinitionBucketDefinitionArgs.builder()
.accountId("ACCOUNT ID")
.buckets("S3 BUCKET NAME")
.build())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(test)
.build());
}
}
resources:
test:
type: aws:macie2:Account
testClassificationJob:
type: aws:macie2:ClassificationJob
name: test
properties:
jobType: ONE_TIME
name: NAME OF THE CLASSIFICATION JOB
s3JobDefinition:
bucketDefinitions:
- accountId: ACCOUNT ID
buckets:
- S3 BUCKET NAME
options:
dependsOn:
- ${test}

Import

Using pulumi import, import aws_macie2_classification_job using the id. For example:

$ pulumi import aws:macie2/classificationJob:ClassificationJob example abcd1

Constructors

Link copied to clipboard
constructor(customDataIdentifierIds: Output<List<String>>? = null, description: Output<String>? = null, initialRun: Output<Boolean>? = null, jobStatus: Output<String>? = null, jobType: Output<String>? = null, name: Output<String>? = null, namePrefix: Output<String>? = null, s3JobDefinition: Output<ClassificationJobS3JobDefinitionArgs>? = null, samplingPercentage: Output<Int>? = null, scheduleFrequency: Output<ClassificationJobScheduleFrequencyArgs>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val customDataIdentifierIds: Output<List<String>>? = null

The custom data identifiers to use for data analysis and classification.

Link copied to clipboard
val description: Output<String>? = null

A custom description of the job. The description can contain as many as 200 characters.

Link copied to clipboard
val initialRun: Output<Boolean>? = null

Specifies whether to analyze all existing, eligible objects immediately after the job is created.

Link copied to clipboard
val jobStatus: Output<String>? = null

The status for the job. Valid values are: CANCELLED, RUNNING and USER_PAUSED

Link copied to clipboard
val jobType: Output<String>? = null

The schedule for running the job. Valid values are: ONE_TIME - Run the job only once. If you specify this value, don't specify a value for the schedule_frequency property. SCHEDULED - Run the job on a daily, weekly, or monthly basis. If you specify this value, use the schedule_frequency property to define the recurrence pattern for the job.

Link copied to clipboard
val name: Output<String>? = null

A custom name for the job. The name can contain as many as 500 characters. If omitted, the provider will assign a random, unique name. Conflicts with name_prefix.

Link copied to clipboard
val namePrefix: Output<String>? = null

Creates a unique name beginning with the specified prefix. Conflicts with name.

Link copied to clipboard

The S3 buckets that contain the objects to analyze, and the scope of that analysis. (documented below)

Link copied to clipboard
val samplingPercentage: Output<Int>? = null

The sampling depth, as a percentage, to apply when processing objects. This value determines the percentage of eligible objects that the job analyzes. If this value is less than 100, Amazon Macie selects the objects to analyze at random, up to the specified percentage, and analyzes all the data in those objects.

Link copied to clipboard

The recurrence pattern for running the job. To run the job only once, don't specify a value for this property and set the value for the job_type property to ONE_TIME. (documented below)

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

Link copied to clipboard
open override fun toJava(): ClassificationJobArgs