ClassificationJob class
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", {
s3JobDefinition: {
bucketDefinitions: [{
accountId: "ACCOUNT ID",
buckets: ["S3 BUCKET NAME"],
}],
},
jobType: "ONE_TIME",
name: "NAME OF THE CLASSIFICATION JOB",
}, {
dependsOn: [test],
});
import pulumi
import pulumi_aws as aws
test = aws.macie2.Account("test")
test_classification_job = aws.macie2.ClassificationJob("test",
s3_job_definition={
"bucket_definitions": [{
"account_id": "ACCOUNT ID",
"buckets": ["S3 BUCKET NAME"],
}],
},
job_type="ONE_TIME",
name="NAME OF THE CLASSIFICATION JOB",
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()
{
S3JobDefinition = new Aws.Macie2.Inputs.ClassificationJobS3JobDefinitionArgs
{
BucketDefinitions = new[]
{
new Aws.Macie2.Inputs.ClassificationJobS3JobDefinitionBucketDefinitionArgs
{
AccountId = "ACCOUNT ID",
Buckets = new[]
{
"S3 BUCKET NAME",
},
},
},
},
JobType = "ONE_TIME",
Name = "NAME OF THE CLASSIFICATION JOB",
}, new CustomResourceOptions
{
DependsOn =
{
test,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/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{
S3JobDefinition: &macie2.ClassificationJobS3JobDefinitionArgs{
BucketDefinitions: macie2.ClassificationJobS3JobDefinitionBucketDefinitionArray{
&macie2.ClassificationJobS3JobDefinitionBucketDefinitionArgs{
AccountId: pulumi.String("ACCOUNT ID"),
Buckets: pulumi.StringArray{
pulumi.String("S3 BUCKET NAME"),
},
},
},
},
JobType: pulumi.String("ONE_TIME"),
Name: pulumi.String("NAME OF THE CLASSIFICATION JOB"),
}, pulumi.DependsOn([]pulumi.Resource{
test,
}))
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_macie2_account" "test" {
}
resource "aws_macie2_classificationjob" "test" {
depends_on = [aws_macie2_account.test]
s3_job_definition = {
bucket_definitions = [{
"accountId" = "ACCOUNT ID"
"buckets" = ["S3 BUCKET NAME"]
}]
}
job_type = "ONE_TIME"
name = "NAME OF THE CLASSIFICATION JOB"
}
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.aws.macie2.inputs.ClassificationJobS3JobDefinitionBucketDefinitionArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
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()
.s3JobDefinition(ClassificationJobS3JobDefinitionArgs.builder()
.bucketDefinitions(ClassificationJobS3JobDefinitionBucketDefinitionArgs.builder()
.accountId("ACCOUNT ID")
.buckets("S3 BUCKET NAME")
.build())
.build())
.jobType("ONE_TIME")
.name("NAME OF THE CLASSIFICATION JOB")
.build(), CustomResourceOptions.builder()
.dependsOn(test)
.build());
}
}
resources:
test:
type: aws:macie2:Account
testClassificationJob:
type: aws:macie2:ClassificationJob
name: test
properties:
s3JobDefinition:
bucketDefinitions:
- accountId: ACCOUNT ID
buckets:
- S3 BUCKET NAME
jobType: ONE_TIME
name: NAME OF THE CLASSIFICATION JOB
options:
dependsOn:
- ${test}
Import
Using pulumi import, import aws.macie2.ClassificationJob using the id. For example:
$ pulumi import aws:macie2/classificationJob:ClassificationJob example abcd1
Constructors
- ClassificationJob(String name, {ClassificationJobArgs? args, CustomResourceOptions? options})
-
Creates a new ClassificationJob.
nameThe Pulumi resource name.argsArguments used to configure this ClassificationJob. The set of arguments for ClassificationJob.optionsResource options controlling this resource's behavior. - ClassificationJob.reference(String urn)
- Creates a typed reference to an existing ClassificationJob resource.
Properties
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
createdAt
↔ Output<
String> -
The date and time, in UTC and extended RFC 3339 format, when the job was created.
latefinal
-
customDataIdentifierIds
↔ Output<
List< String> > -
The custom data identifiers to use for data analysis and classification.
latefinal
-
description
↔ Output<
String> -
A custom description of the job. The description can contain as many as 200 characters.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
-
initialRun
↔ Output<
bool?> -
Specifies whether to analyze all existing, eligible objects immediately after the job is created.
latefinal
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
jobArn
↔ Output<
String> -
latefinal
-
jobId
↔ Output<
String> -
latefinal
-
jobStatus
↔ Output<
String> -
The status for the job. Valid values are:
CANCELLED,RUNNINGandUSER_PAUSEDlatefinal -
jobType
↔ Output<
String> -
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 thescheduleFrequencyproperty.SCHEDULED- Run the job on a daily, weekly, or monthly basis. If you specify this value, use thescheduleFrequencyproperty to define the recurrence pattern for the job.latefinal -
name
↔ Output<
String> -
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
namePrefix.latefinal -
namePrefix
↔ Output<
String> -
Creates a unique name beginning with the specified prefix. Conflicts with
name.latefinal -
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
s3JobDefinition
↔ Output<
ClassificationJobS3JobDefinition> -
The S3 buckets that contain the objects to analyze, and the scope of that analysis. (documented below)
latefinal
-
samplingPercentage
↔ Output<
int> -
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.
latefinal
-
scheduleFrequency
↔ Output<
ClassificationJobScheduleFrequency> -
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
jobTypeproperty toONE_TIME. (documented below)latefinal -
Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
A map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
-
userPausedDetails
↔ Output<
List< ClassificationJobUserPausedDetail> > -
If the current status of the job is
USER_PAUSED, specifies when the job was paused and when the job or job run will expire and be canceled if it isn't resumed. This value is present only if the value forjob-statusisUSER_PAUSED.latefinal
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {ClassificationJobState? state, CustomResourceOptions? options}) → ClassificationJob -
Gets an existing ClassificationJob resource's state with the given
nameandid.