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