1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package sagemaker
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/sagemaker/types"
10	"github.com/aws/smithy-go/middleware"
11	smithyhttp "github.com/aws/smithy-go/transport/http"
12	"time"
13)
14
15// Gets information about a labeling job.
16func (c *Client) DescribeLabelingJob(ctx context.Context, params *DescribeLabelingJobInput, optFns ...func(*Options)) (*DescribeLabelingJobOutput, error) {
17	if params == nil {
18		params = &DescribeLabelingJobInput{}
19	}
20
21	result, metadata, err := c.invokeOperation(ctx, "DescribeLabelingJob", params, optFns, addOperationDescribeLabelingJobMiddlewares)
22	if err != nil {
23		return nil, err
24	}
25
26	out := result.(*DescribeLabelingJobOutput)
27	out.ResultMetadata = metadata
28	return out, nil
29}
30
31type DescribeLabelingJobInput struct {
32
33	// The name of the labeling job to return information for.
34	//
35	// This member is required.
36	LabelingJobName *string
37}
38
39type DescribeLabelingJobOutput struct {
40
41	// The date and time that the labeling job was created.
42	//
43	// This member is required.
44	CreationTime *time.Time
45
46	// Configuration information required for human workers to complete a labeling
47	// task.
48	//
49	// This member is required.
50	HumanTaskConfig *types.HumanTaskConfig
51
52	// Input configuration information for the labeling job, such as the Amazon S3
53	// location of the data objects and the location of the manifest file that
54	// describes the data objects.
55	//
56	// This member is required.
57	InputConfig *types.LabelingJobInputConfig
58
59	// A unique identifier for work done as part of a labeling job.
60	//
61	// This member is required.
62	JobReferenceCode *string
63
64	// Provides a breakdown of the number of data objects labeled by humans, the number
65	// of objects labeled by machine, the number of objects than couldn't be labeled,
66	// and the total number of objects labeled.
67	//
68	// This member is required.
69	LabelCounters *types.LabelCounters
70
71	// The Amazon Resource Name (ARN) of the labeling job.
72	//
73	// This member is required.
74	LabelingJobArn *string
75
76	// The name assigned to the labeling job when it was created.
77	//
78	// This member is required.
79	LabelingJobName *string
80
81	// The processing status of the labeling job.
82	//
83	// This member is required.
84	LabelingJobStatus types.LabelingJobStatus
85
86	// The date and time that the labeling job was last updated.
87	//
88	// This member is required.
89	LastModifiedTime *time.Time
90
91	// The location of the job's output data and the AWS Key Management Service key ID
92	// for the key used to encrypt the output data, if any.
93	//
94	// This member is required.
95	OutputConfig *types.LabelingJobOutputConfig
96
97	// The Amazon Resource Name (ARN) that Amazon SageMaker assumes to perform tasks on
98	// your behalf during data labeling.
99	//
100	// This member is required.
101	RoleArn *string
102
103	// If the job failed, the reason that it failed.
104	FailureReason *string
105
106	// The attribute used as the label in the output manifest file.
107	LabelAttributeName *string
108
109	// The S3 location of the JSON file that defines the categories used to label data
110	// objects. Please note the following label-category limits:
111	//
112	// * Semantic
113	// segmentation labeling jobs using automated labeling: 20 labels
114	//
115	// * Box bounding
116	// labeling jobs (all): 10 labels
117	//
118	// The file is a JSON structure in the following
119	// format: {
120	//     "document-version": "2018-11-28"
121	//
122	//     "labels": [
123	//
124	//     {
125	//
126	//
127	// "label": "label 1"
128	//
129	//     },
130	//
131	//     {
132	//
133	//     "label": "label 2"
134	//
135	//     },
136	//
137	//     ...
138	//
139	//
140	// {
141	//
142	//     "label": "label n"
143	//
144	//     }
145	//
146	//     ]
147	//
148	//     }
149	LabelCategoryConfigS3Uri *string
150
151	// Configuration information for automated data labeling.
152	LabelingJobAlgorithmsConfig *types.LabelingJobAlgorithmsConfig
153
154	// The location of the output produced by the labeling job.
155	LabelingJobOutput *types.LabelingJobOutput
156
157	// A set of conditions for stopping a labeling job. If any of the conditions are
158	// met, the job is automatically stopped.
159	StoppingConditions *types.LabelingJobStoppingConditions
160
161	// An array of key-value pairs. You can use tags to categorize your AWS resources
162	// in different ways, for example, by purpose, owner, or environment. For more
163	// information, see Tagging AWS Resources
164	// (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html).
165	Tags []types.Tag
166
167	// Metadata pertaining to the operation's result.
168	ResultMetadata middleware.Metadata
169}
170
171func addOperationDescribeLabelingJobMiddlewares(stack *middleware.Stack, options Options) (err error) {
172	err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeLabelingJob{}, middleware.After)
173	if err != nil {
174		return err
175	}
176	err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeLabelingJob{}, middleware.After)
177	if err != nil {
178		return err
179	}
180	if err = addSetLoggerMiddleware(stack, options); err != nil {
181		return err
182	}
183	if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
184		return err
185	}
186	if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
187		return err
188	}
189	if err = addResolveEndpointMiddleware(stack, options); err != nil {
190		return err
191	}
192	if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
193		return err
194	}
195	if err = addRetryMiddlewares(stack, options); err != nil {
196		return err
197	}
198	if err = addHTTPSignerV4Middleware(stack, options); err != nil {
199		return err
200	}
201	if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
202		return err
203	}
204	if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
205		return err
206	}
207	if err = addClientUserAgent(stack); err != nil {
208		return err
209	}
210	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
211		return err
212	}
213	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
214		return err
215	}
216	if err = addOpDescribeLabelingJobValidationMiddleware(stack); err != nil {
217		return err
218	}
219	if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLabelingJob(options.Region), middleware.Before); err != nil {
220		return err
221	}
222	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
223		return err
224	}
225	if err = addResponseErrorMiddleware(stack); err != nil {
226		return err
227	}
228	if err = addRequestResponseLogging(stack, options); err != nil {
229		return err
230	}
231	return nil
232}
233
234func newServiceMetadataMiddleware_opDescribeLabelingJob(region string) *awsmiddleware.RegisterServiceMetadata {
235	return &awsmiddleware.RegisterServiceMetadata{
236		Region:        region,
237		ServiceID:     ServiceID,
238		SigningName:   "sagemaker",
239		OperationName: "DescribeLabelingJob",
240	}
241}
242