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 an Amazon SageMaker AutoML job.
16func (c *Client) DescribeAutoMLJob(ctx context.Context, params *DescribeAutoMLJobInput, optFns ...func(*Options)) (*DescribeAutoMLJobOutput, error) {
17	if params == nil {
18		params = &DescribeAutoMLJobInput{}
19	}
20
21	result, metadata, err := c.invokeOperation(ctx, "DescribeAutoMLJob", params, optFns, addOperationDescribeAutoMLJobMiddlewares)
22	if err != nil {
23		return nil, err
24	}
25
26	out := result.(*DescribeAutoMLJobOutput)
27	out.ResultMetadata = metadata
28	return out, nil
29}
30
31type DescribeAutoMLJobInput struct {
32
33	// Requests information about an AutoML job using its unique name.
34	//
35	// This member is required.
36	AutoMLJobName *string
37}
38
39type DescribeAutoMLJobOutput struct {
40
41	// Returns the ARN of the AutoML job.
42	//
43	// This member is required.
44	AutoMLJobArn *string
45
46	// Returns the name of the AutoML job.
47	//
48	// This member is required.
49	AutoMLJobName *string
50
51	// Returns the secondary status of the AutoML job.
52	//
53	// This member is required.
54	AutoMLJobSecondaryStatus types.AutoMLJobSecondaryStatus
55
56	// Returns the status of the AutoML job's AutoMLJobStatus.
57	//
58	// This member is required.
59	AutoMLJobStatus types.AutoMLJobStatus
60
61	// Returns the creation time of the AutoML job.
62	//
63	// This member is required.
64	CreationTime *time.Time
65
66	// Returns the input data configuration for the AutoML job..
67	//
68	// This member is required.
69	InputDataConfig []types.AutoMLChannel
70
71	// Returns the job's last modified time.
72	//
73	// This member is required.
74	LastModifiedTime *time.Time
75
76	// Returns the job's output data config.
77	//
78	// This member is required.
79	OutputDataConfig *types.AutoMLOutputDataConfig
80
81	// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM)
82	// role that has read permission to the input data location and write permission to
83	// the output data location in Amazon S3.
84	//
85	// This member is required.
86	RoleArn *string
87
88	// Returns information on the job's artifacts found in AutoMLJobArtifacts.
89	AutoMLJobArtifacts *types.AutoMLJobArtifacts
90
91	// Returns the configuration for the AutoML job.
92	AutoMLJobConfig *types.AutoMLJobConfig
93
94	// Returns the job's objective.
95	AutoMLJobObjective *types.AutoMLJobObjective
96
97	// Returns the job's BestCandidate.
98	BestCandidate *types.AutoMLCandidate
99
100	// Returns the end time of the AutoML job.
101	EndTime *time.Time
102
103	// Returns the job's FailureReason.
104	FailureReason *string
105
106	// Returns the job's output from GenerateCandidateDefinitionsOnly.
107	GenerateCandidateDefinitionsOnly bool
108
109	// Returns a list of reasons for partial failures within an AutoML job.
110	PartialFailureReasons []types.AutoMLPartialFailureReason
111
112	// Returns the job's problem type.
113	ProblemType types.ProblemType
114
115	// This contains ProblemType, AutoMLJobObjective and CompletionCriteria. If you do
116	// not provide these values, they are auto-inferred. If you do provide them, they
117	// are the values you provide.
118	ResolvedAttributes *types.ResolvedAttributes
119
120	// Metadata pertaining to the operation's result.
121	ResultMetadata middleware.Metadata
122}
123
124func addOperationDescribeAutoMLJobMiddlewares(stack *middleware.Stack, options Options) (err error) {
125	err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAutoMLJob{}, middleware.After)
126	if err != nil {
127		return err
128	}
129	err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAutoMLJob{}, middleware.After)
130	if err != nil {
131		return err
132	}
133	if err = addSetLoggerMiddleware(stack, options); err != nil {
134		return err
135	}
136	if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
137		return err
138	}
139	if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
140		return err
141	}
142	if err = addResolveEndpointMiddleware(stack, options); err != nil {
143		return err
144	}
145	if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
146		return err
147	}
148	if err = addRetryMiddlewares(stack, options); err != nil {
149		return err
150	}
151	if err = addHTTPSignerV4Middleware(stack, options); err != nil {
152		return err
153	}
154	if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
155		return err
156	}
157	if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
158		return err
159	}
160	if err = addClientUserAgent(stack); err != nil {
161		return err
162	}
163	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
164		return err
165	}
166	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
167		return err
168	}
169	if err = addOpDescribeAutoMLJobValidationMiddleware(stack); err != nil {
170		return err
171	}
172	if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAutoMLJob(options.Region), middleware.Before); err != nil {
173		return err
174	}
175	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
176		return err
177	}
178	if err = addResponseErrorMiddleware(stack); err != nil {
179		return err
180	}
181	if err = addRequestResponseLogging(stack, options); err != nil {
182		return err
183	}
184	return nil
185}
186
187func newServiceMetadataMiddleware_opDescribeAutoMLJob(region string) *awsmiddleware.RegisterServiceMetadata {
188	return &awsmiddleware.RegisterServiceMetadata{
189		Region:        region,
190		ServiceID:     ServiceID,
191		SigningName:   "sagemaker",
192		OperationName: "DescribeAutoMLJob",
193	}
194}
195