123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791(* 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.ec2_instance_connectletapiVersion="2018-04-02"letendpointPrefix="ec2-instance-connect"letserviceFullName="AWS EC2 Instance Connect"letsignatureVersion="v4"letprotocol="json"letglobalEndpoint=endpointPrefix^".amazonaws.com"letserviceAbbreviation="EC2 Instance Connect"lettargetPrefix="AWSEC2InstanceConnectService"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[]))])moduleString_=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_valueendmoduleAuthException=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"Either your AWS credentials are not valid or you do not have access to the EC2 instance."]moduleEC2InstanceNotFoundException=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 specified instance was not found."]moduleEC2InstanceStateInvalidException=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"Unable to connect because the instance is not in a valid state. Connecting to a stopped or terminated instance is not supported. If the instance is stopped, start your instance, and try to connect again."]moduleEC2InstanceTypeInvalidException=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 instance type is not supported for connecting via the serial console. Only Nitro instance types are currently supported."]moduleEC2InstanceUnavailableException=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 instance is currently unavailable. Wait a few minutes and try again."]moduleInvalidArgsException=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"One of the parameters is not valid."]moduleRequestId=structtypenonrect=stringletcontext_="RequestId"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:"RequestId"jletto_json=simple_to_jsonto_valueendmoduleSerialConsoleAccessDisabledException=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"Your account is not authorized to use the EC2 Serial Console. To authorize your account, run the EnableSerialConsoleAccess API. For more information, see EnableSerialConsoleAccess in the Amazon EC2 API Reference."]moduleSerialConsoleSessionLimitExceededException=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 instance currently has 1 active serial console session. Only 1 session is supported at a time."]moduleSerialConsoleSessionUnavailableException=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"Unable to start a serial console session. Please try again."]moduleSerialConsoleSessionUnsupportedException=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"Your instance's BIOS version is unsupported for serial console connection. Reboot your instance to update its BIOS, and then try again to connect."]moduleServiceException=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 service encountered an error. Follow the instructions in the error message and try again."]moduleSuccess=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_valueendmoduleThrottlingException=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 requests were made too frequently and have been throttled. Wait a while and try again. To increase the limit on your request frequency, contact AWS Support."]moduleInstanceId=structtypenonrect=stringletcontext_="InstanceId"letmakei=letopenResultinok_or_failwith((check_string_mini~min:10)>>=(fun()->(check_string_maxi~max:32)>>=(fun()->check_patterni~pattern:"^i-[a-f0-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:"InstanceId"jletto_json=simple_to_jsonto_valueendmoduleSSHPublicKey=structtypenonrect=stringletcontext_="SSHPublicKey"letmakei=letopenResultinok_or_failwith((check_string_maxi~max:4096)>>=(fun()->check_string_mini~min:80));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"SSHPublicKey"jletto_json=simple_to_jsonto_valueendmoduleSerialPort=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:0)>>=(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 SerialPort"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleAvailabilityZone=structtypenonrect=stringletcontext_="AvailabilityZone"letmakei=letopenResultinok_or_failwith((check_string_mini~min:6)>>=(fun()->(check_string_maxi~max:32)>>=(fun()->check_patterni~pattern:"^(\\w+-){2,3}\\d+\\w+$")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"AvailabilityZone"jletto_json=simple_to_jsonto_valueendmoduleInstanceOSUser=structtypenonrect=stringletcontext_="InstanceOSUser"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:32)>>=(fun()->check_patterni~pattern:"(^[A-Za-z_][A-Za-z0-9\\@\\._-]{0,30}[A-Za-z0-9\\$_-]?$)|(^(?=.{2,32}$)[0-9]{1,32}[A-Za-z\\@\\._-][A-Za-z0-9\\@\\._-]*[A-Za-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:"InstanceOSUser"jletto_json=simple_to_jsonto_valueendmoduleSendSerialConsoleSSHPublicKeyResponse=structtypenonrect={requestId:RequestId.toption[@ocaml.doc"The ID of the request. Please provide this ID when contacting AWS Support for assistance."];success:Success.toption[@ocaml.doc"Is true if the request succeeds and an error otherwise."]}typenonrecerror=[`AuthExceptionofAuthException.t|`EC2InstanceNotFoundExceptionofEC2InstanceNotFoundException.t|`EC2InstanceStateInvalidExceptionofEC2InstanceStateInvalidException.t|`EC2InstanceTypeInvalidExceptionofEC2InstanceTypeInvalidException.t|`EC2InstanceUnavailableExceptionofEC2InstanceUnavailableException.t|`InvalidArgsExceptionofInvalidArgsException.t|`SerialConsoleAccessDisabledExceptionofSerialConsoleAccessDisabledException.t|`SerialConsoleSessionLimitExceededExceptionofSerialConsoleSessionLimitExceededException.t|`SerialConsoleSessionUnavailableExceptionofSerialConsoleSessionUnavailableException.t|`SerialConsoleSessionUnsupportedExceptionofSerialConsoleSessionUnsupportedException.t|`ServiceExceptionofServiceException.t|`ThrottlingExceptionofThrottlingException.t|`Unknown_operation_errorof(string*stringoption)]letmake?requestId=fun?success->fun()->{requestId;success}leterror_of_jsonnamejson=matchnamewith|"AuthException"->`AuthException(AuthException.of_jsonjson)|"EC2InstanceNotFoundException"->`EC2InstanceNotFoundException(EC2InstanceNotFoundException.of_jsonjson)|"EC2InstanceStateInvalidException"->`EC2InstanceStateInvalidException(EC2InstanceStateInvalidException.of_jsonjson)|"EC2InstanceTypeInvalidException"->`EC2InstanceTypeInvalidException(EC2InstanceTypeInvalidException.of_jsonjson)|"EC2InstanceUnavailableException"->`EC2InstanceUnavailableException(EC2InstanceUnavailableException.of_jsonjson)|"InvalidArgsException"->`InvalidArgsException(InvalidArgsException.of_jsonjson)|"SerialConsoleAccessDisabledException"->`SerialConsoleAccessDisabledException(SerialConsoleAccessDisabledException.of_jsonjson)|"SerialConsoleSessionLimitExceededException"->`SerialConsoleSessionLimitExceededException(SerialConsoleSessionLimitExceededException.of_jsonjson)|"SerialConsoleSessionUnavailableException"->`SerialConsoleSessionUnavailableException(SerialConsoleSessionUnavailableException.of_jsonjson)|"SerialConsoleSessionUnsupportedException"->`SerialConsoleSessionUnsupportedException(SerialConsoleSessionUnsupportedException.of_jsonjson)|"ServiceException"->`ServiceException(ServiceException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AuthException"->`AuthException(AuthException.of_xmlxml)|"EC2InstanceNotFoundException"->`EC2InstanceNotFoundException(EC2InstanceNotFoundException.of_xmlxml)|"EC2InstanceStateInvalidException"->`EC2InstanceStateInvalidException(EC2InstanceStateInvalidException.of_xmlxml)|"EC2InstanceTypeInvalidException"->`EC2InstanceTypeInvalidException(EC2InstanceTypeInvalidException.of_xmlxml)|"EC2InstanceUnavailableException"->`EC2InstanceUnavailableException(EC2InstanceUnavailableException.of_xmlxml)|"InvalidArgsException"->`InvalidArgsException(InvalidArgsException.of_xmlxml)|"SerialConsoleAccessDisabledException"->`SerialConsoleAccessDisabledException(SerialConsoleAccessDisabledException.of_xmlxml)|"SerialConsoleSessionLimitExceededException"->`SerialConsoleSessionLimitExceededException(SerialConsoleSessionLimitExceededException.of_xmlxml)|"SerialConsoleSessionUnavailableException"->`SerialConsoleSessionUnavailableException(SerialConsoleSessionUnavailableException.of_xmlxml)|"SerialConsoleSessionUnsupportedException"->`SerialConsoleSessionUnsupportedException(SerialConsoleSessionUnsupportedException.of_xmlxml)|"ServiceException"->`ServiceException(ServiceException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AuthExceptione->`Assoc[("error",(`String"AuthException"));("details",(AuthException.to_jsone))]|`EC2InstanceNotFoundExceptione->`Assoc[("error",(`String"EC2InstanceNotFoundException"));("details",(EC2InstanceNotFoundException.to_jsone))]|`EC2InstanceStateInvalidExceptione->`Assoc[("error",(`String"EC2InstanceStateInvalidException"));("details",(EC2InstanceStateInvalidException.to_jsone))]|`EC2InstanceTypeInvalidExceptione->`Assoc[("error",(`String"EC2InstanceTypeInvalidException"));("details",(EC2InstanceTypeInvalidException.to_jsone))]|`EC2InstanceUnavailableExceptione->`Assoc[("error",(`String"EC2InstanceUnavailableException"));("details",(EC2InstanceUnavailableException.to_jsone))]|`InvalidArgsExceptione->`Assoc[("error",(`String"InvalidArgsException"));("details",(InvalidArgsException.to_jsone))]|`SerialConsoleAccessDisabledExceptione->`Assoc[("error",(`String"SerialConsoleAccessDisabledException"));("details",(SerialConsoleAccessDisabledException.to_jsone))]|`SerialConsoleSessionLimitExceededExceptione->`Assoc[("error",(`String"SerialConsoleSessionLimitExceededException"));("details",(SerialConsoleSessionLimitExceededException.to_jsone))]|`SerialConsoleSessionUnavailableExceptione->`Assoc[("error",(`String"SerialConsoleSessionUnavailableException"));("details",(SerialConsoleSessionUnavailableException.to_jsone))]|`SerialConsoleSessionUnsupportedExceptione->`Assoc[("error",(`String"SerialConsoleSessionUnsupportedException"));("details",(SerialConsoleSessionUnsupportedException.to_jsone))]|`ServiceExceptione->`Assoc[("error",(`String"ServiceException"));("details",(ServiceException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("RequestId",(Option.mapx.requestId~f:RequestId.to_value));("Success",(Option.mapx.success~f:Success.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letsuccess=(Option.map~f:Success.of_xml)(Xml.childxml_arg0"Success")inletrequestId=(Option.map~f:RequestId.of_xml)(Xml.childxml_arg0"RequestId")inmake?success?requestId()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letsuccess=field_mapjson__"Success"Success.of_jsoninletrequestId=field_mapjson__"RequestId"RequestId.of_jsoninmake?success?requestId()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Pushes an SSH public key to the specified EC2 instance. The key remains for 60 seconds, which gives you 60 seconds to establish a serial console connection to the instance using SSH. For more information, see EC2 Serial Console in the Amazon EC2 User Guide."]moduleSendSerialConsoleSSHPublicKeyRequest=structtypenonrect={instanceId:InstanceId.t[@ocaml.doc"The ID of the EC2 instance."];serialPort:SerialPort.toption[@ocaml.doc"The serial port of the EC2 instance. Currently only port 0 is supported. Default: 0"];sSHPublicKey:SSHPublicKey.t[@ocaml.doc"The public key material. To use the public key, you must have the matching private key. For information about the supported key formats and lengths, see Requirements for key pairs in the Amazon EC2 User Guide."]}letcontext_="SendSerialConsoleSSHPublicKeyRequest"letmake?serialPort=fun~instanceId->fun~sSHPublicKey->fun()->{serialPort;instanceId;sSHPublicKey}letto_valuex=structure_to_value[("InstanceId",(Some(InstanceId.to_valuex.instanceId)));("SerialPort",(Option.mapx.serialPort~f:SerialPort.to_value));("SSHPublicKey",(Some(SSHPublicKey.to_valuex.sSHPublicKey)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letsSHPublicKey=SSHPublicKey.of_xml(Xml.child_exn~context:context_xml_arg0"SSHPublicKey")inletserialPort=(Option.map~f:SerialPort.of_xml)(Xml.childxml_arg0"SerialPort")inletinstanceId=InstanceId.of_xml(Xml.child_exn~context:context_xml_arg0"InstanceId")inmake~sSHPublicKey?serialPort~instanceId()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letsSHPublicKey=field_map_exnjson__"SSHPublicKey"SSHPublicKey.of_jsoninletserialPort=field_mapjson__"SerialPort"SerialPort.of_jsoninletinstanceId=field_map_exnjson__"InstanceId"InstanceId.of_jsoninmake~sSHPublicKey?serialPort~instanceId()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Pushes an SSH public key to the specified EC2 instance. The key remains for 60 seconds, which gives you 60 seconds to establish a serial console connection to the instance using SSH. For more information, see EC2 Serial Console in the Amazon EC2 User Guide."]moduleSendSSHPublicKeyResponse=structtypenonrect={requestId:RequestId.toption[@ocaml.doc"The ID of the request. Please provide this ID when contacting AWS Support for assistance."];success:Success.toption[@ocaml.doc"Is true if the request succeeds and an error otherwise."]}typenonrecerror=[`AuthExceptionofAuthException.t|`EC2InstanceNotFoundExceptionofEC2InstanceNotFoundException.t|`EC2InstanceStateInvalidExceptionofEC2InstanceStateInvalidException.t|`EC2InstanceUnavailableExceptionofEC2InstanceUnavailableException.t|`InvalidArgsExceptionofInvalidArgsException.t|`ServiceExceptionofServiceException.t|`ThrottlingExceptionofThrottlingException.t|`Unknown_operation_errorof(string*stringoption)]letmake?requestId=fun?success->fun()->{requestId;success}leterror_of_jsonnamejson=matchnamewith|"AuthException"->`AuthException(AuthException.of_jsonjson)|"EC2InstanceNotFoundException"->`EC2InstanceNotFoundException(EC2InstanceNotFoundException.of_jsonjson)|"EC2InstanceStateInvalidException"->`EC2InstanceStateInvalidException(EC2InstanceStateInvalidException.of_jsonjson)|"EC2InstanceUnavailableException"->`EC2InstanceUnavailableException(EC2InstanceUnavailableException.of_jsonjson)|"InvalidArgsException"->`InvalidArgsException(InvalidArgsException.of_jsonjson)|"ServiceException"->`ServiceException(ServiceException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AuthException"->`AuthException(AuthException.of_xmlxml)|"EC2InstanceNotFoundException"->`EC2InstanceNotFoundException(EC2InstanceNotFoundException.of_xmlxml)|"EC2InstanceStateInvalidException"->`EC2InstanceStateInvalidException(EC2InstanceStateInvalidException.of_xmlxml)|"EC2InstanceUnavailableException"->`EC2InstanceUnavailableException(EC2InstanceUnavailableException.of_xmlxml)|"InvalidArgsException"->`InvalidArgsException(InvalidArgsException.of_xmlxml)|"ServiceException"->`ServiceException(ServiceException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AuthExceptione->`Assoc[("error",(`String"AuthException"));("details",(AuthException.to_jsone))]|`EC2InstanceNotFoundExceptione->`Assoc[("error",(`String"EC2InstanceNotFoundException"));("details",(EC2InstanceNotFoundException.to_jsone))]|`EC2InstanceStateInvalidExceptione->`Assoc[("error",(`String"EC2InstanceStateInvalidException"));("details",(EC2InstanceStateInvalidException.to_jsone))]|`EC2InstanceUnavailableExceptione->`Assoc[("error",(`String"EC2InstanceUnavailableException"));("details",(EC2InstanceUnavailableException.to_jsone))]|`InvalidArgsExceptione->`Assoc[("error",(`String"InvalidArgsException"));("details",(InvalidArgsException.to_jsone))]|`ServiceExceptione->`Assoc[("error",(`String"ServiceException"));("details",(ServiceException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("RequestId",(Option.mapx.requestId~f:RequestId.to_value));("Success",(Option.mapx.success~f:Success.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letsuccess=(Option.map~f:Success.of_xml)(Xml.childxml_arg0"Success")inletrequestId=(Option.map~f:RequestId.of_xml)(Xml.childxml_arg0"RequestId")inmake?success?requestId()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letsuccess=field_mapjson__"Success"Success.of_jsoninletrequestId=field_mapjson__"RequestId"RequestId.of_jsoninmake?success?requestId()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Pushes an SSH public key to the specified EC2 instance for use by the specified user. The key remains for 60 seconds. For more information, see Connect to your Linux instance using EC2 Instance Connect in the Amazon EC2 User Guide."]moduleSendSSHPublicKeyRequest=structtypenonrect={instanceId:InstanceId.t[@ocaml.doc"The ID of the EC2 instance."];instanceOSUser:InstanceOSUser.t[@ocaml.doc"The OS user on the EC2 instance for whom the key can be used to authenticate."];sSHPublicKey:SSHPublicKey.t[@ocaml.doc"The public key material. To use the public key, you must have the matching private key."];availabilityZone:AvailabilityZone.toption[@ocaml.doc"The Availability Zone in which the EC2 instance was launched."]}letcontext_="SendSSHPublicKeyRequest"letmake?availabilityZone=fun~instanceId->fun~instanceOSUser->fun~sSHPublicKey->fun()->{availabilityZone;instanceId;instanceOSUser;sSHPublicKey}letto_valuex=structure_to_value[("InstanceId",(Some(InstanceId.to_valuex.instanceId)));("InstanceOSUser",(Some(InstanceOSUser.to_valuex.instanceOSUser)));("SSHPublicKey",(Some(SSHPublicKey.to_valuex.sSHPublicKey)));("AvailabilityZone",(Option.mapx.availabilityZone~f:AvailabilityZone.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letavailabilityZone=(Option.map~f:AvailabilityZone.of_xml)(Xml.childxml_arg0"AvailabilityZone")inletsSHPublicKey=SSHPublicKey.of_xml(Xml.child_exn~context:context_xml_arg0"SSHPublicKey")inletinstanceOSUser=InstanceOSUser.of_xml(Xml.child_exn~context:context_xml_arg0"InstanceOSUser")inletinstanceId=InstanceId.of_xml(Xml.child_exn~context:context_xml_arg0"InstanceId")inmake?availabilityZone~sSHPublicKey~instanceOSUser~instanceId()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letavailabilityZone=field_mapjson__"AvailabilityZone"AvailabilityZone.of_jsoninletsSHPublicKey=field_map_exnjson__"SSHPublicKey"SSHPublicKey.of_jsoninletinstanceOSUser=field_map_exnjson__"InstanceOSUser"InstanceOSUser.of_jsoninletinstanceId=field_map_exnjson__"InstanceId"InstanceId.of_jsoninmake?availabilityZone~sSHPublicKey~instanceOSUser~instanceId()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Pushes an SSH public key to the specified EC2 instance for use by the specified user. The key remains for 60 seconds. For more information, see Connect to your Linux instance using EC2 Instance Connect in the Amazon EC2 User Guide."]