1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919(* generated by: awso-codegen generate-all --botocore-data vendor/botocore/botocore/data -o aws --runtime-dir lib/runtime/awso --cli-dir awso-cli *)openAwsoopen!Import[@@@warning"-32"]letservice=Service.redshift_dataletapiVersion="2019-12-20"letendpointPrefix="redshift-data"letserviceFullName="Redshift Data API Service"letsignatureVersion="v4"letprotocol="json"letglobalEndpoint=endpointPrefix^".amazonaws.com"lettargetPrefix="RedshiftData"letsimple_to_jsonto_valuex=Botodata.Json.value_to_json_scalar(to_valuex)letcomposed_to_jsonto_valuex=Botodata.Json.value_to_json(to_valuex)letto_queryto_valuex=Client.Query.of_value(to_valuex)letstructure_to_value_auxst~f=letfilter=function|(k,Somev)->Some(k,v)|_->Noneinletpairkv=(k,v)inletdefer_value(k,dv)=pairkdvin((List.filter_mapst~f:filter)|>(List.map~f:defer_value))|>(funx->`Structure(fx))letstructure_to_value=structure_to_value_aux~f:Fn.idletstructure_to_wrapped_value~wrapper~response=structure_to_value_aux~f:(funx->[(wrapper,(`Structurex));(response,(`Structure[]))])moduleParameterName=structtypenonrect=stringletcontext_="ParameterName"letmakei=letopenResultinok_or_failwith(check_patterni~pattern:"[0-9a-zA-Z_]+");iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"ParameterName"jletto_json=simple_to_jsonto_valueendmoduleParameterValue=structtypenonrect=stringletcontext_="ParameterValue"letmakei=letopenResultinok_or_failwith(check_string_mini~min:1);iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"ParameterValue"jletto_json=simple_to_jsonto_valueendmoduleSqlParameter=structtypenonrect={name:ParameterName.t[@ocaml.doc"The name of the parameter."];value:ParameterValue.t[@ocaml.doc"The value of the parameter. Amazon Redshift implicitly converts to the proper data type. For more information, see Data types in the Amazon Redshift Database Developer Guide."]}letcontext_="SqlParameter"letmake~name=fun~value->fun()->{name;value}letto_valuex=structure_to_value[("name",(Some(ParameterName.to_valuex.name)));("value",(Some(ParameterValue.to_valuex.value)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letvalue=ParameterValue.of_xml(Xml.child_exn~context:context_xml_arg0"value")inletname=ParameterName.of_xml(Xml.child_exn~context:context_xml_arg0"name")inmake~value~name()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letvalue=field_map_exnjson__"value"ParameterValue.of_jsoninletname=field_map_exnjson__"name"ParameterName.of_jsoninmake~value~name()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"A parameter used in a SQL statement."]moduleStatementString=structtypenonrect=stringletcontext_="StatementString"letmakei=iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"StatementString"jletto_json=simple_to_jsonto_valueendmoduleBlob=structtypenonrect=stringletmakei=iletof_stringx=xletto_valuex=`Blobxletto_queryv=to_queryto_valuevletto_headerx=xletof_xmlxml_arg0=string_of_xml~kind:"a blob"xml_arg0letof_jsonj=string_of_json~kind:"a blob"jletto_json=simple_to_jsonto_valueendmoduleBoxedBoolean=structtypenonrect=boolletmakei=iletof_string=Bool.of_stringletto_valuex=`Booleanxletto_queryv=to_queryto_valuevletto_headerx=Bool.to_stringxletof_xmlxml_arg0=Bool.of_string(string_of_xml~kind:"a boolean"xml_arg0)letof_json=bool_of_jsonletto_json=simple_to_jsonto_valueendmoduleBoxedDouble=structtypenonrect=floatletmakei=iletof_string=Float.of_stringletto_valuex=`Doublexletto_queryv=to_queryto_valuevletto_headerx=Stdlib.Float.to_stringxletof_xmlxml_arg0=Float.of_string(string_of_xml~kind:"a double"xml_arg0)letof_jsonj=float_of_json~kind:"a double"jletto_json=simple_to_jsonto_valueendmoduleBoxedLong=structtypenonrect=Int64.tletmakei=iletof_string=Int64.of_stringletto_valuex=`Longxletto_queryv=to_queryto_valuevletto_headerx=Int64.to_stringxletof_xmlxml_arg0=Int64.of_string(string_of_xml~kind:"a long"xml_arg0)letof_jsonj=Int64.of_float(float_of_json~kind:"a long"j)letto_json=simple_to_jsonto_valueendmoduleString_=structtypenonrect=stringletcontext_="String"letmakei=iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"String"jletto_json=simple_to_jsonto_valueendmoduleBoolean=structtypenonrect=boolletmakei=iletof_string=Bool.of_stringletto_valuex=`Booleanxletto_queryv=to_queryto_valuevletto_headerx=Bool.to_stringxletof_xmlxml_arg0=Bool.of_string(string_of_xml~kind:"a boolean"xml_arg0)letof_json=bool_of_jsonletto_json=simple_to_jsonto_valueendmoduleResultFormatString=structtypenonrect=|JSON|CSV|Non_static_idofstringletmakei=iletto_string=function|JSON->"JSON"|CSV->"CSV"|Non_static_ids->sletof_string=function|"JSON"->JSON|"CSV"->CSV|x->Non_static_idxletto_valuex=`Enum(to_stringx)letto_queryv=to_queryto_valuevletto_headerx=to_stringxletof_xmlxml_arg0=of_string(string_of_xml~kind:"enumeration ResultFormatString"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"ResultFormatString"j)letto_json=simple_to_jsonto_valueendmoduleSecretArn=structtypenonrect=stringletcontext_="SecretArn"letmakei=iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"SecretArn"jletto_json=simple_to_jsonto_valueendmoduleSqlParametersList=structtypenonrect=SqlParameter.tlistletmakei=letopenResultinok_or_failwith(check_list_mini~min:1);iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:SqlParameter.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:SqlParameter.of_xml)letof_jsonj=list_of_json~kind:"SqlParametersList"~of_json:SqlParameter.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleStatementNameString=structtypenonrect=stringletcontext_="StatementNameString"letmakei=letopenResultinok_or_failwith((check_string_maxi~max:2048)>>=(fun()->check_string_mini~min:0));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"StatementNameString"jletto_json=simple_to_jsonto_valueendmoduleStatementStringList=structtypenonrect=StatementString.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:StatementString.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:StatementString.of_xml)letof_jsonj=list_of_json~kind:"StatementStringList"~of_json:StatementString.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleStatusString=structtypenonrect=|SUBMITTED|PICKED|STARTED|FINISHED|ABORTED|FAILED|ALL|Non_static_idofstringletmakei=iletto_string=function|SUBMITTED->"SUBMITTED"|PICKED->"PICKED"|STARTED->"STARTED"|FINISHED->"FINISHED"|ABORTED->"ABORTED"|FAILED->"FAILED"|ALL->"ALL"|Non_static_ids->sletof_string=function|"SUBMITTED"->SUBMITTED|"PICKED"->PICKED|"STARTED"->STARTED|"FINISHED"->FINISHED|"ABORTED"->ABORTED|"FAILED"->FAILED|"ALL"->ALL|x->Non_static_idxletto_valuex=`Enum(to_stringx)letto_queryv=to_queryto_valuevletto_headerx=to_stringxletof_xmlxml_arg0=of_string(string_of_xml~kind:"enumeration StatusString"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"StatusString"j)letto_json=simple_to_jsonto_valueendmoduleTimestamp=structtypenonrect=stringletmakei=iletof_stringx=xletto_valuex=`Timestampxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=string_of_xml~kind:"a timestamp"letof_json=timestamp_of_jsonletto_json=simple_to_jsonto_valueendmoduleUUID=structtypenonrect=stringletcontext_="UUID"letmakei=letopenResultinok_or_failwith(check_patterni~pattern:"[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}(:\\d{0,2})?");iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"UUID"jletto_json=simple_to_jsonto_valueendmoduleInteger=structtypenonrect=intletmakei=iletof_string=Int.of_stringletto_valuex=`Integerxletto_queryv=to_queryto_valuevletto_headerx=Int.to_stringxletof_xmlxml_arg0=Int.of_string(string_of_xml~kind:"an integer for Integer"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleBool_=structtypenonrect=boolletmakei=iletof_string=Bool.of_stringletto_valuex=`Booleanxletto_queryv=to_queryto_valuevletto_headerx=Bool.to_stringxletof_xmlxml_arg0=Bool.of_string(string_of_xml~kind:"a boolean"xml_arg0)letof_json=bool_of_jsonletto_json=simple_to_jsonto_valueendmoduleField=structtypenonrect={isNull:BoxedBoolean.toption[@ocaml.doc"A value that indicates whether the data is NULL."];booleanValue:BoxedBoolean.toption[@ocaml.doc"A value of the Boolean data type."];longValue:BoxedLong.toption[@ocaml.doc"A value of the long data type."];doubleValue:BoxedDouble.toption[@ocaml.doc"A value of the double data type."];stringValue:String_.toption[@ocaml.doc"A value of the string data type."];blobValue:Blob.toption[@ocaml.doc"A value of the BLOB data type."]}letmake?isNull=fun?booleanValue->fun?longValue->fun?doubleValue->fun?stringValue->fun?blobValue->fun()->{isNull;booleanValue;longValue;doubleValue;stringValue;blobValue}letto_valuex=structure_to_value[("isNull",(Option.mapx.isNull~f:BoxedBoolean.to_value));("booleanValue",(Option.mapx.booleanValue~f:BoxedBoolean.to_value));("longValue",(Option.mapx.longValue~f:BoxedLong.to_value));("doubleValue",(Option.mapx.doubleValue~f:BoxedDouble.to_value));("stringValue",(Option.mapx.stringValue~f:String_.to_value));("blobValue",(Option.mapx.blobValue~f:Blob.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letblobValue=(Option.map~f:Blob.of_xml)(Xml.childxml_arg0"blobValue")inletstringValue=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"stringValue")inletdoubleValue=(Option.map~f:BoxedDouble.of_xml)(Xml.childxml_arg0"doubleValue")inletlongValue=(Option.map~f:BoxedLong.of_xml)(Xml.childxml_arg0"longValue")inletbooleanValue=(Option.map~f:BoxedBoolean.of_xml)(Xml.childxml_arg0"booleanValue")inletisNull=(Option.map~f:BoxedBoolean.of_xml)(Xml.childxml_arg0"isNull")inmake?blobValue?stringValue?doubleValue?longValue?booleanValue?isNull()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letblobValue=field_mapjson__"blobValue"Blob.of_jsoninletstringValue=field_mapjson__"stringValue"String_.of_jsoninletdoubleValue=field_mapjson__"doubleValue"BoxedDouble.of_jsoninletlongValue=field_mapjson__"longValue"BoxedLong.of_jsoninletbooleanValue=field_mapjson__"booleanValue"BoxedBoolean.of_jsoninletisNull=field_mapjson__"isNull"BoxedBoolean.of_jsoninmake?blobValue?stringValue?doubleValue?longValue?booleanValue?isNull()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"A data value in a column."]moduleLong=structtypenonrect=Int64.tletmakei=iletof_string=Int64.of_stringletto_valuex=`Longxletto_queryv=to_queryto_valuevletto_headerx=Int64.to_stringxletof_xmlxml_arg0=Int64.of_string(string_of_xml~kind:"a long"xml_arg0)letof_jsonj=Int64.of_float(float_of_json~kind:"a long"j)letto_json=simple_to_jsonto_valueendmoduleStatementStatusString=structtypenonrect=|SUBMITTED|PICKED|STARTED|FINISHED|ABORTED|FAILED|Non_static_idofstringletmakei=iletto_string=function|SUBMITTED->"SUBMITTED"|PICKED->"PICKED"|STARTED->"STARTED"|FINISHED->"FINISHED"|ABORTED->"ABORTED"|FAILED->"FAILED"|Non_static_ids->sletof_string=function|"SUBMITTED"->SUBMITTED|"PICKED"->PICKED|"STARTED"->STARTED|"FINISHED"->FINISHED|"ABORTED"->ABORTED|"FAILED"->FAILED|x->Non_static_idxletto_valuex=`Enum(to_stringx)letto_queryv=to_queryto_valuevletto_headerx=to_stringxletof_xmlxml_arg0=of_string(string_of_xml~kind:"enumeration StatementStatusString"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"StatementStatusString"j)letto_json=simple_to_jsonto_valueendmoduleTableMember=structtypenonrect={name:String_.toption[@ocaml.doc"The name of the table."];type_:String_.toption[@ocaml.doc"The type of the table. Possible values include TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and SYNONYM."];schema:String_.toption[@ocaml.doc"The schema containing the table."]}letmake?name=fun?type_->fun?schema->fun()->{name;type_;schema}letto_valuex=structure_to_value[("name",(Option.mapx.name~f:String_.to_value));("type",(Option.mapx.type_~f:String_.to_value));("schema",(Option.mapx.schema~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letschema=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"schema")inlettype_=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"type")inletname=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"name")inmake?schema?type_?name()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letschema=field_mapjson__"schema"String_.of_jsoninlettype_=field_mapjson__"type"String_.of_jsoninletname=field_mapjson__"name"String_.of_jsoninmake?schema?type_?name()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The properties of a table."]moduleStatementData=structtypenonrect={id:UUID.toption[@ocaml.doc"The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API."];queryString:StatementString.toption[@ocaml.doc"The SQL statement."];queryStrings:StatementStringList.toption[@ocaml.doc"One or more SQL statements. Each query string in the array corresponds to one of the queries in a batch query request."];secretArn:SecretArn.toption[@ocaml.doc"The name or Amazon Resource Name (ARN) of the secret that enables access to the database."];status:StatusString.toption[@ocaml.doc"The status of the SQL statement. An example is the that the SQL statement finished."];statementName:StatementNameString.toption[@ocaml.doc"The name of the SQL statement."];createdAt:Timestamp.toption[@ocaml.doc"The date and time (UTC) the statement was created."];updatedAt:Timestamp.toption[@ocaml.doc"The date and time (UTC) that the statement metadata was last updated."];queryParameters:SqlParametersList.toption[@ocaml.doc"The parameters used in a SQL statement."];isBatchStatement:Boolean.toption[@ocaml.doc"A value that indicates whether the statement is a batch query request."];resultFormat:ResultFormatString.toption[@ocaml.doc"The data format of the result of the SQL statement."];sessionId:UUID.toption[@ocaml.doc"The session identifier of the query."]}letmake?id=fun?queryString->fun?queryStrings->fun?secretArn->fun?status->fun?statementName->fun?createdAt->fun?updatedAt->fun?queryParameters->fun?isBatchStatement->fun?resultFormat->fun?sessionId->fun()->{id;queryString;queryStrings;secretArn;status;statementName;createdAt;updatedAt;queryParameters;isBatchStatement;resultFormat;sessionId}letto_valuex=structure_to_value[("Id",(Option.mapx.id~f:UUID.to_value));("QueryString",(Option.mapx.queryString~f:StatementString.to_value));("QueryStrings",(Option.mapx.queryStrings~f:StatementStringList.to_value));("SecretArn",(Option.mapx.secretArn~f:SecretArn.to_value));("Status",(Option.mapx.status~f:StatusString.to_value));("StatementName",(Option.mapx.statementName~f:StatementNameString.to_value));("CreatedAt",(Option.mapx.createdAt~f:Timestamp.to_value));("UpdatedAt",(Option.mapx.updatedAt~f:Timestamp.to_value));("QueryParameters",(Option.mapx.queryParameters~f:SqlParametersList.to_value));("IsBatchStatement",(Option.mapx.isBatchStatement~f:Boolean.to_value));("ResultFormat",(Option.mapx.resultFormat~f:ResultFormatString.to_value));("SessionId",(Option.mapx.sessionId~f:UUID.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letsessionId=(Option.map~f:UUID.of_xml)(Xml.childxml_arg0"SessionId")inletresultFormat=(Option.map~f:ResultFormatString.of_xml)(Xml.childxml_arg0"ResultFormat")inletisBatchStatement=(Option.map~f:Boolean.of_xml)(Xml.childxml_arg0"IsBatchStatement")inletqueryParameters=(Option.map~f:SqlParametersList.of_xml)(Xml.childxml_arg0"QueryParameters")inletupdatedAt=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"UpdatedAt")inletcreatedAt=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"CreatedAt")inletstatementName=(Option.map~f:StatementNameString.of_xml)(Xml.childxml_arg0"StatementName")inletstatus=(Option.map~f:StatusString.of_xml)(Xml.childxml_arg0"Status")inletsecretArn=(Option.map~f:SecretArn.of_xml)(Xml.childxml_arg0"SecretArn")inletqueryStrings=(Option.map~f:StatementStringList.of_xml)(Xml.childxml_arg0"QueryStrings")inletqueryString=(Option.map~f:StatementString.of_xml)(Xml.childxml_arg0"QueryString")inletid=(Option.map~f:UUID.of_xml)(Xml.childxml_arg0"Id")inmake?sessionId?resultFormat?isBatchStatement?queryParameters?updatedAt?createdAt?statementName?status?secretArn?queryStrings?queryString?id()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letsessionId=field_mapjson__"SessionId"UUID.of_jsoninletresultFormat=field_mapjson__"ResultFormat"ResultFormatString.of_jsoninletisBatchStatement=field_mapjson__"IsBatchStatement"Boolean.of_jsoninletqueryParameters=field_mapjson__"QueryParameters"SqlParametersList.of_jsoninletupdatedAt=field_mapjson__"UpdatedAt"Timestamp.of_jsoninletcreatedAt=field_mapjson__"CreatedAt"Timestamp.of_jsoninletstatementName=field_mapjson__"StatementName"StatementNameString.of_jsoninletstatus=field_mapjson__"Status"StatusString.of_jsoninletsecretArn=field_mapjson__"SecretArn"SecretArn.of_jsoninletqueryStrings=field_mapjson__"QueryStrings"StatementStringList.of_jsoninletqueryString=field_mapjson__"QueryString"StatementString.of_jsoninletid=field_mapjson__"Id"UUID.of_jsoninmake?sessionId?resultFormat?isBatchStatement?queryParameters?updatedAt?createdAt?statementName?status?secretArn?queryStrings?queryString?id()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The SQL statement to run."]moduleColumnMetadata=structtypenonrect={isCaseSensitive:Bool_.toption[@ocaml.doc"A value that indicates whether the column is case-sensitive."];isCurrency:Bool_.toption[@ocaml.doc"A value that indicates whether the column contains currency values."];isSigned:Bool_.toption[@ocaml.doc"A value that indicates whether an integer column is signed."];label:String_.toption[@ocaml.doc"The label for the column."];name:String_.toption[@ocaml.doc"The name of the column."];nullable:Integer.toption[@ocaml.doc"A value that indicates whether the column is nullable."];precision:Integer.toption[@ocaml.doc"The precision value of a decimal number column, or the column length for a non-numeric column."];scale:Integer.toption[@ocaml.doc"The scale value of a decimal number column."];schemaName:String_.toption[@ocaml.doc"The name of the schema that contains the table that includes the column."];tableName:String_.toption[@ocaml.doc"The name of the table that includes the column."];typeName:String_.toption[@ocaml.doc"The database-specific data type of the column."];length:Integer.toption[@ocaml.doc"The length of the column."];columnDefault:String_.toption[@ocaml.doc"The default value of the column."]}letmake?isCaseSensitive=fun?isCurrency->fun?isSigned->fun?label->fun?name->fun?nullable->fun?precision->fun?scale->fun?schemaName->fun?tableName->fun?typeName->fun?length->fun?columnDefault->fun()->{isCaseSensitive;isCurrency;isSigned;label;name;nullable;precision;scale;schemaName;tableName;typeName;length;columnDefault}letto_valuex=structure_to_value[("isCaseSensitive",(Option.mapx.isCaseSensitive~f:Bool_.to_value));("isCurrency",(Option.mapx.isCurrency~f:Bool_.to_value));("isSigned",(Option.mapx.isSigned~f:Bool_.to_value));("label",(Option.mapx.label~f:String_.to_value));("name",(Option.mapx.name~f:String_.to_value));("nullable",(Option.mapx.nullable~f:Integer.to_value));("precision",(Option.mapx.precision~f:Integer.to_value));("scale",(Option.mapx.scale~f:Integer.to_value));("schemaName",(Option.mapx.schemaName~f:String_.to_value));("tableName",(Option.mapx.tableName~f:String_.to_value));("typeName",(Option.mapx.typeName~f:String_.to_value));("length",(Option.mapx.length~f:Integer.to_value));("columnDefault",(Option.mapx.columnDefault~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcolumnDefault=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"columnDefault")inletlength=(Option.map~f:Integer.of_xml)(Xml.childxml_arg0"length")inlettypeName=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"typeName")inlettableName=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"tableName")inletschemaName=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"schemaName")inletscale=(Option.map~f:Integer.of_xml)(Xml.childxml_arg0"scale")inletprecision=(Option.map~f:Integer.of_xml)(Xml.childxml_arg0"precision")inletnullable=(Option.map~f:Integer.of_xml)(Xml.childxml_arg0"nullable")inletname=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"name")inletlabel=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"label")inletisSigned=(Option.map~f:Bool_.of_xml)(Xml.childxml_arg0"isSigned")inletisCurrency=(Option.map~f:Bool_.of_xml)(Xml.childxml_arg0"isCurrency")inletisCaseSensitive=(Option.map~f:Bool_.of_xml)(Xml.childxml_arg0"isCaseSensitive")inmake?columnDefault?length?typeName?tableName?schemaName?scale?precision?nullable?name?label?isSigned?isCurrency?isCaseSensitive()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcolumnDefault=field_mapjson__"columnDefault"String_.of_jsoninletlength=field_mapjson__"length"Integer.of_jsoninlettypeName=field_mapjson__"typeName"String_.of_jsoninlettableName=field_mapjson__"tableName"String_.of_jsoninletschemaName=field_mapjson__"schemaName"String_.of_jsoninletscale=field_mapjson__"scale"Integer.of_jsoninletprecision=field_mapjson__"precision"Integer.of_jsoninletnullable=field_mapjson__"nullable"Integer.of_jsoninletname=field_mapjson__"name"String_.of_jsoninletlabel=field_mapjson__"label"String_.of_jsoninletisSigned=field_mapjson__"isSigned"Bool_.of_jsoninletisCurrency=field_mapjson__"isCurrency"Bool_.of_jsoninletisCaseSensitive=field_mapjson__"isCaseSensitive"Bool_.of_jsoninmake?columnDefault?length?typeName?tableName?schemaName?scale?precision?nullable?name?label?isSigned?isCurrency?isCaseSensitive()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The properties (metadata) of a column."]moduleQueryRecords=structtypenonrect={cSVRecords:String_.toption[@ocaml.doc"The results of the SQL statement in CSV format."]}letmake?cSVRecords=fun()->{cSVRecords}letto_valuex=structure_to_value[("CSVRecords",(Option.mapx.cSVRecords~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcSVRecords=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"CSVRecords")inmake?cSVRecords()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcSVRecords=field_mapjson__"CSVRecords"String_.of_jsoninmake?cSVRecords()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The results of the SQL statement."]moduleFieldList=structtypenonrect=Field.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:Field.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:Field.of_xml)letof_jsonj=list_of_json~kind:"FieldList"~of_json:Field.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleSubStatementData=structtypenonrect={id:UUID.toption[@ocaml.doc"The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL statement of a batch query."];duration:Long.toption[@ocaml.doc"The amount of time in nanoseconds that the statement ran."];error:String_.toption[@ocaml.doc"The error message from the cluster if the SQL statement encountered an error while running."];status:StatementStatusString.toption[@ocaml.doc"The status of the SQL statement. An example is the that the SQL statement finished."];createdAt:Timestamp.toption[@ocaml.doc"The date and time (UTC) the statement was created."];updatedAt:Timestamp.toption[@ocaml.doc"The date and time (UTC) that the statement metadata was last updated."];queryString:StatementString.toption[@ocaml.doc"The SQL statement text."];resultRows:Long.toption[@ocaml.doc"Either the number of rows returned from the SQL statement or the number of rows affected. If result size is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and others. A -1 indicates the value is null."];resultSize:Long.toption[@ocaml.doc"The size in bytes of the returned results. A -1 indicates the value is null."];redshiftQueryId:Long.toption[@ocaml.doc"The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API."];hasResultSet:Boolean.toption[@ocaml.doc"A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set."]}letmake?id=fun?duration->fun?error->fun?status->fun?createdAt->fun?updatedAt->fun?queryString->fun?resultRows->fun?resultSize->fun?redshiftQueryId->fun?hasResultSet->fun()->{id;duration;error;status;createdAt;updatedAt;queryString;resultRows;resultSize;redshiftQueryId;hasResultSet}letto_valuex=structure_to_value[("Id",(Option.mapx.id~f:UUID.to_value));("Duration",(Option.mapx.duration~f:Long.to_value));("Error",(Option.mapx.error~f:String_.to_value));("Status",(Option.mapx.status~f:StatementStatusString.to_value));("CreatedAt",(Option.mapx.createdAt~f:Timestamp.to_value));("UpdatedAt",(Option.mapx.updatedAt~f:Timestamp.to_value));("QueryString",(Option.mapx.queryString~f:StatementString.to_value));("ResultRows",(Option.mapx.resultRows~f:Long.to_value));("ResultSize",(Option.mapx.resultSize~f:Long.to_value));("RedshiftQueryId",(Option.mapx.redshiftQueryId~f:Long.to_value));("HasResultSet",(Option.mapx.hasResultSet~f:Boolean.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=lethasResultSet=(Option.map~f:Boolean.of_xml)(Xml.childxml_arg0"HasResultSet")inletredshiftQueryId=(Option.map~f:Long.of_xml)(Xml.childxml_arg0"RedshiftQueryId")inletresultSize=(Option.map~f:Long.of_xml)(Xml.childxml_arg0"ResultSize")inletresultRows=(Option.map~f:Long.of_xml)(Xml.childxml_arg0"ResultRows")inletqueryString=(Option.map~f:StatementString.of_xml)(Xml.childxml_arg0"QueryString")inletupdatedAt=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"UpdatedAt")inletcreatedAt=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"CreatedAt")inletstatus=(Option.map~f:StatementStatusString.of_xml)(Xml.childxml_arg0"Status")inleterror=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Error")inletduration=(Option.map~f:Long.of_xml)(Xml.childxml_arg0"Duration")inletid=(Option.map~f:UUID.of_xml)(Xml.childxml_arg0"Id")inmake?hasResultSet?redshiftQueryId?resultSize?resultRows?queryString?updatedAt?createdAt?status?error?duration?id()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=lethasResultSet=field_mapjson__"HasResultSet"Boolean.of_jsoninletredshiftQueryId=field_mapjson__"RedshiftQueryId"Long.of_jsoninletresultSize=field_mapjson__"ResultSize"Long.of_jsoninletresultRows=field_mapjson__"ResultRows"Long.of_jsoninletqueryString=field_mapjson__"QueryString"StatementString.of_jsoninletupdatedAt=field_mapjson__"UpdatedAt"Timestamp.of_jsoninletcreatedAt=field_mapjson__"CreatedAt"Timestamp.of_jsoninletstatus=field_mapjson__"Status"StatementStatusString.of_jsoninleterror=field_mapjson__"Error"String_.of_jsoninletduration=field_mapjson__"Duration"Long.of_jsoninletid=field_mapjson__"Id"UUID.of_jsoninmake?hasResultSet?redshiftQueryId?resultSize?resultRows?queryString?updatedAt?createdAt?status?error?duration?id()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Information about an SQL statement."]moduleDatabaseConnectionException=structtypenonrect={message:String_.toption}letmake?message=fun()->{message}letto_valuex=structure_to_value[("Message",(Option.mapx.message~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"String_.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Connection to a database failed."]moduleInternalServerException=structtypenonrect={message:String_.toption[@ocaml.doc"The exception message."]}letmake?message=fun()->{message}letto_valuex=structure_to_value[("Message",(Option.mapx.message~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"String_.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The Amazon Redshift Data API operation failed due to invalid input."]moduleQueryTimeoutException=structtypenonrect={message:String_.toption}letmake?message=fun()->{message}letto_valuex=structure_to_value[("Message",(Option.mapx.message~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"String_.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The Amazon Redshift Data API operation failed due to timeout."]moduleResourceNotFoundException=structtypenonrect={message:String_.toption[@ocaml.doc"The exception message."];resourceId:String_.toption[@ocaml.doc"Resource identifier associated with the exception."]}letmake?message=fun?resourceId->fun()->{message;resourceId}letto_valuex=structure_to_value[("Message",(Option.mapx.message~f:String_.to_value));("ResourceId",(Option.mapx.resourceId~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letresourceId=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"ResourceId")inletmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Message")inmake?resourceId?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letresourceId=field_mapjson__"ResourceId"String_.of_jsoninletmessage=field_mapjson__"Message"String_.of_jsoninmake?resourceId?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The Amazon Redshift Data API operation failed due to a missing resource."]moduleTableList=structtypenonrect=TableMember.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:TableMember.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:TableMember.of_xml)letof_jsonj=list_of_json~kind:"TableList"~of_json:TableMember.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleValidationException=structtypenonrect={message:String_.toption[@ocaml.doc"The exception message."]}letmake?message=fun()->{message}letto_valuex=structure_to_value[("Message",(Option.mapx.message~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"String_.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The Amazon Redshift Data API operation failed due to invalid input."]moduleClusterIdentifierString=structtypenonrect=stringletcontext_="ClusterIdentifierString"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:63)>>=(fun()->check_patterni~pattern:"[a-z][a-z0-9]*(-[a-z0-9]+)*")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"ClusterIdentifierString"jletto_json=simple_to_jsonto_valueendmodulePageSize=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:1000)>>=(fun()->check_int_mini~min:0));iletof_string=Int.of_stringletto_valuex=`Integerxletto_queryv=to_queryto_valuevletto_headerx=Int.to_stringxletof_xmlxml_arg0=Int.of_string(string_of_xml~kind:"an integer for PageSize"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleWorkgroupNameString=structtypenonrect=stringletcontext_="WorkgroupNameString"letmakei=letopenResultinok_or_failwith((check_string_mini~min:3)>>=(fun()->(check_string_maxi~max:128)>>=(fun()->check_patterni~pattern:".*((^[a-z0-9-]{3,63}$)|^(arn:(aws(-[a-z]+)*):redshift-serverless:[a-z]{2}(-gov|(-iso[a-z]?))?-[a-z]+-\\d{1}:\\d{12}:workgroup/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}))")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"WorkgroupNameString"jletto_json=simple_to_jsonto_valueendmoduleStatementList=structtypenonrect=StatementData.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:StatementData.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:StatementData.of_xml)letof_jsonj=list_of_json~kind:"StatementList"~of_json:StatementData.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleListStatementsLimit=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:100)>>=(fun()->check_int_mini~min:0));iletof_string=Int.of_stringletto_valuex=`Integerxletto_queryv=to_queryto_valuevletto_headerx=Int.to_stringxletof_xmlxml_arg0=Int.of_string(string_of_xml~kind:"an integer for ListStatementsLimit"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleSchemaList=structtypenonrect=String_.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:String_.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:String_.of_xml)letof_jsonj=list_of_json~kind:"SchemaList"~of_json:String_.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleDatabaseList=structtypenonrect=String_.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:String_.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:String_.of_xml)letof_jsonj=list_of_json~kind:"DatabaseList"~of_json:String_.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleColumnMetadataList=structtypenonrect=ColumnMetadata.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:ColumnMetadata.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:ColumnMetadata.of_xml)letof_jsonj=list_of_json~kind:"ColumnMetadataList"~of_json:ColumnMetadata.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleFormattedSqlRecords=structtypenonrect=QueryRecords.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:QueryRecords.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:QueryRecords.of_xml)letof_jsonj=list_of_json~kind:"FormattedSqlRecords"~of_json:QueryRecords.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleSqlRecords=structtypenonrect=FieldList.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:FieldList.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:FieldList.of_xml)letof_jsonj=list_of_json~kind:"SqlRecords"~of_json:FieldList.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleActiveSessionsExceededException=structtypenonrect={message:String_.toption}letmake?message=fun()->{message}letto_valuex=structure_to_value[("Message",(Option.mapx.message~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"String_.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The Amazon Redshift Data API operation failed because the maximum number of active sessions exceeded."]moduleActiveStatementsExceededException=structtypenonrect={message:String_.toption}letmake?message=fun()->{message}letto_valuex=structure_to_value[("Message",(Option.mapx.message~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"String_.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The number of active statements exceeds the limit."]moduleDbGroupList=structtypenonrect=String_.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:String_.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:String_.of_xml)letof_jsonj=list_of_json~kind:"DbGroupList"~of_json:String_.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleExecuteStatementException=structtypenonrect={message:String_.toption[@ocaml.doc"The exception message."];statementId:String_.toption[@ocaml.doc"Statement identifier of the exception."]}letmake?message=fun?statementId->fun()->{message;statementId}letto_valuex=structure_to_value[("Message",(Option.mapx.message~f:String_.to_value));("StatementId",(Option.mapx.statementId~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letstatementId=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"StatementId")inletmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Message")inmake?statementId?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letstatementId=field_mapjson__"StatementId"String_.of_jsoninletmessage=field_mapjson__"Message"String_.of_jsoninmake?statementId?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The SQL statement encountered an environmental error while running."]moduleClientToken=structtypenonrect=stringletcontext_="ClientToken"letmakei=letopenResultinok_or_failwith((check_string_maxi~max:64)>>=(fun()->check_string_mini~min:1));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"ClientToken"jletto_json=simple_to_jsonto_valueendmoduleSessionAliveSeconds=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:86400)>>=(fun()->check_int_mini~min:0));iletof_string=Int.of_stringletto_valuex=`Integerxletto_queryv=to_queryto_valuevletto_headerx=Int.to_stringxletof_xmlxml_arg0=Int.of_string(string_of_xml~kind:"an integer for SessionAliveSeconds"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleColumnList=structtypenonrect=ColumnMetadata.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:ColumnMetadata.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:ColumnMetadata.of_xml)letof_jsonj=list_of_json~kind:"ColumnList"~of_json:ColumnMetadata.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleSubStatementList=structtypenonrect=SubStatementData.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:SubStatementData.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:SubStatementData.of_xml)letof_jsonj=list_of_json~kind:"SubStatementList"~of_json:SubStatementData.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleBatchExecuteStatementException=structtypenonrect={message:String_.toption;statementId:String_.toption[@ocaml.doc"Statement identifier of the exception."]}letmake?message=fun?statementId->fun()->{message;statementId}letto_valuex=structure_to_value[("Message",(Option.mapx.message~f:String_.to_value));("StatementId",(Option.mapx.statementId~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letstatementId=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"StatementId")inletmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Message")inmake?statementId?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letstatementId=field_mapjson__"StatementId"String_.of_jsoninletmessage=field_mapjson__"Message"String_.of_jsoninmake?statementId?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"An SQL statement encountered an environmental error while running."]moduleSqlList=structtypenonrect=StatementString.tlistletmakei=letopenResultinok_or_failwith((check_list_maxi~max:40)>>=(fun()->check_list_mini~min:1));iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:StatementString.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:StatementString.of_xml)letof_jsonj=list_of_json~kind:"SqlList"~of_json:StatementString.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleListTablesResponse=structtypenonrect={tables:TableList.toption[@ocaml.doc"The tables that match the request pattern."];nextToken:String_.toption[@ocaml.doc"A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request."]}typenonrecerror=[`DatabaseConnectionExceptionofDatabaseConnectionException.t|`InternalServerExceptionofInternalServerException.t|`QueryTimeoutExceptionofQueryTimeoutException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?tables=fun?nextToken->fun()->{tables;nextToken}leterror_of_jsonnamejson=matchnamewith|"DatabaseConnectionException"->`DatabaseConnectionException(DatabaseConnectionException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"QueryTimeoutException"->`QueryTimeoutException(QueryTimeoutException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"DatabaseConnectionException"->`DatabaseConnectionException(DatabaseConnectionException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"QueryTimeoutException"->`QueryTimeoutException(QueryTimeoutException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`DatabaseConnectionExceptione->`Assoc[("error",(`String"DatabaseConnectionException"));("details",(DatabaseConnectionException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`QueryTimeoutExceptione->`Assoc[("error",(`String"QueryTimeoutException"));("details",(QueryTimeoutException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("Tables",(Option.mapx.tables~f:TableList.to_value));("NextToken",(Option.mapx.nextToken~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letnextToken=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"NextToken")inlettables=(Option.map~f:TableList.of_xml)(Xml.childxml_arg0"Tables")inmake?nextToken?tables()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"NextToken"String_.of_jsoninlettables=field_mapjson__"Tables"TableList.of_jsoninmake?nextToken?tables()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"List the tables in a database. If neither SchemaPattern nor TablePattern are specified, then all tables in the database are returned. A token is returned to page through the table list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - when connecting to a cluster, provide the secret-arn of a secret stored in Secrets Manager which has username and password. The specified secret contains credentials to connect to the database you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name. Temporary credentials - when connecting to your data warehouse, choose one of the following options: When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials operation is required. When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift:GetClusterCredentialsWithIAM operation is required. When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials operation is required. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleListTablesRequest=structtypenonrect={clusterIdentifier:ClusterIdentifierString.toption[@ocaml.doc"The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials."];secretArn:SecretArn.toption[@ocaml.doc"The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager."];dbUser:String_.toption[@ocaml.doc"The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials."];database:String_.t[@ocaml.doc"The name of the database that contains the tables to list. If ConnectedDatabase is not specified, this is also the database to connect to with your authentication credentials."];connectedDatabase:String_.toption[@ocaml.doc"A database name. The connected database is specified when you connect with your authentication credentials."];schemaPattern:String_.toption[@ocaml.doc"A pattern to filter results by schema name. Within a schema pattern, \"%\" means match any substring of 0 or more characters and \"_\" means match any one character. Only schema name entries matching the search pattern are returned. If SchemaPattern is not specified, then all tables that match TablePattern are returned. If neither SchemaPattern or TablePattern are specified, then all tables are returned."];tablePattern:String_.toption[@ocaml.doc"A pattern to filter results by table name. Within a table pattern, \"%\" means match any substring of 0 or more characters and \"_\" means match any one character. Only table name entries matching the search pattern are returned. If TablePattern is not specified, then all tables that match SchemaPatternare returned. If neither SchemaPattern or TablePattern are specified, then all tables are returned."];nextToken:String_.toption[@ocaml.doc"A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request."];maxResults:PageSize.toption[@ocaml.doc"The maximum number of tables to return in the response. If more tables exist than fit in one response, then NextToken is returned to page through the results."];workgroupName:WorkgroupNameString.toption[@ocaml.doc"The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials."]}letcontext_="ListTablesRequest"letmake?clusterIdentifier=fun?secretArn->fun?dbUser->fun?connectedDatabase->fun?schemaPattern->fun?tablePattern->fun?nextToken->fun?maxResults->fun?workgroupName->fun~database->fun()->{clusterIdentifier;secretArn;dbUser;connectedDatabase;schemaPattern;tablePattern;nextToken;maxResults;workgroupName;database}letto_valuex=structure_to_value[("ClusterIdentifier",(Option.mapx.clusterIdentifier~f:ClusterIdentifierString.to_value));("SecretArn",(Option.mapx.secretArn~f:SecretArn.to_value));("DbUser",(Option.mapx.dbUser~f:String_.to_value));("Database",(Some(String_.to_valuex.database)));("ConnectedDatabase",(Option.mapx.connectedDatabase~f:String_.to_value));("SchemaPattern",(Option.mapx.schemaPattern~f:String_.to_value));("TablePattern",(Option.mapx.tablePattern~f:String_.to_value));("NextToken",(Option.mapx.nextToken~f:String_.to_value));("MaxResults",(Option.mapx.maxResults~f:PageSize.to_value));("WorkgroupName",(Option.mapx.workgroupName~f:WorkgroupNameString.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letworkgroupName=(Option.map~f:WorkgroupNameString.of_xml)(Xml.childxml_arg0"WorkgroupName")inletmaxResults=(Option.map~f:PageSize.of_xml)(Xml.childxml_arg0"MaxResults")inletnextToken=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"NextToken")inlettablePattern=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"TablePattern")inletschemaPattern=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"SchemaPattern")inletconnectedDatabase=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"ConnectedDatabase")inletdatabase=String_.of_xml(Xml.child_exn~context:context_xml_arg0"Database")inletdbUser=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"DbUser")inletsecretArn=(Option.map~f:SecretArn.of_xml)(Xml.childxml_arg0"SecretArn")inletclusterIdentifier=(Option.map~f:ClusterIdentifierString.of_xml)(Xml.childxml_arg0"ClusterIdentifier")inmake?workgroupName?maxResults?nextToken?tablePattern?schemaPattern?connectedDatabase~database?dbUser?secretArn?clusterIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letworkgroupName=field_mapjson__"WorkgroupName"WorkgroupNameString.of_jsoninletmaxResults=field_mapjson__"MaxResults"PageSize.of_jsoninletnextToken=field_mapjson__"NextToken"String_.of_jsoninlettablePattern=field_mapjson__"TablePattern"String_.of_jsoninletschemaPattern=field_mapjson__"SchemaPattern"String_.of_jsoninletconnectedDatabase=field_mapjson__"ConnectedDatabase"String_.of_jsoninletdatabase=field_map_exnjson__"Database"String_.of_jsoninletdbUser=field_mapjson__"DbUser"String_.of_jsoninletsecretArn=field_mapjson__"SecretArn"SecretArn.of_jsoninletclusterIdentifier=field_mapjson__"ClusterIdentifier"ClusterIdentifierString.of_jsoninmake?workgroupName?maxResults?nextToken?tablePattern?schemaPattern?connectedDatabase~database?dbUser?secretArn?clusterIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"List the tables in a database. If neither SchemaPattern nor TablePattern are specified, then all tables in the database are returned. A token is returned to page through the table list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - when connecting to a cluster, provide the secret-arn of a secret stored in Secrets Manager which has username and password. The specified secret contains credentials to connect to the database you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name. Temporary credentials - when connecting to your data warehouse, choose one of the following options: When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials operation is required. When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift:GetClusterCredentialsWithIAM operation is required. When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials operation is required. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleListStatementsResponse=structtypenonrect={statements:StatementList.toption[@ocaml.doc"The SQL statements."];nextToken:String_.toption[@ocaml.doc"A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request."]}typenonrecerror=[`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?statements=fun?nextToken->fun()->{statements;nextToken}leterror_of_jsonnamejson=matchnamewith|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("Statements",(Option.mapx.statements~f:StatementList.to_value));("NextToken",(Option.mapx.nextToken~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letnextToken=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"NextToken")inletstatements=(Option.map~f:StatementList.of_xml)(Xml.childxml_arg0"Statements")inmake?nextToken?statements()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"NextToken"String_.of_jsoninletstatements=field_mapjson__"Statements"StatementList.of_jsoninmake?nextToken?statements()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"List of SQL statements. By default, only finished statements are shown. A token is returned to page through the statement list. When you use identity-enhanced role sessions to list statements, you must provide either the cluster-identifier or workgroup-name parameter. This ensures that the IdC user can only access the Amazon Redshift IdC applications they are assigned. For more information, see Trusted identity propagation overview. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleListStatementsRequest=structtypenonrect={nextToken:String_.toption[@ocaml.doc"A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request."];maxResults:ListStatementsLimit.toption[@ocaml.doc"The maximum number of SQL statements to return in the response. If more SQL statements exist than fit in one response, then NextToken is returned to page through the results."];statementName:StatementNameString.toption[@ocaml.doc"The name of the SQL statement specified as input to BatchExecuteStatement or ExecuteStatement to identify the query. You can list multiple statements by providing a prefix that matches the beginning of the statement name. For example, to list myStatement1, myStatement2, myStatement3, and so on, then provide the a value of myStatement. Data API does a case-sensitive match of SQL statement names to the prefix value you provide."];status:StatusString.toption[@ocaml.doc"The status of the SQL statement to list. Status values are defined as follows: ABORTED - The query run was stopped by the user. ALL - A status value that includes all query statuses. This value can be used to filter results. FAILED - The query run failed. FINISHED - The query has finished running. PICKED - The query has been chosen to be run. STARTED - The query run has started. SUBMITTED - The query was submitted, but not yet processed."];roleLevel:Boolean.toption[@ocaml.doc"A value that filters which statements to return in the response. If true, all statements run by the caller's IAM role are returned. If false, only statements run by the caller's IAM role in the current IAM session are returned. The default is true."];database:String_.toption[@ocaml.doc"The name of the database when listing statements run against a ClusterIdentifier or WorkgroupName."];clusterIdentifier:ClusterIdentifierString.toption[@ocaml.doc"The cluster identifier. Only statements that ran on this cluster are returned. When providing ClusterIdentifier, then WorkgroupName can't be specified."];workgroupName:WorkgroupNameString.toption[@ocaml.doc"The serverless workgroup name or Amazon Resource Name (ARN). Only statements that ran on this workgroup are returned. When providing WorkgroupName, then ClusterIdentifier can't be specified."]}letmake?nextToken=fun?maxResults->fun?statementName->fun?status->fun?roleLevel->fun?database->fun?clusterIdentifier->fun?workgroupName->fun()->{nextToken;maxResults;statementName;status;roleLevel;database;clusterIdentifier;workgroupName}letto_valuex=structure_to_value[("NextToken",(Option.mapx.nextToken~f:String_.to_value));("MaxResults",(Option.mapx.maxResults~f:ListStatementsLimit.to_value));("StatementName",(Option.mapx.statementName~f:StatementNameString.to_value));("Status",(Option.mapx.status~f:StatusString.to_value));("RoleLevel",(Option.mapx.roleLevel~f:Boolean.to_value));("Database",(Option.mapx.database~f:String_.to_value));("ClusterIdentifier",(Option.mapx.clusterIdentifier~f:ClusterIdentifierString.to_value));("WorkgroupName",(Option.mapx.workgroupName~f:WorkgroupNameString.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letworkgroupName=(Option.map~f:WorkgroupNameString.of_xml)(Xml.childxml_arg0"WorkgroupName")inletclusterIdentifier=(Option.map~f:ClusterIdentifierString.of_xml)(Xml.childxml_arg0"ClusterIdentifier")inletdatabase=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Database")inletroleLevel=(Option.map~f:Boolean.of_xml)(Xml.childxml_arg0"RoleLevel")inletstatus=(Option.map~f:StatusString.of_xml)(Xml.childxml_arg0"Status")inletstatementName=(Option.map~f:StatementNameString.of_xml)(Xml.childxml_arg0"StatementName")inletmaxResults=(Option.map~f:ListStatementsLimit.of_xml)(Xml.childxml_arg0"MaxResults")inletnextToken=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"NextToken")inmake?workgroupName?clusterIdentifier?database?roleLevel?status?statementName?maxResults?nextToken()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letworkgroupName=field_mapjson__"WorkgroupName"WorkgroupNameString.of_jsoninletclusterIdentifier=field_mapjson__"ClusterIdentifier"ClusterIdentifierString.of_jsoninletdatabase=field_mapjson__"Database"String_.of_jsoninletroleLevel=field_mapjson__"RoleLevel"Boolean.of_jsoninletstatus=field_mapjson__"Status"StatusString.of_jsoninletstatementName=field_mapjson__"StatementName"StatementNameString.of_jsoninletmaxResults=field_mapjson__"MaxResults"ListStatementsLimit.of_jsoninletnextToken=field_mapjson__"NextToken"String_.of_jsoninmake?workgroupName?clusterIdentifier?database?roleLevel?status?statementName?maxResults?nextToken()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"List of SQL statements. By default, only finished statements are shown. A token is returned to page through the statement list. When you use identity-enhanced role sessions to list statements, you must provide either the cluster-identifier or workgroup-name parameter. This ensures that the IdC user can only access the Amazon Redshift IdC applications they are assigned. For more information, see Trusted identity propagation overview. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleListSchemasResponse=structtypenonrect={schemas:SchemaList.toption[@ocaml.doc"The schemas that match the request pattern."];nextToken:String_.toption[@ocaml.doc"A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request."]}typenonrecerror=[`DatabaseConnectionExceptionofDatabaseConnectionException.t|`InternalServerExceptionofInternalServerException.t|`QueryTimeoutExceptionofQueryTimeoutException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?schemas=fun?nextToken->fun()->{schemas;nextToken}leterror_of_jsonnamejson=matchnamewith|"DatabaseConnectionException"->`DatabaseConnectionException(DatabaseConnectionException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"QueryTimeoutException"->`QueryTimeoutException(QueryTimeoutException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"DatabaseConnectionException"->`DatabaseConnectionException(DatabaseConnectionException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"QueryTimeoutException"->`QueryTimeoutException(QueryTimeoutException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`DatabaseConnectionExceptione->`Assoc[("error",(`String"DatabaseConnectionException"));("details",(DatabaseConnectionException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`QueryTimeoutExceptione->`Assoc[("error",(`String"QueryTimeoutException"));("details",(QueryTimeoutException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("Schemas",(Option.mapx.schemas~f:SchemaList.to_value));("NextToken",(Option.mapx.nextToken~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letnextToken=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"NextToken")inletschemas=(Option.map~f:SchemaList.of_xml)(Xml.childxml_arg0"Schemas")inmake?nextToken?schemas()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"NextToken"String_.of_jsoninletschemas=field_mapjson__"Schemas"SchemaList.of_jsoninmake?nextToken?schemas()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Lists the schemas in a database. A token is returned to page through the schema list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - when connecting to a cluster, provide the secret-arn of a secret stored in Secrets Manager which has username and password. The specified secret contains credentials to connect to the database you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name. Temporary credentials - when connecting to your data warehouse, choose one of the following options: When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials operation is required. When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift:GetClusterCredentialsWithIAM operation is required. When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials operation is required. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleListSchemasRequest=structtypenonrect={clusterIdentifier:ClusterIdentifierString.toption[@ocaml.doc"The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials."];secretArn:SecretArn.toption[@ocaml.doc"The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager."];dbUser:String_.toption[@ocaml.doc"The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials."];database:String_.t[@ocaml.doc"The name of the database that contains the schemas to list. If ConnectedDatabase is not specified, this is also the database to connect to with your authentication credentials."];connectedDatabase:String_.toption[@ocaml.doc"A database name. The connected database is specified when you connect with your authentication credentials."];schemaPattern:String_.toption[@ocaml.doc"A pattern to filter results by schema name. Within a schema pattern, \"%\" means match any substring of 0 or more characters and \"_\" means match any one character. Only schema name entries matching the search pattern are returned."];nextToken:String_.toption[@ocaml.doc"A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request."];maxResults:PageSize.toption[@ocaml.doc"The maximum number of schemas to return in the response. If more schemas exist than fit in one response, then NextToken is returned to page through the results."];workgroupName:WorkgroupNameString.toption[@ocaml.doc"The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials."]}letcontext_="ListSchemasRequest"letmake?clusterIdentifier=fun?secretArn->fun?dbUser->fun?connectedDatabase->fun?schemaPattern->fun?nextToken->fun?maxResults->fun?workgroupName->fun~database->fun()->{clusterIdentifier;secretArn;dbUser;connectedDatabase;schemaPattern;nextToken;maxResults;workgroupName;database}letto_valuex=structure_to_value[("ClusterIdentifier",(Option.mapx.clusterIdentifier~f:ClusterIdentifierString.to_value));("SecretArn",(Option.mapx.secretArn~f:SecretArn.to_value));("DbUser",(Option.mapx.dbUser~f:String_.to_value));("Database",(Some(String_.to_valuex.database)));("ConnectedDatabase",(Option.mapx.connectedDatabase~f:String_.to_value));("SchemaPattern",(Option.mapx.schemaPattern~f:String_.to_value));("NextToken",(Option.mapx.nextToken~f:String_.to_value));("MaxResults",(Option.mapx.maxResults~f:PageSize.to_value));("WorkgroupName",(Option.mapx.workgroupName~f:WorkgroupNameString.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letworkgroupName=(Option.map~f:WorkgroupNameString.of_xml)(Xml.childxml_arg0"WorkgroupName")inletmaxResults=(Option.map~f:PageSize.of_xml)(Xml.childxml_arg0"MaxResults")inletnextToken=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"NextToken")inletschemaPattern=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"SchemaPattern")inletconnectedDatabase=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"ConnectedDatabase")inletdatabase=String_.of_xml(Xml.child_exn~context:context_xml_arg0"Database")inletdbUser=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"DbUser")inletsecretArn=(Option.map~f:SecretArn.of_xml)(Xml.childxml_arg0"SecretArn")inletclusterIdentifier=(Option.map~f:ClusterIdentifierString.of_xml)(Xml.childxml_arg0"ClusterIdentifier")inmake?workgroupName?maxResults?nextToken?schemaPattern?connectedDatabase~database?dbUser?secretArn?clusterIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letworkgroupName=field_mapjson__"WorkgroupName"WorkgroupNameString.of_jsoninletmaxResults=field_mapjson__"MaxResults"PageSize.of_jsoninletnextToken=field_mapjson__"NextToken"String_.of_jsoninletschemaPattern=field_mapjson__"SchemaPattern"String_.of_jsoninletconnectedDatabase=field_mapjson__"ConnectedDatabase"String_.of_jsoninletdatabase=field_map_exnjson__"Database"String_.of_jsoninletdbUser=field_mapjson__"DbUser"String_.of_jsoninletsecretArn=field_mapjson__"SecretArn"SecretArn.of_jsoninletclusterIdentifier=field_mapjson__"ClusterIdentifier"ClusterIdentifierString.of_jsoninmake?workgroupName?maxResults?nextToken?schemaPattern?connectedDatabase~database?dbUser?secretArn?clusterIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Lists the schemas in a database. A token is returned to page through the schema list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - when connecting to a cluster, provide the secret-arn of a secret stored in Secrets Manager which has username and password. The specified secret contains credentials to connect to the database you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name. Temporary credentials - when connecting to your data warehouse, choose one of the following options: When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials operation is required. When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift:GetClusterCredentialsWithIAM operation is required. When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials operation is required. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleListDatabasesResponse=structtypenonrect={databases:DatabaseList.toption[@ocaml.doc"The names of databases."];nextToken:String_.toption[@ocaml.doc"A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request."]}typenonrecerror=[`DatabaseConnectionExceptionofDatabaseConnectionException.t|`InternalServerExceptionofInternalServerException.t|`QueryTimeoutExceptionofQueryTimeoutException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?databases=fun?nextToken->fun()->{databases;nextToken}leterror_of_jsonnamejson=matchnamewith|"DatabaseConnectionException"->`DatabaseConnectionException(DatabaseConnectionException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"QueryTimeoutException"->`QueryTimeoutException(QueryTimeoutException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"DatabaseConnectionException"->`DatabaseConnectionException(DatabaseConnectionException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"QueryTimeoutException"->`QueryTimeoutException(QueryTimeoutException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`DatabaseConnectionExceptione->`Assoc[("error",(`String"DatabaseConnectionException"));("details",(DatabaseConnectionException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`QueryTimeoutExceptione->`Assoc[("error",(`String"QueryTimeoutException"));("details",(QueryTimeoutException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("Databases",(Option.mapx.databases~f:DatabaseList.to_value));("NextToken",(Option.mapx.nextToken~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letnextToken=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"NextToken")inletdatabases=(Option.map~f:DatabaseList.of_xml)(Xml.childxml_arg0"Databases")inmake?nextToken?databases()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"NextToken"String_.of_jsoninletdatabases=field_mapjson__"Databases"DatabaseList.of_jsoninmake?nextToken?databases()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"List the databases in a cluster. A token is returned to page through the database list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - when connecting to a cluster, provide the secret-arn of a secret stored in Secrets Manager which has username and password. The specified secret contains credentials to connect to the database you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name. Temporary credentials - when connecting to your data warehouse, choose one of the following options: When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials operation is required. When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift:GetClusterCredentialsWithIAM operation is required. When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials operation is required. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleListDatabasesRequest=structtypenonrect={clusterIdentifier:ClusterIdentifierString.toption[@ocaml.doc"The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials."];database:String_.t[@ocaml.doc"The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials."];secretArn:SecretArn.toption[@ocaml.doc"The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager."];dbUser:String_.toption[@ocaml.doc"The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials."];nextToken:String_.toption[@ocaml.doc"A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request."];maxResults:PageSize.toption[@ocaml.doc"The maximum number of databases to return in the response. If more databases exist than fit in one response, then NextToken is returned to page through the results."];workgroupName:WorkgroupNameString.toption[@ocaml.doc"The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials."]}letcontext_="ListDatabasesRequest"letmake?clusterIdentifier=fun?secretArn->fun?dbUser->fun?nextToken->fun?maxResults->fun?workgroupName->fun~database->fun()->{clusterIdentifier;secretArn;dbUser;nextToken;maxResults;workgroupName;database}letto_valuex=structure_to_value[("ClusterIdentifier",(Option.mapx.clusterIdentifier~f:ClusterIdentifierString.to_value));("Database",(Some(String_.to_valuex.database)));("SecretArn",(Option.mapx.secretArn~f:SecretArn.to_value));("DbUser",(Option.mapx.dbUser~f:String_.to_value));("NextToken",(Option.mapx.nextToken~f:String_.to_value));("MaxResults",(Option.mapx.maxResults~f:PageSize.to_value));("WorkgroupName",(Option.mapx.workgroupName~f:WorkgroupNameString.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letworkgroupName=(Option.map~f:WorkgroupNameString.of_xml)(Xml.childxml_arg0"WorkgroupName")inletmaxResults=(Option.map~f:PageSize.of_xml)(Xml.childxml_arg0"MaxResults")inletnextToken=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"NextToken")inletdbUser=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"DbUser")inletsecretArn=(Option.map~f:SecretArn.of_xml)(Xml.childxml_arg0"SecretArn")inletdatabase=String_.of_xml(Xml.child_exn~context:context_xml_arg0"Database")inletclusterIdentifier=(Option.map~f:ClusterIdentifierString.of_xml)(Xml.childxml_arg0"ClusterIdentifier")inmake?workgroupName?maxResults?nextToken?dbUser?secretArn~database?clusterIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letworkgroupName=field_mapjson__"WorkgroupName"WorkgroupNameString.of_jsoninletmaxResults=field_mapjson__"MaxResults"PageSize.of_jsoninletnextToken=field_mapjson__"NextToken"String_.of_jsoninletdbUser=field_mapjson__"DbUser"String_.of_jsoninletsecretArn=field_mapjson__"SecretArn"SecretArn.of_jsoninletdatabase=field_map_exnjson__"Database"String_.of_jsoninletclusterIdentifier=field_mapjson__"ClusterIdentifier"ClusterIdentifierString.of_jsoninmake?workgroupName?maxResults?nextToken?dbUser?secretArn~database?clusterIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"List the databases in a cluster. A token is returned to page through the database list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - when connecting to a cluster, provide the secret-arn of a secret stored in Secrets Manager which has username and password. The specified secret contains credentials to connect to the database you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name. Temporary credentials - when connecting to your data warehouse, choose one of the following options: When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials operation is required. When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift:GetClusterCredentialsWithIAM operation is required. When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials operation is required. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleGetStatementResultV2Response=structtypenonrect={records:FormattedSqlRecords.toption[@ocaml.doc"The results of the SQL statement in CSV format."];columnMetadata:ColumnMetadataList.toption[@ocaml.doc"The properties (metadata) of a column."];totalNumRows:Long.toption[@ocaml.doc"The total number of rows in the result set returned from a query. You can use this number to estimate the number of calls to the GetStatementResultV2 operation needed to page through the results."];resultFormat:ResultFormatString.toption[@ocaml.doc"The data format of the result of the SQL statement."];nextToken:String_.toption[@ocaml.doc"A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request."]}typenonrecerror=[`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?records=fun?columnMetadata->fun?totalNumRows->fun?resultFormat->fun?nextToken->fun()->{records;columnMetadata;totalNumRows;resultFormat;nextToken}leterror_of_jsonnamejson=matchnamewith|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("Records",(Option.mapx.records~f:FormattedSqlRecords.to_value));("ColumnMetadata",(Option.mapx.columnMetadata~f:ColumnMetadataList.to_value));("TotalNumRows",(Option.mapx.totalNumRows~f:Long.to_value));("ResultFormat",(Option.mapx.resultFormat~f:ResultFormatString.to_value));("NextToken",(Option.mapx.nextToken~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letnextToken=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"NextToken")inletresultFormat=(Option.map~f:ResultFormatString.of_xml)(Xml.childxml_arg0"ResultFormat")inlettotalNumRows=(Option.map~f:Long.of_xml)(Xml.childxml_arg0"TotalNumRows")inletcolumnMetadata=(Option.map~f:ColumnMetadataList.of_xml)(Xml.childxml_arg0"ColumnMetadata")inletrecords=(Option.map~f:FormattedSqlRecords.of_xml)(Xml.childxml_arg0"Records")inmake?nextToken?resultFormat?totalNumRows?columnMetadata?records()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"NextToken"String_.of_jsoninletresultFormat=field_mapjson__"ResultFormat"ResultFormatString.of_jsoninlettotalNumRows=field_mapjson__"TotalNumRows"Long.of_jsoninletcolumnMetadata=field_mapjson__"ColumnMetadata"ColumnMetadataList.of_jsoninletrecords=field_mapjson__"Records"FormattedSqlRecords.of_jsoninmake?nextToken?resultFormat?totalNumRows?columnMetadata?records()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Fetches the temporarily cached result of an SQL statement in CSV format. The ExecuteStatement or BatchExecuteStatement operation that ran the SQL statement must have specified ResultFormat as CSV. A token is returned to page through the statement results. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleGetStatementResultV2Request=structtypenonrect={id:UUID.t[@ocaml.doc"The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates then number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL statement of a batch query. This identifier is returned by BatchExecuteStatment, ExecuteStatment, and ListStatements."];nextToken:String_.toption[@ocaml.doc"A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request."]}letcontext_="GetStatementResultV2Request"letmake?nextToken=fun~id->fun()->{nextToken;id}letto_valuex=structure_to_value[("Id",(Some(UUID.to_valuex.id)));("NextToken",(Option.mapx.nextToken~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letnextToken=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"NextToken")inletid=UUID.of_xml(Xml.child_exn~context:context_xml_arg0"Id")inmake?nextToken~id()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"NextToken"String_.of_jsoninletid=field_map_exnjson__"Id"UUID.of_jsoninmake?nextToken~id()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Fetches the temporarily cached result of an SQL statement in CSV format. The ExecuteStatement or BatchExecuteStatement operation that ran the SQL statement must have specified ResultFormat as CSV. A token is returned to page through the statement results. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleGetStatementResultResponse=structtypenonrect={records:SqlRecords.toption[@ocaml.doc"The results of the SQL statement in JSON format."];columnMetadata:ColumnMetadataList.toption[@ocaml.doc"The properties (metadata) of a column."];totalNumRows:Long.toption[@ocaml.doc"The total number of rows in the result set returned from a query. You can use this number to estimate the number of calls to the GetStatementResult operation needed to page through the results."];nextToken:String_.toption[@ocaml.doc"A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request."]}typenonrecerror=[`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?records=fun?columnMetadata->fun?totalNumRows->fun?nextToken->fun()->{records;columnMetadata;totalNumRows;nextToken}leterror_of_jsonnamejson=matchnamewith|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("Records",(Option.mapx.records~f:SqlRecords.to_value));("ColumnMetadata",(Option.mapx.columnMetadata~f:ColumnMetadataList.to_value));("TotalNumRows",(Option.mapx.totalNumRows~f:Long.to_value));("NextToken",(Option.mapx.nextToken~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letnextToken=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"NextToken")inlettotalNumRows=(Option.map~f:Long.of_xml)(Xml.childxml_arg0"TotalNumRows")inletcolumnMetadata=(Option.map~f:ColumnMetadataList.of_xml)(Xml.childxml_arg0"ColumnMetadata")inletrecords=(Option.map~f:SqlRecords.of_xml)(Xml.childxml_arg0"Records")inmake?nextToken?totalNumRows?columnMetadata?records()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"NextToken"String_.of_jsoninlettotalNumRows=field_mapjson__"TotalNumRows"Long.of_jsoninletcolumnMetadata=field_mapjson__"ColumnMetadata"ColumnMetadataList.of_jsoninletrecords=field_mapjson__"Records"SqlRecords.of_jsoninmake?nextToken?totalNumRows?columnMetadata?records()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Fetches the temporarily cached result of an SQL statement in JSON format. The ExecuteStatement or BatchExecuteStatement operation that ran the SQL statement must have specified ResultFormat as JSON , or let the format default to JSON. A token is returned to page through the statement results. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleGetStatementResultRequest=structtypenonrect={id:UUID.t[@ocaml.doc"The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates then number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL statement of a batch query. This identifier is returned by BatchExecuteStatment, ExecuteStatment, and ListStatements."];nextToken:String_.toption[@ocaml.doc"A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request."]}letcontext_="GetStatementResultRequest"letmake?nextToken=fun~id->fun()->{nextToken;id}letto_valuex=structure_to_value[("Id",(Some(UUID.to_valuex.id)));("NextToken",(Option.mapx.nextToken~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letnextToken=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"NextToken")inletid=UUID.of_xml(Xml.child_exn~context:context_xml_arg0"Id")inmake?nextToken~id()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"NextToken"String_.of_jsoninletid=field_map_exnjson__"Id"UUID.of_jsoninmake?nextToken~id()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Fetches the temporarily cached result of an SQL statement in JSON format. The ExecuteStatement or BatchExecuteStatement operation that ran the SQL statement must have specified ResultFormat as JSON , or let the format default to JSON. A token is returned to page through the statement results. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleExecuteStatementOutput=structtypenonrect={id:UUID.toption[@ocaml.doc"The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API."];createdAt:Timestamp.toption[@ocaml.doc"The date and time (UTC) the statement was created."];clusterIdentifier:ClusterIdentifierString.toption[@ocaml.doc"The cluster identifier. This element is not returned when connecting to a serverless workgroup."];dbUser:String_.toption[@ocaml.doc"The database user name."];dbGroups:DbGroupList.toption[@ocaml.doc"A list of colon (:) separated names of database groups."];database:String_.toption[@ocaml.doc"The name of the database."];secretArn:SecretArn.toption[@ocaml.doc"The name or ARN of the secret that enables access to the database."];workgroupName:WorkgroupNameString.toption[@ocaml.doc"The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting to a provisioned cluster."];sessionId:UUID.toption[@ocaml.doc"The session identifier of the query."]}typenonrecerror=[`ActiveSessionsExceededExceptionofActiveSessionsExceededException.t|`ActiveStatementsExceededExceptionofActiveStatementsExceededException.t|`ExecuteStatementExceptionofExecuteStatementException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?id=fun?createdAt->fun?clusterIdentifier->fun?dbUser->fun?dbGroups->fun?database->fun?secretArn->fun?workgroupName->fun?sessionId->fun()->{id;createdAt;clusterIdentifier;dbUser;dbGroups;database;secretArn;workgroupName;sessionId}leterror_of_jsonnamejson=matchnamewith|"ActiveSessionsExceededException"->`ActiveSessionsExceededException(ActiveSessionsExceededException.of_jsonjson)|"ActiveStatementsExceededException"->`ActiveStatementsExceededException(ActiveStatementsExceededException.of_jsonjson)|"ExecuteStatementException"->`ExecuteStatementException(ExecuteStatementException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"ActiveSessionsExceededException"->`ActiveSessionsExceededException(ActiveSessionsExceededException.of_xmlxml)|"ActiveStatementsExceededException"->`ActiveStatementsExceededException(ActiveStatementsExceededException.of_xmlxml)|"ExecuteStatementException"->`ExecuteStatementException(ExecuteStatementException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`ActiveSessionsExceededExceptione->`Assoc[("error",(`String"ActiveSessionsExceededException"));("details",(ActiveSessionsExceededException.to_jsone))]|`ActiveStatementsExceededExceptione->`Assoc[("error",(`String"ActiveStatementsExceededException"));("details",(ActiveStatementsExceededException.to_jsone))]|`ExecuteStatementExceptione->`Assoc[("error",(`String"ExecuteStatementException"));("details",(ExecuteStatementException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("Id",(Option.mapx.id~f:UUID.to_value));("CreatedAt",(Option.mapx.createdAt~f:Timestamp.to_value));("ClusterIdentifier",(Option.mapx.clusterIdentifier~f:ClusterIdentifierString.to_value));("DbUser",(Option.mapx.dbUser~f:String_.to_value));("DbGroups",(Option.mapx.dbGroups~f:DbGroupList.to_value));("Database",(Option.mapx.database~f:String_.to_value));("SecretArn",(Option.mapx.secretArn~f:SecretArn.to_value));("WorkgroupName",(Option.mapx.workgroupName~f:WorkgroupNameString.to_value));("SessionId",(Option.mapx.sessionId~f:UUID.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letsessionId=(Option.map~f:UUID.of_xml)(Xml.childxml_arg0"SessionId")inletworkgroupName=(Option.map~f:WorkgroupNameString.of_xml)(Xml.childxml_arg0"WorkgroupName")inletsecretArn=(Option.map~f:SecretArn.of_xml)(Xml.childxml_arg0"SecretArn")inletdatabase=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Database")inletdbGroups=(Option.map~f:DbGroupList.of_xml)(Xml.childxml_arg0"DbGroups")inletdbUser=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"DbUser")inletclusterIdentifier=(Option.map~f:ClusterIdentifierString.of_xml)(Xml.childxml_arg0"ClusterIdentifier")inletcreatedAt=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"CreatedAt")inletid=(Option.map~f:UUID.of_xml)(Xml.childxml_arg0"Id")inmake?sessionId?workgroupName?secretArn?database?dbGroups?dbUser?clusterIdentifier?createdAt?id()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letsessionId=field_mapjson__"SessionId"UUID.of_jsoninletworkgroupName=field_mapjson__"WorkgroupName"WorkgroupNameString.of_jsoninletsecretArn=field_mapjson__"SecretArn"SecretArn.of_jsoninletdatabase=field_mapjson__"Database"String_.of_jsoninletdbGroups=field_mapjson__"DbGroups"DbGroupList.of_jsoninletdbUser=field_mapjson__"DbUser"String_.of_jsoninletclusterIdentifier=field_mapjson__"ClusterIdentifier"ClusterIdentifierString.of_jsoninletcreatedAt=field_mapjson__"CreatedAt"Timestamp.of_jsoninletid=field_mapjson__"Id"UUID.of_jsoninmake?sessionId?workgroupName?secretArn?database?dbGroups?dbUser?clusterIdentifier?createdAt?id()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL). This statement must be a single SQL statement. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - when connecting to a cluster, provide the secret-arn of a secret stored in Secrets Manager which has username and password. The specified secret contains credentials to connect to the database you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name. Temporary credentials - when connecting to your data warehouse, choose one of the following options: When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials operation is required. When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift:GetClusterCredentialsWithIAM operation is required. When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials operation is required. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleExecuteStatementInput=structtypenonrect={sql:StatementString.t[@ocaml.doc"The SQL statement text to run."];clusterIdentifier:ClusterIdentifierString.toption[@ocaml.doc"The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials."];secretArn:SecretArn.toption[@ocaml.doc"The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager."];dbUser:String_.toption[@ocaml.doc"The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials."];database:String_.toption[@ocaml.doc"The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials."];withEvent:Boolean.toption[@ocaml.doc"A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs."];statementName:StatementNameString.toption[@ocaml.doc"The name of the SQL statement. You can name the SQL statement when you create it to identify the query."];parameters:SqlParametersList.toption[@ocaml.doc"The parameters for the SQL statement."];workgroupName:WorkgroupNameString.toption[@ocaml.doc"The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials."];clientToken:ClientToken.toption[@ocaml.doc"A unique, case-sensitive identifier that you provide to ensure the idempotency of the request."];resultFormat:ResultFormatString.toption[@ocaml.doc"The data format of the result of the SQL statement. If no format is specified, the default is JSON."];sessionKeepAliveSeconds:SessionAliveSeconds.toption[@ocaml.doc"The number of seconds to keep the session alive after the query finishes. The maximum time a session can keep alive is 24 hours. After 24 hours, the session is forced closed and the query is terminated."];sessionId:UUID.toption[@ocaml.doc"The session identifier of the query."]}letcontext_="ExecuteStatementInput"letmake?clusterIdentifier=fun?secretArn->fun?dbUser->fun?database->fun?withEvent->fun?statementName->fun?parameters->fun?workgroupName->fun?clientToken->fun?resultFormat->fun?sessionKeepAliveSeconds->fun?sessionId->fun~sql->fun()->{clusterIdentifier;secretArn;dbUser;database;withEvent;statementName;parameters;workgroupName;clientToken;resultFormat;sessionKeepAliveSeconds;sessionId;sql}letto_valuex=structure_to_value[("Sql",(Some(StatementString.to_valuex.sql)));("ClusterIdentifier",(Option.mapx.clusterIdentifier~f:ClusterIdentifierString.to_value));("SecretArn",(Option.mapx.secretArn~f:SecretArn.to_value));("DbUser",(Option.mapx.dbUser~f:String_.to_value));("Database",(Option.mapx.database~f:String_.to_value));("WithEvent",(Option.mapx.withEvent~f:Boolean.to_value));("StatementName",(Option.mapx.statementName~f:StatementNameString.to_value));("Parameters",(Option.mapx.parameters~f:SqlParametersList.to_value));("WorkgroupName",(Option.mapx.workgroupName~f:WorkgroupNameString.to_value));("ClientToken",(Option.mapx.clientToken~f:ClientToken.to_value));("ResultFormat",(Option.mapx.resultFormat~f:ResultFormatString.to_value));("SessionKeepAliveSeconds",(Option.mapx.sessionKeepAliveSeconds~f:SessionAliveSeconds.to_value));("SessionId",(Option.mapx.sessionId~f:UUID.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letsessionId=(Option.map~f:UUID.of_xml)(Xml.childxml_arg0"SessionId")inletsessionKeepAliveSeconds=(Option.map~f:SessionAliveSeconds.of_xml)(Xml.childxml_arg0"SessionKeepAliveSeconds")inletresultFormat=(Option.map~f:ResultFormatString.of_xml)(Xml.childxml_arg0"ResultFormat")inletclientToken=(Option.map~f:ClientToken.of_xml)(Xml.childxml_arg0"ClientToken")inletworkgroupName=(Option.map~f:WorkgroupNameString.of_xml)(Xml.childxml_arg0"WorkgroupName")inletparameters=(Option.map~f:SqlParametersList.of_xml)(Xml.childxml_arg0"Parameters")inletstatementName=(Option.map~f:StatementNameString.of_xml)(Xml.childxml_arg0"StatementName")inletwithEvent=(Option.map~f:Boolean.of_xml)(Xml.childxml_arg0"WithEvent")inletdatabase=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Database")inletdbUser=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"DbUser")inletsecretArn=(Option.map~f:SecretArn.of_xml)(Xml.childxml_arg0"SecretArn")inletclusterIdentifier=(Option.map~f:ClusterIdentifierString.of_xml)(Xml.childxml_arg0"ClusterIdentifier")inletsql=StatementString.of_xml(Xml.child_exn~context:context_xml_arg0"Sql")inmake?sessionId?sessionKeepAliveSeconds?resultFormat?clientToken?workgroupName?parameters?statementName?withEvent?database?dbUser?secretArn?clusterIdentifier~sql()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letsessionId=field_mapjson__"SessionId"UUID.of_jsoninletsessionKeepAliveSeconds=field_mapjson__"SessionKeepAliveSeconds"SessionAliveSeconds.of_jsoninletresultFormat=field_mapjson__"ResultFormat"ResultFormatString.of_jsoninletclientToken=field_mapjson__"ClientToken"ClientToken.of_jsoninletworkgroupName=field_mapjson__"WorkgroupName"WorkgroupNameString.of_jsoninletparameters=field_mapjson__"Parameters"SqlParametersList.of_jsoninletstatementName=field_mapjson__"StatementName"StatementNameString.of_jsoninletwithEvent=field_mapjson__"WithEvent"Boolean.of_jsoninletdatabase=field_mapjson__"Database"String_.of_jsoninletdbUser=field_mapjson__"DbUser"String_.of_jsoninletsecretArn=field_mapjson__"SecretArn"SecretArn.of_jsoninletclusterIdentifier=field_mapjson__"ClusterIdentifier"ClusterIdentifierString.of_jsoninletsql=field_map_exnjson__"Sql"StatementString.of_jsoninmake?sessionId?sessionKeepAliveSeconds?resultFormat?clientToken?workgroupName?parameters?statementName?withEvent?database?dbUser?secretArn?clusterIdentifier~sql()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL). This statement must be a single SQL statement. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - when connecting to a cluster, provide the secret-arn of a secret stored in Secrets Manager which has username and password. The specified secret contains credentials to connect to the database you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name. Temporary credentials - when connecting to your data warehouse, choose one of the following options: When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials operation is required. When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift:GetClusterCredentialsWithIAM operation is required. When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials operation is required. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleDescribeTableResponse=structtypenonrect={tableName:String_.toption[@ocaml.doc"The table name."];columnList:ColumnList.toption[@ocaml.doc"A list of columns in the table."];nextToken:String_.toption[@ocaml.doc"A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request."]}typenonrecerror=[`DatabaseConnectionExceptionofDatabaseConnectionException.t|`InternalServerExceptionofInternalServerException.t|`QueryTimeoutExceptionofQueryTimeoutException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?tableName=fun?columnList->fun?nextToken->fun()->{tableName;columnList;nextToken}leterror_of_jsonnamejson=matchnamewith|"DatabaseConnectionException"->`DatabaseConnectionException(DatabaseConnectionException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"QueryTimeoutException"->`QueryTimeoutException(QueryTimeoutException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"DatabaseConnectionException"->`DatabaseConnectionException(DatabaseConnectionException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"QueryTimeoutException"->`QueryTimeoutException(QueryTimeoutException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`DatabaseConnectionExceptione->`Assoc[("error",(`String"DatabaseConnectionException"));("details",(DatabaseConnectionException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`QueryTimeoutExceptione->`Assoc[("error",(`String"QueryTimeoutException"));("details",(QueryTimeoutException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("TableName",(Option.mapx.tableName~f:String_.to_value));("ColumnList",(Option.mapx.columnList~f:ColumnList.to_value));("NextToken",(Option.mapx.nextToken~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letnextToken=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"NextToken")inletcolumnList=(Option.map~f:ColumnList.of_xml)(Xml.childxml_arg0"ColumnList")inlettableName=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"TableName")inmake?nextToken?columnList?tableName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"NextToken"String_.of_jsoninletcolumnList=field_mapjson__"ColumnList"ColumnList.of_jsoninlettableName=field_mapjson__"TableName"String_.of_jsoninmake?nextToken?columnList?tableName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Describes the detailed information about a table from metadata in the cluster. The information includes its columns. A token is returned to page through the column list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - when connecting to a cluster, provide the secret-arn of a secret stored in Secrets Manager which has username and password. The specified secret contains credentials to connect to the database you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name. Temporary credentials - when connecting to your data warehouse, choose one of the following options: When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials operation is required. When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift:GetClusterCredentialsWithIAM operation is required. When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials operation is required. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleDescribeTableRequest=structtypenonrect={clusterIdentifier:ClusterIdentifierString.toption[@ocaml.doc"The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials."];secretArn:SecretArn.toption[@ocaml.doc"The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager."];dbUser:String_.toption[@ocaml.doc"The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials."];database:String_.t[@ocaml.doc"The name of the database that contains the tables to be described. If ConnectedDatabase is not specified, this is also the database to connect to with your authentication credentials."];connectedDatabase:String_.toption[@ocaml.doc"A database name. The connected database is specified when you connect with your authentication credentials."];schema:String_.toption[@ocaml.doc"The schema that contains the table. If no schema is specified, then matching tables for all schemas are returned."];table:String_.toption[@ocaml.doc"The table name. If no table is specified, then all tables for all matching schemas are returned. If no table and no schema is specified, then all tables for all schemas in the database are returned"];nextToken:String_.toption[@ocaml.doc"A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request."];maxResults:PageSize.toption[@ocaml.doc"The maximum number of tables to return in the response. If more tables exist than fit in one response, then NextToken is returned to page through the results."];workgroupName:WorkgroupNameString.toption[@ocaml.doc"The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials."]}letcontext_="DescribeTableRequest"letmake?clusterIdentifier=fun?secretArn->fun?dbUser->fun?connectedDatabase->fun?schema->fun?table->fun?nextToken->fun?maxResults->fun?workgroupName->fun~database->fun()->{clusterIdentifier;secretArn;dbUser;connectedDatabase;schema;table;nextToken;maxResults;workgroupName;database}letto_valuex=structure_to_value[("ClusterIdentifier",(Option.mapx.clusterIdentifier~f:ClusterIdentifierString.to_value));("SecretArn",(Option.mapx.secretArn~f:SecretArn.to_value));("DbUser",(Option.mapx.dbUser~f:String_.to_value));("Database",(Some(String_.to_valuex.database)));("ConnectedDatabase",(Option.mapx.connectedDatabase~f:String_.to_value));("Schema",(Option.mapx.schema~f:String_.to_value));("Table",(Option.mapx.table~f:String_.to_value));("NextToken",(Option.mapx.nextToken~f:String_.to_value));("MaxResults",(Option.mapx.maxResults~f:PageSize.to_value));("WorkgroupName",(Option.mapx.workgroupName~f:WorkgroupNameString.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letworkgroupName=(Option.map~f:WorkgroupNameString.of_xml)(Xml.childxml_arg0"WorkgroupName")inletmaxResults=(Option.map~f:PageSize.of_xml)(Xml.childxml_arg0"MaxResults")inletnextToken=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"NextToken")inlettable=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Table")inletschema=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Schema")inletconnectedDatabase=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"ConnectedDatabase")inletdatabase=String_.of_xml(Xml.child_exn~context:context_xml_arg0"Database")inletdbUser=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"DbUser")inletsecretArn=(Option.map~f:SecretArn.of_xml)(Xml.childxml_arg0"SecretArn")inletclusterIdentifier=(Option.map~f:ClusterIdentifierString.of_xml)(Xml.childxml_arg0"ClusterIdentifier")inmake?workgroupName?maxResults?nextToken?table?schema?connectedDatabase~database?dbUser?secretArn?clusterIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letworkgroupName=field_mapjson__"WorkgroupName"WorkgroupNameString.of_jsoninletmaxResults=field_mapjson__"MaxResults"PageSize.of_jsoninletnextToken=field_mapjson__"NextToken"String_.of_jsoninlettable=field_mapjson__"Table"String_.of_jsoninletschema=field_mapjson__"Schema"String_.of_jsoninletconnectedDatabase=field_mapjson__"ConnectedDatabase"String_.of_jsoninletdatabase=field_map_exnjson__"Database"String_.of_jsoninletdbUser=field_mapjson__"DbUser"String_.of_jsoninletsecretArn=field_mapjson__"SecretArn"SecretArn.of_jsoninletclusterIdentifier=field_mapjson__"ClusterIdentifier"ClusterIdentifierString.of_jsoninmake?workgroupName?maxResults?nextToken?table?schema?connectedDatabase~database?dbUser?secretArn?clusterIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Describes the detailed information about a table from metadata in the cluster. The information includes its columns. A token is returned to page through the column list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - when connecting to a cluster, provide the secret-arn of a secret stored in Secrets Manager which has username and password. The specified secret contains credentials to connect to the database you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name. Temporary credentials - when connecting to your data warehouse, choose one of the following options: When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials operation is required. When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift:GetClusterCredentialsWithIAM operation is required. When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials operation is required. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleDescribeStatementResponse=structtypenonrect={id:UUID.toption[@ocaml.doc"The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API."];secretArn:SecretArn.toption[@ocaml.doc"The name or Amazon Resource Name (ARN) of the secret that enables access to the database."];dbUser:String_.toption[@ocaml.doc"The database user name."];database:String_.toption[@ocaml.doc"The name of the database."];clusterIdentifier:String_.toption[@ocaml.doc"The cluster identifier."];duration:Long.toption[@ocaml.doc"The amount of time in nanoseconds that the statement ran."];error:String_.toption[@ocaml.doc"The error message from the cluster if the SQL statement encountered an error while running."];status:StatusString.toption[@ocaml.doc"The status of the SQL statement being described. Status values are defined as follows: ABORTED - The query run was stopped by the user. ALL - A status value that includes all query statuses. This value can be used to filter results. FAILED - The query run failed. FINISHED - The query has finished running. PICKED - The query has been chosen to be run. STARTED - The query run has started. SUBMITTED - The query was submitted, but not yet processed."];createdAt:Timestamp.toption[@ocaml.doc"The date and time (UTC) when the SQL statement was submitted to run."];updatedAt:Timestamp.toption[@ocaml.doc"The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time the status last changed."];redshiftPid:Long.toption[@ocaml.doc"The process identifier from Amazon Redshift."];hasResultSet:Boolean.toption[@ocaml.doc"A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set. The value is true if any substatement returns a result set."];queryString:StatementString.toption[@ocaml.doc"The SQL statement text."];resultRows:Long.toption[@ocaml.doc"Either the number of rows returned from the SQL statement or the number of rows affected. If result size is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and others. A -1 indicates the value is null."];resultSize:Long.toption[@ocaml.doc"The size in bytes of the returned results. A -1 indicates the value is null."];redshiftQueryId:Long.toption[@ocaml.doc"The identifier of the query generated by Amazon Redshift. These identifiers are also available in the query column of the STL_QUERY system view."];queryParameters:SqlParametersList.toption[@ocaml.doc"The parameters for the SQL statement."];subStatements:SubStatementList.toption[@ocaml.doc"The SQL statements from a multiple statement run."];workgroupName:WorkgroupNameString.toption[@ocaml.doc"The serverless workgroup name or Amazon Resource Name (ARN)."];resultFormat:ResultFormatString.toption[@ocaml.doc"The data format of the result of the SQL statement."];sessionId:String_.toption[@ocaml.doc"The session identifier of the query."]}typenonrecerror=[`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?id=fun?secretArn->fun?dbUser->fun?database->fun?clusterIdentifier->fun?duration->fun?error->fun?status->fun?createdAt->fun?updatedAt->fun?redshiftPid->fun?hasResultSet->fun?queryString->fun?resultRows->fun?resultSize->fun?redshiftQueryId->fun?queryParameters->fun?subStatements->fun?workgroupName->fun?resultFormat->fun?sessionId->fun()->{id;secretArn;dbUser;database;clusterIdentifier;duration;error;status;createdAt;updatedAt;redshiftPid;hasResultSet;queryString;resultRows;resultSize;redshiftQueryId;queryParameters;subStatements;workgroupName;resultFormat;sessionId}leterror_of_jsonnamejson=matchnamewith|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("Id",(Option.mapx.id~f:UUID.to_value));("SecretArn",(Option.mapx.secretArn~f:SecretArn.to_value));("DbUser",(Option.mapx.dbUser~f:String_.to_value));("Database",(Option.mapx.database~f:String_.to_value));("ClusterIdentifier",(Option.mapx.clusterIdentifier~f:String_.to_value));("Duration",(Option.mapx.duration~f:Long.to_value));("Error",(Option.mapx.error~f:String_.to_value));("Status",(Option.mapx.status~f:StatusString.to_value));("CreatedAt",(Option.mapx.createdAt~f:Timestamp.to_value));("UpdatedAt",(Option.mapx.updatedAt~f:Timestamp.to_value));("RedshiftPid",(Option.mapx.redshiftPid~f:Long.to_value));("HasResultSet",(Option.mapx.hasResultSet~f:Boolean.to_value));("QueryString",(Option.mapx.queryString~f:StatementString.to_value));("ResultRows",(Option.mapx.resultRows~f:Long.to_value));("ResultSize",(Option.mapx.resultSize~f:Long.to_value));("RedshiftQueryId",(Option.mapx.redshiftQueryId~f:Long.to_value));("QueryParameters",(Option.mapx.queryParameters~f:SqlParametersList.to_value));("SubStatements",(Option.mapx.subStatements~f:SubStatementList.to_value));("WorkgroupName",(Option.mapx.workgroupName~f:WorkgroupNameString.to_value));("ResultFormat",(Option.mapx.resultFormat~f:ResultFormatString.to_value));("SessionId",(Option.mapx.sessionId~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letsessionId=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"SessionId")inletresultFormat=(Option.map~f:ResultFormatString.of_xml)(Xml.childxml_arg0"ResultFormat")inletworkgroupName=(Option.map~f:WorkgroupNameString.of_xml)(Xml.childxml_arg0"WorkgroupName")inletsubStatements=(Option.map~f:SubStatementList.of_xml)(Xml.childxml_arg0"SubStatements")inletqueryParameters=(Option.map~f:SqlParametersList.of_xml)(Xml.childxml_arg0"QueryParameters")inletredshiftQueryId=(Option.map~f:Long.of_xml)(Xml.childxml_arg0"RedshiftQueryId")inletresultSize=(Option.map~f:Long.of_xml)(Xml.childxml_arg0"ResultSize")inletresultRows=(Option.map~f:Long.of_xml)(Xml.childxml_arg0"ResultRows")inletqueryString=(Option.map~f:StatementString.of_xml)(Xml.childxml_arg0"QueryString")inlethasResultSet=(Option.map~f:Boolean.of_xml)(Xml.childxml_arg0"HasResultSet")inletredshiftPid=(Option.map~f:Long.of_xml)(Xml.childxml_arg0"RedshiftPid")inletupdatedAt=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"UpdatedAt")inletcreatedAt=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"CreatedAt")inletstatus=(Option.map~f:StatusString.of_xml)(Xml.childxml_arg0"Status")inleterror=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Error")inletduration=(Option.map~f:Long.of_xml)(Xml.childxml_arg0"Duration")inletclusterIdentifier=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"ClusterIdentifier")inletdatabase=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Database")inletdbUser=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"DbUser")inletsecretArn=(Option.map~f:SecretArn.of_xml)(Xml.childxml_arg0"SecretArn")inletid=(Option.map~f:UUID.of_xml)(Xml.childxml_arg0"Id")inmake?sessionId?resultFormat?workgroupName?subStatements?queryParameters?redshiftQueryId?resultSize?resultRows?queryString?hasResultSet?redshiftPid?updatedAt?createdAt?status?error?duration?clusterIdentifier?database?dbUser?secretArn?id()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letsessionId=field_mapjson__"SessionId"String_.of_jsoninletresultFormat=field_mapjson__"ResultFormat"ResultFormatString.of_jsoninletworkgroupName=field_mapjson__"WorkgroupName"WorkgroupNameString.of_jsoninletsubStatements=field_mapjson__"SubStatements"SubStatementList.of_jsoninletqueryParameters=field_mapjson__"QueryParameters"SqlParametersList.of_jsoninletredshiftQueryId=field_mapjson__"RedshiftQueryId"Long.of_jsoninletresultSize=field_mapjson__"ResultSize"Long.of_jsoninletresultRows=field_mapjson__"ResultRows"Long.of_jsoninletqueryString=field_mapjson__"QueryString"StatementString.of_jsoninlethasResultSet=field_mapjson__"HasResultSet"Boolean.of_jsoninletredshiftPid=field_mapjson__"RedshiftPid"Long.of_jsoninletupdatedAt=field_mapjson__"UpdatedAt"Timestamp.of_jsoninletcreatedAt=field_mapjson__"CreatedAt"Timestamp.of_jsoninletstatus=field_mapjson__"Status"StatusString.of_jsoninleterror=field_mapjson__"Error"String_.of_jsoninletduration=field_mapjson__"Duration"Long.of_jsoninletclusterIdentifier=field_mapjson__"ClusterIdentifier"String_.of_jsoninletdatabase=field_mapjson__"Database"String_.of_jsoninletdbUser=field_mapjson__"DbUser"String_.of_jsoninletsecretArn=field_mapjson__"SecretArn"SecretArn.of_jsoninletid=field_mapjson__"Id"UUID.of_jsoninmake?sessionId?resultFormat?workgroupName?subStatements?queryParameters?redshiftQueryId?resultSize?resultRows?queryString?hasResultSet?redshiftPid?updatedAt?createdAt?status?error?duration?clusterIdentifier?database?dbUser?secretArn?id()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Describes the details about a specific instance when a query was run by the Amazon Redshift Data API. The information includes when the query started, when it finished, the query status, the number of rows returned, and the SQL statement. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleDescribeStatementRequest=structtypenonrect={id:UUID.t[@ocaml.doc"The identifier of the SQL statement to describe. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL statement of a batch query. This identifier is returned by BatchExecuteStatment, ExecuteStatement, and ListStatements."]}letcontext_="DescribeStatementRequest"letmake~id=fun()->{id}letto_valuex=structure_to_value[("Id",(Some(UUID.to_valuex.id)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letid=UUID.of_xml(Xml.child_exn~context:context_xml_arg0"Id")inmake~id()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letid=field_map_exnjson__"Id"UUID.of_jsoninmake~id()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Describes the details about a specific instance when a query was run by the Amazon Redshift Data API. The information includes when the query started, when it finished, the query status, the number of rows returned, and the SQL statement. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleCancelStatementResponse=structtypenonrect={status:Boolean.toption[@ocaml.doc"A value that indicates whether the cancel statement succeeded (true)."]}typenonrecerror=[`DatabaseConnectionExceptionofDatabaseConnectionException.t|`InternalServerExceptionofInternalServerException.t|`QueryTimeoutExceptionofQueryTimeoutException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?status=fun()->{status}leterror_of_jsonnamejson=matchnamewith|"DatabaseConnectionException"->`DatabaseConnectionException(DatabaseConnectionException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"QueryTimeoutException"->`QueryTimeoutException(QueryTimeoutException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"DatabaseConnectionException"->`DatabaseConnectionException(DatabaseConnectionException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"QueryTimeoutException"->`QueryTimeoutException(QueryTimeoutException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`DatabaseConnectionExceptione->`Assoc[("error",(`String"DatabaseConnectionException"));("details",(DatabaseConnectionException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`QueryTimeoutExceptione->`Assoc[("error",(`String"QueryTimeoutException"));("details",(QueryTimeoutException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("Status",(Option.mapx.status~f:Boolean.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letstatus=(Option.map~f:Boolean.of_xml)(Xml.childxml_arg0"Status")inmake?status()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letstatus=field_mapjson__"Status"Boolean.of_jsoninmake?status()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Cancels a running query. To be canceled, a query must be running. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleCancelStatementRequest=structtypenonrect={id:UUID.t[@ocaml.doc"The identifier of the SQL statement to cancel. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. This identifier is returned by BatchExecuteStatment, ExecuteStatment, and ListStatements."]}letcontext_="CancelStatementRequest"letmake~id=fun()->{id}letto_valuex=structure_to_value[("Id",(Some(UUID.to_valuex.id)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letid=UUID.of_xml(Xml.child_exn~context:context_xml_arg0"Id")inmake~id()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letid=field_map_exnjson__"Id"UUID.of_jsoninmake~id()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Cancels a running query. To be canceled, a query must be running. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleBatchExecuteStatementOutput=structtypenonrect={id:UUID.toption[@ocaml.doc"The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. This identifier is returned by BatchExecuteStatment."];createdAt:Timestamp.toption[@ocaml.doc"The date and time (UTC) the statement was created."];clusterIdentifier:ClusterIdentifierString.toption[@ocaml.doc"The cluster identifier. This element is not returned when connecting to a serverless workgroup."];dbUser:String_.toption[@ocaml.doc"The database user name."];dbGroups:DbGroupList.toption[@ocaml.doc"A list of colon (:) separated names of database groups."];database:String_.toption[@ocaml.doc"The name of the database."];secretArn:SecretArn.toption[@ocaml.doc"The name or ARN of the secret that enables access to the database."];workgroupName:WorkgroupNameString.toption[@ocaml.doc"The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting to a provisioned cluster."];sessionId:UUID.toption[@ocaml.doc"The session identifier of the query."]}typenonrecerror=[`ActiveSessionsExceededExceptionofActiveSessionsExceededException.t|`ActiveStatementsExceededExceptionofActiveStatementsExceededException.t|`BatchExecuteStatementExceptionofBatchExecuteStatementException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?id=fun?createdAt->fun?clusterIdentifier->fun?dbUser->fun?dbGroups->fun?database->fun?secretArn->fun?workgroupName->fun?sessionId->fun()->{id;createdAt;clusterIdentifier;dbUser;dbGroups;database;secretArn;workgroupName;sessionId}leterror_of_jsonnamejson=matchnamewith|"ActiveSessionsExceededException"->`ActiveSessionsExceededException(ActiveSessionsExceededException.of_jsonjson)|"ActiveStatementsExceededException"->`ActiveStatementsExceededException(ActiveStatementsExceededException.of_jsonjson)|"BatchExecuteStatementException"->`BatchExecuteStatementException(BatchExecuteStatementException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"ActiveSessionsExceededException"->`ActiveSessionsExceededException(ActiveSessionsExceededException.of_xmlxml)|"ActiveStatementsExceededException"->`ActiveStatementsExceededException(ActiveStatementsExceededException.of_xmlxml)|"BatchExecuteStatementException"->`BatchExecuteStatementException(BatchExecuteStatementException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`ActiveSessionsExceededExceptione->`Assoc[("error",(`String"ActiveSessionsExceededException"));("details",(ActiveSessionsExceededException.to_jsone))]|`ActiveStatementsExceededExceptione->`Assoc[("error",(`String"ActiveStatementsExceededException"));("details",(ActiveStatementsExceededException.to_jsone))]|`BatchExecuteStatementExceptione->`Assoc[("error",(`String"BatchExecuteStatementException"));("details",(BatchExecuteStatementException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("Id",(Option.mapx.id~f:UUID.to_value));("CreatedAt",(Option.mapx.createdAt~f:Timestamp.to_value));("ClusterIdentifier",(Option.mapx.clusterIdentifier~f:ClusterIdentifierString.to_value));("DbUser",(Option.mapx.dbUser~f:String_.to_value));("DbGroups",(Option.mapx.dbGroups~f:DbGroupList.to_value));("Database",(Option.mapx.database~f:String_.to_value));("SecretArn",(Option.mapx.secretArn~f:SecretArn.to_value));("WorkgroupName",(Option.mapx.workgroupName~f:WorkgroupNameString.to_value));("SessionId",(Option.mapx.sessionId~f:UUID.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letsessionId=(Option.map~f:UUID.of_xml)(Xml.childxml_arg0"SessionId")inletworkgroupName=(Option.map~f:WorkgroupNameString.of_xml)(Xml.childxml_arg0"WorkgroupName")inletsecretArn=(Option.map~f:SecretArn.of_xml)(Xml.childxml_arg0"SecretArn")inletdatabase=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Database")inletdbGroups=(Option.map~f:DbGroupList.of_xml)(Xml.childxml_arg0"DbGroups")inletdbUser=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"DbUser")inletclusterIdentifier=(Option.map~f:ClusterIdentifierString.of_xml)(Xml.childxml_arg0"ClusterIdentifier")inletcreatedAt=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"CreatedAt")inletid=(Option.map~f:UUID.of_xml)(Xml.childxml_arg0"Id")inmake?sessionId?workgroupName?secretArn?database?dbGroups?dbUser?clusterIdentifier?createdAt?id()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letsessionId=field_mapjson__"SessionId"UUID.of_jsoninletworkgroupName=field_mapjson__"WorkgroupName"WorkgroupNameString.of_jsoninletsecretArn=field_mapjson__"SecretArn"SecretArn.of_jsoninletdatabase=field_mapjson__"Database"String_.of_jsoninletdbGroups=field_mapjson__"DbGroups"DbGroupList.of_jsoninletdbUser=field_mapjson__"DbUser"String_.of_jsoninletclusterIdentifier=field_mapjson__"ClusterIdentifier"ClusterIdentifierString.of_jsoninletcreatedAt=field_mapjson__"CreatedAt"Timestamp.of_jsoninletid=field_mapjson__"Id"UUID.of_jsoninmake?sessionId?workgroupName?secretArn?database?dbGroups?dbUser?clusterIdentifier?createdAt?id()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Runs one or more SQL statements, which can be data manipulation language (DML) or data definition language (DDL). Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - when connecting to a cluster, provide the secret-arn of a secret stored in Secrets Manager which has username and password. The specified secret contains credentials to connect to the database you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name. Temporary credentials - when connecting to your data warehouse, choose one of the following options: When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials operation is required. When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift:GetClusterCredentialsWithIAM operation is required. When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials operation is required. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]moduleBatchExecuteStatementInput=structtypenonrect={sqls:SqlList.t[@ocaml.doc"One or more SQL statements to run. The SQL statements are run as a single transaction. They run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL statement fails, then because they are run as one transaction, all work is rolled back."];clusterIdentifier:ClusterIdentifierString.toption[@ocaml.doc"The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials."];secretArn:SecretArn.toption[@ocaml.doc"The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager."];dbUser:String_.toption[@ocaml.doc"The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials."];database:String_.toption[@ocaml.doc"The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials."];withEvent:Boolean.toption[@ocaml.doc"A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statements run."];statementName:StatementNameString.toption[@ocaml.doc"The name of the SQL statements. You can name the SQL statements when you create them to identify the query."];parameters:SqlParametersList.toption[@ocaml.doc"The parameters for the SQL statements. The parameters are shared across all SQL statements in the batch."];workgroupName:WorkgroupNameString.toption[@ocaml.doc"The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials."];clientToken:ClientToken.toption[@ocaml.doc"A unique, case-sensitive identifier that you provide to ensure the idempotency of the request."];resultFormat:ResultFormatString.toption[@ocaml.doc"The data format of the result of the SQL statement. If no format is specified, the default is JSON."];sessionKeepAliveSeconds:SessionAliveSeconds.toption[@ocaml.doc"The number of seconds to keep the session alive after the query finishes. The maximum time a session can keep alive is 24 hours. After 24 hours, the session is forced closed and the query is terminated."];sessionId:UUID.toption[@ocaml.doc"The session identifier of the query."]}letcontext_="BatchExecuteStatementInput"letmake?clusterIdentifier=fun?secretArn->fun?dbUser->fun?database->fun?withEvent->fun?statementName->fun?parameters->fun?workgroupName->fun?clientToken->fun?resultFormat->fun?sessionKeepAliveSeconds->fun?sessionId->fun~sqls->fun()->{clusterIdentifier;secretArn;dbUser;database;withEvent;statementName;parameters;workgroupName;clientToken;resultFormat;sessionKeepAliveSeconds;sessionId;sqls}letto_valuex=structure_to_value[("Sqls",(Some(SqlList.to_valuex.sqls)));("ClusterIdentifier",(Option.mapx.clusterIdentifier~f:ClusterIdentifierString.to_value));("SecretArn",(Option.mapx.secretArn~f:SecretArn.to_value));("DbUser",(Option.mapx.dbUser~f:String_.to_value));("Database",(Option.mapx.database~f:String_.to_value));("WithEvent",(Option.mapx.withEvent~f:Boolean.to_value));("StatementName",(Option.mapx.statementName~f:StatementNameString.to_value));("Parameters",(Option.mapx.parameters~f:SqlParametersList.to_value));("WorkgroupName",(Option.mapx.workgroupName~f:WorkgroupNameString.to_value));("ClientToken",(Option.mapx.clientToken~f:ClientToken.to_value));("ResultFormat",(Option.mapx.resultFormat~f:ResultFormatString.to_value));("SessionKeepAliveSeconds",(Option.mapx.sessionKeepAliveSeconds~f:SessionAliveSeconds.to_value));("SessionId",(Option.mapx.sessionId~f:UUID.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letsessionId=(Option.map~f:UUID.of_xml)(Xml.childxml_arg0"SessionId")inletsessionKeepAliveSeconds=(Option.map~f:SessionAliveSeconds.of_xml)(Xml.childxml_arg0"SessionKeepAliveSeconds")inletresultFormat=(Option.map~f:ResultFormatString.of_xml)(Xml.childxml_arg0"ResultFormat")inletclientToken=(Option.map~f:ClientToken.of_xml)(Xml.childxml_arg0"ClientToken")inletworkgroupName=(Option.map~f:WorkgroupNameString.of_xml)(Xml.childxml_arg0"WorkgroupName")inletparameters=(Option.map~f:SqlParametersList.of_xml)(Xml.childxml_arg0"Parameters")inletstatementName=(Option.map~f:StatementNameString.of_xml)(Xml.childxml_arg0"StatementName")inletwithEvent=(Option.map~f:Boolean.of_xml)(Xml.childxml_arg0"WithEvent")inletdatabase=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Database")inletdbUser=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"DbUser")inletsecretArn=(Option.map~f:SecretArn.of_xml)(Xml.childxml_arg0"SecretArn")inletclusterIdentifier=(Option.map~f:ClusterIdentifierString.of_xml)(Xml.childxml_arg0"ClusterIdentifier")inletsqls=SqlList.of_xml(Xml.child_exn~context:context_xml_arg0"Sqls")inmake?sessionId?sessionKeepAliveSeconds?resultFormat?clientToken?workgroupName?parameters?statementName?withEvent?database?dbUser?secretArn?clusterIdentifier~sqls()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letsessionId=field_mapjson__"SessionId"UUID.of_jsoninletsessionKeepAliveSeconds=field_mapjson__"SessionKeepAliveSeconds"SessionAliveSeconds.of_jsoninletresultFormat=field_mapjson__"ResultFormat"ResultFormatString.of_jsoninletclientToken=field_mapjson__"ClientToken"ClientToken.of_jsoninletworkgroupName=field_mapjson__"WorkgroupName"WorkgroupNameString.of_jsoninletparameters=field_mapjson__"Parameters"SqlParametersList.of_jsoninletstatementName=field_mapjson__"StatementName"StatementNameString.of_jsoninletwithEvent=field_mapjson__"WithEvent"Boolean.of_jsoninletdatabase=field_mapjson__"Database"String_.of_jsoninletdbUser=field_mapjson__"DbUser"String_.of_jsoninletsecretArn=field_mapjson__"SecretArn"SecretArn.of_jsoninletclusterIdentifier=field_mapjson__"ClusterIdentifier"ClusterIdentifierString.of_jsoninletsqls=field_map_exnjson__"Sqls"SqlList.of_jsoninmake?sessionId?sessionKeepAliveSeconds?resultFormat?clientToken?workgroupName?parameters?statementName?withEvent?database?dbUser?secretArn?clusterIdentifier~sqls()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Runs one or more SQL statements, which can be data manipulation language (DML) or data definition language (DDL). Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - when connecting to a cluster, provide the secret-arn of a secret stored in Secrets Manager which has username and password. The specified secret contains credentials to connect to the database you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name. Temporary credentials - when connecting to your data warehouse, choose one of the following options: When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials operation is required. When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift:GetClusterCredentialsWithIAM operation is required. When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials operation is required. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide."]