// snippet - source description :[ Describe Training Job . kt Ġdemonstrates Ġhow Ġto Ġobtain Ġinformation Ġabout Ġa Ġtraining Ġjob .] č Ċ // snippet - keyword :[ AWS ĠSDK Ġfor ĠKotlin ] č Ċ // snippet - keyword :[ Code ĠSample ] č Ċ // snippet - keyword :[ Amazon ĠS age Maker ] č Ċ // snippet - s ourc etype :[ full - example ] č Ċ // snippet - s ourced ate :[ 1 1 / 0 5 / 2 0 2 1 ] č Ċ // snippet - source author :[ sc mac don Ġ- ĠAWS ] čĊč Ċ /* čĊĠĠ ĠCopyright ĠAmazon . com , ĠInc . Ġor Ġits Ġaffiliates . ĠAll ĠRights ĠReserved . čĊĠĠ ĠSPDX - License - Identifier : ĠApache - 2 . 0 č Ċ */ čĊč Ċ package Ġcom . kotlin . sage čĊč Ċ // snippet - start :[ sagemaker . kotlin . describe _ train _ job . import ] č Ċ import Ġaws . sdk . kotlin . services . sagemaker . S age Maker Client č Ċ import Ġaws . sdk . kotlin . services . sagemaker . model . Describe Training JobRequest č Ċ import Ġaws . sdk . kotlin . services . sagemaker . model . S age Maker Exception č Ċ import Ġkotlin . system . exit Process č Ċ // snippet - end :[ sagemaker . kotlin . describe _ train _ job . import ] čĊč Ċ /** č Ċ To Ġrun Ġthis ĠKotlin Ġcode Ġexample , Ġensure Ġthat Ġyou Ġhave Ġsetup Ġyour Ġdevelopment Ġenvironment , č Ċ including Ġyour Ġcredentials . čĊč Ċ For Ġinformation , Ġsee Ġthis Ġdocumentation Ġtopic : č Ċ https :// docs . aws . amazon . com / sdk - for - kotlin / latest / developer - guide / setup . html čĊ Ġ*/ č Ċ suspend Ġfun Ġmain ( args : Array < String >) Ġ{ čĊčĊĠĠĠ Ġval Ġusage Ġ= Ġ""" čĊĠĠĠ ĠUsage : čĊĠĠĠĠĠĠĠ Ġ< training Job Name > čĊčĊĠĠĠ ĠWhere : čĊĠĠĠĠĠĠĠ Ġtraining Job Name Ġ- Ġthe Ġname Ġof Ġthe Ġtraining Ġjob . čĊčĊĠĠĠ Ġ""" čĊčĊĠĠĠ Ġif Ġ( args . size Ġ!= Ġ 1 ) Ġ{ čĊĠĠĠĠĠĠ Ġprintln ( usage ) čĊĠĠĠĠĠĠ Ġexit Process ( 1 ) čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġval Ġtraining Job Name Ġ= Ġargs [ 0 ] čĊĠĠĠ Ġval Ġsage Maker Client Ġ= ĠS age Maker Client { region Ġ= Ġ" us - west - 2 " Ġ} čĊĠĠĠ Ġdescribe Train Job ( sage Maker Client , Ġtraining Job Name ) čĊĠĠĠ Ġsage Maker Client . close () č Ċ } čĊč Ċ // snippet - start :[ sagemaker . kotlin . describe _ train _ job . main ] č Ċ suspend Ġfun Ġdescribe Train Job ( sage Maker Client : ĠS age Maker Client , Ġtraining Job Name Val : ĠString ?) Ġ{ čĊĠĠĠ Ġtry Ġ{ čĊĠĠĠĠĠĠĠ Ġval Ġtraining JobRequest Ġ= ĠDescribe Training JobRequest Ġ{ čĊĠĠĠĠĠĠĠĠĠĠĠ Ġtraining Job Name Ġ= Ġtraining Job Name Val čĊĠĠĠĠĠĠĠ Ġ} čĊčĊĠĠĠĠĠĠĠ Ġval Ġjob Response Ġ= Ġsage Maker Client . describe Training Job ( training JobRequest ) čĊĠĠĠĠĠĠĠ Ġprintln (" The Ġjob Ġstatus Ġis Ġ${ job Response . training JobStatus . toString () }") čĊčĊĠĠĠ Ġ} Ġcatch Ġ( e : ĠS age Maker Exception ) Ġ{ čĊĠĠĠĠĠĠĠ Ġprintln ( e . message ) čĊĠĠĠĠĠĠĠ Ġsage Maker Client . close () čĊĠĠĠĠĠĠĠ Ġexit Process ( 0 ) čĊĠĠĠ Ġ} č Ċ } č Ċ // snippet - end :[ sagemaker . kotlin . describe _ train _ job . main ]