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, c.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 noSmithyDocumentSerde 39} 40 41type DescribeJobOutput struct { 42 43 // The name of the job. 44 // 45 // This member is required. 46 Name *string 47 48 // The date and time that the job was created. 49 CreateDate *time.Time 50 51 // The identifier (user name) of the user associated with the creation of the job. 52 CreatedBy *string 53 54 // One or more artifacts that represent the Glue Data Catalog output from running 55 // the job. 56 DataCatalogOutputs []types.DataCatalogOutput 57 58 // Represents a list of JDBC database output objects which defines the output 59 // destination for a DataBrew recipe job to write into. 60 DatabaseOutputs []types.DatabaseOutput 61 62 // The dataset that the job acts upon. 63 DatasetName *string 64 65 // The Amazon Resource Name (ARN) of an encryption key that is used to protect the 66 // job. 67 EncryptionKeyArn *string 68 69 // The encryption mode for the job, which can be one of the following: 70 // 71 // * SSE-KMS - 72 // Server-side encryption with keys managed by KMS. 73 // 74 // * SSE-S3 - Server-side 75 // encryption with keys managed by Amazon S3. 76 EncryptionMode types.EncryptionMode 77 78 // Sample configuration for profile jobs only. Determines the number of rows on 79 // which the profile job will be executed. 80 JobSample *types.JobSample 81 82 // The identifier (user name) of the user who last modified the job. 83 LastModifiedBy *string 84 85 // The date and time that the job was last modified. 86 LastModifiedDate *time.Time 87 88 // Indicates whether Amazon CloudWatch logging is enabled for this job. 89 LogSubscription types.LogSubscription 90 91 // The maximum number of compute nodes that DataBrew can consume when the job 92 // processes data. 93 MaxCapacity int32 94 95 // The maximum number of times to retry the job after a job run fails. 96 MaxRetries int32 97 98 // One or more artifacts that represent the output from running the job. 99 Outputs []types.Output 100 101 // Configuration for profile jobs. Used to select columns, do evaluations, and 102 // override default parameters of evaluations. When configuration is null, the 103 // profile job will run with default settings. 104 ProfileConfiguration *types.ProfileConfiguration 105 106 // The DataBrew project associated with this job. 107 ProjectName *string 108 109 // Represents the name and version of a DataBrew recipe. 110 RecipeReference *types.RecipeReference 111 112 // The Amazon Resource Name (ARN) of the job. 113 ResourceArn *string 114 115 // The ARN of the Identity and Access Management (IAM) role to be assumed when 116 // DataBrew runs the job. 117 RoleArn *string 118 119 // Metadata tags associated with this job. 120 Tags map[string]string 121 122 // The job's timeout in minutes. A job that attempts to run longer than this 123 // timeout period ends with a status of TIMEOUT. 124 Timeout int32 125 126 // The job type, which must be one of the following: 127 // 128 // * PROFILE - The job analyzes 129 // the dataset to determine its size, data types, data distribution, and more. 130 // 131 // * 132 // RECIPE - The job applies one or more transformations to a dataset. 133 Type types.JobType 134 135 // Metadata pertaining to the operation's result. 136 ResultMetadata middleware.Metadata 137 138 noSmithyDocumentSerde 139} 140 141func (c *Client) addOperationDescribeJobMiddlewares(stack *middleware.Stack, options Options) (err error) { 142 err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeJob{}, middleware.After) 143 if err != nil { 144 return err 145 } 146 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeJob{}, middleware.After) 147 if err != nil { 148 return err 149 } 150 if err = addSetLoggerMiddleware(stack, options); err != nil { 151 return err 152 } 153 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 154 return err 155 } 156 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 157 return err 158 } 159 if err = addResolveEndpointMiddleware(stack, options); err != nil { 160 return err 161 } 162 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 163 return err 164 } 165 if err = addRetryMiddlewares(stack, options); err != nil { 166 return err 167 } 168 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 169 return err 170 } 171 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 172 return err 173 } 174 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 175 return err 176 } 177 if err = addClientUserAgent(stack); err != nil { 178 return err 179 } 180 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 181 return err 182 } 183 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 184 return err 185 } 186 if err = addOpDescribeJobValidationMiddleware(stack); err != nil { 187 return err 188 } 189 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeJob(options.Region), middleware.Before); err != nil { 190 return err 191 } 192 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 193 return err 194 } 195 if err = addResponseErrorMiddleware(stack); err != nil { 196 return err 197 } 198 if err = addRequestResponseLogging(stack, options); err != nil { 199 return err 200 } 201 return nil 202} 203 204func newServiceMetadataMiddleware_opDescribeJob(region string) *awsmiddleware.RegisterServiceMetadata { 205 return &awsmiddleware.RegisterServiceMetadata{ 206 Region: region, 207 ServiceID: ServiceID, 208 SigningName: "databrew", 209 OperationName: "DescribeJob", 210 } 211} 212