Class ClassificationJob


  • public class ClassificationJob
    extends com.pulumi.resources.CustomResource
    Provides a resource to manage an [AWS Macie Classification Job](https://docs.aws.amazon.com/macie/latest/APIReference/jobs.html). ## Example Usage
     
     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());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import `aws.macie2.ClassificationJob` using the ID. For example: ```sh $ pulumi import aws:macie2/classificationJob:ClassificationJob example abcd1 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> createdAt()  
      com.pulumi.core.Output<java.util.List<java.lang.String>> customDataIdentifierIds()  
      com.pulumi.core.Output<java.lang.String> description()  
      static ClassificationJob get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ClassificationJobState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> initialRun()  
      com.pulumi.core.Output<java.lang.String> jobArn()  
      com.pulumi.core.Output<java.lang.String> jobId()  
      com.pulumi.core.Output<java.lang.String> jobStatus()  
      com.pulumi.core.Output<java.lang.String> jobType()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.lang.String> namePrefix()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<ClassificationJobS3JobDefinition> s3JobDefinition()  
      com.pulumi.core.Output<java.lang.Integer> samplingPercentage()  
      com.pulumi.core.Output<ClassificationJobScheduleFrequency> scheduleFrequency()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()  
      com.pulumi.core.Output<java.util.List<ClassificationJobUserPausedDetail>> userPausedDetails()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ClassificationJob

        public ClassificationJob​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • ClassificationJob

        public ClassificationJob​(java.lang.String name,
                                 ClassificationJobArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • ClassificationJob

        public ClassificationJob​(java.lang.String name,
                                 ClassificationJobArgs args,
                                 @Nullable
                                 com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • createdAt

        public com.pulumi.core.Output<java.lang.String> createdAt()
        Returns:
        Date and time, in UTC and extended RFC 3339 format, when the job was created.
      • customDataIdentifierIds

        public com.pulumi.core.Output<java.util.List<java.lang.String>> customDataIdentifierIds()
        Returns:
        Custom data identifiers to use for data analysis and classification.
      • description

        public com.pulumi.core.Output<java.lang.String> description()
        Returns:
        Custom description of the job. Can contain as many as 200 characters.
      • initialRun

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> initialRun()
        Returns:
        Whether to analyze all existing, eligible objects immediately after the job is created.
      • jobArn

        public com.pulumi.core.Output<java.lang.String> jobArn()
        Returns:
        ARN of the classification job.
      • jobId

        public com.pulumi.core.Output<java.lang.String> jobId()
        Returns:
        Unique identifier (ID) of the classification job.
      • jobStatus

        public com.pulumi.core.Output<java.lang.String> jobStatus()
        Returns:
        Status for the job. Valid values are `CANCELLED`, `RUNNING` and `USER_PAUSED`.
      • jobType

        public com.pulumi.core.Output<java.lang.String> jobType()
        Returns:
        Schedule for running the job. Valid values are `ONE_TIME`, to run the job only once, and `SCHEDULED`, to run the job on a daily, weekly, or monthly basis. When set to `SCHEDULED`, use `scheduleFrequency` to define the recurrence pattern for the job.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Custom name for the job. Can contain as many as 500 characters. If omitted, Terraform assigns a random, unique name. Conflicts with `namePrefix`.
      • namePrefix

        public com.pulumi.core.Output<java.lang.String> namePrefix()
        Returns:
        Creates a unique name beginning with the specified prefix. Conflicts with `name`.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • s3JobDefinition

        public com.pulumi.core.Output<ClassificationJobS3JobDefinition> s3JobDefinition()
        Returns:
        S3 buckets that contain the objects to analyze, and the scope of that analysis. See `s3JobDefinition` Block for details.
      • samplingPercentage

        public com.pulumi.core.Output<java.lang.Integer> samplingPercentage()
        Returns:
        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.
      • scheduleFrequency

        public com.pulumi.core.Output<ClassificationJobScheduleFrequency> scheduleFrequency()
        Returns:
        Recurrence pattern for running the job. To run the job only once, omit this argument and set `jobType` to `ONE_TIME`. See `scheduleFrequency` Block for details.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • userPausedDetails

        public com.pulumi.core.Output<java.util.List<ClassificationJobUserPausedDetail>> userPausedDetails()
        Returns:
        If the current status of the job is `USER_PAUSED`, information about when the job was paused and when the job or job run will expire and be cancelled if it isn't resumed. This value is present only if `jobStatus` is `USER_PAUSED`. See `userPausedDetails` Block for details.
      • get

        public static ClassificationJob get​(java.lang.String name,
                                            com.pulumi.core.Output<java.lang.String> id,
                                            @Nullable
                                            ClassificationJobState state,
                                            @Nullable
                                            com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.