1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package databrew 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/databrew/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12 "time" 13) 14 15// Returns the definition of a specific DataBrew job. 16func (c *Client) DescribeJob(ctx context.Context, params *DescribeJobInput, optFns ...func(*Options)) (*DescribeJobOutput, error) { 17 if params == nil { 18 params = &DescribeJobInput{} 19 } 20 21 result, metadata, err := c.invokeOperation(ctx, "DescribeJob", params, optFns, addOperationDescribeJobMiddlewares) 22 if err != nil { 23 return nil, err 24 } 25 26 out := result.(*DescribeJobOutput) 27 out.ResultMetadata = metadata 28 return out, nil 29} 30 31type DescribeJobInput struct { 32 33 // The name of the job to be described. 34 // 35 // This member is required. 36 Name *string 37} 38 39type DescribeJobOutput struct { 40 41 // The name of the job. 42 // 43 // This member is required. 44 Name *string 45 46 // The date and time that the job was created. 47 CreateDate *time.Time 48 49 // The identifier (user name) of the user associated with the creation of the job. 50 CreatedBy *string 51 52 // The dataset that the job acts upon. 53 DatasetName *string 54 55 // The Amazon Resource Name (ARN) of an encryption key that is used to protect the 56 // job. 57 EncryptionKeyArn *string 58 59 // The encryption mode for the job, which can be one of the following: 60 // 61 // * SSE-KMS - 62 // Server-side encryption with keys managed by AWS KMS. 63 // 64 // * SSE-S3 - Server-side 65 // encryption with keys managed by Amazon S3. 66 EncryptionMode types.EncryptionMode 67 68 // Sample configuration for profile jobs only. Determines the number of rows on 69 // which the profile job will be executed. 70 JobSample *types.JobSample 71 72 // The identifier (user name) of the user who last modified the job. 73 LastModifiedBy *string 74 75 // The date and time that the job was last modified. 76 LastModifiedDate *time.Time 77 78 // Indicates whether Amazon CloudWatch logging is enabled for this job. 79 LogSubscription types.LogSubscription 80 81 // The maximum number of compute nodes that DataBrew can consume when the job 82 // processes data. 83 MaxCapacity int32 84 85 // The maximum number of times to retry the job after a job run fails. 86 MaxRetries int32 87 88 // One or more artifacts that represent the output from running the job. 89 Outputs []types.Output 90 91 // The DataBrew project associated with this job. 92 ProjectName *string 93 94 // Represents the name and version of a DataBrew recipe. 95 RecipeReference *types.RecipeReference 96 97 // The Amazon Resource Name (ARN) of the job. 98 ResourceArn *string 99 100 // The ARN of the AWS Identity and Access Management (IAM) role to be assumed when 101 // DataBrew runs the job. 102 RoleArn *string 103 104 // Metadata tags associated with this job. 105 Tags map[string]string 106 107 // The job's timeout in minutes. A job that attempts to run longer than this 108 // timeout period ends with a status of TIMEOUT. 109 Timeout int32 110 111 // The job type, which must be one of the following: 112 // 113 // * PROFILE - The job analyzes 114 // the dataset to determine its size, data types, data distribution, and more. 115 // 116 // * 117 // RECIPE - The job applies one or more transformations to a dataset. 118 Type types.JobType 119 120 // Metadata pertaining to the operation's result. 121 ResultMetadata middleware.Metadata 122} 123 124func addOperationDescribeJobMiddlewares(stack *middleware.Stack, options Options) (err error) { 125 err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeJob{}, middleware.After) 126 if err != nil { 127 return err 128 } 129 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeJob{}, middleware.After) 130 if err != nil { 131 return err 132 } 133 if err = addSetLoggerMiddleware(stack, options); err != nil { 134 return err 135 } 136 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 137 return err 138 } 139 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 140 return err 141 } 142 if err = addResolveEndpointMiddleware(stack, options); err != nil { 143 return err 144 } 145 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 146 return err 147 } 148 if err = addRetryMiddlewares(stack, options); err != nil { 149 return err 150 } 151 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 152 return err 153 } 154 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 155 return err 156 } 157 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 158 return err 159 } 160 if err = addClientUserAgent(stack); err != nil { 161 return err 162 } 163 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 164 return err 165 } 166 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 167 return err 168 } 169 if err = addOpDescribeJobValidationMiddleware(stack); err != nil { 170 return err 171 } 172 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeJob(options.Region), middleware.Before); err != nil { 173 return err 174 } 175 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 176 return err 177 } 178 if err = addResponseErrorMiddleware(stack); err != nil { 179 return err 180 } 181 if err = addRequestResponseLogging(stack, options); err != nil { 182 return err 183 } 184 return nil 185} 186 187func newServiceMetadataMiddleware_opDescribeJob(region string) *awsmiddleware.RegisterServiceMetadata { 188 return &awsmiddleware.RegisterServiceMetadata{ 189 Region: region, 190 ServiceID: ServiceID, 191 SigningName: "databrew", 192 OperationName: "DescribeJob", 193 } 194} 195