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// Returns information about a transform job.
16func (c *Client) DescribeTransformJob(ctx context.Context, params *DescribeTransformJobInput, optFns ...func(*Options)) (*DescribeTransformJobOutput, error) {
17	if params == nil {
18		params = &DescribeTransformJobInput{}
19	}
20
21	result, metadata, err := c.invokeOperation(ctx, "DescribeTransformJob", params, optFns, addOperationDescribeTransformJobMiddlewares)
22	if err != nil {
23		return nil, err
24	}
25
26	out := result.(*DescribeTransformJobOutput)
27	out.ResultMetadata = metadata
28	return out, nil
29}
30
31type DescribeTransformJobInput struct {
32
33	// The name of the transform job that you want to view details of.
34	//
35	// This member is required.
36	TransformJobName *string
37}
38
39type DescribeTransformJobOutput struct {
40
41	// A timestamp that shows when the transform Job was created.
42	//
43	// This member is required.
44	CreationTime *time.Time
45
46	// The name of the model used in the transform job.
47	//
48	// This member is required.
49	ModelName *string
50
51	// Describes the dataset to be transformed and the Amazon S3 location where it is
52	// stored.
53	//
54	// This member is required.
55	TransformInput *types.TransformInput
56
57	// The Amazon Resource Name (ARN) of the transform job.
58	//
59	// This member is required.
60	TransformJobArn *string
61
62	// The name of the transform job.
63	//
64	// This member is required.
65	TransformJobName *string
66
67	// The status of the transform job. If the transform job failed, the reason is
68	// returned in the FailureReason field.
69	//
70	// This member is required.
71	TransformJobStatus types.TransformJobStatus
72
73	// Describes the resources, including ML instance types and ML instance count, to
74	// use for the transform job.
75	//
76	// This member is required.
77	TransformResources *types.TransformResources
78
79	// The Amazon Resource Name (ARN) of the AutoML transform job.
80	AutoMLJobArn *string
81
82	// Specifies the number of records to include in a mini-batch for an HTTP inference
83	// request. A record is a single unit of input data that inference can be made on.
84	// For example, a single line in a CSV file is a record. To enable the batch
85	// strategy, you must set SplitType to Line, RecordIO, or TFRecord.
86	BatchStrategy types.BatchStrategy
87
88	// The data structure used to specify the data to be used for inference in a batch
89	// transform job and to associate the data that is relevant to the prediction
90	// results in the output. The input filter provided allows you to exclude input
91	// data that is not needed for inference in a batch transform job. The output
92	// filter provided allows you to include input data relevant to interpreting the
93	// predictions in the output from the job. For more information, see Associate
94	// Prediction Results with their Corresponding Input Records
95	// (https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform-data-processing.html).
96	DataProcessing *types.DataProcessing
97
98	// The environment variables to set in the Docker container. We support up to 16
99	// key and values entries in the map.
100	Environment map[string]string
101
102	// Associates a SageMaker job as a trial component with an experiment and trial.
103	// Specified when you call the following APIs:
104	//
105	// * CreateProcessingJob
106	//
107	// *
108	// CreateTrainingJob
109	//
110	// * CreateTransformJob
111	ExperimentConfig *types.ExperimentConfig
112
113	// If the transform job failed, FailureReason describes why it failed. A transform
114	// job creates a log file, which includes error messages, and stores it as an
115	// Amazon S3 object. For more information, see Log Amazon SageMaker Events with
116	// Amazon CloudWatch
117	// (https://docs.aws.amazon.com/sagemaker/latest/dg/logging-cloudwatch.html).
118	FailureReason *string
119
120	// The Amazon Resource Name (ARN) of the Amazon SageMaker Ground Truth labeling job
121	// that created the transform or training job.
122	LabelingJobArn *string
123
124	// The maximum number of parallel requests on each instance node that can be
125	// launched in a transform job. The default value is 1.
126	MaxConcurrentTransforms *int32
127
128	// The maximum payload size, in MB, used in the transform job.
129	MaxPayloadInMB *int32
130
131	// The timeout and maximum number of retries for processing a transform job
132	// invocation.
133	ModelClientConfig *types.ModelClientConfig
134
135	// Indicates when the transform job has been completed, or has stopped or failed.
136	// You are billed for the time interval between this time and the value of
137	// TransformStartTime.
138	TransformEndTime *time.Time
139
140	// Identifies the Amazon S3 location where you want Amazon SageMaker to save the
141	// results from the transform job.
142	TransformOutput *types.TransformOutput
143
144	// Indicates when the transform job starts on ML instances. You are billed for the
145	// time interval between this time and the value of TransformEndTime.
146	TransformStartTime *time.Time
147
148	// Metadata pertaining to the operation's result.
149	ResultMetadata middleware.Metadata
150}
151
152func addOperationDescribeTransformJobMiddlewares(stack *middleware.Stack, options Options) (err error) {
153	err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeTransformJob{}, middleware.After)
154	if err != nil {
155		return err
156	}
157	err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeTransformJob{}, middleware.After)
158	if err != nil {
159		return err
160	}
161	if err = addSetLoggerMiddleware(stack, options); err != nil {
162		return err
163	}
164	if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
165		return err
166	}
167	if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
168		return err
169	}
170	if err = addResolveEndpointMiddleware(stack, options); err != nil {
171		return err
172	}
173	if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
174		return err
175	}
176	if err = addRetryMiddlewares(stack, options); err != nil {
177		return err
178	}
179	if err = addHTTPSignerV4Middleware(stack, options); err != nil {
180		return err
181	}
182	if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
183		return err
184	}
185	if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
186		return err
187	}
188	if err = addClientUserAgent(stack); err != nil {
189		return err
190	}
191	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
192		return err
193	}
194	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
195		return err
196	}
197	if err = addOpDescribeTransformJobValidationMiddleware(stack); err != nil {
198		return err
199	}
200	if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransformJob(options.Region), middleware.Before); err != nil {
201		return err
202	}
203	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
204		return err
205	}
206	if err = addResponseErrorMiddleware(stack); err != nil {
207		return err
208	}
209	if err = addRequestResponseLogging(stack, options); err != nil {
210		return err
211	}
212	return nil
213}
214
215func newServiceMetadataMiddleware_opDescribeTransformJob(region string) *awsmiddleware.RegisterServiceMetadata {
216	return &awsmiddleware.RegisterServiceMetadata{
217		Region:        region,
218		ServiceID:     ServiceID,
219		SigningName:   "sagemaker",
220		OperationName: "DescribeTransformJob",
221	}
222}
223