123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946 |
- // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
- // Package cognitoidentity provides a client for Amazon Cognito Identity.
- package cognitoidentity
- import (
- "fmt"
- "time"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
- )
- const opCreateIdentityPool = "CreateIdentityPool"
- // CreateIdentityPoolRequest generates a "aws/request.Request" representing the
- // client's request for the CreateIdentityPool operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See CreateIdentityPool for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the CreateIdentityPool method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the CreateIdentityPoolRequest method.
- // req, resp := client.CreateIdentityPoolRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) CreateIdentityPoolRequest(input *CreateIdentityPoolInput) (req *request.Request, output *IdentityPool) {
- op := &request.Operation{
- Name: opCreateIdentityPool,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateIdentityPoolInput{}
- }
- req = c.newRequest(op, input, output)
- output = &IdentityPool{}
- req.Data = output
- return
- }
- // CreateIdentityPool API operation for Amazon Cognito Identity.
- //
- // Creates a new identity pool. The identity pool is a store of user identity
- // information that is specific to your AWS account. The limit on identity pools
- // is 60 per account. The keys for SupportedLoginProviders are as follows: Facebook:
- // graph.facebook.com
- // Google: accounts.google.com
- // Amazon: www.amazon.com
- // Twitter: api.twitter.com
- // Digits: www.digits.com
- // You must use AWS Developer credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation CreateIdentityPool for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * ResourceConflictException
- // Thrown when a user tries to use a login which is already linked to another
- // account.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- // * LimitExceededException
- // Thrown when the total number of user pools has exceeded a preset limit.
- //
- func (c *CognitoIdentity) CreateIdentityPool(input *CreateIdentityPoolInput) (*IdentityPool, error) {
- req, out := c.CreateIdentityPoolRequest(input)
- err := req.Send()
- return out, err
- }
- const opDeleteIdentities = "DeleteIdentities"
- // DeleteIdentitiesRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteIdentities operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See DeleteIdentities for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DeleteIdentities method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the DeleteIdentitiesRequest method.
- // req, resp := client.DeleteIdentitiesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) DeleteIdentitiesRequest(input *DeleteIdentitiesInput) (req *request.Request, output *DeleteIdentitiesOutput) {
- op := &request.Operation{
- Name: opDeleteIdentities,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteIdentitiesInput{}
- }
- req = c.newRequest(op, input, output)
- output = &DeleteIdentitiesOutput{}
- req.Data = output
- return
- }
- // DeleteIdentities API operation for Amazon Cognito Identity.
- //
- // Deletes identities from an identity pool. You can specify a list of 1-60
- // identities that you want to delete.
- //
- // You must use AWS Developer credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation DeleteIdentities for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- func (c *CognitoIdentity) DeleteIdentities(input *DeleteIdentitiesInput) (*DeleteIdentitiesOutput, error) {
- req, out := c.DeleteIdentitiesRequest(input)
- err := req.Send()
- return out, err
- }
- const opDeleteIdentityPool = "DeleteIdentityPool"
- // DeleteIdentityPoolRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteIdentityPool operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See DeleteIdentityPool for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DeleteIdentityPool method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the DeleteIdentityPoolRequest method.
- // req, resp := client.DeleteIdentityPoolRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) DeleteIdentityPoolRequest(input *DeleteIdentityPoolInput) (req *request.Request, output *DeleteIdentityPoolOutput) {
- op := &request.Operation{
- Name: opDeleteIdentityPool,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteIdentityPoolInput{}
- }
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
- output = &DeleteIdentityPoolOutput{}
- req.Data = output
- return
- }
- // DeleteIdentityPool API operation for Amazon Cognito Identity.
- //
- // Deletes a user pool. Once a pool is deleted, users will not be able to authenticate
- // with the pool.
- //
- // You must use AWS Developer credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation DeleteIdentityPool for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * ResourceNotFoundException
- // Thrown when the requested resource (for example, a dataset or record) does
- // not exist.
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- func (c *CognitoIdentity) DeleteIdentityPool(input *DeleteIdentityPoolInput) (*DeleteIdentityPoolOutput, error) {
- req, out := c.DeleteIdentityPoolRequest(input)
- err := req.Send()
- return out, err
- }
- const opDescribeIdentity = "DescribeIdentity"
- // DescribeIdentityRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeIdentity operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See DescribeIdentity for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DescribeIdentity method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the DescribeIdentityRequest method.
- // req, resp := client.DescribeIdentityRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) DescribeIdentityRequest(input *DescribeIdentityInput) (req *request.Request, output *IdentityDescription) {
- op := &request.Operation{
- Name: opDescribeIdentity,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DescribeIdentityInput{}
- }
- req = c.newRequest(op, input, output)
- output = &IdentityDescription{}
- req.Data = output
- return
- }
- // DescribeIdentity API operation for Amazon Cognito Identity.
- //
- // Returns metadata related to the given identity, including when the identity
- // was created and any associated linked logins.
- //
- // You must use AWS Developer credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation DescribeIdentity for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * ResourceNotFoundException
- // Thrown when the requested resource (for example, a dataset or record) does
- // not exist.
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- func (c *CognitoIdentity) DescribeIdentity(input *DescribeIdentityInput) (*IdentityDescription, error) {
- req, out := c.DescribeIdentityRequest(input)
- err := req.Send()
- return out, err
- }
- const opDescribeIdentityPool = "DescribeIdentityPool"
- // DescribeIdentityPoolRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeIdentityPool operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See DescribeIdentityPool for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DescribeIdentityPool method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the DescribeIdentityPoolRequest method.
- // req, resp := client.DescribeIdentityPoolRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) DescribeIdentityPoolRequest(input *DescribeIdentityPoolInput) (req *request.Request, output *IdentityPool) {
- op := &request.Operation{
- Name: opDescribeIdentityPool,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DescribeIdentityPoolInput{}
- }
- req = c.newRequest(op, input, output)
- output = &IdentityPool{}
- req.Data = output
- return
- }
- // DescribeIdentityPool API operation for Amazon Cognito Identity.
- //
- // Gets details about a particular identity pool, including the pool name, ID
- // description, creation date, and current number of users.
- //
- // You must use AWS Developer credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation DescribeIdentityPool for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * ResourceNotFoundException
- // Thrown when the requested resource (for example, a dataset or record) does
- // not exist.
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- func (c *CognitoIdentity) DescribeIdentityPool(input *DescribeIdentityPoolInput) (*IdentityPool, error) {
- req, out := c.DescribeIdentityPoolRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetCredentialsForIdentity = "GetCredentialsForIdentity"
- // GetCredentialsForIdentityRequest generates a "aws/request.Request" representing the
- // client's request for the GetCredentialsForIdentity operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetCredentialsForIdentity for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetCredentialsForIdentity method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetCredentialsForIdentityRequest method.
- // req, resp := client.GetCredentialsForIdentityRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) GetCredentialsForIdentityRequest(input *GetCredentialsForIdentityInput) (req *request.Request, output *GetCredentialsForIdentityOutput) {
- op := &request.Operation{
- Name: opGetCredentialsForIdentity,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetCredentialsForIdentityInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetCredentialsForIdentityOutput{}
- req.Data = output
- return
- }
- // GetCredentialsForIdentity API operation for Amazon Cognito Identity.
- //
- // Returns credentials for the provided identity ID. Any provided logins will
- // be validated against supported login providers. If the token is for cognito-identity.amazonaws.com,
- // it will be passed through to AWS Security Token Service with the appropriate
- // role for the token.
- //
- // This is a public API. You do not need any credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation GetCredentialsForIdentity for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * ResourceNotFoundException
- // Thrown when the requested resource (for example, a dataset or record) does
- // not exist.
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * ResourceConflictException
- // Thrown when a user tries to use a login which is already linked to another
- // account.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InvalidIdentityPoolConfigurationException
- // Thrown if the identity pool has no role associated for the given auth type
- // (auth/unauth) or if the AssumeRole fails.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- // * ExternalServiceException
- // An exception thrown when a dependent service such as Facebook or Twitter
- // is not responding
- //
- func (c *CognitoIdentity) GetCredentialsForIdentity(input *GetCredentialsForIdentityInput) (*GetCredentialsForIdentityOutput, error) {
- req, out := c.GetCredentialsForIdentityRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetId = "GetId"
- // GetIdRequest generates a "aws/request.Request" representing the
- // client's request for the GetId operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetId for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetId method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetIdRequest method.
- // req, resp := client.GetIdRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) GetIdRequest(input *GetIdInput) (req *request.Request, output *GetIdOutput) {
- op := &request.Operation{
- Name: opGetId,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetIdInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetIdOutput{}
- req.Data = output
- return
- }
- // GetId API operation for Amazon Cognito Identity.
- //
- // Generates (or retrieves) a Cognito ID. Supplying multiple logins will create
- // an implicit linked account.
- //
- // This is a public API. You do not need any credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation GetId for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * ResourceNotFoundException
- // Thrown when the requested resource (for example, a dataset or record) does
- // not exist.
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * ResourceConflictException
- // Thrown when a user tries to use a login which is already linked to another
- // account.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- // * LimitExceededException
- // Thrown when the total number of user pools has exceeded a preset limit.
- //
- // * ExternalServiceException
- // An exception thrown when a dependent service such as Facebook or Twitter
- // is not responding
- //
- func (c *CognitoIdentity) GetId(input *GetIdInput) (*GetIdOutput, error) {
- req, out := c.GetIdRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetIdentityPoolRoles = "GetIdentityPoolRoles"
- // GetIdentityPoolRolesRequest generates a "aws/request.Request" representing the
- // client's request for the GetIdentityPoolRoles operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetIdentityPoolRoles for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetIdentityPoolRoles method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetIdentityPoolRolesRequest method.
- // req, resp := client.GetIdentityPoolRolesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) GetIdentityPoolRolesRequest(input *GetIdentityPoolRolesInput) (req *request.Request, output *GetIdentityPoolRolesOutput) {
- op := &request.Operation{
- Name: opGetIdentityPoolRoles,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetIdentityPoolRolesInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetIdentityPoolRolesOutput{}
- req.Data = output
- return
- }
- // GetIdentityPoolRoles API operation for Amazon Cognito Identity.
- //
- // Gets the roles for an identity pool.
- //
- // You must use AWS Developer credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation GetIdentityPoolRoles for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * ResourceNotFoundException
- // Thrown when the requested resource (for example, a dataset or record) does
- // not exist.
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * ResourceConflictException
- // Thrown when a user tries to use a login which is already linked to another
- // account.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- func (c *CognitoIdentity) GetIdentityPoolRoles(input *GetIdentityPoolRolesInput) (*GetIdentityPoolRolesOutput, error) {
- req, out := c.GetIdentityPoolRolesRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetOpenIdToken = "GetOpenIdToken"
- // GetOpenIdTokenRequest generates a "aws/request.Request" representing the
- // client's request for the GetOpenIdToken operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetOpenIdToken for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetOpenIdToken method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetOpenIdTokenRequest method.
- // req, resp := client.GetOpenIdTokenRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) GetOpenIdTokenRequest(input *GetOpenIdTokenInput) (req *request.Request, output *GetOpenIdTokenOutput) {
- op := &request.Operation{
- Name: opGetOpenIdToken,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetOpenIdTokenInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetOpenIdTokenOutput{}
- req.Data = output
- return
- }
- // GetOpenIdToken API operation for Amazon Cognito Identity.
- //
- // Gets an OpenID token, using a known Cognito ID. This known Cognito ID is
- // returned by GetId. You can optionally add additional logins for the identity.
- // Supplying multiple logins creates an implicit link.
- //
- // The OpenId token is valid for 15 minutes.
- //
- // This is a public API. You do not need any credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation GetOpenIdToken for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * ResourceNotFoundException
- // Thrown when the requested resource (for example, a dataset or record) does
- // not exist.
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * ResourceConflictException
- // Thrown when a user tries to use a login which is already linked to another
- // account.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- // * ExternalServiceException
- // An exception thrown when a dependent service such as Facebook or Twitter
- // is not responding
- //
- func (c *CognitoIdentity) GetOpenIdToken(input *GetOpenIdTokenInput) (*GetOpenIdTokenOutput, error) {
- req, out := c.GetOpenIdTokenRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetOpenIdTokenForDeveloperIdentity = "GetOpenIdTokenForDeveloperIdentity"
- // GetOpenIdTokenForDeveloperIdentityRequest generates a "aws/request.Request" representing the
- // client's request for the GetOpenIdTokenForDeveloperIdentity operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetOpenIdTokenForDeveloperIdentity for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetOpenIdTokenForDeveloperIdentity method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetOpenIdTokenForDeveloperIdentityRequest method.
- // req, resp := client.GetOpenIdTokenForDeveloperIdentityRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) GetOpenIdTokenForDeveloperIdentityRequest(input *GetOpenIdTokenForDeveloperIdentityInput) (req *request.Request, output *GetOpenIdTokenForDeveloperIdentityOutput) {
- op := &request.Operation{
- Name: opGetOpenIdTokenForDeveloperIdentity,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetOpenIdTokenForDeveloperIdentityInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetOpenIdTokenForDeveloperIdentityOutput{}
- req.Data = output
- return
- }
- // GetOpenIdTokenForDeveloperIdentity API operation for Amazon Cognito Identity.
- //
- // Registers (or retrieves) a Cognito IdentityId and an OpenID Connect token
- // for a user authenticated by your backend authentication process. Supplying
- // multiple logins will create an implicit linked account. You can only specify
- // one developer provider as part of the Logins map, which is linked to the
- // identity pool. The developer provider is the "domain" by which Cognito will
- // refer to your users.
- //
- // You can use GetOpenIdTokenForDeveloperIdentity to create a new identity and
- // to link new logins (that is, user credentials issued by a public provider
- // or developer provider) to an existing identity. When you want to create a
- // new identity, the IdentityId should be null. When you want to associate a
- // new login with an existing authenticated/unauthenticated identity, you can
- // do so by providing the existing IdentityId. This API will create the identity
- // in the specified IdentityPoolId.
- //
- // You must use AWS Developer credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation GetOpenIdTokenForDeveloperIdentity for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * ResourceNotFoundException
- // Thrown when the requested resource (for example, a dataset or record) does
- // not exist.
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * ResourceConflictException
- // Thrown when a user tries to use a login which is already linked to another
- // account.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- // * DeveloperUserAlreadyRegisteredException
- // The provided developer user identifier is already registered with Cognito
- // under a different identity ID.
- //
- func (c *CognitoIdentity) GetOpenIdTokenForDeveloperIdentity(input *GetOpenIdTokenForDeveloperIdentityInput) (*GetOpenIdTokenForDeveloperIdentityOutput, error) {
- req, out := c.GetOpenIdTokenForDeveloperIdentityRequest(input)
- err := req.Send()
- return out, err
- }
- const opListIdentities = "ListIdentities"
- // ListIdentitiesRequest generates a "aws/request.Request" representing the
- // client's request for the ListIdentities operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See ListIdentities for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListIdentities method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the ListIdentitiesRequest method.
- // req, resp := client.ListIdentitiesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) ListIdentitiesRequest(input *ListIdentitiesInput) (req *request.Request, output *ListIdentitiesOutput) {
- op := &request.Operation{
- Name: opListIdentities,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListIdentitiesInput{}
- }
- req = c.newRequest(op, input, output)
- output = &ListIdentitiesOutput{}
- req.Data = output
- return
- }
- // ListIdentities API operation for Amazon Cognito Identity.
- //
- // Lists the identities in a pool.
- //
- // You must use AWS Developer credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation ListIdentities for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * ResourceNotFoundException
- // Thrown when the requested resource (for example, a dataset or record) does
- // not exist.
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- func (c *CognitoIdentity) ListIdentities(input *ListIdentitiesInput) (*ListIdentitiesOutput, error) {
- req, out := c.ListIdentitiesRequest(input)
- err := req.Send()
- return out, err
- }
- const opListIdentityPools = "ListIdentityPools"
- // ListIdentityPoolsRequest generates a "aws/request.Request" representing the
- // client's request for the ListIdentityPools operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See ListIdentityPools for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListIdentityPools method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the ListIdentityPoolsRequest method.
- // req, resp := client.ListIdentityPoolsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) ListIdentityPoolsRequest(input *ListIdentityPoolsInput) (req *request.Request, output *ListIdentityPoolsOutput) {
- op := &request.Operation{
- Name: opListIdentityPools,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListIdentityPoolsInput{}
- }
- req = c.newRequest(op, input, output)
- output = &ListIdentityPoolsOutput{}
- req.Data = output
- return
- }
- // ListIdentityPools API operation for Amazon Cognito Identity.
- //
- // Lists all of the Cognito identity pools registered for your account.
- //
- // You must use AWS Developer credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation ListIdentityPools for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- func (c *CognitoIdentity) ListIdentityPools(input *ListIdentityPoolsInput) (*ListIdentityPoolsOutput, error) {
- req, out := c.ListIdentityPoolsRequest(input)
- err := req.Send()
- return out, err
- }
- const opLookupDeveloperIdentity = "LookupDeveloperIdentity"
- // LookupDeveloperIdentityRequest generates a "aws/request.Request" representing the
- // client's request for the LookupDeveloperIdentity operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See LookupDeveloperIdentity for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the LookupDeveloperIdentity method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the LookupDeveloperIdentityRequest method.
- // req, resp := client.LookupDeveloperIdentityRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) LookupDeveloperIdentityRequest(input *LookupDeveloperIdentityInput) (req *request.Request, output *LookupDeveloperIdentityOutput) {
- op := &request.Operation{
- Name: opLookupDeveloperIdentity,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &LookupDeveloperIdentityInput{}
- }
- req = c.newRequest(op, input, output)
- output = &LookupDeveloperIdentityOutput{}
- req.Data = output
- return
- }
- // LookupDeveloperIdentity API operation for Amazon Cognito Identity.
- //
- // Retrieves the IdentityID associated with a DeveloperUserIdentifier or the
- // list of DeveloperUserIdentifiers associated with an IdentityId for an existing
- // identity. Either IdentityID or DeveloperUserIdentifier must not be null.
- // If you supply only one of these values, the other value will be searched
- // in the database and returned as a part of the response. If you supply both,
- // DeveloperUserIdentifier will be matched against IdentityID. If the values
- // are verified against the database, the response returns both values and is
- // the same as the request. Otherwise a ResourceConflictException is thrown.
- //
- // You must use AWS Developer credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation LookupDeveloperIdentity for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * ResourceNotFoundException
- // Thrown when the requested resource (for example, a dataset or record) does
- // not exist.
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * ResourceConflictException
- // Thrown when a user tries to use a login which is already linked to another
- // account.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- func (c *CognitoIdentity) LookupDeveloperIdentity(input *LookupDeveloperIdentityInput) (*LookupDeveloperIdentityOutput, error) {
- req, out := c.LookupDeveloperIdentityRequest(input)
- err := req.Send()
- return out, err
- }
- const opMergeDeveloperIdentities = "MergeDeveloperIdentities"
- // MergeDeveloperIdentitiesRequest generates a "aws/request.Request" representing the
- // client's request for the MergeDeveloperIdentities operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See MergeDeveloperIdentities for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the MergeDeveloperIdentities method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the MergeDeveloperIdentitiesRequest method.
- // req, resp := client.MergeDeveloperIdentitiesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) MergeDeveloperIdentitiesRequest(input *MergeDeveloperIdentitiesInput) (req *request.Request, output *MergeDeveloperIdentitiesOutput) {
- op := &request.Operation{
- Name: opMergeDeveloperIdentities,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &MergeDeveloperIdentitiesInput{}
- }
- req = c.newRequest(op, input, output)
- output = &MergeDeveloperIdentitiesOutput{}
- req.Data = output
- return
- }
- // MergeDeveloperIdentities API operation for Amazon Cognito Identity.
- //
- // Merges two users having different IdentityIds, existing in the same identity
- // pool, and identified by the same developer provider. You can use this action
- // to request that discrete users be merged and identified as a single user
- // in the Cognito environment. Cognito associates the given source user (SourceUserIdentifier)
- // with the IdentityId of the DestinationUserIdentifier. Only developer-authenticated
- // users can be merged. If the users to be merged are associated with the same
- // public provider, but as two different users, an exception will be thrown.
- //
- // You must use AWS Developer credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation MergeDeveloperIdentities for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * ResourceNotFoundException
- // Thrown when the requested resource (for example, a dataset or record) does
- // not exist.
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * ResourceConflictException
- // Thrown when a user tries to use a login which is already linked to another
- // account.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- func (c *CognitoIdentity) MergeDeveloperIdentities(input *MergeDeveloperIdentitiesInput) (*MergeDeveloperIdentitiesOutput, error) {
- req, out := c.MergeDeveloperIdentitiesRequest(input)
- err := req.Send()
- return out, err
- }
- const opSetIdentityPoolRoles = "SetIdentityPoolRoles"
- // SetIdentityPoolRolesRequest generates a "aws/request.Request" representing the
- // client's request for the SetIdentityPoolRoles operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See SetIdentityPoolRoles for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the SetIdentityPoolRoles method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the SetIdentityPoolRolesRequest method.
- // req, resp := client.SetIdentityPoolRolesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) SetIdentityPoolRolesRequest(input *SetIdentityPoolRolesInput) (req *request.Request, output *SetIdentityPoolRolesOutput) {
- op := &request.Operation{
- Name: opSetIdentityPoolRoles,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &SetIdentityPoolRolesInput{}
- }
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
- output = &SetIdentityPoolRolesOutput{}
- req.Data = output
- return
- }
- // SetIdentityPoolRoles API operation for Amazon Cognito Identity.
- //
- // Sets the roles for an identity pool. These roles are used when making calls
- // to GetCredentialsForIdentity action.
- //
- // You must use AWS Developer credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation SetIdentityPoolRoles for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * ResourceNotFoundException
- // Thrown when the requested resource (for example, a dataset or record) does
- // not exist.
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * ResourceConflictException
- // Thrown when a user tries to use a login which is already linked to another
- // account.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- // * ConcurrentModificationException
- // Thrown if there are parallel requests to modify a resource.
- //
- func (c *CognitoIdentity) SetIdentityPoolRoles(input *SetIdentityPoolRolesInput) (*SetIdentityPoolRolesOutput, error) {
- req, out := c.SetIdentityPoolRolesRequest(input)
- err := req.Send()
- return out, err
- }
- const opUnlinkDeveloperIdentity = "UnlinkDeveloperIdentity"
- // UnlinkDeveloperIdentityRequest generates a "aws/request.Request" representing the
- // client's request for the UnlinkDeveloperIdentity operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UnlinkDeveloperIdentity for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UnlinkDeveloperIdentity method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UnlinkDeveloperIdentityRequest method.
- // req, resp := client.UnlinkDeveloperIdentityRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) UnlinkDeveloperIdentityRequest(input *UnlinkDeveloperIdentityInput) (req *request.Request, output *UnlinkDeveloperIdentityOutput) {
- op := &request.Operation{
- Name: opUnlinkDeveloperIdentity,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UnlinkDeveloperIdentityInput{}
- }
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
- output = &UnlinkDeveloperIdentityOutput{}
- req.Data = output
- return
- }
- // UnlinkDeveloperIdentity API operation for Amazon Cognito Identity.
- //
- // Unlinks a DeveloperUserIdentifier from an existing identity. Unlinked developer
- // users will be considered new identities next time they are seen. If, for
- // a given Cognito identity, you remove all federated identities as well as
- // the developer user identifier, the Cognito identity becomes inaccessible.
- //
- // You must use AWS Developer credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation UnlinkDeveloperIdentity for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * ResourceNotFoundException
- // Thrown when the requested resource (for example, a dataset or record) does
- // not exist.
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * ResourceConflictException
- // Thrown when a user tries to use a login which is already linked to another
- // account.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- func (c *CognitoIdentity) UnlinkDeveloperIdentity(input *UnlinkDeveloperIdentityInput) (*UnlinkDeveloperIdentityOutput, error) {
- req, out := c.UnlinkDeveloperIdentityRequest(input)
- err := req.Send()
- return out, err
- }
- const opUnlinkIdentity = "UnlinkIdentity"
- // UnlinkIdentityRequest generates a "aws/request.Request" representing the
- // client's request for the UnlinkIdentity operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UnlinkIdentity for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UnlinkIdentity method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UnlinkIdentityRequest method.
- // req, resp := client.UnlinkIdentityRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) UnlinkIdentityRequest(input *UnlinkIdentityInput) (req *request.Request, output *UnlinkIdentityOutput) {
- op := &request.Operation{
- Name: opUnlinkIdentity,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UnlinkIdentityInput{}
- }
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
- output = &UnlinkIdentityOutput{}
- req.Data = output
- return
- }
- // UnlinkIdentity API operation for Amazon Cognito Identity.
- //
- // Unlinks a federated identity from an existing account. Unlinked logins will
- // be considered new identities next time they are seen. Removing the last linked
- // login will make this identity inaccessible.
- //
- // This is a public API. You do not need any credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation UnlinkIdentity for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * ResourceNotFoundException
- // Thrown when the requested resource (for example, a dataset or record) does
- // not exist.
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * ResourceConflictException
- // Thrown when a user tries to use a login which is already linked to another
- // account.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- // * ExternalServiceException
- // An exception thrown when a dependent service such as Facebook or Twitter
- // is not responding
- //
- func (c *CognitoIdentity) UnlinkIdentity(input *UnlinkIdentityInput) (*UnlinkIdentityOutput, error) {
- req, out := c.UnlinkIdentityRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateIdentityPool = "UpdateIdentityPool"
- // UpdateIdentityPoolRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateIdentityPool operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UpdateIdentityPool for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateIdentityPool method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UpdateIdentityPoolRequest method.
- // req, resp := client.UpdateIdentityPoolRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CognitoIdentity) UpdateIdentityPoolRequest(input *IdentityPool) (req *request.Request, output *IdentityPool) {
- op := &request.Operation{
- Name: opUpdateIdentityPool,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &IdentityPool{}
- }
- req = c.newRequest(op, input, output)
- output = &IdentityPool{}
- req.Data = output
- return
- }
- // UpdateIdentityPool API operation for Amazon Cognito Identity.
- //
- // Updates a user pool.
- //
- // You must use AWS Developer credentials to call this API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Cognito Identity's
- // API operation UpdateIdentityPool for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidParameterException
- // Thrown for missing or bad input parameter(s).
- //
- // * ResourceNotFoundException
- // Thrown when the requested resource (for example, a dataset or record) does
- // not exist.
- //
- // * NotAuthorizedException
- // Thrown when a user is not authorized to access the requested resource.
- //
- // * ResourceConflictException
- // Thrown when a user tries to use a login which is already linked to another
- // account.
- //
- // * TooManyRequestsException
- // Thrown when a request is throttled.
- //
- // * InternalErrorException
- // Thrown when the service encounters an error during processing the request.
- //
- // * ConcurrentModificationException
- // Thrown if there are parallel requests to modify a resource.
- //
- // * LimitExceededException
- // Thrown when the total number of user pools has exceeded a preset limit.
- //
- func (c *CognitoIdentity) UpdateIdentityPool(input *IdentityPool) (*IdentityPool, error) {
- req, out := c.UpdateIdentityPoolRequest(input)
- err := req.Send()
- return out, err
- }
- // Input to the CreateIdentityPool action.
- type CreateIdentityPoolInput struct {
- _ struct{} `type:"structure"`
- // TRUE if the identity pool supports unauthenticated logins.
- //
- // AllowUnauthenticatedIdentities is a required field
- AllowUnauthenticatedIdentities *bool `type:"boolean" required:"true"`
- // An array of Amazon Cognito Identity user pools.
- CognitoIdentityProviders []*Provider `type:"list"`
- // The "domain" by which Cognito will refer to your users. This name acts as
- // a placeholder that allows your backend and the Cognito service to communicate
- // about the developer provider. For the DeveloperProviderName, you can use
- // letters as well as period (.), underscore (_), and dash (-).
- //
- // Once you have set a developer provider name, you cannot change it. Please
- // take care in setting this parameter.
- DeveloperProviderName *string `min:"1" type:"string"`
- // A string that you provide.
- //
- // IdentityPoolName is a required field
- IdentityPoolName *string `min:"1" type:"string" required:"true"`
- // A list of OpendID Connect provider ARNs.
- OpenIdConnectProviderARNs []*string `type:"list"`
- // An array of Amazon Resource Names (ARNs) of the SAML provider for your identity
- // pool.
- SamlProviderARNs []*string `type:"list"`
- // Optional key:value pairs mapping provider names to provider app IDs.
- SupportedLoginProviders map[string]*string `type:"map"`
- }
- // String returns the string representation
- func (s CreateIdentityPoolInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateIdentityPoolInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateIdentityPoolInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateIdentityPoolInput"}
- if s.AllowUnauthenticatedIdentities == nil {
- invalidParams.Add(request.NewErrParamRequired("AllowUnauthenticatedIdentities"))
- }
- if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1))
- }
- if s.IdentityPoolName == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityPoolName"))
- }
- if s.IdentityPoolName != nil && len(*s.IdentityPoolName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityPoolName", 1))
- }
- if s.CognitoIdentityProviders != nil {
- for i, v := range s.CognitoIdentityProviders {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CognitoIdentityProviders", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Credentials for the provided identity ID.
- type Credentials struct {
- _ struct{} `type:"structure"`
- // The Access Key portion of the credentials.
- AccessKeyId *string `type:"string"`
- // The date at which these credentials will expire.
- Expiration *time.Time `type:"timestamp" timestampFormat:"unix"`
- // The Secret Access Key portion of the credentials
- SecretKey *string `type:"string"`
- // The Session Token portion of the credentials
- SessionToken *string `type:"string"`
- }
- // String returns the string representation
- func (s Credentials) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Credentials) GoString() string {
- return s.String()
- }
- // Input to the DeleteIdentities action.
- type DeleteIdentitiesInput struct {
- _ struct{} `type:"structure"`
- // A list of 1-60 identities that you want to delete.
- //
- // IdentityIdsToDelete is a required field
- IdentityIdsToDelete []*string `min:"1" type:"list" required:"true"`
- }
- // String returns the string representation
- func (s DeleteIdentitiesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteIdentitiesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteIdentitiesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteIdentitiesInput"}
- if s.IdentityIdsToDelete == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityIdsToDelete"))
- }
- if s.IdentityIdsToDelete != nil && len(s.IdentityIdsToDelete) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityIdsToDelete", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Returned in response to a successful DeleteIdentities operation.
- type DeleteIdentitiesOutput struct {
- _ struct{} `type:"structure"`
- // An array of UnprocessedIdentityId objects, each of which contains an ErrorCode
- // and IdentityId.
- UnprocessedIdentityIds []*UnprocessedIdentityId `type:"list"`
- }
- // String returns the string representation
- func (s DeleteIdentitiesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteIdentitiesOutput) GoString() string {
- return s.String()
- }
- // Input to the DeleteIdentityPool action.
- type DeleteIdentityPoolInput struct {
- _ struct{} `type:"structure"`
- // An identity pool ID in the format REGION:GUID.
- //
- // IdentityPoolId is a required field
- IdentityPoolId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteIdentityPoolInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteIdentityPoolInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteIdentityPoolInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteIdentityPoolInput"}
- if s.IdentityPoolId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
- }
- if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type DeleteIdentityPoolOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteIdentityPoolOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteIdentityPoolOutput) GoString() string {
- return s.String()
- }
- // Input to the DescribeIdentity action.
- type DescribeIdentityInput struct {
- _ struct{} `type:"structure"`
- // A unique identifier in the format REGION:GUID.
- //
- // IdentityId is a required field
- IdentityId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DescribeIdentityInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeIdentityInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeIdentityInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityInput"}
- if s.IdentityId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityId"))
- }
- if s.IdentityId != nil && len(*s.IdentityId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Input to the DescribeIdentityPool action.
- type DescribeIdentityPoolInput struct {
- _ struct{} `type:"structure"`
- // An identity pool ID in the format REGION:GUID.
- //
- // IdentityPoolId is a required field
- IdentityPoolId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DescribeIdentityPoolInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeIdentityPoolInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeIdentityPoolInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityPoolInput"}
- if s.IdentityPoolId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
- }
- if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Input to the GetCredentialsForIdentity action.
- type GetCredentialsForIdentityInput struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) of the role to be assumed when multiple roles
- // were received in the token from the identity provider. For example, a SAML-based
- // identity provider. This parameter is optional for identity providers that
- // do not support role customization.
- CustomRoleArn *string `min:"20" type:"string"`
- // A unique identifier in the format REGION:GUID.
- //
- // IdentityId is a required field
- IdentityId *string `min:"1" type:"string" required:"true"`
- // A set of optional name-value pairs that map provider names to provider tokens.
- Logins map[string]*string `type:"map"`
- }
- // String returns the string representation
- func (s GetCredentialsForIdentityInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetCredentialsForIdentityInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetCredentialsForIdentityInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetCredentialsForIdentityInput"}
- if s.CustomRoleArn != nil && len(*s.CustomRoleArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("CustomRoleArn", 20))
- }
- if s.IdentityId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityId"))
- }
- if s.IdentityId != nil && len(*s.IdentityId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Returned in response to a successful GetCredentialsForIdentity operation.
- type GetCredentialsForIdentityOutput struct {
- _ struct{} `type:"structure"`
- // Credentials for the provided identity ID.
- Credentials *Credentials `type:"structure"`
- // A unique identifier in the format REGION:GUID.
- IdentityId *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s GetCredentialsForIdentityOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetCredentialsForIdentityOutput) GoString() string {
- return s.String()
- }
- // Input to the GetId action.
- type GetIdInput struct {
- _ struct{} `type:"structure"`
- // A standard AWS account ID (9+ digits).
- AccountId *string `min:"1" type:"string"`
- // An identity pool ID in the format REGION:GUID.
- //
- // IdentityPoolId is a required field
- IdentityPoolId *string `min:"1" type:"string" required:"true"`
- // A set of optional name-value pairs that map provider names to provider tokens.
- //
- // The available provider names for Logins are as follows: Facebook: graph.facebook.com
- //
- // Google: accounts.google.com
- // Amazon: www.amazon.com
- // Twitter: api.twitter.com
- // Digits: www.digits.com
- Logins map[string]*string `type:"map"`
- }
- // String returns the string representation
- func (s GetIdInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetIdInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetIdInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetIdInput"}
- if s.AccountId != nil && len(*s.AccountId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("AccountId", 1))
- }
- if s.IdentityPoolId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
- }
- if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Returned in response to a GetId request.
- type GetIdOutput struct {
- _ struct{} `type:"structure"`
- // A unique identifier in the format REGION:GUID.
- IdentityId *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s GetIdOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetIdOutput) GoString() string {
- return s.String()
- }
- // Input to the GetIdentityPoolRoles action.
- type GetIdentityPoolRolesInput struct {
- _ struct{} `type:"structure"`
- // An identity pool ID in the format REGION:GUID.
- //
- // IdentityPoolId is a required field
- IdentityPoolId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetIdentityPoolRolesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetIdentityPoolRolesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetIdentityPoolRolesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetIdentityPoolRolesInput"}
- if s.IdentityPoolId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
- }
- if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Returned in response to a successful GetIdentityPoolRoles operation.
- type GetIdentityPoolRolesOutput struct {
- _ struct{} `type:"structure"`
- // An identity pool ID in the format REGION:GUID.
- IdentityPoolId *string `min:"1" type:"string"`
- // The map of roles associated with this pool. Currently only authenticated
- // and unauthenticated roles are supported.
- Roles map[string]*string `type:"map"`
- }
- // String returns the string representation
- func (s GetIdentityPoolRolesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetIdentityPoolRolesOutput) GoString() string {
- return s.String()
- }
- // Input to the GetOpenIdTokenForDeveloperIdentity action.
- type GetOpenIdTokenForDeveloperIdentityInput struct {
- _ struct{} `type:"structure"`
- // A unique identifier in the format REGION:GUID.
- IdentityId *string `min:"1" type:"string"`
- // An identity pool ID in the format REGION:GUID.
- //
- // IdentityPoolId is a required field
- IdentityPoolId *string `min:"1" type:"string" required:"true"`
- // A set of optional name-value pairs that map provider names to provider tokens.
- // Each name-value pair represents a user from a public provider or developer
- // provider. If the user is from a developer provider, the name-value pair will
- // follow the syntax "developer_provider_name": "developer_user_identifier".
- // The developer provider is the "domain" by which Cognito will refer to your
- // users; you provided this domain while creating/updating the identity pool.
- // The developer user identifier is an identifier from your backend that uniquely
- // identifies a user. When you create an identity pool, you can specify the
- // supported logins.
- //
- // Logins is a required field
- Logins map[string]*string `type:"map" required:"true"`
- // The expiration time of the token, in seconds. You can specify a custom expiration
- // time for the token so that you can cache it. If you don't provide an expiration
- // time, the token is valid for 15 minutes. You can exchange the token with
- // Amazon STS for temporary AWS credentials, which are valid for a maximum of
- // one hour. The maximum token duration you can set is 24 hours. You should
- // take care in setting the expiration time for a token, as there are significant
- // security implications: an attacker could use a leaked token to access your
- // AWS resources for the token's duration.
- TokenDuration *int64 `min:"1" type:"long"`
- }
- // String returns the string representation
- func (s GetOpenIdTokenForDeveloperIdentityInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetOpenIdTokenForDeveloperIdentityInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetOpenIdTokenForDeveloperIdentityInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetOpenIdTokenForDeveloperIdentityInput"}
- if s.IdentityId != nil && len(*s.IdentityId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
- }
- if s.IdentityPoolId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
- }
- if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
- }
- if s.Logins == nil {
- invalidParams.Add(request.NewErrParamRequired("Logins"))
- }
- if s.TokenDuration != nil && *s.TokenDuration < 1 {
- invalidParams.Add(request.NewErrParamMinValue("TokenDuration", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Returned in response to a successful GetOpenIdTokenForDeveloperIdentity request.
- type GetOpenIdTokenForDeveloperIdentityOutput struct {
- _ struct{} `type:"structure"`
- // A unique identifier in the format REGION:GUID.
- IdentityId *string `min:"1" type:"string"`
- // An OpenID token.
- Token *string `type:"string"`
- }
- // String returns the string representation
- func (s GetOpenIdTokenForDeveloperIdentityOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetOpenIdTokenForDeveloperIdentityOutput) GoString() string {
- return s.String()
- }
- // Input to the GetOpenIdToken action.
- type GetOpenIdTokenInput struct {
- _ struct{} `type:"structure"`
- // A unique identifier in the format REGION:GUID.
- //
- // IdentityId is a required field
- IdentityId *string `min:"1" type:"string" required:"true"`
- // A set of optional name-value pairs that map provider names to provider tokens.
- // When using graph.facebook.com and www.amazon.com, supply the access_token
- // returned from the provider's authflow. For accounts.google.com or any other
- // OpenId Connect provider, always include the id_token.
- Logins map[string]*string `type:"map"`
- }
- // String returns the string representation
- func (s GetOpenIdTokenInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetOpenIdTokenInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetOpenIdTokenInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetOpenIdTokenInput"}
- if s.IdentityId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityId"))
- }
- if s.IdentityId != nil && len(*s.IdentityId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Returned in response to a successful GetOpenIdToken request.
- type GetOpenIdTokenOutput struct {
- _ struct{} `type:"structure"`
- // A unique identifier in the format REGION:GUID. Note that the IdentityId returned
- // may not match the one passed on input.
- IdentityId *string `min:"1" type:"string"`
- // An OpenID token, valid for 15 minutes.
- Token *string `type:"string"`
- }
- // String returns the string representation
- func (s GetOpenIdTokenOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetOpenIdTokenOutput) GoString() string {
- return s.String()
- }
- // A description of the identity.
- type IdentityDescription struct {
- _ struct{} `type:"structure"`
- // Date on which the identity was created.
- CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"`
- // A unique identifier in the format REGION:GUID.
- IdentityId *string `min:"1" type:"string"`
- // Date on which the identity was last modified.
- LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
- // A set of optional name-value pairs that map provider names to provider tokens.
- Logins []*string `type:"list"`
- }
- // String returns the string representation
- func (s IdentityDescription) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s IdentityDescription) GoString() string {
- return s.String()
- }
- // An object representing a Cognito identity pool.
- type IdentityPool struct {
- _ struct{} `type:"structure"`
- // TRUE if the identity pool supports unauthenticated logins.
- //
- // AllowUnauthenticatedIdentities is a required field
- AllowUnauthenticatedIdentities *bool `type:"boolean" required:"true"`
- // A list representing an Amazon Cognito Identity User Pool and its client ID.
- CognitoIdentityProviders []*Provider `type:"list"`
- // The "domain" by which Cognito will refer to your users.
- DeveloperProviderName *string `min:"1" type:"string"`
- // An identity pool ID in the format REGION:GUID.
- //
- // IdentityPoolId is a required field
- IdentityPoolId *string `min:"1" type:"string" required:"true"`
- // A string that you provide.
- //
- // IdentityPoolName is a required field
- IdentityPoolName *string `min:"1" type:"string" required:"true"`
- // A list of OpendID Connect provider ARNs.
- OpenIdConnectProviderARNs []*string `type:"list"`
- // An array of Amazon Resource Names (ARNs) of the SAML provider for your identity
- // pool.
- SamlProviderARNs []*string `type:"list"`
- // Optional key:value pairs mapping provider names to provider app IDs.
- SupportedLoginProviders map[string]*string `type:"map"`
- }
- // String returns the string representation
- func (s IdentityPool) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s IdentityPool) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *IdentityPool) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "IdentityPool"}
- if s.AllowUnauthenticatedIdentities == nil {
- invalidParams.Add(request.NewErrParamRequired("AllowUnauthenticatedIdentities"))
- }
- if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1))
- }
- if s.IdentityPoolId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
- }
- if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
- }
- if s.IdentityPoolName == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityPoolName"))
- }
- if s.IdentityPoolName != nil && len(*s.IdentityPoolName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityPoolName", 1))
- }
- if s.CognitoIdentityProviders != nil {
- for i, v := range s.CognitoIdentityProviders {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CognitoIdentityProviders", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // A description of the identity pool.
- type IdentityPoolShortDescription struct {
- _ struct{} `type:"structure"`
- // An identity pool ID in the format REGION:GUID.
- IdentityPoolId *string `min:"1" type:"string"`
- // A string that you provide.
- IdentityPoolName *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s IdentityPoolShortDescription) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s IdentityPoolShortDescription) GoString() string {
- return s.String()
- }
- // Input to the ListIdentities action.
- type ListIdentitiesInput struct {
- _ struct{} `type:"structure"`
- // An optional boolean parameter that allows you to hide disabled identities.
- // If omitted, the ListIdentities API will include disabled identities in the
- // response.
- HideDisabled *bool `type:"boolean"`
- // An identity pool ID in the format REGION:GUID.
- //
- // IdentityPoolId is a required field
- IdentityPoolId *string `min:"1" type:"string" required:"true"`
- // The maximum number of identities to return.
- //
- // MaxResults is a required field
- MaxResults *int64 `min:"1" type:"integer" required:"true"`
- // A pagination token.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListIdentitiesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListIdentitiesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListIdentitiesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListIdentitiesInput"}
- if s.IdentityPoolId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
- }
- if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
- }
- if s.MaxResults == nil {
- invalidParams.Add(request.NewErrParamRequired("MaxResults"))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // The response to a ListIdentities request.
- type ListIdentitiesOutput struct {
- _ struct{} `type:"structure"`
- // An object containing a set of identities and associated mappings.
- Identities []*IdentityDescription `type:"list"`
- // An identity pool ID in the format REGION:GUID.
- IdentityPoolId *string `min:"1" type:"string"`
- // A pagination token.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListIdentitiesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListIdentitiesOutput) GoString() string {
- return s.String()
- }
- // Input to the ListIdentityPools action.
- type ListIdentityPoolsInput struct {
- _ struct{} `type:"structure"`
- // The maximum number of identities to return.
- //
- // MaxResults is a required field
- MaxResults *int64 `min:"1" type:"integer" required:"true"`
- // A pagination token.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListIdentityPoolsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListIdentityPoolsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListIdentityPoolsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListIdentityPoolsInput"}
- if s.MaxResults == nil {
- invalidParams.Add(request.NewErrParamRequired("MaxResults"))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // The result of a successful ListIdentityPools action.
- type ListIdentityPoolsOutput struct {
- _ struct{} `type:"structure"`
- // The identity pools returned by the ListIdentityPools action.
- IdentityPools []*IdentityPoolShortDescription `type:"list"`
- // A pagination token.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListIdentityPoolsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListIdentityPoolsOutput) GoString() string {
- return s.String()
- }
- // Input to the LookupDeveloperIdentityInput action.
- type LookupDeveloperIdentityInput struct {
- _ struct{} `type:"structure"`
- // A unique ID used by your backend authentication process to identify a user.
- // Typically, a developer identity provider would issue many developer user
- // identifiers, in keeping with the number of users.
- DeveloperUserIdentifier *string `min:"1" type:"string"`
- // A unique identifier in the format REGION:GUID.
- IdentityId *string `min:"1" type:"string"`
- // An identity pool ID in the format REGION:GUID.
- //
- // IdentityPoolId is a required field
- IdentityPoolId *string `min:"1" type:"string" required:"true"`
- // The maximum number of identities to return.
- MaxResults *int64 `min:"1" type:"integer"`
- // A pagination token. The first call you make will have NextToken set to null.
- // After that the service will return NextToken values as needed. For example,
- // let's say you make a request with MaxResults set to 10, and there are 20
- // matches in the database. The service will return a pagination token as a
- // part of the response. This token can be used to call the API again and get
- // results starting from the 11th match.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s LookupDeveloperIdentityInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s LookupDeveloperIdentityInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *LookupDeveloperIdentityInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LookupDeveloperIdentityInput"}
- if s.DeveloperUserIdentifier != nil && len(*s.DeveloperUserIdentifier) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DeveloperUserIdentifier", 1))
- }
- if s.IdentityId != nil && len(*s.IdentityId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
- }
- if s.IdentityPoolId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
- }
- if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Returned in response to a successful LookupDeveloperIdentity action.
- type LookupDeveloperIdentityOutput struct {
- _ struct{} `type:"structure"`
- // This is the list of developer user identifiers associated with an identity
- // ID. Cognito supports the association of multiple developer user identifiers
- // with an identity ID.
- DeveloperUserIdentifierList []*string `type:"list"`
- // A unique identifier in the format REGION:GUID.
- IdentityId *string `min:"1" type:"string"`
- // A pagination token. The first call you make will have NextToken set to null.
- // After that the service will return NextToken values as needed. For example,
- // let's say you make a request with MaxResults set to 10, and there are 20
- // matches in the database. The service will return a pagination token as a
- // part of the response. This token can be used to call the API again and get
- // results starting from the 11th match.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s LookupDeveloperIdentityOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s LookupDeveloperIdentityOutput) GoString() string {
- return s.String()
- }
- // Input to the MergeDeveloperIdentities action.
- type MergeDeveloperIdentitiesInput struct {
- _ struct{} `type:"structure"`
- // User identifier for the destination user. The value should be a DeveloperUserIdentifier.
- //
- // DestinationUserIdentifier is a required field
- DestinationUserIdentifier *string `min:"1" type:"string" required:"true"`
- // The "domain" by which Cognito will refer to your users. This is a (pseudo)
- // domain name that you provide while creating an identity pool. This name acts
- // as a placeholder that allows your backend and the Cognito service to communicate
- // about the developer provider. For the DeveloperProviderName, you can use
- // letters as well as period (.), underscore (_), and dash (-).
- //
- // DeveloperProviderName is a required field
- DeveloperProviderName *string `min:"1" type:"string" required:"true"`
- // An identity pool ID in the format REGION:GUID.
- //
- // IdentityPoolId is a required field
- IdentityPoolId *string `min:"1" type:"string" required:"true"`
- // User identifier for the source user. The value should be a DeveloperUserIdentifier.
- //
- // SourceUserIdentifier is a required field
- SourceUserIdentifier *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s MergeDeveloperIdentitiesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s MergeDeveloperIdentitiesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *MergeDeveloperIdentitiesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "MergeDeveloperIdentitiesInput"}
- if s.DestinationUserIdentifier == nil {
- invalidParams.Add(request.NewErrParamRequired("DestinationUserIdentifier"))
- }
- if s.DestinationUserIdentifier != nil && len(*s.DestinationUserIdentifier) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DestinationUserIdentifier", 1))
- }
- if s.DeveloperProviderName == nil {
- invalidParams.Add(request.NewErrParamRequired("DeveloperProviderName"))
- }
- if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1))
- }
- if s.IdentityPoolId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
- }
- if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
- }
- if s.SourceUserIdentifier == nil {
- invalidParams.Add(request.NewErrParamRequired("SourceUserIdentifier"))
- }
- if s.SourceUserIdentifier != nil && len(*s.SourceUserIdentifier) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("SourceUserIdentifier", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Returned in response to a successful MergeDeveloperIdentities action.
- type MergeDeveloperIdentitiesOutput struct {
- _ struct{} `type:"structure"`
- // A unique identifier in the format REGION:GUID.
- IdentityId *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s MergeDeveloperIdentitiesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s MergeDeveloperIdentitiesOutput) GoString() string {
- return s.String()
- }
- // A provider representing an Amazon Cognito Identity User Pool and its client
- // ID.
- type Provider struct {
- _ struct{} `type:"structure"`
- // The client ID for the Amazon Cognito Identity User Pool.
- ClientId *string `min:"1" type:"string"`
- // The provider name for an Amazon Cognito Identity User Pool. For example,
- // cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789.
- ProviderName *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s Provider) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Provider) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *Provider) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Provider"}
- if s.ClientId != nil && len(*s.ClientId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ClientId", 1))
- }
- if s.ProviderName != nil && len(*s.ProviderName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ProviderName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Input to the SetIdentityPoolRoles action.
- type SetIdentityPoolRolesInput struct {
- _ struct{} `type:"structure"`
- // An identity pool ID in the format REGION:GUID.
- //
- // IdentityPoolId is a required field
- IdentityPoolId *string `min:"1" type:"string" required:"true"`
- // The map of roles associated with this pool. For a given role, the key will
- // be either "authenticated" or "unauthenticated" and the value will be the
- // Role ARN.
- //
- // Roles is a required field
- Roles map[string]*string `type:"map" required:"true"`
- }
- // String returns the string representation
- func (s SetIdentityPoolRolesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SetIdentityPoolRolesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *SetIdentityPoolRolesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SetIdentityPoolRolesInput"}
- if s.IdentityPoolId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
- }
- if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
- }
- if s.Roles == nil {
- invalidParams.Add(request.NewErrParamRequired("Roles"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type SetIdentityPoolRolesOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s SetIdentityPoolRolesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SetIdentityPoolRolesOutput) GoString() string {
- return s.String()
- }
- // Input to the UnlinkDeveloperIdentity action.
- type UnlinkDeveloperIdentityInput struct {
- _ struct{} `type:"structure"`
- // The "domain" by which Cognito will refer to your users.
- //
- // DeveloperProviderName is a required field
- DeveloperProviderName *string `min:"1" type:"string" required:"true"`
- // A unique ID used by your backend authentication process to identify a user.
- //
- // DeveloperUserIdentifier is a required field
- DeveloperUserIdentifier *string `min:"1" type:"string" required:"true"`
- // A unique identifier in the format REGION:GUID.
- //
- // IdentityId is a required field
- IdentityId *string `min:"1" type:"string" required:"true"`
- // An identity pool ID in the format REGION:GUID.
- //
- // IdentityPoolId is a required field
- IdentityPoolId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s UnlinkDeveloperIdentityInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UnlinkDeveloperIdentityInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UnlinkDeveloperIdentityInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UnlinkDeveloperIdentityInput"}
- if s.DeveloperProviderName == nil {
- invalidParams.Add(request.NewErrParamRequired("DeveloperProviderName"))
- }
- if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1))
- }
- if s.DeveloperUserIdentifier == nil {
- invalidParams.Add(request.NewErrParamRequired("DeveloperUserIdentifier"))
- }
- if s.DeveloperUserIdentifier != nil && len(*s.DeveloperUserIdentifier) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DeveloperUserIdentifier", 1))
- }
- if s.IdentityId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityId"))
- }
- if s.IdentityId != nil && len(*s.IdentityId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
- }
- if s.IdentityPoolId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
- }
- if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UnlinkDeveloperIdentityOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s UnlinkDeveloperIdentityOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UnlinkDeveloperIdentityOutput) GoString() string {
- return s.String()
- }
- // Input to the UnlinkIdentity action.
- type UnlinkIdentityInput struct {
- _ struct{} `type:"structure"`
- // A unique identifier in the format REGION:GUID.
- //
- // IdentityId is a required field
- IdentityId *string `min:"1" type:"string" required:"true"`
- // A set of optional name-value pairs that map provider names to provider tokens.
- //
- // Logins is a required field
- Logins map[string]*string `type:"map" required:"true"`
- // Provider names to unlink from this identity.
- //
- // LoginsToRemove is a required field
- LoginsToRemove []*string `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s UnlinkIdentityInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UnlinkIdentityInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UnlinkIdentityInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UnlinkIdentityInput"}
- if s.IdentityId == nil {
- invalidParams.Add(request.NewErrParamRequired("IdentityId"))
- }
- if s.IdentityId != nil && len(*s.IdentityId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
- }
- if s.Logins == nil {
- invalidParams.Add(request.NewErrParamRequired("Logins"))
- }
- if s.LoginsToRemove == nil {
- invalidParams.Add(request.NewErrParamRequired("LoginsToRemove"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UnlinkIdentityOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s UnlinkIdentityOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UnlinkIdentityOutput) GoString() string {
- return s.String()
- }
- // An array of UnprocessedIdentityId objects, each of which contains an ErrorCode
- // and IdentityId.
- type UnprocessedIdentityId struct {
- _ struct{} `type:"structure"`
- // The error code indicating the type of error that occurred.
- ErrorCode *string `type:"string" enum:"ErrorCode"`
- // A unique identifier in the format REGION:GUID.
- IdentityId *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s UnprocessedIdentityId) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UnprocessedIdentityId) GoString() string {
- return s.String()
- }
- const (
- // ErrorCodeAccessDenied is a ErrorCode enum value
- ErrorCodeAccessDenied = "AccessDenied"
- // ErrorCodeInternalServerError is a ErrorCode enum value
- ErrorCodeInternalServerError = "InternalServerError"
- )
|