1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package macie2 4 5import ( 6 "context" 7 awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" 8 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" 9 "github.com/aws/aws-sdk-go-v2/service/macie2/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12 "time" 13) 14 15// Retrieves the status and settings for a classification job. 16func (c *Client) DescribeClassificationJob(ctx context.Context, params *DescribeClassificationJobInput, optFns ...func(*Options)) (*DescribeClassificationJobOutput, error) { 17 if params == nil { 18 params = &DescribeClassificationJobInput{} 19 } 20 21 result, metadata, err := c.invokeOperation(ctx, "DescribeClassificationJob", params, optFns, addOperationDescribeClassificationJobMiddlewares) 22 if err != nil { 23 return nil, err 24 } 25 26 out := result.(*DescribeClassificationJobOutput) 27 out.ResultMetadata = metadata 28 return out, nil 29} 30 31type DescribeClassificationJobInput struct { 32 33 // The unique identifier for the classification job. 34 // 35 // This member is required. 36 JobId *string 37} 38 39type DescribeClassificationJobOutput struct { 40 41 // The token that was provided to ensure the idempotency of the request to create 42 // the job. 43 ClientToken *string 44 45 // The date and time, in UTC and extended ISO 8601 format, when the job was 46 // created. 47 CreatedAt *time.Time 48 49 // The custom data identifiers that the job uses to analyze data. 50 CustomDataIdentifierIds []string 51 52 // The custom description of the job. 53 Description *string 54 55 // Specifies whether the job is configured to analyze all existing, eligible 56 // objects immediately after it's created. 57 InitialRun bool 58 59 // The Amazon Resource Name (ARN) of the job. 60 JobArn *string 61 62 // The unique identifier for the job. 63 JobId *string 64 65 // The current status of the job. Possible values are: 66 // 67 // * CANCELLED - You cancelled 68 // the job, or you paused the job while it had a status of RUNNING and you didn't 69 // resume it within 30 days of pausing it. 70 // 71 // * COMPLETE - For a one-time job, Amazon 72 // Macie finished processing the data specified for the job. This value doesn't 73 // apply to recurring jobs. 74 // 75 // * IDLE - For a recurring job, the previous scheduled 76 // run is complete and the next scheduled run is pending. This value doesn't apply 77 // to one-time jobs. 78 // 79 // * PAUSED - Amazon Macie started running the job but 80 // additional processing would exceed the monthly sensitive data discovery quota 81 // for your account or one or more member accounts that the job analyzes data 82 // for. 83 // 84 // * RUNNING - For a one-time job, the job is in progress. For a recurring 85 // job, a scheduled run is in progress. 86 // 87 // * USER_PAUSED - You paused the job. If you 88 // paused the job while it had a status of RUNNING and you don't resume the job 89 // within 30 days of pausing it, the job expires and is cancelled. To check the 90 // job's expiration date, refer to the UserPausedDetails.jobExpiresAt property. 91 JobStatus types.JobStatus 92 93 // The schedule for running the job. Possible values are: 94 // 95 // * ONE_TIME - The job 96 // runs only once. 97 // 98 // * SCHEDULED - The job runs on a daily, weekly, or monthly 99 // basis. The scheduleFrequency property indicates the recurrence pattern for the 100 // job. 101 JobType types.JobType 102 103 // Specifies whether any account- or bucket-level access errors occurred when the 104 // job ran. For a recurring job, this value indicates the error status of the job's 105 // most recent run. 106 LastRunErrorStatus *types.LastRunErrorStatus 107 108 // The date and time, in UTC and extended ISO 8601 format, when the job started. If 109 // the job is a recurring job, this value indicates when the most recent run 110 // started. 111 LastRunTime *time.Time 112 113 // The custom name of the job. 114 Name *string 115 116 // The S3 buckets that the job is configured to analyze, and the scope of that 117 // analysis. 118 S3JobDefinition *types.S3JobDefinition 119 120 // The sampling depth, as a percentage, that determines the percentage of eligible 121 // objects that the job analyzes. 122 SamplingPercentage int32 123 124 // The recurrence pattern for running the job. If the job is configured to run only 125 // once, this value is null. 126 ScheduleFrequency *types.JobScheduleFrequency 127 128 // The number of times that the job has run and processing statistics for the job's 129 // current run. 130 Statistics *types.Statistics 131 132 // A map of key-value pairs that specifies which tags (keys and values) are 133 // associated with the classification job. 134 Tags map[string]string 135 136 // If the current status of the job is USER_PAUSED, specifies when the job was 137 // paused and when the job will expire and be cancelled if it isn't resumed. This 138 // value is present only if the value for jobStatus is USER_PAUSED. 139 UserPausedDetails *types.UserPausedDetails 140 141 // Metadata pertaining to the operation's result. 142 ResultMetadata middleware.Metadata 143} 144 145func addOperationDescribeClassificationJobMiddlewares(stack *middleware.Stack, options Options) (err error) { 146 err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeClassificationJob{}, middleware.After) 147 if err != nil { 148 return err 149 } 150 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeClassificationJob{}, middleware.After) 151 if err != nil { 152 return err 153 } 154 if err = addSetLoggerMiddleware(stack, options); err != nil { 155 return err 156 } 157 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 158 return err 159 } 160 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 161 return err 162 } 163 if err = addResolveEndpointMiddleware(stack, options); err != nil { 164 return err 165 } 166 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 167 return err 168 } 169 if err = addRetryMiddlewares(stack, options); err != nil { 170 return err 171 } 172 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 173 return err 174 } 175 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 176 return err 177 } 178 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 179 return err 180 } 181 if err = addClientUserAgent(stack); err != nil { 182 return err 183 } 184 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 185 return err 186 } 187 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 188 return err 189 } 190 if err = addOpDescribeClassificationJobValidationMiddleware(stack); err != nil { 191 return err 192 } 193 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClassificationJob(options.Region), middleware.Before); err != nil { 194 return err 195 } 196 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 197 return err 198 } 199 if err = addResponseErrorMiddleware(stack); err != nil { 200 return err 201 } 202 if err = addRequestResponseLogging(stack, options); err != nil { 203 return err 204 } 205 return nil 206} 207 208func newServiceMetadataMiddleware_opDescribeClassificationJob(region string) *awsmiddleware.RegisterServiceMetadata { 209 return &awsmiddleware.RegisterServiceMetadata{ 210 Region: region, 211 ServiceID: ServiceID, 212 SigningName: "macie2", 213 OperationName: "DescribeClassificationJob", 214 } 215} 216