1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package glue 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/glue/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12 "time" 13) 14 15// Gets details for a specific task run on a machine learning transform. Machine 16// learning task runs are asynchronous tasks that AWS Glue runs on your behalf as 17// part of various machine learning workflows. You can check the stats of any task 18// run by calling GetMLTaskRun with the TaskRunID and its parent transform's 19// TransformID. 20func (c *Client) GetMLTaskRun(ctx context.Context, params *GetMLTaskRunInput, optFns ...func(*Options)) (*GetMLTaskRunOutput, error) { 21 if params == nil { 22 params = &GetMLTaskRunInput{} 23 } 24 25 result, metadata, err := c.invokeOperation(ctx, "GetMLTaskRun", params, optFns, addOperationGetMLTaskRunMiddlewares) 26 if err != nil { 27 return nil, err 28 } 29 30 out := result.(*GetMLTaskRunOutput) 31 out.ResultMetadata = metadata 32 return out, nil 33} 34 35type GetMLTaskRunInput struct { 36 37 // The unique identifier of the task run. 38 // 39 // This member is required. 40 TaskRunId *string 41 42 // The unique identifier of the machine learning transform. 43 // 44 // This member is required. 45 TransformId *string 46} 47 48type GetMLTaskRunOutput struct { 49 50 // The date and time when this task run was completed. 51 CompletedOn *time.Time 52 53 // The error strings that are associated with the task run. 54 ErrorString *string 55 56 // The amount of time (in seconds) that the task run consumed resources. 57 ExecutionTime int32 58 59 // The date and time when this task run was last modified. 60 LastModifiedOn *time.Time 61 62 // The names of the log groups that are associated with the task run. 63 LogGroupName *string 64 65 // The list of properties that are associated with the task run. 66 Properties *types.TaskRunProperties 67 68 // The date and time when this task run started. 69 StartedOn *time.Time 70 71 // The status for this task run. 72 Status types.TaskStatusType 73 74 // The unique run identifier associated with this run. 75 TaskRunId *string 76 77 // The unique identifier of the task run. 78 TransformId *string 79 80 // Metadata pertaining to the operation's result. 81 ResultMetadata middleware.Metadata 82} 83 84func addOperationGetMLTaskRunMiddlewares(stack *middleware.Stack, options Options) (err error) { 85 err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetMLTaskRun{}, middleware.After) 86 if err != nil { 87 return err 88 } 89 err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetMLTaskRun{}, middleware.After) 90 if err != nil { 91 return err 92 } 93 if err = addSetLoggerMiddleware(stack, options); err != nil { 94 return err 95 } 96 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 97 return err 98 } 99 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 100 return err 101 } 102 if err = addResolveEndpointMiddleware(stack, options); err != nil { 103 return err 104 } 105 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 106 return err 107 } 108 if err = addRetryMiddlewares(stack, options); err != nil { 109 return err 110 } 111 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 112 return err 113 } 114 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 115 return err 116 } 117 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 118 return err 119 } 120 if err = addClientUserAgent(stack); err != nil { 121 return err 122 } 123 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 124 return err 125 } 126 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 127 return err 128 } 129 if err = addOpGetMLTaskRunValidationMiddleware(stack); err != nil { 130 return err 131 } 132 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMLTaskRun(options.Region), middleware.Before); err != nil { 133 return err 134 } 135 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 136 return err 137 } 138 if err = addResponseErrorMiddleware(stack); err != nil { 139 return err 140 } 141 if err = addRequestResponseLogging(stack, options); err != nil { 142 return err 143 } 144 return nil 145} 146 147func newServiceMetadataMiddleware_opGetMLTaskRun(region string) *awsmiddleware.RegisterServiceMetadata { 148 return &awsmiddleware.RegisterServiceMetadata{ 149 Region: region, 150 ServiceID: ServiceID, 151 SigningName: "glue", 152 OperationName: "GetMLTaskRun", 153 } 154} 155