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 a description of a processing job.
16func (c *Client) DescribeProcessingJob(ctx context.Context, params *DescribeProcessingJobInput, optFns ...func(*Options)) (*DescribeProcessingJobOutput, error) {
17	if params == nil {
18		params = &DescribeProcessingJobInput{}
19	}
20
21	result, metadata, err := c.invokeOperation(ctx, "DescribeProcessingJob", params, optFns, addOperationDescribeProcessingJobMiddlewares)
22	if err != nil {
23		return nil, err
24	}
25
26	out := result.(*DescribeProcessingJobOutput)
27	out.ResultMetadata = metadata
28	return out, nil
29}
30
31type DescribeProcessingJobInput struct {
32
33	// The name of the processing job. The name must be unique within an AWS Region in
34	// the AWS account.
35	//
36	// This member is required.
37	ProcessingJobName *string
38}
39
40type DescribeProcessingJobOutput struct {
41
42	// Configures the processing job to run a specified container image.
43	//
44	// This member is required.
45	AppSpecification *types.AppSpecification
46
47	// The time at which the processing job was created.
48	//
49	// This member is required.
50	CreationTime *time.Time
51
52	// The Amazon Resource Name (ARN) of the processing job.
53	//
54	// This member is required.
55	ProcessingJobArn *string
56
57	// The name of the processing job. The name must be unique within an AWS Region in
58	// the AWS account.
59	//
60	// This member is required.
61	ProcessingJobName *string
62
63	// Provides the status of a processing job.
64	//
65	// This member is required.
66	ProcessingJobStatus types.ProcessingJobStatus
67
68	// Identifies the resources, ML compute instances, and ML storage volumes to deploy
69	// for a processing job. In distributed training, you specify more than one
70	// instance.
71	//
72	// This member is required.
73	ProcessingResources *types.ProcessingResources
74
75	// The ARN of an AutoML job associated with this processing job.
76	AutoMLJobArn *string
77
78	// The environment variables set in the Docker container.
79	Environment map[string]string
80
81	// An optional string, up to one KB in size, that contains metadata from the
82	// processing container when the processing job exits.
83	ExitMessage *string
84
85	// The configuration information used to create an experiment.
86	ExperimentConfig *types.ExperimentConfig
87
88	// A string, up to one KB in size, that contains the reason a processing job
89	// failed, if it failed.
90	FailureReason *string
91
92	// The time at which the processing job was last modified.
93	LastModifiedTime *time.Time
94
95	// The ARN of a monitoring schedule for an endpoint associated with this processing
96	// job.
97	MonitoringScheduleArn *string
98
99	// Networking options for a processing job.
100	NetworkConfig *types.NetworkConfig
101
102	// The time at which the processing job completed.
103	ProcessingEndTime *time.Time
104
105	// The inputs for a processing job.
106	ProcessingInputs []types.ProcessingInput
107
108	// Output configuration for the processing job.
109	ProcessingOutputConfig *types.ProcessingOutputConfig
110
111	// The time at which the processing job started.
112	ProcessingStartTime *time.Time
113
114	// The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume
115	// to perform tasks on your behalf.
116	RoleArn *string
117
118	// The time limit for how long the processing job is allowed to run.
119	StoppingCondition *types.ProcessingStoppingCondition
120
121	// The ARN of a training job associated with this processing job.
122	TrainingJobArn *string
123
124	// Metadata pertaining to the operation's result.
125	ResultMetadata middleware.Metadata
126}
127
128func addOperationDescribeProcessingJobMiddlewares(stack *middleware.Stack, options Options) (err error) {
129	err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeProcessingJob{}, middleware.After)
130	if err != nil {
131		return err
132	}
133	err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeProcessingJob{}, middleware.After)
134	if err != nil {
135		return err
136	}
137	if err = addSetLoggerMiddleware(stack, options); err != nil {
138		return err
139	}
140	if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
141		return err
142	}
143	if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
144		return err
145	}
146	if err = addResolveEndpointMiddleware(stack, options); err != nil {
147		return err
148	}
149	if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
150		return err
151	}
152	if err = addRetryMiddlewares(stack, options); err != nil {
153		return err
154	}
155	if err = addHTTPSignerV4Middleware(stack, options); err != nil {
156		return err
157	}
158	if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
159		return err
160	}
161	if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
162		return err
163	}
164	if err = addClientUserAgent(stack); err != nil {
165		return err
166	}
167	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
168		return err
169	}
170	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
171		return err
172	}
173	if err = addOpDescribeProcessingJobValidationMiddleware(stack); err != nil {
174		return err
175	}
176	if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeProcessingJob(options.Region), middleware.Before); err != nil {
177		return err
178	}
179	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
180		return err
181	}
182	if err = addResponseErrorMiddleware(stack); err != nil {
183		return err
184	}
185	if err = addRequestResponseLogging(stack, options); err != nil {
186		return err
187	}
188	return nil
189}
190
191func newServiceMetadataMiddleware_opDescribeProcessingJob(region string) *awsmiddleware.RegisterServiceMetadata {
192	return &awsmiddleware.RegisterServiceMetadata{
193		Region:        region,
194		ServiceID:     ServiceID,
195		SigningName:   "sagemaker",
196		OperationName: "DescribeProcessingJob",
197	}
198}
199