123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894(* 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.ssoletapiVersion="2019-06-10"letendpointPrefix="portal.sso"letserviceFullName="AWS Single Sign-On"letsignatureVersion="v4"letprotocol="rest_json"letglobalEndpoint=endpointPrefix^".amazonaws.com"letserviceAbbreviation="SSO"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[]))])moduleAccountIdType=structtypenonrect=stringletcontext_="AccountIdType"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:"AccountIdType"jletto_json=simple_to_jsonto_valueendmoduleAccountNameType=structtypenonrect=stringletcontext_="AccountNameType"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:"AccountNameType"jletto_json=simple_to_jsonto_valueendmoduleEmailAddressType=structtypenonrect=stringletcontext_="EmailAddressType"letmakei=letopenResultinok_or_failwith((check_string_maxi~max:254)>>=(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:"EmailAddressType"jletto_json=simple_to_jsonto_valueendmoduleRoleNameType=structtypenonrect=stringletcontext_="RoleNameType"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:"RoleNameType"jletto_json=simple_to_jsonto_valueendmoduleAccountInfo=structtypenonrect={accountId:AccountIdType.toption[@ocaml.doc"The identifier of the AWS account that is assigned to the user."];accountName:AccountNameType.toption[@ocaml.doc"The display name of the AWS account that is assigned to the user."];emailAddress:EmailAddressType.toption[@ocaml.doc"The email address of the AWS account that is assigned to the user."]}letmake?accountId=fun?accountName->fun?emailAddress->fun()->{accountId;accountName;emailAddress}letto_valuex=structure_to_value[("accountId",(Option.mapx.accountId~f:AccountIdType.to_value));("accountName",(Option.mapx.accountName~f:AccountNameType.to_value));("emailAddress",(Option.mapx.emailAddress~f:EmailAddressType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letemailAddress=(Option.map~f:EmailAddressType.of_xml)(Xml.childxml_arg0"emailAddress")inletaccountName=(Option.map~f:AccountNameType.of_xml)(Xml.childxml_arg0"accountName")inletaccountId=(Option.map~f:AccountIdType.of_xml)(Xml.childxml_arg0"accountId")inmake?emailAddress?accountName?accountId()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letemailAddress=field_mapjson__"emailAddress"EmailAddressType.of_jsoninletaccountName=field_mapjson__"accountName"AccountNameType.of_jsoninletaccountId=field_mapjson__"accountId"AccountIdType.of_jsoninmake?emailAddress?accountName?accountId()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Provides information about your AWS account."]moduleErrorDescription=structtypenonrect=stringletcontext_="ErrorDescription"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:"ErrorDescription"jletto_json=simple_to_jsonto_valueendmoduleRoleInfo=structtypenonrect={roleName:RoleNameType.toption[@ocaml.doc"The friendly name of the role that is assigned to the user."];accountId:AccountIdType.toption[@ocaml.doc"The identifier of the AWS account assigned to the user."]}letmake?roleName=fun?accountId->fun()->{roleName;accountId}letto_valuex=structure_to_value[("roleName",(Option.mapx.roleName~f:RoleNameType.to_value));("accountId",(Option.mapx.accountId~f:AccountIdType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letaccountId=(Option.map~f:AccountIdType.of_xml)(Xml.childxml_arg0"accountId")inletroleName=(Option.map~f:RoleNameType.of_xml)(Xml.childxml_arg0"roleName")inmake?accountId?roleName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letaccountId=field_mapjson__"accountId"AccountIdType.of_jsoninletroleName=field_mapjson__"roleName"RoleNameType.of_jsoninmake?accountId?roleName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Provides information about the role that is assigned to the user."]moduleAccessKeyType=structtypenonrect=stringletcontext_="AccessKeyType"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:"AccessKeyType"jletto_json=simple_to_jsonto_valueendmoduleExpirationTimestampType=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_valueendmoduleSecretAccessKeyType=structtypenonrect=stringletcontext_="SecretAccessKeyType"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:"SecretAccessKeyType"jletto_json=simple_to_jsonto_valueendmoduleSessionTokenType=structtypenonrect=stringletcontext_="SessionTokenType"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:"SessionTokenType"jletto_json=simple_to_jsonto_valueendmoduleAccessTokenType=structtypenonrect=stringletcontext_="AccessTokenType"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:"AccessTokenType"jletto_json=simple_to_jsonto_valueendmoduleAccountListType=structtypenonrect=AccountInfo.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:AccountInfo.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:AccountInfo.of_xml)letof_jsonj=list_of_json~kind:"AccountListType"~of_json:AccountInfo.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleInvalidRequestException=structtypenonrect={message:ErrorDescription.toption}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"ErrorDescription.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range."]moduleNextTokenType=structtypenonrect=stringletcontext_="NextTokenType"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:"NextTokenType"jletto_json=simple_to_jsonto_valueendmoduleResourceNotFoundException=structtypenonrect={message:ErrorDescription.toption}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"ErrorDescription.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The specified resource doesn't exist."]moduleTooManyRequestsException=structtypenonrect={message:ErrorDescription.toption}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"ErrorDescription.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that the request is being made too frequently and is more than what the server can handle."]moduleUnauthorizedException=structtypenonrect={message:ErrorDescription.toption}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"ErrorDescription.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that the request is not authorized. This can happen due to an invalid access token in the request."]moduleMaxResultType=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:100)>>=(fun()->check_int_mini~min:1));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 MaxResultType"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleRoleListType=structtypenonrect=RoleInfo.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:RoleInfo.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:RoleInfo.of_xml)letof_jsonj=list_of_json~kind:"RoleListType"~of_json:RoleInfo.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleRoleCredentials=structtypenonrect={accessKeyId:AccessKeyType.toption[@ocaml.doc"The identifier used for the temporary security credentials. For more information, see Using Temporary Security Credentials to Request Access to AWS Resources in the AWS IAM User Guide."];secretAccessKey:SecretAccessKeyType.toption[@ocaml.doc"The key that is used to sign the request. For more information, see Using Temporary Security Credentials to Request Access to AWS Resources in the AWS IAM User Guide."];sessionToken:SessionTokenType.toption[@ocaml.doc"The token used for temporary credentials. For more information, see Using Temporary Security Credentials to Request Access to AWS Resources in the AWS IAM User Guide."];expiration:ExpirationTimestampType.toption[@ocaml.doc"The date on which temporary security credentials expire."]}letmake?accessKeyId=fun?secretAccessKey->fun?sessionToken->fun?expiration->fun()->{accessKeyId;secretAccessKey;sessionToken;expiration}letto_valuex=structure_to_value[("accessKeyId",(Option.mapx.accessKeyId~f:AccessKeyType.to_value));("secretAccessKey",(Option.mapx.secretAccessKey~f:SecretAccessKeyType.to_value));("sessionToken",(Option.mapx.sessionToken~f:SessionTokenType.to_value));("expiration",(Option.mapx.expiration~f:ExpirationTimestampType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letexpiration=(Option.map~f:ExpirationTimestampType.of_xml)(Xml.childxml_arg0"expiration")inletsessionToken=(Option.map~f:SessionTokenType.of_xml)(Xml.childxml_arg0"sessionToken")inletsecretAccessKey=(Option.map~f:SecretAccessKeyType.of_xml)(Xml.childxml_arg0"secretAccessKey")inletaccessKeyId=(Option.map~f:AccessKeyType.of_xml)(Xml.childxml_arg0"accessKeyId")inmake?expiration?sessionToken?secretAccessKey?accessKeyId()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letexpiration=field_mapjson__"expiration"ExpirationTimestampType.of_jsoninletsessionToken=field_mapjson__"sessionToken"SessionTokenType.of_jsoninletsecretAccessKey=field_mapjson__"secretAccessKey"SecretAccessKeyType.of_jsoninletaccessKeyId=field_mapjson__"accessKeyId"AccessKeyType.of_jsoninmake?expiration?sessionToken?secretAccessKey?accessKeyId()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Provides information about the role credentials that are assigned to the user."]moduleLogoutRequest=structtypenonrect={accessToken:AccessTokenType.t[@ocaml.doc"The token issued by the CreateToken API call. For more information, see CreateToken in the IAM Identity Center OIDC API Reference Guide."]}letcontext_="LogoutRequest"letmake~accessToken=fun()->{accessToken}letof_header_and_body=((fun(xs,pipe)->make~accessToken:(AccessTokenType.of_string((List.Assoc.find_exn~equal:String.Caseless.equal)xs"x-amz-sso_bearer_token"))())[@warning"-27"])letto_valuex=structure_to_value[("x-amz-sso_bearer_token",(Some(AccessTokenType.to_valuex.accessToken)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letaccessToken=AccessTokenType.of_xml(Xml.child_exn~context:context_xml_arg0"x-amz-sso_bearer_token")inmake~accessToken()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letaccessToken=field_map_exnjson__"accessToken"AccessTokenType.of_jsoninmake~accessToken()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Removes the locally stored SSO tokens from the client-side cache and sends an API call to the IAM Identity Center service to invalidate the corresponding server-side IAM Identity Center sign in session. If a user uses IAM Identity Center to access the AWS CLI, the user\226\128\153s IAM Identity Center sign in session is used to obtain an IAM session, as specified in the corresponding IAM Identity Center permission set. More specifically, IAM Identity Center assumes an IAM role in the target account on behalf of the user, and the corresponding temporary AWS credentials are returned to the client. After user logout, any existing IAM role sessions that were created by using IAM Identity Center permission sets continue based on the duration configured in the permission set. For more information, see User authentications in the IAM Identity Center User Guide."]moduleListAccountsResponse=structtypenonrect={nextToken:NextTokenType.toption[@ocaml.doc"The page token client that is used to retrieve the list of accounts."];accountList:AccountListType.toption[@ocaml.doc"A paginated response with the list of account information and the next token if more results are available."]}typenonrecerror=[`InvalidRequestExceptionofInvalidRequestException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`TooManyRequestsExceptionofTooManyRequestsException.t|`UnauthorizedExceptionofUnauthorizedException.t|`Unknown_operation_errorof(string*stringoption)]letmake?nextToken=fun?accountList->fun()->{nextToken;accountList}leterror_of_jsonnamejson=matchnamewith|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"TooManyRequestsException"->`TooManyRequestsException(TooManyRequestsException.of_jsonjson)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"TooManyRequestsException"->`TooManyRequestsException(TooManyRequestsException.of_xmlxml)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InvalidRequestExceptione->`Assoc[("error",(`String"InvalidRequestException"));("details",(InvalidRequestException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`TooManyRequestsExceptione->`Assoc[("error",(`String"TooManyRequestsException"));("details",(TooManyRequestsException.to_jsone))]|`UnauthorizedExceptione->`Assoc[("error",(`String"UnauthorizedException"));("details",(UnauthorizedException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("nextToken",(Option.mapx.nextToken~f:NextTokenType.to_value));("accountList",(Option.mapx.accountList~f:AccountListType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letaccountList=(Option.map~f:AccountListType.of_xml)(Xml.childxml_arg0"accountList")inletnextToken=(Option.map~f:NextTokenType.of_xml)(Xml.childxml_arg0"nextToken")inmake?accountList?nextToken()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letaccountList=field_mapjson__"accountList"AccountListType.of_jsoninletnextToken=field_mapjson__"nextToken"NextTokenType.of_jsoninmake?accountList?nextToken()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the administrator of the account. For more information, see Assign User Access in the IAM Identity Center User Guide. This operation returns a paginated response."]moduleListAccountsRequest=structtypenonrect={nextToken:NextTokenType.toption[@ocaml.doc"(Optional) When requesting subsequent pages, this is the page token from the previous response output."];maxResults:MaxResultType.toption[@ocaml.doc"This is the number of items clients can request per page."];accessToken:AccessTokenType.t[@ocaml.doc"The token issued by the CreateToken API call. For more information, see CreateToken in the IAM Identity Center OIDC API Reference Guide."]}letcontext_="ListAccountsRequest"letmake?nextToken=fun?maxResults->fun~accessToken->fun()->{nextToken;maxResults;accessToken}letto_valuex=structure_to_value[("next_token",(Option.mapx.nextToken~f:NextTokenType.to_value));("max_result",(Option.mapx.maxResults~f:MaxResultType.to_value));("x-amz-sso_bearer_token",(Some(AccessTokenType.to_valuex.accessToken)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letaccessToken=AccessTokenType.of_xml(Xml.child_exn~context:context_xml_arg0"x-amz-sso_bearer_token")inletmaxResults=(Option.map~f:MaxResultType.of_xml)(Xml.childxml_arg0"max_result")inletnextToken=(Option.map~f:NextTokenType.of_xml)(Xml.childxml_arg0"next_token")inmake~accessToken?maxResults?nextToken()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letaccessToken=field_map_exnjson__"accessToken"AccessTokenType.of_jsoninletmaxResults=field_mapjson__"maxResults"MaxResultType.of_jsoninletnextToken=field_mapjson__"nextToken"NextTokenType.of_jsoninmake~accessToken?maxResults?nextToken()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the administrator of the account. For more information, see Assign User Access in the IAM Identity Center User Guide. This operation returns a paginated response."]moduleListAccountRolesResponse=structtypenonrect={nextToken:NextTokenType.toption[@ocaml.doc"The page token client that is used to retrieve the list of accounts."];roleList:RoleListType.toption[@ocaml.doc"A paginated response with the list of roles and the next token if more results are available."]}typenonrecerror=[`InvalidRequestExceptionofInvalidRequestException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`TooManyRequestsExceptionofTooManyRequestsException.t|`UnauthorizedExceptionofUnauthorizedException.t|`Unknown_operation_errorof(string*stringoption)]letmake?nextToken=fun?roleList->fun()->{nextToken;roleList}leterror_of_jsonnamejson=matchnamewith|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"TooManyRequestsException"->`TooManyRequestsException(TooManyRequestsException.of_jsonjson)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"TooManyRequestsException"->`TooManyRequestsException(TooManyRequestsException.of_xmlxml)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InvalidRequestExceptione->`Assoc[("error",(`String"InvalidRequestException"));("details",(InvalidRequestException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`TooManyRequestsExceptione->`Assoc[("error",(`String"TooManyRequestsException"));("details",(TooManyRequestsException.to_jsone))]|`UnauthorizedExceptione->`Assoc[("error",(`String"UnauthorizedException"));("details",(UnauthorizedException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("nextToken",(Option.mapx.nextToken~f:NextTokenType.to_value));("roleList",(Option.mapx.roleList~f:RoleListType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letroleList=(Option.map~f:RoleListType.of_xml)(Xml.childxml_arg0"roleList")inletnextToken=(Option.map~f:NextTokenType.of_xml)(Xml.childxml_arg0"nextToken")inmake?roleList?nextToken()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letroleList=field_mapjson__"roleList"RoleListType.of_jsoninletnextToken=field_mapjson__"nextToken"NextTokenType.of_jsoninmake?roleList?nextToken()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Lists all roles that are assigned to the user for a given AWS account."]moduleListAccountRolesRequest=structtypenonrect={nextToken:NextTokenType.toption[@ocaml.doc"The page token from the previous response output when you request subsequent pages."];maxResults:MaxResultType.toption[@ocaml.doc"The number of items that clients can request per page."];accessToken:AccessTokenType.t[@ocaml.doc"The token issued by the CreateToken API call. For more information, see CreateToken in the IAM Identity Center OIDC API Reference Guide."];accountId:AccountIdType.t[@ocaml.doc"The identifier for the AWS account that is assigned to the user."]}letcontext_="ListAccountRolesRequest"letmake?nextToken=fun?maxResults->fun~accessToken->fun~accountId->fun()->{nextToken;maxResults;accessToken;accountId}letto_valuex=structure_to_value[("next_token",(Option.mapx.nextToken~f:NextTokenType.to_value));("max_result",(Option.mapx.maxResults~f:MaxResultType.to_value));("x-amz-sso_bearer_token",(Some(AccessTokenType.to_valuex.accessToken)));("account_id",(Some(AccountIdType.to_valuex.accountId)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letaccountId=AccountIdType.of_xml(Xml.child_exn~context:context_xml_arg0"account_id")inletaccessToken=AccessTokenType.of_xml(Xml.child_exn~context:context_xml_arg0"x-amz-sso_bearer_token")inletmaxResults=(Option.map~f:MaxResultType.of_xml)(Xml.childxml_arg0"max_result")inletnextToken=(Option.map~f:NextTokenType.of_xml)(Xml.childxml_arg0"next_token")inmake~accountId~accessToken?maxResults?nextToken()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letaccountId=field_map_exnjson__"accountId"AccountIdType.of_jsoninletaccessToken=field_map_exnjson__"accessToken"AccessTokenType.of_jsoninletmaxResults=field_mapjson__"maxResults"MaxResultType.of_jsoninletnextToken=field_mapjson__"nextToken"NextTokenType.of_jsoninmake~accountId~accessToken?maxResults?nextToken()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Lists all roles that are assigned to the user for a given AWS account."]moduleGetRoleCredentialsResponse=structtypenonrect={roleCredentials:RoleCredentials.toption[@ocaml.doc"The credentials for the role that is assigned to the user."]}typenonrecerror=[`InvalidRequestExceptionofInvalidRequestException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`TooManyRequestsExceptionofTooManyRequestsException.t|`UnauthorizedExceptionofUnauthorizedException.t|`Unknown_operation_errorof(string*stringoption)]letmake?roleCredentials=fun()->{roleCredentials}leterror_of_jsonnamejson=matchnamewith|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"TooManyRequestsException"->`TooManyRequestsException(TooManyRequestsException.of_jsonjson)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"TooManyRequestsException"->`TooManyRequestsException(TooManyRequestsException.of_xmlxml)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InvalidRequestExceptione->`Assoc[("error",(`String"InvalidRequestException"));("details",(InvalidRequestException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`TooManyRequestsExceptione->`Assoc[("error",(`String"TooManyRequestsException"));("details",(TooManyRequestsException.to_jsone))]|`UnauthorizedExceptione->`Assoc[("error",(`String"UnauthorizedException"));("details",(UnauthorizedException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("roleCredentials",(Option.mapx.roleCredentials~f:RoleCredentials.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letroleCredentials=(Option.map~f:RoleCredentials.of_xml)(Xml.childxml_arg0"roleCredentials")inmake?roleCredentials()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letroleCredentials=field_mapjson__"roleCredentials"RoleCredentials.of_jsoninmake?roleCredentials()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns the STS short-term credentials for a given role name that is assigned to the user."]moduleGetRoleCredentialsRequest=structtypenonrect={roleName:RoleNameType.t[@ocaml.doc"The friendly name of the role that is assigned to the user."];accountId:AccountIdType.t[@ocaml.doc"The identifier for the AWS account that is assigned to the user."];accessToken:AccessTokenType.t[@ocaml.doc"The token issued by the CreateToken API call. For more information, see CreateToken in the IAM Identity Center OIDC API Reference Guide."]}letcontext_="GetRoleCredentialsRequest"letmake~roleName=fun~accountId->fun~accessToken->fun()->{roleName;accountId;accessToken}letto_valuex=structure_to_value[("role_name",(Some(RoleNameType.to_valuex.roleName)));("account_id",(Some(AccountIdType.to_valuex.accountId)));("x-amz-sso_bearer_token",(Some(AccessTokenType.to_valuex.accessToken)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letaccessToken=AccessTokenType.of_xml(Xml.child_exn~context:context_xml_arg0"x-amz-sso_bearer_token")inletaccountId=AccountIdType.of_xml(Xml.child_exn~context:context_xml_arg0"account_id")inletroleName=RoleNameType.of_xml(Xml.child_exn~context:context_xml_arg0"role_name")inmake~accessToken~accountId~roleName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letaccessToken=field_map_exnjson__"accessToken"AccessTokenType.of_jsoninletaccountId=field_map_exnjson__"accountId"AccountIdType.of_jsoninletroleName=field_map_exnjson__"roleName"RoleNameType.of_jsoninmake~accessToken~accountId~roleName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns the STS short-term credentials for a given role name that is assigned to the user."]