api.go 140 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package ram
  3. import (
  4. "time"
  5. "github.com/aws/aws-sdk-go/aws"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/private/protocol"
  9. "github.com/aws/aws-sdk-go/private/protocol/restjson"
  10. )
  11. const opAcceptResourceShareInvitation = "AcceptResourceShareInvitation"
  12. // AcceptResourceShareInvitationRequest generates a "aws/request.Request" representing the
  13. // client's request for the AcceptResourceShareInvitation operation. The "output" return
  14. // value will be populated with the request's response once the request completes
  15. // successfully.
  16. //
  17. // Use "Send" method on the returned Request to send the API call to the service.
  18. // the "output" return value is not valid until after Send returns without error.
  19. //
  20. // See AcceptResourceShareInvitation for more information on using the AcceptResourceShareInvitation
  21. // API call, and error handling.
  22. //
  23. // This method is useful when you want to inject custom logic or configuration
  24. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  25. //
  26. //
  27. // // Example sending a request using the AcceptResourceShareInvitationRequest method.
  28. // req, resp := client.AcceptResourceShareInvitationRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/AcceptResourceShareInvitation
  36. func (c *RAM) AcceptResourceShareInvitationRequest(input *AcceptResourceShareInvitationInput) (req *request.Request, output *AcceptResourceShareInvitationOutput) {
  37. op := &request.Operation{
  38. Name: opAcceptResourceShareInvitation,
  39. HTTPMethod: "POST",
  40. HTTPPath: "/acceptresourceshareinvitation",
  41. }
  42. if input == nil {
  43. input = &AcceptResourceShareInvitationInput{}
  44. }
  45. output = &AcceptResourceShareInvitationOutput{}
  46. req = c.newRequest(op, input, output)
  47. return
  48. }
  49. // AcceptResourceShareInvitation API operation for AWS Resource Access Manager.
  50. //
  51. // Accepts an invitation to a resource share from another AWS account.
  52. //
  53. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  54. // with awserr.Error's Code and Message methods to get detailed information about
  55. // the error.
  56. //
  57. // See the AWS API reference guide for AWS Resource Access Manager's
  58. // API operation AcceptResourceShareInvitation for usage and error information.
  59. //
  60. // Returned Error Codes:
  61. // * ErrCodeMalformedArnException "MalformedArnException"
  62. // The format of an Amazon Resource Name (ARN) is not valid.
  63. //
  64. // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
  65. // The requested operation is not permitted.
  66. //
  67. // * ErrCodeResourceShareInvitationArnNotFoundException "ResourceShareInvitationArnNotFoundException"
  68. // The Amazon Resource Name (ARN) for an invitation was not found.
  69. //
  70. // * ErrCodeResourceShareInvitationAlreadyAcceptedException "ResourceShareInvitationAlreadyAcceptedException"
  71. // The invitation was already accepted.
  72. //
  73. // * ErrCodeResourceShareInvitationAlreadyRejectedException "ResourceShareInvitationAlreadyRejectedException"
  74. // The invitation was already rejected.
  75. //
  76. // * ErrCodeResourceShareInvitationExpiredException "ResourceShareInvitationExpiredException"
  77. // The invitation is expired.
  78. //
  79. // * ErrCodeServerInternalException "ServerInternalException"
  80. // The service could not respond to the request due to an internal problem.
  81. //
  82. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  83. // The service is not available.
  84. //
  85. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/AcceptResourceShareInvitation
  86. func (c *RAM) AcceptResourceShareInvitation(input *AcceptResourceShareInvitationInput) (*AcceptResourceShareInvitationOutput, error) {
  87. req, out := c.AcceptResourceShareInvitationRequest(input)
  88. return out, req.Send()
  89. }
  90. // AcceptResourceShareInvitationWithContext is the same as AcceptResourceShareInvitation with the addition of
  91. // the ability to pass a context and additional request options.
  92. //
  93. // See AcceptResourceShareInvitation for details on how to use this API operation.
  94. //
  95. // The context must be non-nil and will be used for request cancellation. If
  96. // the context is nil a panic will occur. In the future the SDK may create
  97. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  98. // for more information on using Contexts.
  99. func (c *RAM) AcceptResourceShareInvitationWithContext(ctx aws.Context, input *AcceptResourceShareInvitationInput, opts ...request.Option) (*AcceptResourceShareInvitationOutput, error) {
  100. req, out := c.AcceptResourceShareInvitationRequest(input)
  101. req.SetContext(ctx)
  102. req.ApplyOptions(opts...)
  103. return out, req.Send()
  104. }
  105. const opAssociateResourceShare = "AssociateResourceShare"
  106. // AssociateResourceShareRequest generates a "aws/request.Request" representing the
  107. // client's request for the AssociateResourceShare operation. The "output" return
  108. // value will be populated with the request's response once the request completes
  109. // successfully.
  110. //
  111. // Use "Send" method on the returned Request to send the API call to the service.
  112. // the "output" return value is not valid until after Send returns without error.
  113. //
  114. // See AssociateResourceShare for more information on using the AssociateResourceShare
  115. // API call, and error handling.
  116. //
  117. // This method is useful when you want to inject custom logic or configuration
  118. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  119. //
  120. //
  121. // // Example sending a request using the AssociateResourceShareRequest method.
  122. // req, resp := client.AssociateResourceShareRequest(params)
  123. //
  124. // err := req.Send()
  125. // if err == nil { // resp is now filled
  126. // fmt.Println(resp)
  127. // }
  128. //
  129. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/AssociateResourceShare
  130. func (c *RAM) AssociateResourceShareRequest(input *AssociateResourceShareInput) (req *request.Request, output *AssociateResourceShareOutput) {
  131. op := &request.Operation{
  132. Name: opAssociateResourceShare,
  133. HTTPMethod: "POST",
  134. HTTPPath: "/associateresourceshare",
  135. }
  136. if input == nil {
  137. input = &AssociateResourceShareInput{}
  138. }
  139. output = &AssociateResourceShareOutput{}
  140. req = c.newRequest(op, input, output)
  141. return
  142. }
  143. // AssociateResourceShare API operation for AWS Resource Access Manager.
  144. //
  145. // Associates the specified resource share with the specified principals and
  146. // resources.
  147. //
  148. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  149. // with awserr.Error's Code and Message methods to get detailed information about
  150. // the error.
  151. //
  152. // See the AWS API reference guide for AWS Resource Access Manager's
  153. // API operation AssociateResourceShare for usage and error information.
  154. //
  155. // Returned Error Codes:
  156. // * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException"
  157. // A client token input parameter was reused with an operation, but at least
  158. // one of the other input parameters is different from the previous call to
  159. // the operation.
  160. //
  161. // * ErrCodeUnknownResourceException "UnknownResourceException"
  162. // A specified resource was not found.
  163. //
  164. // * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException"
  165. // The requested state transition is not valid.
  166. //
  167. // * ErrCodeResourceShareLimitExceededException "ResourceShareLimitExceededException"
  168. // The requested resource share exceeds the limit for your account.
  169. //
  170. // * ErrCodeMalformedArnException "MalformedArnException"
  171. // The format of an Amazon Resource Name (ARN) is not valid.
  172. //
  173. // * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException"
  174. // The requested state transition is not valid.
  175. //
  176. // * ErrCodeInvalidClientTokenException "InvalidClientTokenException"
  177. // A client token is not valid.
  178. //
  179. // * ErrCodeInvalidParameterException "InvalidParameterException"
  180. // A parameter is not valid.
  181. //
  182. // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
  183. // The requested operation is not permitted.
  184. //
  185. // * ErrCodeServerInternalException "ServerInternalException"
  186. // The service could not respond to the request due to an internal problem.
  187. //
  188. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  189. // The service is not available.
  190. //
  191. // * ErrCodeUnknownResourceException "UnknownResourceException"
  192. // A specified resource was not found.
  193. //
  194. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/AssociateResourceShare
  195. func (c *RAM) AssociateResourceShare(input *AssociateResourceShareInput) (*AssociateResourceShareOutput, error) {
  196. req, out := c.AssociateResourceShareRequest(input)
  197. return out, req.Send()
  198. }
  199. // AssociateResourceShareWithContext is the same as AssociateResourceShare with the addition of
  200. // the ability to pass a context and additional request options.
  201. //
  202. // See AssociateResourceShare for details on how to use this API operation.
  203. //
  204. // The context must be non-nil and will be used for request cancellation. If
  205. // the context is nil a panic will occur. In the future the SDK may create
  206. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  207. // for more information on using Contexts.
  208. func (c *RAM) AssociateResourceShareWithContext(ctx aws.Context, input *AssociateResourceShareInput, opts ...request.Option) (*AssociateResourceShareOutput, error) {
  209. req, out := c.AssociateResourceShareRequest(input)
  210. req.SetContext(ctx)
  211. req.ApplyOptions(opts...)
  212. return out, req.Send()
  213. }
  214. const opCreateResourceShare = "CreateResourceShare"
  215. // CreateResourceShareRequest generates a "aws/request.Request" representing the
  216. // client's request for the CreateResourceShare operation. The "output" return
  217. // value will be populated with the request's response once the request completes
  218. // successfully.
  219. //
  220. // Use "Send" method on the returned Request to send the API call to the service.
  221. // the "output" return value is not valid until after Send returns without error.
  222. //
  223. // See CreateResourceShare for more information on using the CreateResourceShare
  224. // API call, and error handling.
  225. //
  226. // This method is useful when you want to inject custom logic or configuration
  227. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  228. //
  229. //
  230. // // Example sending a request using the CreateResourceShareRequest method.
  231. // req, resp := client.CreateResourceShareRequest(params)
  232. //
  233. // err := req.Send()
  234. // if err == nil { // resp is now filled
  235. // fmt.Println(resp)
  236. // }
  237. //
  238. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/CreateResourceShare
  239. func (c *RAM) CreateResourceShareRequest(input *CreateResourceShareInput) (req *request.Request, output *CreateResourceShareOutput) {
  240. op := &request.Operation{
  241. Name: opCreateResourceShare,
  242. HTTPMethod: "POST",
  243. HTTPPath: "/createresourceshare",
  244. }
  245. if input == nil {
  246. input = &CreateResourceShareInput{}
  247. }
  248. output = &CreateResourceShareOutput{}
  249. req = c.newRequest(op, input, output)
  250. return
  251. }
  252. // CreateResourceShare API operation for AWS Resource Access Manager.
  253. //
  254. // Creates a resource share.
  255. //
  256. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  257. // with awserr.Error's Code and Message methods to get detailed information about
  258. // the error.
  259. //
  260. // See the AWS API reference guide for AWS Resource Access Manager's
  261. // API operation CreateResourceShare for usage and error information.
  262. //
  263. // Returned Error Codes:
  264. // * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException"
  265. // A client token input parameter was reused with an operation, but at least
  266. // one of the other input parameters is different from the previous call to
  267. // the operation.
  268. //
  269. // * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException"
  270. // The requested state transition is not valid.
  271. //
  272. // * ErrCodeUnknownResourceException "UnknownResourceException"
  273. // A specified resource was not found.
  274. //
  275. // * ErrCodeMalformedArnException "MalformedArnException"
  276. // The format of an Amazon Resource Name (ARN) is not valid.
  277. //
  278. // * ErrCodeInvalidClientTokenException "InvalidClientTokenException"
  279. // A client token is not valid.
  280. //
  281. // * ErrCodeInvalidParameterException "InvalidParameterException"
  282. // A parameter is not valid.
  283. //
  284. // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
  285. // The requested operation is not permitted.
  286. //
  287. // * ErrCodeResourceShareLimitExceededException "ResourceShareLimitExceededException"
  288. // The requested resource share exceeds the limit for your account.
  289. //
  290. // * ErrCodeServerInternalException "ServerInternalException"
  291. // The service could not respond to the request due to an internal problem.
  292. //
  293. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  294. // The service is not available.
  295. //
  296. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/CreateResourceShare
  297. func (c *RAM) CreateResourceShare(input *CreateResourceShareInput) (*CreateResourceShareOutput, error) {
  298. req, out := c.CreateResourceShareRequest(input)
  299. return out, req.Send()
  300. }
  301. // CreateResourceShareWithContext is the same as CreateResourceShare with the addition of
  302. // the ability to pass a context and additional request options.
  303. //
  304. // See CreateResourceShare for details on how to use this API operation.
  305. //
  306. // The context must be non-nil and will be used for request cancellation. If
  307. // the context is nil a panic will occur. In the future the SDK may create
  308. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  309. // for more information on using Contexts.
  310. func (c *RAM) CreateResourceShareWithContext(ctx aws.Context, input *CreateResourceShareInput, opts ...request.Option) (*CreateResourceShareOutput, error) {
  311. req, out := c.CreateResourceShareRequest(input)
  312. req.SetContext(ctx)
  313. req.ApplyOptions(opts...)
  314. return out, req.Send()
  315. }
  316. const opDeleteResourceShare = "DeleteResourceShare"
  317. // DeleteResourceShareRequest generates a "aws/request.Request" representing the
  318. // client's request for the DeleteResourceShare operation. The "output" return
  319. // value will be populated with the request's response once the request completes
  320. // successfully.
  321. //
  322. // Use "Send" method on the returned Request to send the API call to the service.
  323. // the "output" return value is not valid until after Send returns without error.
  324. //
  325. // See DeleteResourceShare for more information on using the DeleteResourceShare
  326. // API call, and error handling.
  327. //
  328. // This method is useful when you want to inject custom logic or configuration
  329. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  330. //
  331. //
  332. // // Example sending a request using the DeleteResourceShareRequest method.
  333. // req, resp := client.DeleteResourceShareRequest(params)
  334. //
  335. // err := req.Send()
  336. // if err == nil { // resp is now filled
  337. // fmt.Println(resp)
  338. // }
  339. //
  340. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/DeleteResourceShare
  341. func (c *RAM) DeleteResourceShareRequest(input *DeleteResourceShareInput) (req *request.Request, output *DeleteResourceShareOutput) {
  342. op := &request.Operation{
  343. Name: opDeleteResourceShare,
  344. HTTPMethod: "DELETE",
  345. HTTPPath: "/deleteresourceshare",
  346. }
  347. if input == nil {
  348. input = &DeleteResourceShareInput{}
  349. }
  350. output = &DeleteResourceShareOutput{}
  351. req = c.newRequest(op, input, output)
  352. return
  353. }
  354. // DeleteResourceShare API operation for AWS Resource Access Manager.
  355. //
  356. // Deletes the specified resource share.
  357. //
  358. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  359. // with awserr.Error's Code and Message methods to get detailed information about
  360. // the error.
  361. //
  362. // See the AWS API reference guide for AWS Resource Access Manager's
  363. // API operation DeleteResourceShare for usage and error information.
  364. //
  365. // Returned Error Codes:
  366. // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
  367. // The requested operation is not permitted.
  368. //
  369. // * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException"
  370. // A client token input parameter was reused with an operation, but at least
  371. // one of the other input parameters is different from the previous call to
  372. // the operation.
  373. //
  374. // * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException"
  375. // The requested state transition is not valid.
  376. //
  377. // * ErrCodeUnknownResourceException "UnknownResourceException"
  378. // A specified resource was not found.
  379. //
  380. // * ErrCodeMalformedArnException "MalformedArnException"
  381. // The format of an Amazon Resource Name (ARN) is not valid.
  382. //
  383. // * ErrCodeInvalidClientTokenException "InvalidClientTokenException"
  384. // A client token is not valid.
  385. //
  386. // * ErrCodeInvalidParameterException "InvalidParameterException"
  387. // A parameter is not valid.
  388. //
  389. // * ErrCodeServerInternalException "ServerInternalException"
  390. // The service could not respond to the request due to an internal problem.
  391. //
  392. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  393. // The service is not available.
  394. //
  395. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/DeleteResourceShare
  396. func (c *RAM) DeleteResourceShare(input *DeleteResourceShareInput) (*DeleteResourceShareOutput, error) {
  397. req, out := c.DeleteResourceShareRequest(input)
  398. return out, req.Send()
  399. }
  400. // DeleteResourceShareWithContext is the same as DeleteResourceShare with the addition of
  401. // the ability to pass a context and additional request options.
  402. //
  403. // See DeleteResourceShare for details on how to use this API operation.
  404. //
  405. // The context must be non-nil and will be used for request cancellation. If
  406. // the context is nil a panic will occur. In the future the SDK may create
  407. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  408. // for more information on using Contexts.
  409. func (c *RAM) DeleteResourceShareWithContext(ctx aws.Context, input *DeleteResourceShareInput, opts ...request.Option) (*DeleteResourceShareOutput, error) {
  410. req, out := c.DeleteResourceShareRequest(input)
  411. req.SetContext(ctx)
  412. req.ApplyOptions(opts...)
  413. return out, req.Send()
  414. }
  415. const opDisassociateResourceShare = "DisassociateResourceShare"
  416. // DisassociateResourceShareRequest generates a "aws/request.Request" representing the
  417. // client's request for the DisassociateResourceShare operation. The "output" return
  418. // value will be populated with the request's response once the request completes
  419. // successfully.
  420. //
  421. // Use "Send" method on the returned Request to send the API call to the service.
  422. // the "output" return value is not valid until after Send returns without error.
  423. //
  424. // See DisassociateResourceShare for more information on using the DisassociateResourceShare
  425. // API call, and error handling.
  426. //
  427. // This method is useful when you want to inject custom logic or configuration
  428. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  429. //
  430. //
  431. // // Example sending a request using the DisassociateResourceShareRequest method.
  432. // req, resp := client.DisassociateResourceShareRequest(params)
  433. //
  434. // err := req.Send()
  435. // if err == nil { // resp is now filled
  436. // fmt.Println(resp)
  437. // }
  438. //
  439. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/DisassociateResourceShare
  440. func (c *RAM) DisassociateResourceShareRequest(input *DisassociateResourceShareInput) (req *request.Request, output *DisassociateResourceShareOutput) {
  441. op := &request.Operation{
  442. Name: opDisassociateResourceShare,
  443. HTTPMethod: "POST",
  444. HTTPPath: "/disassociateresourceshare",
  445. }
  446. if input == nil {
  447. input = &DisassociateResourceShareInput{}
  448. }
  449. output = &DisassociateResourceShareOutput{}
  450. req = c.newRequest(op, input, output)
  451. return
  452. }
  453. // DisassociateResourceShare API operation for AWS Resource Access Manager.
  454. //
  455. // Disassociates the specified principals or resources from the specified resource
  456. // share.
  457. //
  458. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  459. // with awserr.Error's Code and Message methods to get detailed information about
  460. // the error.
  461. //
  462. // See the AWS API reference guide for AWS Resource Access Manager's
  463. // API operation DisassociateResourceShare for usage and error information.
  464. //
  465. // Returned Error Codes:
  466. // * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException"
  467. // A client token input parameter was reused with an operation, but at least
  468. // one of the other input parameters is different from the previous call to
  469. // the operation.
  470. //
  471. // * ErrCodeResourceShareLimitExceededException "ResourceShareLimitExceededException"
  472. // The requested resource share exceeds the limit for your account.
  473. //
  474. // * ErrCodeMalformedArnException "MalformedArnException"
  475. // The format of an Amazon Resource Name (ARN) is not valid.
  476. //
  477. // * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException"
  478. // The requested state transition is not valid.
  479. //
  480. // * ErrCodeInvalidClientTokenException "InvalidClientTokenException"
  481. // A client token is not valid.
  482. //
  483. // * ErrCodeInvalidParameterException "InvalidParameterException"
  484. // A parameter is not valid.
  485. //
  486. // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
  487. // The requested operation is not permitted.
  488. //
  489. // * ErrCodeServerInternalException "ServerInternalException"
  490. // The service could not respond to the request due to an internal problem.
  491. //
  492. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  493. // The service is not available.
  494. //
  495. // * ErrCodeUnknownResourceException "UnknownResourceException"
  496. // A specified resource was not found.
  497. //
  498. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/DisassociateResourceShare
  499. func (c *RAM) DisassociateResourceShare(input *DisassociateResourceShareInput) (*DisassociateResourceShareOutput, error) {
  500. req, out := c.DisassociateResourceShareRequest(input)
  501. return out, req.Send()
  502. }
  503. // DisassociateResourceShareWithContext is the same as DisassociateResourceShare with the addition of
  504. // the ability to pass a context and additional request options.
  505. //
  506. // See DisassociateResourceShare for details on how to use this API operation.
  507. //
  508. // The context must be non-nil and will be used for request cancellation. If
  509. // the context is nil a panic will occur. In the future the SDK may create
  510. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  511. // for more information on using Contexts.
  512. func (c *RAM) DisassociateResourceShareWithContext(ctx aws.Context, input *DisassociateResourceShareInput, opts ...request.Option) (*DisassociateResourceShareOutput, error) {
  513. req, out := c.DisassociateResourceShareRequest(input)
  514. req.SetContext(ctx)
  515. req.ApplyOptions(opts...)
  516. return out, req.Send()
  517. }
  518. const opEnableSharingWithAwsOrganization = "EnableSharingWithAwsOrganization"
  519. // EnableSharingWithAwsOrganizationRequest generates a "aws/request.Request" representing the
  520. // client's request for the EnableSharingWithAwsOrganization operation. The "output" return
  521. // value will be populated with the request's response once the request completes
  522. // successfully.
  523. //
  524. // Use "Send" method on the returned Request to send the API call to the service.
  525. // the "output" return value is not valid until after Send returns without error.
  526. //
  527. // See EnableSharingWithAwsOrganization for more information on using the EnableSharingWithAwsOrganization
  528. // API call, and error handling.
  529. //
  530. // This method is useful when you want to inject custom logic or configuration
  531. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  532. //
  533. //
  534. // // Example sending a request using the EnableSharingWithAwsOrganizationRequest method.
  535. // req, resp := client.EnableSharingWithAwsOrganizationRequest(params)
  536. //
  537. // err := req.Send()
  538. // if err == nil { // resp is now filled
  539. // fmt.Println(resp)
  540. // }
  541. //
  542. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/EnableSharingWithAwsOrganization
  543. func (c *RAM) EnableSharingWithAwsOrganizationRequest(input *EnableSharingWithAwsOrganizationInput) (req *request.Request, output *EnableSharingWithAwsOrganizationOutput) {
  544. op := &request.Operation{
  545. Name: opEnableSharingWithAwsOrganization,
  546. HTTPMethod: "POST",
  547. HTTPPath: "/enablesharingwithawsorganization",
  548. }
  549. if input == nil {
  550. input = &EnableSharingWithAwsOrganizationInput{}
  551. }
  552. output = &EnableSharingWithAwsOrganizationOutput{}
  553. req = c.newRequest(op, input, output)
  554. return
  555. }
  556. // EnableSharingWithAwsOrganization API operation for AWS Resource Access Manager.
  557. //
  558. // Enables resource sharing within your organization.
  559. //
  560. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  561. // with awserr.Error's Code and Message methods to get detailed information about
  562. // the error.
  563. //
  564. // See the AWS API reference guide for AWS Resource Access Manager's
  565. // API operation EnableSharingWithAwsOrganization for usage and error information.
  566. //
  567. // Returned Error Codes:
  568. // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
  569. // The requested operation is not permitted.
  570. //
  571. // * ErrCodeServerInternalException "ServerInternalException"
  572. // The service could not respond to the request due to an internal problem.
  573. //
  574. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  575. // The service is not available.
  576. //
  577. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/EnableSharingWithAwsOrganization
  578. func (c *RAM) EnableSharingWithAwsOrganization(input *EnableSharingWithAwsOrganizationInput) (*EnableSharingWithAwsOrganizationOutput, error) {
  579. req, out := c.EnableSharingWithAwsOrganizationRequest(input)
  580. return out, req.Send()
  581. }
  582. // EnableSharingWithAwsOrganizationWithContext is the same as EnableSharingWithAwsOrganization with the addition of
  583. // the ability to pass a context and additional request options.
  584. //
  585. // See EnableSharingWithAwsOrganization for details on how to use this API operation.
  586. //
  587. // The context must be non-nil and will be used for request cancellation. If
  588. // the context is nil a panic will occur. In the future the SDK may create
  589. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  590. // for more information on using Contexts.
  591. func (c *RAM) EnableSharingWithAwsOrganizationWithContext(ctx aws.Context, input *EnableSharingWithAwsOrganizationInput, opts ...request.Option) (*EnableSharingWithAwsOrganizationOutput, error) {
  592. req, out := c.EnableSharingWithAwsOrganizationRequest(input)
  593. req.SetContext(ctx)
  594. req.ApplyOptions(opts...)
  595. return out, req.Send()
  596. }
  597. const opGetResourcePolicies = "GetResourcePolicies"
  598. // GetResourcePoliciesRequest generates a "aws/request.Request" representing the
  599. // client's request for the GetResourcePolicies operation. The "output" return
  600. // value will be populated with the request's response once the request completes
  601. // successfully.
  602. //
  603. // Use "Send" method on the returned Request to send the API call to the service.
  604. // the "output" return value is not valid until after Send returns without error.
  605. //
  606. // See GetResourcePolicies for more information on using the GetResourcePolicies
  607. // API call, and error handling.
  608. //
  609. // This method is useful when you want to inject custom logic or configuration
  610. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  611. //
  612. //
  613. // // Example sending a request using the GetResourcePoliciesRequest method.
  614. // req, resp := client.GetResourcePoliciesRequest(params)
  615. //
  616. // err := req.Send()
  617. // if err == nil { // resp is now filled
  618. // fmt.Println(resp)
  619. // }
  620. //
  621. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourcePolicies
  622. func (c *RAM) GetResourcePoliciesRequest(input *GetResourcePoliciesInput) (req *request.Request, output *GetResourcePoliciesOutput) {
  623. op := &request.Operation{
  624. Name: opGetResourcePolicies,
  625. HTTPMethod: "POST",
  626. HTTPPath: "/getresourcepolicies",
  627. Paginator: &request.Paginator{
  628. InputTokens: []string{"nextToken"},
  629. OutputTokens: []string{"nextToken"},
  630. LimitToken: "maxResults",
  631. TruncationToken: "",
  632. },
  633. }
  634. if input == nil {
  635. input = &GetResourcePoliciesInput{}
  636. }
  637. output = &GetResourcePoliciesOutput{}
  638. req = c.newRequest(op, input, output)
  639. return
  640. }
  641. // GetResourcePolicies API operation for AWS Resource Access Manager.
  642. //
  643. // Gets the policies for the specifies resources.
  644. //
  645. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  646. // with awserr.Error's Code and Message methods to get detailed information about
  647. // the error.
  648. //
  649. // See the AWS API reference guide for AWS Resource Access Manager's
  650. // API operation GetResourcePolicies for usage and error information.
  651. //
  652. // Returned Error Codes:
  653. // * ErrCodeMalformedArnException "MalformedArnException"
  654. // The format of an Amazon Resource Name (ARN) is not valid.
  655. //
  656. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  657. // The specified value for NextToken is not valid.
  658. //
  659. // * ErrCodeInvalidParameterException "InvalidParameterException"
  660. // A parameter is not valid.
  661. //
  662. // * ErrCodeServerInternalException "ServerInternalException"
  663. // The service could not respond to the request due to an internal problem.
  664. //
  665. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  666. // The service is not available.
  667. //
  668. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourcePolicies
  669. func (c *RAM) GetResourcePolicies(input *GetResourcePoliciesInput) (*GetResourcePoliciesOutput, error) {
  670. req, out := c.GetResourcePoliciesRequest(input)
  671. return out, req.Send()
  672. }
  673. // GetResourcePoliciesWithContext is the same as GetResourcePolicies with the addition of
  674. // the ability to pass a context and additional request options.
  675. //
  676. // See GetResourcePolicies for details on how to use this API operation.
  677. //
  678. // The context must be non-nil and will be used for request cancellation. If
  679. // the context is nil a panic will occur. In the future the SDK may create
  680. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  681. // for more information on using Contexts.
  682. func (c *RAM) GetResourcePoliciesWithContext(ctx aws.Context, input *GetResourcePoliciesInput, opts ...request.Option) (*GetResourcePoliciesOutput, error) {
  683. req, out := c.GetResourcePoliciesRequest(input)
  684. req.SetContext(ctx)
  685. req.ApplyOptions(opts...)
  686. return out, req.Send()
  687. }
  688. // GetResourcePoliciesPages iterates over the pages of a GetResourcePolicies operation,
  689. // calling the "fn" function with the response data for each page. To stop
  690. // iterating, return false from the fn function.
  691. //
  692. // See GetResourcePolicies method for more information on how to use this operation.
  693. //
  694. // Note: This operation can generate multiple requests to a service.
  695. //
  696. // // Example iterating over at most 3 pages of a GetResourcePolicies operation.
  697. // pageNum := 0
  698. // err := client.GetResourcePoliciesPages(params,
  699. // func(page *GetResourcePoliciesOutput, lastPage bool) bool {
  700. // pageNum++
  701. // fmt.Println(page)
  702. // return pageNum <= 3
  703. // })
  704. //
  705. func (c *RAM) GetResourcePoliciesPages(input *GetResourcePoliciesInput, fn func(*GetResourcePoliciesOutput, bool) bool) error {
  706. return c.GetResourcePoliciesPagesWithContext(aws.BackgroundContext(), input, fn)
  707. }
  708. // GetResourcePoliciesPagesWithContext same as GetResourcePoliciesPages except
  709. // it takes a Context and allows setting request options on the pages.
  710. //
  711. // The context must be non-nil and will be used for request cancellation. If
  712. // the context is nil a panic will occur. In the future the SDK may create
  713. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  714. // for more information on using Contexts.
  715. func (c *RAM) GetResourcePoliciesPagesWithContext(ctx aws.Context, input *GetResourcePoliciesInput, fn func(*GetResourcePoliciesOutput, bool) bool, opts ...request.Option) error {
  716. p := request.Pagination{
  717. NewRequest: func() (*request.Request, error) {
  718. var inCpy *GetResourcePoliciesInput
  719. if input != nil {
  720. tmp := *input
  721. inCpy = &tmp
  722. }
  723. req, _ := c.GetResourcePoliciesRequest(inCpy)
  724. req.SetContext(ctx)
  725. req.ApplyOptions(opts...)
  726. return req, nil
  727. },
  728. }
  729. cont := true
  730. for p.Next() && cont {
  731. cont = fn(p.Page().(*GetResourcePoliciesOutput), !p.HasNextPage())
  732. }
  733. return p.Err()
  734. }
  735. const opGetResourceShareAssociations = "GetResourceShareAssociations"
  736. // GetResourceShareAssociationsRequest generates a "aws/request.Request" representing the
  737. // client's request for the GetResourceShareAssociations operation. The "output" return
  738. // value will be populated with the request's response once the request completes
  739. // successfully.
  740. //
  741. // Use "Send" method on the returned Request to send the API call to the service.
  742. // the "output" return value is not valid until after Send returns without error.
  743. //
  744. // See GetResourceShareAssociations for more information on using the GetResourceShareAssociations
  745. // API call, and error handling.
  746. //
  747. // This method is useful when you want to inject custom logic or configuration
  748. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  749. //
  750. //
  751. // // Example sending a request using the GetResourceShareAssociationsRequest method.
  752. // req, resp := client.GetResourceShareAssociationsRequest(params)
  753. //
  754. // err := req.Send()
  755. // if err == nil { // resp is now filled
  756. // fmt.Println(resp)
  757. // }
  758. //
  759. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShareAssociations
  760. func (c *RAM) GetResourceShareAssociationsRequest(input *GetResourceShareAssociationsInput) (req *request.Request, output *GetResourceShareAssociationsOutput) {
  761. op := &request.Operation{
  762. Name: opGetResourceShareAssociations,
  763. HTTPMethod: "POST",
  764. HTTPPath: "/getresourceshareassociations",
  765. Paginator: &request.Paginator{
  766. InputTokens: []string{"nextToken"},
  767. OutputTokens: []string{"nextToken"},
  768. LimitToken: "maxResults",
  769. TruncationToken: "",
  770. },
  771. }
  772. if input == nil {
  773. input = &GetResourceShareAssociationsInput{}
  774. }
  775. output = &GetResourceShareAssociationsOutput{}
  776. req = c.newRequest(op, input, output)
  777. return
  778. }
  779. // GetResourceShareAssociations API operation for AWS Resource Access Manager.
  780. //
  781. // Gets the associations for the specified resource share.
  782. //
  783. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  784. // with awserr.Error's Code and Message methods to get detailed information about
  785. // the error.
  786. //
  787. // See the AWS API reference guide for AWS Resource Access Manager's
  788. // API operation GetResourceShareAssociations for usage and error information.
  789. //
  790. // Returned Error Codes:
  791. // * ErrCodeUnknownResourceException "UnknownResourceException"
  792. // A specified resource was not found.
  793. //
  794. // * ErrCodeMalformedArnException "MalformedArnException"
  795. // The format of an Amazon Resource Name (ARN) is not valid.
  796. //
  797. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  798. // The specified value for NextToken is not valid.
  799. //
  800. // * ErrCodeInvalidParameterException "InvalidParameterException"
  801. // A parameter is not valid.
  802. //
  803. // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
  804. // The requested operation is not permitted.
  805. //
  806. // * ErrCodeServerInternalException "ServerInternalException"
  807. // The service could not respond to the request due to an internal problem.
  808. //
  809. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  810. // The service is not available.
  811. //
  812. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShareAssociations
  813. func (c *RAM) GetResourceShareAssociations(input *GetResourceShareAssociationsInput) (*GetResourceShareAssociationsOutput, error) {
  814. req, out := c.GetResourceShareAssociationsRequest(input)
  815. return out, req.Send()
  816. }
  817. // GetResourceShareAssociationsWithContext is the same as GetResourceShareAssociations with the addition of
  818. // the ability to pass a context and additional request options.
  819. //
  820. // See GetResourceShareAssociations for details on how to use this API operation.
  821. //
  822. // The context must be non-nil and will be used for request cancellation. If
  823. // the context is nil a panic will occur. In the future the SDK may create
  824. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  825. // for more information on using Contexts.
  826. func (c *RAM) GetResourceShareAssociationsWithContext(ctx aws.Context, input *GetResourceShareAssociationsInput, opts ...request.Option) (*GetResourceShareAssociationsOutput, error) {
  827. req, out := c.GetResourceShareAssociationsRequest(input)
  828. req.SetContext(ctx)
  829. req.ApplyOptions(opts...)
  830. return out, req.Send()
  831. }
  832. // GetResourceShareAssociationsPages iterates over the pages of a GetResourceShareAssociations operation,
  833. // calling the "fn" function with the response data for each page. To stop
  834. // iterating, return false from the fn function.
  835. //
  836. // See GetResourceShareAssociations method for more information on how to use this operation.
  837. //
  838. // Note: This operation can generate multiple requests to a service.
  839. //
  840. // // Example iterating over at most 3 pages of a GetResourceShareAssociations operation.
  841. // pageNum := 0
  842. // err := client.GetResourceShareAssociationsPages(params,
  843. // func(page *GetResourceShareAssociationsOutput, lastPage bool) bool {
  844. // pageNum++
  845. // fmt.Println(page)
  846. // return pageNum <= 3
  847. // })
  848. //
  849. func (c *RAM) GetResourceShareAssociationsPages(input *GetResourceShareAssociationsInput, fn func(*GetResourceShareAssociationsOutput, bool) bool) error {
  850. return c.GetResourceShareAssociationsPagesWithContext(aws.BackgroundContext(), input, fn)
  851. }
  852. // GetResourceShareAssociationsPagesWithContext same as GetResourceShareAssociationsPages except
  853. // it takes a Context and allows setting request options on the pages.
  854. //
  855. // The context must be non-nil and will be used for request cancellation. If
  856. // the context is nil a panic will occur. In the future the SDK may create
  857. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  858. // for more information on using Contexts.
  859. func (c *RAM) GetResourceShareAssociationsPagesWithContext(ctx aws.Context, input *GetResourceShareAssociationsInput, fn func(*GetResourceShareAssociationsOutput, bool) bool, opts ...request.Option) error {
  860. p := request.Pagination{
  861. NewRequest: func() (*request.Request, error) {
  862. var inCpy *GetResourceShareAssociationsInput
  863. if input != nil {
  864. tmp := *input
  865. inCpy = &tmp
  866. }
  867. req, _ := c.GetResourceShareAssociationsRequest(inCpy)
  868. req.SetContext(ctx)
  869. req.ApplyOptions(opts...)
  870. return req, nil
  871. },
  872. }
  873. cont := true
  874. for p.Next() && cont {
  875. cont = fn(p.Page().(*GetResourceShareAssociationsOutput), !p.HasNextPage())
  876. }
  877. return p.Err()
  878. }
  879. const opGetResourceShareInvitations = "GetResourceShareInvitations"
  880. // GetResourceShareInvitationsRequest generates a "aws/request.Request" representing the
  881. // client's request for the GetResourceShareInvitations operation. The "output" return
  882. // value will be populated with the request's response once the request completes
  883. // successfully.
  884. //
  885. // Use "Send" method on the returned Request to send the API call to the service.
  886. // the "output" return value is not valid until after Send returns without error.
  887. //
  888. // See GetResourceShareInvitations for more information on using the GetResourceShareInvitations
  889. // API call, and error handling.
  890. //
  891. // This method is useful when you want to inject custom logic or configuration
  892. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  893. //
  894. //
  895. // // Example sending a request using the GetResourceShareInvitationsRequest method.
  896. // req, resp := client.GetResourceShareInvitationsRequest(params)
  897. //
  898. // err := req.Send()
  899. // if err == nil { // resp is now filled
  900. // fmt.Println(resp)
  901. // }
  902. //
  903. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShareInvitations
  904. func (c *RAM) GetResourceShareInvitationsRequest(input *GetResourceShareInvitationsInput) (req *request.Request, output *GetResourceShareInvitationsOutput) {
  905. op := &request.Operation{
  906. Name: opGetResourceShareInvitations,
  907. HTTPMethod: "POST",
  908. HTTPPath: "/getresourceshareinvitations",
  909. Paginator: &request.Paginator{
  910. InputTokens: []string{"nextToken"},
  911. OutputTokens: []string{"nextToken"},
  912. LimitToken: "maxResults",
  913. TruncationToken: "",
  914. },
  915. }
  916. if input == nil {
  917. input = &GetResourceShareInvitationsInput{}
  918. }
  919. output = &GetResourceShareInvitationsOutput{}
  920. req = c.newRequest(op, input, output)
  921. return
  922. }
  923. // GetResourceShareInvitations API operation for AWS Resource Access Manager.
  924. //
  925. // Gets the specified invitations for resource sharing.
  926. //
  927. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  928. // with awserr.Error's Code and Message methods to get detailed information about
  929. // the error.
  930. //
  931. // See the AWS API reference guide for AWS Resource Access Manager's
  932. // API operation GetResourceShareInvitations for usage and error information.
  933. //
  934. // Returned Error Codes:
  935. // * ErrCodeResourceShareInvitationArnNotFoundException "ResourceShareInvitationArnNotFoundException"
  936. // The Amazon Resource Name (ARN) for an invitation was not found.
  937. //
  938. // * ErrCodeInvalidMaxResultsException "InvalidMaxResultsException"
  939. // The specified value for MaxResults is not valid.
  940. //
  941. // * ErrCodeMalformedArnException "MalformedArnException"
  942. // The format of an Amazon Resource Name (ARN) is not valid.
  943. //
  944. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  945. // The specified value for NextToken is not valid.
  946. //
  947. // * ErrCodeInvalidParameterException "InvalidParameterException"
  948. // A parameter is not valid.
  949. //
  950. // * ErrCodeServerInternalException "ServerInternalException"
  951. // The service could not respond to the request due to an internal problem.
  952. //
  953. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  954. // The service is not available.
  955. //
  956. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShareInvitations
  957. func (c *RAM) GetResourceShareInvitations(input *GetResourceShareInvitationsInput) (*GetResourceShareInvitationsOutput, error) {
  958. req, out := c.GetResourceShareInvitationsRequest(input)
  959. return out, req.Send()
  960. }
  961. // GetResourceShareInvitationsWithContext is the same as GetResourceShareInvitations with the addition of
  962. // the ability to pass a context and additional request options.
  963. //
  964. // See GetResourceShareInvitations for details on how to use this API operation.
  965. //
  966. // The context must be non-nil and will be used for request cancellation. If
  967. // the context is nil a panic will occur. In the future the SDK may create
  968. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  969. // for more information on using Contexts.
  970. func (c *RAM) GetResourceShareInvitationsWithContext(ctx aws.Context, input *GetResourceShareInvitationsInput, opts ...request.Option) (*GetResourceShareInvitationsOutput, error) {
  971. req, out := c.GetResourceShareInvitationsRequest(input)
  972. req.SetContext(ctx)
  973. req.ApplyOptions(opts...)
  974. return out, req.Send()
  975. }
  976. // GetResourceShareInvitationsPages iterates over the pages of a GetResourceShareInvitations operation,
  977. // calling the "fn" function with the response data for each page. To stop
  978. // iterating, return false from the fn function.
  979. //
  980. // See GetResourceShareInvitations method for more information on how to use this operation.
  981. //
  982. // Note: This operation can generate multiple requests to a service.
  983. //
  984. // // Example iterating over at most 3 pages of a GetResourceShareInvitations operation.
  985. // pageNum := 0
  986. // err := client.GetResourceShareInvitationsPages(params,
  987. // func(page *GetResourceShareInvitationsOutput, lastPage bool) bool {
  988. // pageNum++
  989. // fmt.Println(page)
  990. // return pageNum <= 3
  991. // })
  992. //
  993. func (c *RAM) GetResourceShareInvitationsPages(input *GetResourceShareInvitationsInput, fn func(*GetResourceShareInvitationsOutput, bool) bool) error {
  994. return c.GetResourceShareInvitationsPagesWithContext(aws.BackgroundContext(), input, fn)
  995. }
  996. // GetResourceShareInvitationsPagesWithContext same as GetResourceShareInvitationsPages except
  997. // it takes a Context and allows setting request options on the pages.
  998. //
  999. // The context must be non-nil and will be used for request cancellation. If
  1000. // the context is nil a panic will occur. In the future the SDK may create
  1001. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1002. // for more information on using Contexts.
  1003. func (c *RAM) GetResourceShareInvitationsPagesWithContext(ctx aws.Context, input *GetResourceShareInvitationsInput, fn func(*GetResourceShareInvitationsOutput, bool) bool, opts ...request.Option) error {
  1004. p := request.Pagination{
  1005. NewRequest: func() (*request.Request, error) {
  1006. var inCpy *GetResourceShareInvitationsInput
  1007. if input != nil {
  1008. tmp := *input
  1009. inCpy = &tmp
  1010. }
  1011. req, _ := c.GetResourceShareInvitationsRequest(inCpy)
  1012. req.SetContext(ctx)
  1013. req.ApplyOptions(opts...)
  1014. return req, nil
  1015. },
  1016. }
  1017. cont := true
  1018. for p.Next() && cont {
  1019. cont = fn(p.Page().(*GetResourceShareInvitationsOutput), !p.HasNextPage())
  1020. }
  1021. return p.Err()
  1022. }
  1023. const opGetResourceShares = "GetResourceShares"
  1024. // GetResourceSharesRequest generates a "aws/request.Request" representing the
  1025. // client's request for the GetResourceShares operation. The "output" return
  1026. // value will be populated with the request's response once the request completes
  1027. // successfully.
  1028. //
  1029. // Use "Send" method on the returned Request to send the API call to the service.
  1030. // the "output" return value is not valid until after Send returns without error.
  1031. //
  1032. // See GetResourceShares for more information on using the GetResourceShares
  1033. // API call, and error handling.
  1034. //
  1035. // This method is useful when you want to inject custom logic or configuration
  1036. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1037. //
  1038. //
  1039. // // Example sending a request using the GetResourceSharesRequest method.
  1040. // req, resp := client.GetResourceSharesRequest(params)
  1041. //
  1042. // err := req.Send()
  1043. // if err == nil { // resp is now filled
  1044. // fmt.Println(resp)
  1045. // }
  1046. //
  1047. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShares
  1048. func (c *RAM) GetResourceSharesRequest(input *GetResourceSharesInput) (req *request.Request, output *GetResourceSharesOutput) {
  1049. op := &request.Operation{
  1050. Name: opGetResourceShares,
  1051. HTTPMethod: "POST",
  1052. HTTPPath: "/getresourceshares",
  1053. Paginator: &request.Paginator{
  1054. InputTokens: []string{"nextToken"},
  1055. OutputTokens: []string{"nextToken"},
  1056. LimitToken: "maxResults",
  1057. TruncationToken: "",
  1058. },
  1059. }
  1060. if input == nil {
  1061. input = &GetResourceSharesInput{}
  1062. }
  1063. output = &GetResourceSharesOutput{}
  1064. req = c.newRequest(op, input, output)
  1065. return
  1066. }
  1067. // GetResourceShares API operation for AWS Resource Access Manager.
  1068. //
  1069. // Gets the specified resource shares or all of your resource shares.
  1070. //
  1071. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1072. // with awserr.Error's Code and Message methods to get detailed information about
  1073. // the error.
  1074. //
  1075. // See the AWS API reference guide for AWS Resource Access Manager's
  1076. // API operation GetResourceShares for usage and error information.
  1077. //
  1078. // Returned Error Codes:
  1079. // * ErrCodeUnknownResourceException "UnknownResourceException"
  1080. // A specified resource was not found.
  1081. //
  1082. // * ErrCodeMalformedArnException "MalformedArnException"
  1083. // The format of an Amazon Resource Name (ARN) is not valid.
  1084. //
  1085. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  1086. // The specified value for NextToken is not valid.
  1087. //
  1088. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1089. // A parameter is not valid.
  1090. //
  1091. // * ErrCodeServerInternalException "ServerInternalException"
  1092. // The service could not respond to the request due to an internal problem.
  1093. //
  1094. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1095. // The service is not available.
  1096. //
  1097. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShares
  1098. func (c *RAM) GetResourceShares(input *GetResourceSharesInput) (*GetResourceSharesOutput, error) {
  1099. req, out := c.GetResourceSharesRequest(input)
  1100. return out, req.Send()
  1101. }
  1102. // GetResourceSharesWithContext is the same as GetResourceShares with the addition of
  1103. // the ability to pass a context and additional request options.
  1104. //
  1105. // See GetResourceShares for details on how to use this API operation.
  1106. //
  1107. // The context must be non-nil and will be used for request cancellation. If
  1108. // the context is nil a panic will occur. In the future the SDK may create
  1109. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1110. // for more information on using Contexts.
  1111. func (c *RAM) GetResourceSharesWithContext(ctx aws.Context, input *GetResourceSharesInput, opts ...request.Option) (*GetResourceSharesOutput, error) {
  1112. req, out := c.GetResourceSharesRequest(input)
  1113. req.SetContext(ctx)
  1114. req.ApplyOptions(opts...)
  1115. return out, req.Send()
  1116. }
  1117. // GetResourceSharesPages iterates over the pages of a GetResourceShares operation,
  1118. // calling the "fn" function with the response data for each page. To stop
  1119. // iterating, return false from the fn function.
  1120. //
  1121. // See GetResourceShares method for more information on how to use this operation.
  1122. //
  1123. // Note: This operation can generate multiple requests to a service.
  1124. //
  1125. // // Example iterating over at most 3 pages of a GetResourceShares operation.
  1126. // pageNum := 0
  1127. // err := client.GetResourceSharesPages(params,
  1128. // func(page *GetResourceSharesOutput, lastPage bool) bool {
  1129. // pageNum++
  1130. // fmt.Println(page)
  1131. // return pageNum <= 3
  1132. // })
  1133. //
  1134. func (c *RAM) GetResourceSharesPages(input *GetResourceSharesInput, fn func(*GetResourceSharesOutput, bool) bool) error {
  1135. return c.GetResourceSharesPagesWithContext(aws.BackgroundContext(), input, fn)
  1136. }
  1137. // GetResourceSharesPagesWithContext same as GetResourceSharesPages except
  1138. // it takes a Context and allows setting request options on the pages.
  1139. //
  1140. // The context must be non-nil and will be used for request cancellation. If
  1141. // the context is nil a panic will occur. In the future the SDK may create
  1142. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1143. // for more information on using Contexts.
  1144. func (c *RAM) GetResourceSharesPagesWithContext(ctx aws.Context, input *GetResourceSharesInput, fn func(*GetResourceSharesOutput, bool) bool, opts ...request.Option) error {
  1145. p := request.Pagination{
  1146. NewRequest: func() (*request.Request, error) {
  1147. var inCpy *GetResourceSharesInput
  1148. if input != nil {
  1149. tmp := *input
  1150. inCpy = &tmp
  1151. }
  1152. req, _ := c.GetResourceSharesRequest(inCpy)
  1153. req.SetContext(ctx)
  1154. req.ApplyOptions(opts...)
  1155. return req, nil
  1156. },
  1157. }
  1158. cont := true
  1159. for p.Next() && cont {
  1160. cont = fn(p.Page().(*GetResourceSharesOutput), !p.HasNextPage())
  1161. }
  1162. return p.Err()
  1163. }
  1164. const opListPrincipals = "ListPrincipals"
  1165. // ListPrincipalsRequest generates a "aws/request.Request" representing the
  1166. // client's request for the ListPrincipals operation. The "output" return
  1167. // value will be populated with the request's response once the request completes
  1168. // successfully.
  1169. //
  1170. // Use "Send" method on the returned Request to send the API call to the service.
  1171. // the "output" return value is not valid until after Send returns without error.
  1172. //
  1173. // See ListPrincipals for more information on using the ListPrincipals
  1174. // API call, and error handling.
  1175. //
  1176. // This method is useful when you want to inject custom logic or configuration
  1177. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1178. //
  1179. //
  1180. // // Example sending a request using the ListPrincipalsRequest method.
  1181. // req, resp := client.ListPrincipalsRequest(params)
  1182. //
  1183. // err := req.Send()
  1184. // if err == nil { // resp is now filled
  1185. // fmt.Println(resp)
  1186. // }
  1187. //
  1188. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/ListPrincipals
  1189. func (c *RAM) ListPrincipalsRequest(input *ListPrincipalsInput) (req *request.Request, output *ListPrincipalsOutput) {
  1190. op := &request.Operation{
  1191. Name: opListPrincipals,
  1192. HTTPMethod: "POST",
  1193. HTTPPath: "/listprincipals",
  1194. Paginator: &request.Paginator{
  1195. InputTokens: []string{"nextToken"},
  1196. OutputTokens: []string{"nextToken"},
  1197. LimitToken: "maxResults",
  1198. TruncationToken: "",
  1199. },
  1200. }
  1201. if input == nil {
  1202. input = &ListPrincipalsInput{}
  1203. }
  1204. output = &ListPrincipalsOutput{}
  1205. req = c.newRequest(op, input, output)
  1206. return
  1207. }
  1208. // ListPrincipals API operation for AWS Resource Access Manager.
  1209. //
  1210. // Lists the principals with access to the specified resource.
  1211. //
  1212. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1213. // with awserr.Error's Code and Message methods to get detailed information about
  1214. // the error.
  1215. //
  1216. // See the AWS API reference guide for AWS Resource Access Manager's
  1217. // API operation ListPrincipals for usage and error information.
  1218. //
  1219. // Returned Error Codes:
  1220. // * ErrCodeMalformedArnException "MalformedArnException"
  1221. // The format of an Amazon Resource Name (ARN) is not valid.
  1222. //
  1223. // * ErrCodeUnknownResourceException "UnknownResourceException"
  1224. // A specified resource was not found.
  1225. //
  1226. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  1227. // The specified value for NextToken is not valid.
  1228. //
  1229. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1230. // A parameter is not valid.
  1231. //
  1232. // * ErrCodeServerInternalException "ServerInternalException"
  1233. // The service could not respond to the request due to an internal problem.
  1234. //
  1235. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1236. // The service is not available.
  1237. //
  1238. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/ListPrincipals
  1239. func (c *RAM) ListPrincipals(input *ListPrincipalsInput) (*ListPrincipalsOutput, error) {
  1240. req, out := c.ListPrincipalsRequest(input)
  1241. return out, req.Send()
  1242. }
  1243. // ListPrincipalsWithContext is the same as ListPrincipals with the addition of
  1244. // the ability to pass a context and additional request options.
  1245. //
  1246. // See ListPrincipals for details on how to use this API operation.
  1247. //
  1248. // The context must be non-nil and will be used for request cancellation. If
  1249. // the context is nil a panic will occur. In the future the SDK may create
  1250. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1251. // for more information on using Contexts.
  1252. func (c *RAM) ListPrincipalsWithContext(ctx aws.Context, input *ListPrincipalsInput, opts ...request.Option) (*ListPrincipalsOutput, error) {
  1253. req, out := c.ListPrincipalsRequest(input)
  1254. req.SetContext(ctx)
  1255. req.ApplyOptions(opts...)
  1256. return out, req.Send()
  1257. }
  1258. // ListPrincipalsPages iterates over the pages of a ListPrincipals operation,
  1259. // calling the "fn" function with the response data for each page. To stop
  1260. // iterating, return false from the fn function.
  1261. //
  1262. // See ListPrincipals method for more information on how to use this operation.
  1263. //
  1264. // Note: This operation can generate multiple requests to a service.
  1265. //
  1266. // // Example iterating over at most 3 pages of a ListPrincipals operation.
  1267. // pageNum := 0
  1268. // err := client.ListPrincipalsPages(params,
  1269. // func(page *ListPrincipalsOutput, lastPage bool) bool {
  1270. // pageNum++
  1271. // fmt.Println(page)
  1272. // return pageNum <= 3
  1273. // })
  1274. //
  1275. func (c *RAM) ListPrincipalsPages(input *ListPrincipalsInput, fn func(*ListPrincipalsOutput, bool) bool) error {
  1276. return c.ListPrincipalsPagesWithContext(aws.BackgroundContext(), input, fn)
  1277. }
  1278. // ListPrincipalsPagesWithContext same as ListPrincipalsPages except
  1279. // it takes a Context and allows setting request options on the pages.
  1280. //
  1281. // The context must be non-nil and will be used for request cancellation. If
  1282. // the context is nil a panic will occur. In the future the SDK may create
  1283. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1284. // for more information on using Contexts.
  1285. func (c *RAM) ListPrincipalsPagesWithContext(ctx aws.Context, input *ListPrincipalsInput, fn func(*ListPrincipalsOutput, bool) bool, opts ...request.Option) error {
  1286. p := request.Pagination{
  1287. NewRequest: func() (*request.Request, error) {
  1288. var inCpy *ListPrincipalsInput
  1289. if input != nil {
  1290. tmp := *input
  1291. inCpy = &tmp
  1292. }
  1293. req, _ := c.ListPrincipalsRequest(inCpy)
  1294. req.SetContext(ctx)
  1295. req.ApplyOptions(opts...)
  1296. return req, nil
  1297. },
  1298. }
  1299. cont := true
  1300. for p.Next() && cont {
  1301. cont = fn(p.Page().(*ListPrincipalsOutput), !p.HasNextPage())
  1302. }
  1303. return p.Err()
  1304. }
  1305. const opListResources = "ListResources"
  1306. // ListResourcesRequest generates a "aws/request.Request" representing the
  1307. // client's request for the ListResources operation. The "output" return
  1308. // value will be populated with the request's response once the request completes
  1309. // successfully.
  1310. //
  1311. // Use "Send" method on the returned Request to send the API call to the service.
  1312. // the "output" return value is not valid until after Send returns without error.
  1313. //
  1314. // See ListResources for more information on using the ListResources
  1315. // API call, and error handling.
  1316. //
  1317. // This method is useful when you want to inject custom logic or configuration
  1318. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1319. //
  1320. //
  1321. // // Example sending a request using the ListResourcesRequest method.
  1322. // req, resp := client.ListResourcesRequest(params)
  1323. //
  1324. // err := req.Send()
  1325. // if err == nil { // resp is now filled
  1326. // fmt.Println(resp)
  1327. // }
  1328. //
  1329. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/ListResources
  1330. func (c *RAM) ListResourcesRequest(input *ListResourcesInput) (req *request.Request, output *ListResourcesOutput) {
  1331. op := &request.Operation{
  1332. Name: opListResources,
  1333. HTTPMethod: "POST",
  1334. HTTPPath: "/listresources",
  1335. Paginator: &request.Paginator{
  1336. InputTokens: []string{"nextToken"},
  1337. OutputTokens: []string{"nextToken"},
  1338. LimitToken: "maxResults",
  1339. TruncationToken: "",
  1340. },
  1341. }
  1342. if input == nil {
  1343. input = &ListResourcesInput{}
  1344. }
  1345. output = &ListResourcesOutput{}
  1346. req = c.newRequest(op, input, output)
  1347. return
  1348. }
  1349. // ListResources API operation for AWS Resource Access Manager.
  1350. //
  1351. // Lists the resources that the specified principal can access.
  1352. //
  1353. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1354. // with awserr.Error's Code and Message methods to get detailed information about
  1355. // the error.
  1356. //
  1357. // See the AWS API reference guide for AWS Resource Access Manager's
  1358. // API operation ListResources for usage and error information.
  1359. //
  1360. // Returned Error Codes:
  1361. // * ErrCodeInvalidResourceTypeException "InvalidResourceTypeException"
  1362. // The specified resource type is not valid.
  1363. //
  1364. // * ErrCodeUnknownResourceException "UnknownResourceException"
  1365. // A specified resource was not found.
  1366. //
  1367. // * ErrCodeMalformedArnException "MalformedArnException"
  1368. // The format of an Amazon Resource Name (ARN) is not valid.
  1369. //
  1370. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  1371. // The specified value for NextToken is not valid.
  1372. //
  1373. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1374. // A parameter is not valid.
  1375. //
  1376. // * ErrCodeServerInternalException "ServerInternalException"
  1377. // The service could not respond to the request due to an internal problem.
  1378. //
  1379. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1380. // The service is not available.
  1381. //
  1382. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/ListResources
  1383. func (c *RAM) ListResources(input *ListResourcesInput) (*ListResourcesOutput, error) {
  1384. req, out := c.ListResourcesRequest(input)
  1385. return out, req.Send()
  1386. }
  1387. // ListResourcesWithContext is the same as ListResources with the addition of
  1388. // the ability to pass a context and additional request options.
  1389. //
  1390. // See ListResources for details on how to use this API operation.
  1391. //
  1392. // The context must be non-nil and will be used for request cancellation. If
  1393. // the context is nil a panic will occur. In the future the SDK may create
  1394. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1395. // for more information on using Contexts.
  1396. func (c *RAM) ListResourcesWithContext(ctx aws.Context, input *ListResourcesInput, opts ...request.Option) (*ListResourcesOutput, error) {
  1397. req, out := c.ListResourcesRequest(input)
  1398. req.SetContext(ctx)
  1399. req.ApplyOptions(opts...)
  1400. return out, req.Send()
  1401. }
  1402. // ListResourcesPages iterates over the pages of a ListResources operation,
  1403. // calling the "fn" function with the response data for each page. To stop
  1404. // iterating, return false from the fn function.
  1405. //
  1406. // See ListResources method for more information on how to use this operation.
  1407. //
  1408. // Note: This operation can generate multiple requests to a service.
  1409. //
  1410. // // Example iterating over at most 3 pages of a ListResources operation.
  1411. // pageNum := 0
  1412. // err := client.ListResourcesPages(params,
  1413. // func(page *ListResourcesOutput, lastPage bool) bool {
  1414. // pageNum++
  1415. // fmt.Println(page)
  1416. // return pageNum <= 3
  1417. // })
  1418. //
  1419. func (c *RAM) ListResourcesPages(input *ListResourcesInput, fn func(*ListResourcesOutput, bool) bool) error {
  1420. return c.ListResourcesPagesWithContext(aws.BackgroundContext(), input, fn)
  1421. }
  1422. // ListResourcesPagesWithContext same as ListResourcesPages except
  1423. // it takes a Context and allows setting request options on the pages.
  1424. //
  1425. // The context must be non-nil and will be used for request cancellation. If
  1426. // the context is nil a panic will occur. In the future the SDK may create
  1427. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1428. // for more information on using Contexts.
  1429. func (c *RAM) ListResourcesPagesWithContext(ctx aws.Context, input *ListResourcesInput, fn func(*ListResourcesOutput, bool) bool, opts ...request.Option) error {
  1430. p := request.Pagination{
  1431. NewRequest: func() (*request.Request, error) {
  1432. var inCpy *ListResourcesInput
  1433. if input != nil {
  1434. tmp := *input
  1435. inCpy = &tmp
  1436. }
  1437. req, _ := c.ListResourcesRequest(inCpy)
  1438. req.SetContext(ctx)
  1439. req.ApplyOptions(opts...)
  1440. return req, nil
  1441. },
  1442. }
  1443. cont := true
  1444. for p.Next() && cont {
  1445. cont = fn(p.Page().(*ListResourcesOutput), !p.HasNextPage())
  1446. }
  1447. return p.Err()
  1448. }
  1449. const opRejectResourceShareInvitation = "RejectResourceShareInvitation"
  1450. // RejectResourceShareInvitationRequest generates a "aws/request.Request" representing the
  1451. // client's request for the RejectResourceShareInvitation operation. The "output" return
  1452. // value will be populated with the request's response once the request completes
  1453. // successfully.
  1454. //
  1455. // Use "Send" method on the returned Request to send the API call to the service.
  1456. // the "output" return value is not valid until after Send returns without error.
  1457. //
  1458. // See RejectResourceShareInvitation for more information on using the RejectResourceShareInvitation
  1459. // API call, and error handling.
  1460. //
  1461. // This method is useful when you want to inject custom logic or configuration
  1462. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1463. //
  1464. //
  1465. // // Example sending a request using the RejectResourceShareInvitationRequest method.
  1466. // req, resp := client.RejectResourceShareInvitationRequest(params)
  1467. //
  1468. // err := req.Send()
  1469. // if err == nil { // resp is now filled
  1470. // fmt.Println(resp)
  1471. // }
  1472. //
  1473. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/RejectResourceShareInvitation
  1474. func (c *RAM) RejectResourceShareInvitationRequest(input *RejectResourceShareInvitationInput) (req *request.Request, output *RejectResourceShareInvitationOutput) {
  1475. op := &request.Operation{
  1476. Name: opRejectResourceShareInvitation,
  1477. HTTPMethod: "POST",
  1478. HTTPPath: "/rejectresourceshareinvitation",
  1479. }
  1480. if input == nil {
  1481. input = &RejectResourceShareInvitationInput{}
  1482. }
  1483. output = &RejectResourceShareInvitationOutput{}
  1484. req = c.newRequest(op, input, output)
  1485. return
  1486. }
  1487. // RejectResourceShareInvitation API operation for AWS Resource Access Manager.
  1488. //
  1489. // Rejects an invitation to a resource share from another AWS account.
  1490. //
  1491. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1492. // with awserr.Error's Code and Message methods to get detailed information about
  1493. // the error.
  1494. //
  1495. // See the AWS API reference guide for AWS Resource Access Manager's
  1496. // API operation RejectResourceShareInvitation for usage and error information.
  1497. //
  1498. // Returned Error Codes:
  1499. // * ErrCodeMalformedArnException "MalformedArnException"
  1500. // The format of an Amazon Resource Name (ARN) is not valid.
  1501. //
  1502. // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
  1503. // The requested operation is not permitted.
  1504. //
  1505. // * ErrCodeResourceShareInvitationArnNotFoundException "ResourceShareInvitationArnNotFoundException"
  1506. // The Amazon Resource Name (ARN) for an invitation was not found.
  1507. //
  1508. // * ErrCodeResourceShareInvitationAlreadyAcceptedException "ResourceShareInvitationAlreadyAcceptedException"
  1509. // The invitation was already accepted.
  1510. //
  1511. // * ErrCodeResourceShareInvitationAlreadyRejectedException "ResourceShareInvitationAlreadyRejectedException"
  1512. // The invitation was already rejected.
  1513. //
  1514. // * ErrCodeResourceShareInvitationExpiredException "ResourceShareInvitationExpiredException"
  1515. // The invitation is expired.
  1516. //
  1517. // * ErrCodeServerInternalException "ServerInternalException"
  1518. // The service could not respond to the request due to an internal problem.
  1519. //
  1520. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1521. // The service is not available.
  1522. //
  1523. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/RejectResourceShareInvitation
  1524. func (c *RAM) RejectResourceShareInvitation(input *RejectResourceShareInvitationInput) (*RejectResourceShareInvitationOutput, error) {
  1525. req, out := c.RejectResourceShareInvitationRequest(input)
  1526. return out, req.Send()
  1527. }
  1528. // RejectResourceShareInvitationWithContext is the same as RejectResourceShareInvitation with the addition of
  1529. // the ability to pass a context and additional request options.
  1530. //
  1531. // See RejectResourceShareInvitation for details on how to use this API operation.
  1532. //
  1533. // The context must be non-nil and will be used for request cancellation. If
  1534. // the context is nil a panic will occur. In the future the SDK may create
  1535. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1536. // for more information on using Contexts.
  1537. func (c *RAM) RejectResourceShareInvitationWithContext(ctx aws.Context, input *RejectResourceShareInvitationInput, opts ...request.Option) (*RejectResourceShareInvitationOutput, error) {
  1538. req, out := c.RejectResourceShareInvitationRequest(input)
  1539. req.SetContext(ctx)
  1540. req.ApplyOptions(opts...)
  1541. return out, req.Send()
  1542. }
  1543. const opTagResource = "TagResource"
  1544. // TagResourceRequest generates a "aws/request.Request" representing the
  1545. // client's request for the TagResource operation. The "output" return
  1546. // value will be populated with the request's response once the request completes
  1547. // successfully.
  1548. //
  1549. // Use "Send" method on the returned Request to send the API call to the service.
  1550. // the "output" return value is not valid until after Send returns without error.
  1551. //
  1552. // See TagResource for more information on using the TagResource
  1553. // API call, and error handling.
  1554. //
  1555. // This method is useful when you want to inject custom logic or configuration
  1556. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1557. //
  1558. //
  1559. // // Example sending a request using the TagResourceRequest method.
  1560. // req, resp := client.TagResourceRequest(params)
  1561. //
  1562. // err := req.Send()
  1563. // if err == nil { // resp is now filled
  1564. // fmt.Println(resp)
  1565. // }
  1566. //
  1567. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/TagResource
  1568. func (c *RAM) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
  1569. op := &request.Operation{
  1570. Name: opTagResource,
  1571. HTTPMethod: "POST",
  1572. HTTPPath: "/tagresource",
  1573. }
  1574. if input == nil {
  1575. input = &TagResourceInput{}
  1576. }
  1577. output = &TagResourceOutput{}
  1578. req = c.newRequest(op, input, output)
  1579. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1580. return
  1581. }
  1582. // TagResource API operation for AWS Resource Access Manager.
  1583. //
  1584. // Adds the specified tags to the specified resource share.
  1585. //
  1586. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1587. // with awserr.Error's Code and Message methods to get detailed information about
  1588. // the error.
  1589. //
  1590. // See the AWS API reference guide for AWS Resource Access Manager's
  1591. // API operation TagResource for usage and error information.
  1592. //
  1593. // Returned Error Codes:
  1594. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1595. // A parameter is not valid.
  1596. //
  1597. // * ErrCodeMalformedArnException "MalformedArnException"
  1598. // The format of an Amazon Resource Name (ARN) is not valid.
  1599. //
  1600. // * ErrCodeTagLimitExceededException "TagLimitExceededException"
  1601. // The requested tags exceed the limit for your account.
  1602. //
  1603. // * ErrCodeResourceArnNotFoundException "ResourceArnNotFoundException"
  1604. // An Amazon Resource Name (ARN) was not found.
  1605. //
  1606. // * ErrCodeServerInternalException "ServerInternalException"
  1607. // The service could not respond to the request due to an internal problem.
  1608. //
  1609. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1610. // The service is not available.
  1611. //
  1612. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/TagResource
  1613. func (c *RAM) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
  1614. req, out := c.TagResourceRequest(input)
  1615. return out, req.Send()
  1616. }
  1617. // TagResourceWithContext is the same as TagResource with the addition of
  1618. // the ability to pass a context and additional request options.
  1619. //
  1620. // See TagResource for details on how to use this API operation.
  1621. //
  1622. // The context must be non-nil and will be used for request cancellation. If
  1623. // the context is nil a panic will occur. In the future the SDK may create
  1624. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1625. // for more information on using Contexts.
  1626. func (c *RAM) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
  1627. req, out := c.TagResourceRequest(input)
  1628. req.SetContext(ctx)
  1629. req.ApplyOptions(opts...)
  1630. return out, req.Send()
  1631. }
  1632. const opUntagResource = "UntagResource"
  1633. // UntagResourceRequest generates a "aws/request.Request" representing the
  1634. // client's request for the UntagResource operation. The "output" return
  1635. // value will be populated with the request's response once the request completes
  1636. // successfully.
  1637. //
  1638. // Use "Send" method on the returned Request to send the API call to the service.
  1639. // the "output" return value is not valid until after Send returns without error.
  1640. //
  1641. // See UntagResource for more information on using the UntagResource
  1642. // API call, and error handling.
  1643. //
  1644. // This method is useful when you want to inject custom logic or configuration
  1645. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1646. //
  1647. //
  1648. // // Example sending a request using the UntagResourceRequest method.
  1649. // req, resp := client.UntagResourceRequest(params)
  1650. //
  1651. // err := req.Send()
  1652. // if err == nil { // resp is now filled
  1653. // fmt.Println(resp)
  1654. // }
  1655. //
  1656. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/UntagResource
  1657. func (c *RAM) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
  1658. op := &request.Operation{
  1659. Name: opUntagResource,
  1660. HTTPMethod: "POST",
  1661. HTTPPath: "/untagresource",
  1662. }
  1663. if input == nil {
  1664. input = &UntagResourceInput{}
  1665. }
  1666. output = &UntagResourceOutput{}
  1667. req = c.newRequest(op, input, output)
  1668. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1669. return
  1670. }
  1671. // UntagResource API operation for AWS Resource Access Manager.
  1672. //
  1673. // Removes the specified tags from the specified resource share.
  1674. //
  1675. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1676. // with awserr.Error's Code and Message methods to get detailed information about
  1677. // the error.
  1678. //
  1679. // See the AWS API reference guide for AWS Resource Access Manager's
  1680. // API operation UntagResource for usage and error information.
  1681. //
  1682. // Returned Error Codes:
  1683. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1684. // A parameter is not valid.
  1685. //
  1686. // * ErrCodeServerInternalException "ServerInternalException"
  1687. // The service could not respond to the request due to an internal problem.
  1688. //
  1689. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1690. // The service is not available.
  1691. //
  1692. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/UntagResource
  1693. func (c *RAM) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
  1694. req, out := c.UntagResourceRequest(input)
  1695. return out, req.Send()
  1696. }
  1697. // UntagResourceWithContext is the same as UntagResource with the addition of
  1698. // the ability to pass a context and additional request options.
  1699. //
  1700. // See UntagResource for details on how to use this API operation.
  1701. //
  1702. // The context must be non-nil and will be used for request cancellation. If
  1703. // the context is nil a panic will occur. In the future the SDK may create
  1704. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1705. // for more information on using Contexts.
  1706. func (c *RAM) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
  1707. req, out := c.UntagResourceRequest(input)
  1708. req.SetContext(ctx)
  1709. req.ApplyOptions(opts...)
  1710. return out, req.Send()
  1711. }
  1712. const opUpdateResourceShare = "UpdateResourceShare"
  1713. // UpdateResourceShareRequest generates a "aws/request.Request" representing the
  1714. // client's request for the UpdateResourceShare operation. The "output" return
  1715. // value will be populated with the request's response once the request completes
  1716. // successfully.
  1717. //
  1718. // Use "Send" method on the returned Request to send the API call to the service.
  1719. // the "output" return value is not valid until after Send returns without error.
  1720. //
  1721. // See UpdateResourceShare for more information on using the UpdateResourceShare
  1722. // API call, and error handling.
  1723. //
  1724. // This method is useful when you want to inject custom logic or configuration
  1725. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1726. //
  1727. //
  1728. // // Example sending a request using the UpdateResourceShareRequest method.
  1729. // req, resp := client.UpdateResourceShareRequest(params)
  1730. //
  1731. // err := req.Send()
  1732. // if err == nil { // resp is now filled
  1733. // fmt.Println(resp)
  1734. // }
  1735. //
  1736. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/UpdateResourceShare
  1737. func (c *RAM) UpdateResourceShareRequest(input *UpdateResourceShareInput) (req *request.Request, output *UpdateResourceShareOutput) {
  1738. op := &request.Operation{
  1739. Name: opUpdateResourceShare,
  1740. HTTPMethod: "POST",
  1741. HTTPPath: "/updateresourceshare",
  1742. }
  1743. if input == nil {
  1744. input = &UpdateResourceShareInput{}
  1745. }
  1746. output = &UpdateResourceShareOutput{}
  1747. req = c.newRequest(op, input, output)
  1748. return
  1749. }
  1750. // UpdateResourceShare API operation for AWS Resource Access Manager.
  1751. //
  1752. // Updates the specified resource share.
  1753. //
  1754. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1755. // with awserr.Error's Code and Message methods to get detailed information about
  1756. // the error.
  1757. //
  1758. // See the AWS API reference guide for AWS Resource Access Manager's
  1759. // API operation UpdateResourceShare for usage and error information.
  1760. //
  1761. // Returned Error Codes:
  1762. // * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException"
  1763. // A client token input parameter was reused with an operation, but at least
  1764. // one of the other input parameters is different from the previous call to
  1765. // the operation.
  1766. //
  1767. // * ErrCodeMissingRequiredParameterException "MissingRequiredParameterException"
  1768. // A required input parameter is missing.
  1769. //
  1770. // * ErrCodeUnknownResourceException "UnknownResourceException"
  1771. // A specified resource was not found.
  1772. //
  1773. // * ErrCodeMalformedArnException "MalformedArnException"
  1774. // The format of an Amazon Resource Name (ARN) is not valid.
  1775. //
  1776. // * ErrCodeInvalidClientTokenException "InvalidClientTokenException"
  1777. // A client token is not valid.
  1778. //
  1779. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1780. // A parameter is not valid.
  1781. //
  1782. // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
  1783. // The requested operation is not permitted.
  1784. //
  1785. // * ErrCodeServerInternalException "ServerInternalException"
  1786. // The service could not respond to the request due to an internal problem.
  1787. //
  1788. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1789. // The service is not available.
  1790. //
  1791. // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/UpdateResourceShare
  1792. func (c *RAM) UpdateResourceShare(input *UpdateResourceShareInput) (*UpdateResourceShareOutput, error) {
  1793. req, out := c.UpdateResourceShareRequest(input)
  1794. return out, req.Send()
  1795. }
  1796. // UpdateResourceShareWithContext is the same as UpdateResourceShare with the addition of
  1797. // the ability to pass a context and additional request options.
  1798. //
  1799. // See UpdateResourceShare for details on how to use this API operation.
  1800. //
  1801. // The context must be non-nil and will be used for request cancellation. If
  1802. // the context is nil a panic will occur. In the future the SDK may create
  1803. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1804. // for more information on using Contexts.
  1805. func (c *RAM) UpdateResourceShareWithContext(ctx aws.Context, input *UpdateResourceShareInput, opts ...request.Option) (*UpdateResourceShareOutput, error) {
  1806. req, out := c.UpdateResourceShareRequest(input)
  1807. req.SetContext(ctx)
  1808. req.ApplyOptions(opts...)
  1809. return out, req.Send()
  1810. }
  1811. type AcceptResourceShareInvitationInput struct {
  1812. _ struct{} `type:"structure"`
  1813. // A unique, case-sensitive identifier that you provide to ensure the idempotency
  1814. // of the request.
  1815. ClientToken *string `locationName:"clientToken" type:"string"`
  1816. // The Amazon Resource Name (ARN) of the invitation.
  1817. //
  1818. // ResourceShareInvitationArn is a required field
  1819. ResourceShareInvitationArn *string `locationName:"resourceShareInvitationArn" type:"string" required:"true"`
  1820. }
  1821. // String returns the string representation
  1822. func (s AcceptResourceShareInvitationInput) String() string {
  1823. return awsutil.Prettify(s)
  1824. }
  1825. // GoString returns the string representation
  1826. func (s AcceptResourceShareInvitationInput) GoString() string {
  1827. return s.String()
  1828. }
  1829. // Validate inspects the fields of the type to determine if they are valid.
  1830. func (s *AcceptResourceShareInvitationInput) Validate() error {
  1831. invalidParams := request.ErrInvalidParams{Context: "AcceptResourceShareInvitationInput"}
  1832. if s.ResourceShareInvitationArn == nil {
  1833. invalidParams.Add(request.NewErrParamRequired("ResourceShareInvitationArn"))
  1834. }
  1835. if invalidParams.Len() > 0 {
  1836. return invalidParams
  1837. }
  1838. return nil
  1839. }
  1840. // SetClientToken sets the ClientToken field's value.
  1841. func (s *AcceptResourceShareInvitationInput) SetClientToken(v string) *AcceptResourceShareInvitationInput {
  1842. s.ClientToken = &v
  1843. return s
  1844. }
  1845. // SetResourceShareInvitationArn sets the ResourceShareInvitationArn field's value.
  1846. func (s *AcceptResourceShareInvitationInput) SetResourceShareInvitationArn(v string) *AcceptResourceShareInvitationInput {
  1847. s.ResourceShareInvitationArn = &v
  1848. return s
  1849. }
  1850. type AcceptResourceShareInvitationOutput struct {
  1851. _ struct{} `type:"structure"`
  1852. // A unique, case-sensitive identifier that you provide to ensure the idempotency
  1853. // of the request.
  1854. ClientToken *string `locationName:"clientToken" type:"string"`
  1855. // Information about the invitation.
  1856. ResourceShareInvitation *ResourceShareInvitation `locationName:"resourceShareInvitation" type:"structure"`
  1857. }
  1858. // String returns the string representation
  1859. func (s AcceptResourceShareInvitationOutput) String() string {
  1860. return awsutil.Prettify(s)
  1861. }
  1862. // GoString returns the string representation
  1863. func (s AcceptResourceShareInvitationOutput) GoString() string {
  1864. return s.String()
  1865. }
  1866. // SetClientToken sets the ClientToken field's value.
  1867. func (s *AcceptResourceShareInvitationOutput) SetClientToken(v string) *AcceptResourceShareInvitationOutput {
  1868. s.ClientToken = &v
  1869. return s
  1870. }
  1871. // SetResourceShareInvitation sets the ResourceShareInvitation field's value.
  1872. func (s *AcceptResourceShareInvitationOutput) SetResourceShareInvitation(v *ResourceShareInvitation) *AcceptResourceShareInvitationOutput {
  1873. s.ResourceShareInvitation = v
  1874. return s
  1875. }
  1876. type AssociateResourceShareInput struct {
  1877. _ struct{} `type:"structure"`
  1878. // A unique, case-sensitive identifier that you provide to ensure the idempotency
  1879. // of the request.
  1880. ClientToken *string `locationName:"clientToken" type:"string"`
  1881. // The principals.
  1882. Principals []*string `locationName:"principals" type:"list"`
  1883. // The Amazon Resource Names (ARN) of the resources.
  1884. ResourceArns []*string `locationName:"resourceArns" type:"list"`
  1885. // The Amazon Resource Name (ARN) of the resource share.
  1886. //
  1887. // ResourceShareArn is a required field
  1888. ResourceShareArn *string `locationName:"resourceShareArn" type:"string" required:"true"`
  1889. }
  1890. // String returns the string representation
  1891. func (s AssociateResourceShareInput) String() string {
  1892. return awsutil.Prettify(s)
  1893. }
  1894. // GoString returns the string representation
  1895. func (s AssociateResourceShareInput) GoString() string {
  1896. return s.String()
  1897. }
  1898. // Validate inspects the fields of the type to determine if they are valid.
  1899. func (s *AssociateResourceShareInput) Validate() error {
  1900. invalidParams := request.ErrInvalidParams{Context: "AssociateResourceShareInput"}
  1901. if s.ResourceShareArn == nil {
  1902. invalidParams.Add(request.NewErrParamRequired("ResourceShareArn"))
  1903. }
  1904. if invalidParams.Len() > 0 {
  1905. return invalidParams
  1906. }
  1907. return nil
  1908. }
  1909. // SetClientToken sets the ClientToken field's value.
  1910. func (s *AssociateResourceShareInput) SetClientToken(v string) *AssociateResourceShareInput {
  1911. s.ClientToken = &v
  1912. return s
  1913. }
  1914. // SetPrincipals sets the Principals field's value.
  1915. func (s *AssociateResourceShareInput) SetPrincipals(v []*string) *AssociateResourceShareInput {
  1916. s.Principals = v
  1917. return s
  1918. }
  1919. // SetResourceArns sets the ResourceArns field's value.
  1920. func (s *AssociateResourceShareInput) SetResourceArns(v []*string) *AssociateResourceShareInput {
  1921. s.ResourceArns = v
  1922. return s
  1923. }
  1924. // SetResourceShareArn sets the ResourceShareArn field's value.
  1925. func (s *AssociateResourceShareInput) SetResourceShareArn(v string) *AssociateResourceShareInput {
  1926. s.ResourceShareArn = &v
  1927. return s
  1928. }
  1929. type AssociateResourceShareOutput struct {
  1930. _ struct{} `type:"structure"`
  1931. // A unique, case-sensitive identifier that you provide to ensure the idempotency
  1932. // of the request.
  1933. ClientToken *string `locationName:"clientToken" type:"string"`
  1934. // Information about the associations.
  1935. ResourceShareAssociations []*ResourceShareAssociation `locationName:"resourceShareAssociations" type:"list"`
  1936. }
  1937. // String returns the string representation
  1938. func (s AssociateResourceShareOutput) String() string {
  1939. return awsutil.Prettify(s)
  1940. }
  1941. // GoString returns the string representation
  1942. func (s AssociateResourceShareOutput) GoString() string {
  1943. return s.String()
  1944. }
  1945. // SetClientToken sets the ClientToken field's value.
  1946. func (s *AssociateResourceShareOutput) SetClientToken(v string) *AssociateResourceShareOutput {
  1947. s.ClientToken = &v
  1948. return s
  1949. }
  1950. // SetResourceShareAssociations sets the ResourceShareAssociations field's value.
  1951. func (s *AssociateResourceShareOutput) SetResourceShareAssociations(v []*ResourceShareAssociation) *AssociateResourceShareOutput {
  1952. s.ResourceShareAssociations = v
  1953. return s
  1954. }
  1955. type CreateResourceShareInput struct {
  1956. _ struct{} `type:"structure"`
  1957. // Indicates whether principals outside your organization can be associated
  1958. // with a resource share.
  1959. AllowExternalPrincipals *bool `locationName:"allowExternalPrincipals" type:"boolean"`
  1960. // A unique, case-sensitive identifier that you provide to ensure the idempotency
  1961. // of the request.
  1962. ClientToken *string `locationName:"clientToken" type:"string"`
  1963. // The name of the resource share.
  1964. //
  1965. // Name is a required field
  1966. Name *string `locationName:"name" type:"string" required:"true"`
  1967. // The principals to associate with the resource share. The possible values
  1968. // are IDs of AWS accounts, the ARN of an OU or organization from AWS Organizations.
  1969. Principals []*string `locationName:"principals" type:"list"`
  1970. // The Amazon Resource Names (ARN) of the resources to associate with the resource
  1971. // share.
  1972. ResourceArns []*string `locationName:"resourceArns" type:"list"`
  1973. // One or more tags.
  1974. Tags []*Tag `locationName:"tags" type:"list"`
  1975. }
  1976. // String returns the string representation
  1977. func (s CreateResourceShareInput) String() string {
  1978. return awsutil.Prettify(s)
  1979. }
  1980. // GoString returns the string representation
  1981. func (s CreateResourceShareInput) GoString() string {
  1982. return s.String()
  1983. }
  1984. // Validate inspects the fields of the type to determine if they are valid.
  1985. func (s *CreateResourceShareInput) Validate() error {
  1986. invalidParams := request.ErrInvalidParams{Context: "CreateResourceShareInput"}
  1987. if s.Name == nil {
  1988. invalidParams.Add(request.NewErrParamRequired("Name"))
  1989. }
  1990. if invalidParams.Len() > 0 {
  1991. return invalidParams
  1992. }
  1993. return nil
  1994. }
  1995. // SetAllowExternalPrincipals sets the AllowExternalPrincipals field's value.
  1996. func (s *CreateResourceShareInput) SetAllowExternalPrincipals(v bool) *CreateResourceShareInput {
  1997. s.AllowExternalPrincipals = &v
  1998. return s
  1999. }
  2000. // SetClientToken sets the ClientToken field's value.
  2001. func (s *CreateResourceShareInput) SetClientToken(v string) *CreateResourceShareInput {
  2002. s.ClientToken = &v
  2003. return s
  2004. }
  2005. // SetName sets the Name field's value.
  2006. func (s *CreateResourceShareInput) SetName(v string) *CreateResourceShareInput {
  2007. s.Name = &v
  2008. return s
  2009. }
  2010. // SetPrincipals sets the Principals field's value.
  2011. func (s *CreateResourceShareInput) SetPrincipals(v []*string) *CreateResourceShareInput {
  2012. s.Principals = v
  2013. return s
  2014. }
  2015. // SetResourceArns sets the ResourceArns field's value.
  2016. func (s *CreateResourceShareInput) SetResourceArns(v []*string) *CreateResourceShareInput {
  2017. s.ResourceArns = v
  2018. return s
  2019. }
  2020. // SetTags sets the Tags field's value.
  2021. func (s *CreateResourceShareInput) SetTags(v []*Tag) *CreateResourceShareInput {
  2022. s.Tags = v
  2023. return s
  2024. }
  2025. type CreateResourceShareOutput struct {
  2026. _ struct{} `type:"structure"`
  2027. // A unique, case-sensitive identifier that you provide to ensure the idempotency
  2028. // of the request.
  2029. ClientToken *string `locationName:"clientToken" type:"string"`
  2030. // Information about the resource share.
  2031. ResourceShare *ResourceShare `locationName:"resourceShare" type:"structure"`
  2032. }
  2033. // String returns the string representation
  2034. func (s CreateResourceShareOutput) String() string {
  2035. return awsutil.Prettify(s)
  2036. }
  2037. // GoString returns the string representation
  2038. func (s CreateResourceShareOutput) GoString() string {
  2039. return s.String()
  2040. }
  2041. // SetClientToken sets the ClientToken field's value.
  2042. func (s *CreateResourceShareOutput) SetClientToken(v string) *CreateResourceShareOutput {
  2043. s.ClientToken = &v
  2044. return s
  2045. }
  2046. // SetResourceShare sets the ResourceShare field's value.
  2047. func (s *CreateResourceShareOutput) SetResourceShare(v *ResourceShare) *CreateResourceShareOutput {
  2048. s.ResourceShare = v
  2049. return s
  2050. }
  2051. type DeleteResourceShareInput struct {
  2052. _ struct{} `type:"structure"`
  2053. // A unique, case-sensitive identifier that you provide to ensure the idempotency
  2054. // of the request.
  2055. ClientToken *string `location:"querystring" locationName:"clientToken" type:"string"`
  2056. // The Amazon Resource Name (ARN) of the resource share.
  2057. //
  2058. // ResourceShareArn is a required field
  2059. ResourceShareArn *string `location:"querystring" locationName:"resourceShareArn" type:"string" required:"true"`
  2060. }
  2061. // String returns the string representation
  2062. func (s DeleteResourceShareInput) String() string {
  2063. return awsutil.Prettify(s)
  2064. }
  2065. // GoString returns the string representation
  2066. func (s DeleteResourceShareInput) GoString() string {
  2067. return s.String()
  2068. }
  2069. // Validate inspects the fields of the type to determine if they are valid.
  2070. func (s *DeleteResourceShareInput) Validate() error {
  2071. invalidParams := request.ErrInvalidParams{Context: "DeleteResourceShareInput"}
  2072. if s.ResourceShareArn == nil {
  2073. invalidParams.Add(request.NewErrParamRequired("ResourceShareArn"))
  2074. }
  2075. if invalidParams.Len() > 0 {
  2076. return invalidParams
  2077. }
  2078. return nil
  2079. }
  2080. // SetClientToken sets the ClientToken field's value.
  2081. func (s *DeleteResourceShareInput) SetClientToken(v string) *DeleteResourceShareInput {
  2082. s.ClientToken = &v
  2083. return s
  2084. }
  2085. // SetResourceShareArn sets the ResourceShareArn field's value.
  2086. func (s *DeleteResourceShareInput) SetResourceShareArn(v string) *DeleteResourceShareInput {
  2087. s.ResourceShareArn = &v
  2088. return s
  2089. }
  2090. type DeleteResourceShareOutput struct {
  2091. _ struct{} `type:"structure"`
  2092. // A unique, case-sensitive identifier that you provide to ensure the idempotency
  2093. // of the request.
  2094. ClientToken *string `locationName:"clientToken" type:"string"`
  2095. // Indicates whether the request succeeded.
  2096. ReturnValue *bool `locationName:"returnValue" type:"boolean"`
  2097. }
  2098. // String returns the string representation
  2099. func (s DeleteResourceShareOutput) String() string {
  2100. return awsutil.Prettify(s)
  2101. }
  2102. // GoString returns the string representation
  2103. func (s DeleteResourceShareOutput) GoString() string {
  2104. return s.String()
  2105. }
  2106. // SetClientToken sets the ClientToken field's value.
  2107. func (s *DeleteResourceShareOutput) SetClientToken(v string) *DeleteResourceShareOutput {
  2108. s.ClientToken = &v
  2109. return s
  2110. }
  2111. // SetReturnValue sets the ReturnValue field's value.
  2112. func (s *DeleteResourceShareOutput) SetReturnValue(v bool) *DeleteResourceShareOutput {
  2113. s.ReturnValue = &v
  2114. return s
  2115. }
  2116. type DisassociateResourceShareInput struct {
  2117. _ struct{} `type:"structure"`
  2118. // A unique, case-sensitive identifier that you provide to ensure the idempotency
  2119. // of the request.
  2120. ClientToken *string `locationName:"clientToken" type:"string"`
  2121. // The principals.
  2122. Principals []*string `locationName:"principals" type:"list"`
  2123. // The Amazon Resource Names (ARN) of the resources.
  2124. ResourceArns []*string `locationName:"resourceArns" type:"list"`
  2125. // The Amazon Resource Name (ARN) of the resource share.
  2126. //
  2127. // ResourceShareArn is a required field
  2128. ResourceShareArn *string `locationName:"resourceShareArn" type:"string" required:"true"`
  2129. }
  2130. // String returns the string representation
  2131. func (s DisassociateResourceShareInput) String() string {
  2132. return awsutil.Prettify(s)
  2133. }
  2134. // GoString returns the string representation
  2135. func (s DisassociateResourceShareInput) GoString() string {
  2136. return s.String()
  2137. }
  2138. // Validate inspects the fields of the type to determine if they are valid.
  2139. func (s *DisassociateResourceShareInput) Validate() error {
  2140. invalidParams := request.ErrInvalidParams{Context: "DisassociateResourceShareInput"}
  2141. if s.ResourceShareArn == nil {
  2142. invalidParams.Add(request.NewErrParamRequired("ResourceShareArn"))
  2143. }
  2144. if invalidParams.Len() > 0 {
  2145. return invalidParams
  2146. }
  2147. return nil
  2148. }
  2149. // SetClientToken sets the ClientToken field's value.
  2150. func (s *DisassociateResourceShareInput) SetClientToken(v string) *DisassociateResourceShareInput {
  2151. s.ClientToken = &v
  2152. return s
  2153. }
  2154. // SetPrincipals sets the Principals field's value.
  2155. func (s *DisassociateResourceShareInput) SetPrincipals(v []*string) *DisassociateResourceShareInput {
  2156. s.Principals = v
  2157. return s
  2158. }
  2159. // SetResourceArns sets the ResourceArns field's value.
  2160. func (s *DisassociateResourceShareInput) SetResourceArns(v []*string) *DisassociateResourceShareInput {
  2161. s.ResourceArns = v
  2162. return s
  2163. }
  2164. // SetResourceShareArn sets the ResourceShareArn field's value.
  2165. func (s *DisassociateResourceShareInput) SetResourceShareArn(v string) *DisassociateResourceShareInput {
  2166. s.ResourceShareArn = &v
  2167. return s
  2168. }
  2169. type DisassociateResourceShareOutput struct {
  2170. _ struct{} `type:"structure"`
  2171. // A unique, case-sensitive identifier that you provide to ensure the idempotency
  2172. // of the request.
  2173. ClientToken *string `locationName:"clientToken" type:"string"`
  2174. // Information about the associations.
  2175. ResourceShareAssociations []*ResourceShareAssociation `locationName:"resourceShareAssociations" type:"list"`
  2176. }
  2177. // String returns the string representation
  2178. func (s DisassociateResourceShareOutput) String() string {
  2179. return awsutil.Prettify(s)
  2180. }
  2181. // GoString returns the string representation
  2182. func (s DisassociateResourceShareOutput) GoString() string {
  2183. return s.String()
  2184. }
  2185. // SetClientToken sets the ClientToken field's value.
  2186. func (s *DisassociateResourceShareOutput) SetClientToken(v string) *DisassociateResourceShareOutput {
  2187. s.ClientToken = &v
  2188. return s
  2189. }
  2190. // SetResourceShareAssociations sets the ResourceShareAssociations field's value.
  2191. func (s *DisassociateResourceShareOutput) SetResourceShareAssociations(v []*ResourceShareAssociation) *DisassociateResourceShareOutput {
  2192. s.ResourceShareAssociations = v
  2193. return s
  2194. }
  2195. type EnableSharingWithAwsOrganizationInput struct {
  2196. _ struct{} `type:"structure"`
  2197. }
  2198. // String returns the string representation
  2199. func (s EnableSharingWithAwsOrganizationInput) String() string {
  2200. return awsutil.Prettify(s)
  2201. }
  2202. // GoString returns the string representation
  2203. func (s EnableSharingWithAwsOrganizationInput) GoString() string {
  2204. return s.String()
  2205. }
  2206. type EnableSharingWithAwsOrganizationOutput struct {
  2207. _ struct{} `type:"structure"`
  2208. // Indicates whether the request succeeded.
  2209. ReturnValue *bool `locationName:"returnValue" type:"boolean"`
  2210. }
  2211. // String returns the string representation
  2212. func (s EnableSharingWithAwsOrganizationOutput) String() string {
  2213. return awsutil.Prettify(s)
  2214. }
  2215. // GoString returns the string representation
  2216. func (s EnableSharingWithAwsOrganizationOutput) GoString() string {
  2217. return s.String()
  2218. }
  2219. // SetReturnValue sets the ReturnValue field's value.
  2220. func (s *EnableSharingWithAwsOrganizationOutput) SetReturnValue(v bool) *EnableSharingWithAwsOrganizationOutput {
  2221. s.ReturnValue = &v
  2222. return s
  2223. }
  2224. type GetResourcePoliciesInput struct {
  2225. _ struct{} `type:"structure"`
  2226. // The maximum number of results to return with a single call. To retrieve the
  2227. // remaining results, make another call with the returned nextToken value.
  2228. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  2229. // The token for the next page of results.
  2230. NextToken *string `locationName:"nextToken" type:"string"`
  2231. // The principal.
  2232. Principal *string `locationName:"principal" type:"string"`
  2233. // The Amazon Resource Names (ARN) of the resources.
  2234. //
  2235. // ResourceArns is a required field
  2236. ResourceArns []*string `locationName:"resourceArns" type:"list" required:"true"`
  2237. }
  2238. // String returns the string representation
  2239. func (s GetResourcePoliciesInput) String() string {
  2240. return awsutil.Prettify(s)
  2241. }
  2242. // GoString returns the string representation
  2243. func (s GetResourcePoliciesInput) GoString() string {
  2244. return s.String()
  2245. }
  2246. // Validate inspects the fields of the type to determine if they are valid.
  2247. func (s *GetResourcePoliciesInput) Validate() error {
  2248. invalidParams := request.ErrInvalidParams{Context: "GetResourcePoliciesInput"}
  2249. if s.MaxResults != nil && *s.MaxResults < 1 {
  2250. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2251. }
  2252. if s.ResourceArns == nil {
  2253. invalidParams.Add(request.NewErrParamRequired("ResourceArns"))
  2254. }
  2255. if invalidParams.Len() > 0 {
  2256. return invalidParams
  2257. }
  2258. return nil
  2259. }
  2260. // SetMaxResults sets the MaxResults field's value.
  2261. func (s *GetResourcePoliciesInput) SetMaxResults(v int64) *GetResourcePoliciesInput {
  2262. s.MaxResults = &v
  2263. return s
  2264. }
  2265. // SetNextToken sets the NextToken field's value.
  2266. func (s *GetResourcePoliciesInput) SetNextToken(v string) *GetResourcePoliciesInput {
  2267. s.NextToken = &v
  2268. return s
  2269. }
  2270. // SetPrincipal sets the Principal field's value.
  2271. func (s *GetResourcePoliciesInput) SetPrincipal(v string) *GetResourcePoliciesInput {
  2272. s.Principal = &v
  2273. return s
  2274. }
  2275. // SetResourceArns sets the ResourceArns field's value.
  2276. func (s *GetResourcePoliciesInput) SetResourceArns(v []*string) *GetResourcePoliciesInput {
  2277. s.ResourceArns = v
  2278. return s
  2279. }
  2280. type GetResourcePoliciesOutput struct {
  2281. _ struct{} `type:"structure"`
  2282. // The token to use to retrieve the next page of results. This value is null
  2283. // when there are no more results to return.
  2284. NextToken *string `locationName:"nextToken" type:"string"`
  2285. // A key policy document, in JSON format.
  2286. Policies []*string `locationName:"policies" type:"list"`
  2287. }
  2288. // String returns the string representation
  2289. func (s GetResourcePoliciesOutput) String() string {
  2290. return awsutil.Prettify(s)
  2291. }
  2292. // GoString returns the string representation
  2293. func (s GetResourcePoliciesOutput) GoString() string {
  2294. return s.String()
  2295. }
  2296. // SetNextToken sets the NextToken field's value.
  2297. func (s *GetResourcePoliciesOutput) SetNextToken(v string) *GetResourcePoliciesOutput {
  2298. s.NextToken = &v
  2299. return s
  2300. }
  2301. // SetPolicies sets the Policies field's value.
  2302. func (s *GetResourcePoliciesOutput) SetPolicies(v []*string) *GetResourcePoliciesOutput {
  2303. s.Policies = v
  2304. return s
  2305. }
  2306. type GetResourceShareAssociationsInput struct {
  2307. _ struct{} `type:"structure"`
  2308. // The status of the association.
  2309. AssociationStatus *string `locationName:"associationStatus" type:"string" enum:"ResourceShareAssociationStatus"`
  2310. // The association type.
  2311. //
  2312. // AssociationType is a required field
  2313. AssociationType *string `locationName:"associationType" type:"string" required:"true" enum:"ResourceShareAssociationType"`
  2314. // The maximum number of results to return with a single call. To retrieve the
  2315. // remaining results, make another call with the returned nextToken value.
  2316. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  2317. // The token for the next page of results.
  2318. NextToken *string `locationName:"nextToken" type:"string"`
  2319. // The principal.
  2320. Principal *string `locationName:"principal" type:"string"`
  2321. // The Amazon Resource Name (ARN) of the resource.
  2322. ResourceArn *string `locationName:"resourceArn" type:"string"`
  2323. // The Amazon Resource Names (ARN) of the resource shares.
  2324. ResourceShareArns []*string `locationName:"resourceShareArns" type:"list"`
  2325. }
  2326. // String returns the string representation
  2327. func (s GetResourceShareAssociationsInput) String() string {
  2328. return awsutil.Prettify(s)
  2329. }
  2330. // GoString returns the string representation
  2331. func (s GetResourceShareAssociationsInput) GoString() string {
  2332. return s.String()
  2333. }
  2334. // Validate inspects the fields of the type to determine if they are valid.
  2335. func (s *GetResourceShareAssociationsInput) Validate() error {
  2336. invalidParams := request.ErrInvalidParams{Context: "GetResourceShareAssociationsInput"}
  2337. if s.AssociationType == nil {
  2338. invalidParams.Add(request.NewErrParamRequired("AssociationType"))
  2339. }
  2340. if s.MaxResults != nil && *s.MaxResults < 1 {
  2341. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2342. }
  2343. if invalidParams.Len() > 0 {
  2344. return invalidParams
  2345. }
  2346. return nil
  2347. }
  2348. // SetAssociationStatus sets the AssociationStatus field's value.
  2349. func (s *GetResourceShareAssociationsInput) SetAssociationStatus(v string) *GetResourceShareAssociationsInput {
  2350. s.AssociationStatus = &v
  2351. return s
  2352. }
  2353. // SetAssociationType sets the AssociationType field's value.
  2354. func (s *GetResourceShareAssociationsInput) SetAssociationType(v string) *GetResourceShareAssociationsInput {
  2355. s.AssociationType = &v
  2356. return s
  2357. }
  2358. // SetMaxResults sets the MaxResults field's value.
  2359. func (s *GetResourceShareAssociationsInput) SetMaxResults(v int64) *GetResourceShareAssociationsInput {
  2360. s.MaxResults = &v
  2361. return s
  2362. }
  2363. // SetNextToken sets the NextToken field's value.
  2364. func (s *GetResourceShareAssociationsInput) SetNextToken(v string) *GetResourceShareAssociationsInput {
  2365. s.NextToken = &v
  2366. return s
  2367. }
  2368. // SetPrincipal sets the Principal field's value.
  2369. func (s *GetResourceShareAssociationsInput) SetPrincipal(v string) *GetResourceShareAssociationsInput {
  2370. s.Principal = &v
  2371. return s
  2372. }
  2373. // SetResourceArn sets the ResourceArn field's value.
  2374. func (s *GetResourceShareAssociationsInput) SetResourceArn(v string) *GetResourceShareAssociationsInput {
  2375. s.ResourceArn = &v
  2376. return s
  2377. }
  2378. // SetResourceShareArns sets the ResourceShareArns field's value.
  2379. func (s *GetResourceShareAssociationsInput) SetResourceShareArns(v []*string) *GetResourceShareAssociationsInput {
  2380. s.ResourceShareArns = v
  2381. return s
  2382. }
  2383. type GetResourceShareAssociationsOutput struct {
  2384. _ struct{} `type:"structure"`
  2385. // The token to use to retrieve the next page of results. This value is null
  2386. // when there are no more results to return.
  2387. NextToken *string `locationName:"nextToken" type:"string"`
  2388. // Information about the association.
  2389. ResourceShareAssociations []*ResourceShareAssociation `locationName:"resourceShareAssociations" type:"list"`
  2390. }
  2391. // String returns the string representation
  2392. func (s GetResourceShareAssociationsOutput) String() string {
  2393. return awsutil.Prettify(s)
  2394. }
  2395. // GoString returns the string representation
  2396. func (s GetResourceShareAssociationsOutput) GoString() string {
  2397. return s.String()
  2398. }
  2399. // SetNextToken sets the NextToken field's value.
  2400. func (s *GetResourceShareAssociationsOutput) SetNextToken(v string) *GetResourceShareAssociationsOutput {
  2401. s.NextToken = &v
  2402. return s
  2403. }
  2404. // SetResourceShareAssociations sets the ResourceShareAssociations field's value.
  2405. func (s *GetResourceShareAssociationsOutput) SetResourceShareAssociations(v []*ResourceShareAssociation) *GetResourceShareAssociationsOutput {
  2406. s.ResourceShareAssociations = v
  2407. return s
  2408. }
  2409. type GetResourceShareInvitationsInput struct {
  2410. _ struct{} `type:"structure"`
  2411. // The maximum number of results to return with a single call. To retrieve the
  2412. // remaining results, make another call with the returned nextToken value.
  2413. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  2414. // The token for the next page of results.
  2415. NextToken *string `locationName:"nextToken" type:"string"`
  2416. // The Amazon Resource Names (ARN) of the resource shares.
  2417. ResourceShareArns []*string `locationName:"resourceShareArns" type:"list"`
  2418. // The Amazon Resource Names (ARN) of the invitations.
  2419. ResourceShareInvitationArns []*string `locationName:"resourceShareInvitationArns" type:"list"`
  2420. }
  2421. // String returns the string representation
  2422. func (s GetResourceShareInvitationsInput) String() string {
  2423. return awsutil.Prettify(s)
  2424. }
  2425. // GoString returns the string representation
  2426. func (s GetResourceShareInvitationsInput) GoString() string {
  2427. return s.String()
  2428. }
  2429. // Validate inspects the fields of the type to determine if they are valid.
  2430. func (s *GetResourceShareInvitationsInput) Validate() error {
  2431. invalidParams := request.ErrInvalidParams{Context: "GetResourceShareInvitationsInput"}
  2432. if s.MaxResults != nil && *s.MaxResults < 1 {
  2433. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2434. }
  2435. if invalidParams.Len() > 0 {
  2436. return invalidParams
  2437. }
  2438. return nil
  2439. }
  2440. // SetMaxResults sets the MaxResults field's value.
  2441. func (s *GetResourceShareInvitationsInput) SetMaxResults(v int64) *GetResourceShareInvitationsInput {
  2442. s.MaxResults = &v
  2443. return s
  2444. }
  2445. // SetNextToken sets the NextToken field's value.
  2446. func (s *GetResourceShareInvitationsInput) SetNextToken(v string) *GetResourceShareInvitationsInput {
  2447. s.NextToken = &v
  2448. return s
  2449. }
  2450. // SetResourceShareArns sets the ResourceShareArns field's value.
  2451. func (s *GetResourceShareInvitationsInput) SetResourceShareArns(v []*string) *GetResourceShareInvitationsInput {
  2452. s.ResourceShareArns = v
  2453. return s
  2454. }
  2455. // SetResourceShareInvitationArns sets the ResourceShareInvitationArns field's value.
  2456. func (s *GetResourceShareInvitationsInput) SetResourceShareInvitationArns(v []*string) *GetResourceShareInvitationsInput {
  2457. s.ResourceShareInvitationArns = v
  2458. return s
  2459. }
  2460. type GetResourceShareInvitationsOutput struct {
  2461. _ struct{} `type:"structure"`
  2462. // The token to use to retrieve the next page of results. This value is null
  2463. // when there are no more results to return.
  2464. NextToken *string `locationName:"nextToken" type:"string"`
  2465. // Information about the invitations.
  2466. ResourceShareInvitations []*ResourceShareInvitation `locationName:"resourceShareInvitations" type:"list"`
  2467. }
  2468. // String returns the string representation
  2469. func (s GetResourceShareInvitationsOutput) String() string {
  2470. return awsutil.Prettify(s)
  2471. }
  2472. // GoString returns the string representation
  2473. func (s GetResourceShareInvitationsOutput) GoString() string {
  2474. return s.String()
  2475. }
  2476. // SetNextToken sets the NextToken field's value.
  2477. func (s *GetResourceShareInvitationsOutput) SetNextToken(v string) *GetResourceShareInvitationsOutput {
  2478. s.NextToken = &v
  2479. return s
  2480. }
  2481. // SetResourceShareInvitations sets the ResourceShareInvitations field's value.
  2482. func (s *GetResourceShareInvitationsOutput) SetResourceShareInvitations(v []*ResourceShareInvitation) *GetResourceShareInvitationsOutput {
  2483. s.ResourceShareInvitations = v
  2484. return s
  2485. }
  2486. type GetResourceSharesInput struct {
  2487. _ struct{} `type:"structure"`
  2488. // The maximum number of results to return with a single call. To retrieve the
  2489. // remaining results, make another call with the returned nextToken value.
  2490. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  2491. // The name of the resource share.
  2492. Name *string `locationName:"name" type:"string"`
  2493. // The token for the next page of results.
  2494. NextToken *string `locationName:"nextToken" type:"string"`
  2495. // The type of owner.
  2496. //
  2497. // ResourceOwner is a required field
  2498. ResourceOwner *string `locationName:"resourceOwner" type:"string" required:"true" enum:"ResourceOwner"`
  2499. // The Amazon Resource Names (ARN) of the resource shares.
  2500. ResourceShareArns []*string `locationName:"resourceShareArns" type:"list"`
  2501. // The status of the resource share.
  2502. ResourceShareStatus *string `locationName:"resourceShareStatus" type:"string" enum:"ResourceShareStatus"`
  2503. // One or more tag filters.
  2504. TagFilters []*TagFilter `locationName:"tagFilters" type:"list"`
  2505. }
  2506. // String returns the string representation
  2507. func (s GetResourceSharesInput) String() string {
  2508. return awsutil.Prettify(s)
  2509. }
  2510. // GoString returns the string representation
  2511. func (s GetResourceSharesInput) GoString() string {
  2512. return s.String()
  2513. }
  2514. // Validate inspects the fields of the type to determine if they are valid.
  2515. func (s *GetResourceSharesInput) Validate() error {
  2516. invalidParams := request.ErrInvalidParams{Context: "GetResourceSharesInput"}
  2517. if s.MaxResults != nil && *s.MaxResults < 1 {
  2518. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2519. }
  2520. if s.ResourceOwner == nil {
  2521. invalidParams.Add(request.NewErrParamRequired("ResourceOwner"))
  2522. }
  2523. if invalidParams.Len() > 0 {
  2524. return invalidParams
  2525. }
  2526. return nil
  2527. }
  2528. // SetMaxResults sets the MaxResults field's value.
  2529. func (s *GetResourceSharesInput) SetMaxResults(v int64) *GetResourceSharesInput {
  2530. s.MaxResults = &v
  2531. return s
  2532. }
  2533. // SetName sets the Name field's value.
  2534. func (s *GetResourceSharesInput) SetName(v string) *GetResourceSharesInput {
  2535. s.Name = &v
  2536. return s
  2537. }
  2538. // SetNextToken sets the NextToken field's value.
  2539. func (s *GetResourceSharesInput) SetNextToken(v string) *GetResourceSharesInput {
  2540. s.NextToken = &v
  2541. return s
  2542. }
  2543. // SetResourceOwner sets the ResourceOwner field's value.
  2544. func (s *GetResourceSharesInput) SetResourceOwner(v string) *GetResourceSharesInput {
  2545. s.ResourceOwner = &v
  2546. return s
  2547. }
  2548. // SetResourceShareArns sets the ResourceShareArns field's value.
  2549. func (s *GetResourceSharesInput) SetResourceShareArns(v []*string) *GetResourceSharesInput {
  2550. s.ResourceShareArns = v
  2551. return s
  2552. }
  2553. // SetResourceShareStatus sets the ResourceShareStatus field's value.
  2554. func (s *GetResourceSharesInput) SetResourceShareStatus(v string) *GetResourceSharesInput {
  2555. s.ResourceShareStatus = &v
  2556. return s
  2557. }
  2558. // SetTagFilters sets the TagFilters field's value.
  2559. func (s *GetResourceSharesInput) SetTagFilters(v []*TagFilter) *GetResourceSharesInput {
  2560. s.TagFilters = v
  2561. return s
  2562. }
  2563. type GetResourceSharesOutput struct {
  2564. _ struct{} `type:"structure"`
  2565. // The token to use to retrieve the next page of results. This value is null
  2566. // when there are no more results to return.
  2567. NextToken *string `locationName:"nextToken" type:"string"`
  2568. // Information about the resource shares.
  2569. ResourceShares []*ResourceShare `locationName:"resourceShares" type:"list"`
  2570. }
  2571. // String returns the string representation
  2572. func (s GetResourceSharesOutput) String() string {
  2573. return awsutil.Prettify(s)
  2574. }
  2575. // GoString returns the string representation
  2576. func (s GetResourceSharesOutput) GoString() string {
  2577. return s.String()
  2578. }
  2579. // SetNextToken sets the NextToken field's value.
  2580. func (s *GetResourceSharesOutput) SetNextToken(v string) *GetResourceSharesOutput {
  2581. s.NextToken = &v
  2582. return s
  2583. }
  2584. // SetResourceShares sets the ResourceShares field's value.
  2585. func (s *GetResourceSharesOutput) SetResourceShares(v []*ResourceShare) *GetResourceSharesOutput {
  2586. s.ResourceShares = v
  2587. return s
  2588. }
  2589. type ListPrincipalsInput struct {
  2590. _ struct{} `type:"structure"`
  2591. // The maximum number of results to return with a single call. To retrieve the
  2592. // remaining results, make another call with the returned nextToken value.
  2593. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  2594. // The token for the next page of results.
  2595. NextToken *string `locationName:"nextToken" type:"string"`
  2596. // The principals.
  2597. Principals []*string `locationName:"principals" type:"list"`
  2598. // The Amazon Resource Name (ARN) of the resource.
  2599. ResourceArn *string `locationName:"resourceArn" type:"string"`
  2600. // The type of owner.
  2601. //
  2602. // ResourceOwner is a required field
  2603. ResourceOwner *string `locationName:"resourceOwner" type:"string" required:"true" enum:"ResourceOwner"`
  2604. // The Amazon Resource Names (ARN) of the resource shares.
  2605. ResourceShareArns []*string `locationName:"resourceShareArns" type:"list"`
  2606. // The resource type.
  2607. ResourceType *string `locationName:"resourceType" type:"string"`
  2608. }
  2609. // String returns the string representation
  2610. func (s ListPrincipalsInput) String() string {
  2611. return awsutil.Prettify(s)
  2612. }
  2613. // GoString returns the string representation
  2614. func (s ListPrincipalsInput) GoString() string {
  2615. return s.String()
  2616. }
  2617. // Validate inspects the fields of the type to determine if they are valid.
  2618. func (s *ListPrincipalsInput) Validate() error {
  2619. invalidParams := request.ErrInvalidParams{Context: "ListPrincipalsInput"}
  2620. if s.MaxResults != nil && *s.MaxResults < 1 {
  2621. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2622. }
  2623. if s.ResourceOwner == nil {
  2624. invalidParams.Add(request.NewErrParamRequired("ResourceOwner"))
  2625. }
  2626. if invalidParams.Len() > 0 {
  2627. return invalidParams
  2628. }
  2629. return nil
  2630. }
  2631. // SetMaxResults sets the MaxResults field's value.
  2632. func (s *ListPrincipalsInput) SetMaxResults(v int64) *ListPrincipalsInput {
  2633. s.MaxResults = &v
  2634. return s
  2635. }
  2636. // SetNextToken sets the NextToken field's value.
  2637. func (s *ListPrincipalsInput) SetNextToken(v string) *ListPrincipalsInput {
  2638. s.NextToken = &v
  2639. return s
  2640. }
  2641. // SetPrincipals sets the Principals field's value.
  2642. func (s *ListPrincipalsInput) SetPrincipals(v []*string) *ListPrincipalsInput {
  2643. s.Principals = v
  2644. return s
  2645. }
  2646. // SetResourceArn sets the ResourceArn field's value.
  2647. func (s *ListPrincipalsInput) SetResourceArn(v string) *ListPrincipalsInput {
  2648. s.ResourceArn = &v
  2649. return s
  2650. }
  2651. // SetResourceOwner sets the ResourceOwner field's value.
  2652. func (s *ListPrincipalsInput) SetResourceOwner(v string) *ListPrincipalsInput {
  2653. s.ResourceOwner = &v
  2654. return s
  2655. }
  2656. // SetResourceShareArns sets the ResourceShareArns field's value.
  2657. func (s *ListPrincipalsInput) SetResourceShareArns(v []*string) *ListPrincipalsInput {
  2658. s.ResourceShareArns = v
  2659. return s
  2660. }
  2661. // SetResourceType sets the ResourceType field's value.
  2662. func (s *ListPrincipalsInput) SetResourceType(v string) *ListPrincipalsInput {
  2663. s.ResourceType = &v
  2664. return s
  2665. }
  2666. type ListPrincipalsOutput struct {
  2667. _ struct{} `type:"structure"`
  2668. // The token to use to retrieve the next page of results. This value is null
  2669. // when there are no more results to return.
  2670. NextToken *string `locationName:"nextToken" type:"string"`
  2671. // The principals.
  2672. Principals []*Principal `locationName:"principals" type:"list"`
  2673. }
  2674. // String returns the string representation
  2675. func (s ListPrincipalsOutput) String() string {
  2676. return awsutil.Prettify(s)
  2677. }
  2678. // GoString returns the string representation
  2679. func (s ListPrincipalsOutput) GoString() string {
  2680. return s.String()
  2681. }
  2682. // SetNextToken sets the NextToken field's value.
  2683. func (s *ListPrincipalsOutput) SetNextToken(v string) *ListPrincipalsOutput {
  2684. s.NextToken = &v
  2685. return s
  2686. }
  2687. // SetPrincipals sets the Principals field's value.
  2688. func (s *ListPrincipalsOutput) SetPrincipals(v []*Principal) *ListPrincipalsOutput {
  2689. s.Principals = v
  2690. return s
  2691. }
  2692. type ListResourcesInput struct {
  2693. _ struct{} `type:"structure"`
  2694. // The maximum number of results to return with a single call. To retrieve the
  2695. // remaining results, make another call with the returned nextToken value.
  2696. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  2697. // The token for the next page of results.
  2698. NextToken *string `locationName:"nextToken" type:"string"`
  2699. // The principal.
  2700. Principal *string `locationName:"principal" type:"string"`
  2701. // The Amazon Resource Names (ARN) of the resources.
  2702. ResourceArns []*string `locationName:"resourceArns" type:"list"`
  2703. // The type of owner.
  2704. //
  2705. // ResourceOwner is a required field
  2706. ResourceOwner *string `locationName:"resourceOwner" type:"string" required:"true" enum:"ResourceOwner"`
  2707. // The Amazon Resource Names (ARN) of the resource shares.
  2708. ResourceShareArns []*string `locationName:"resourceShareArns" type:"list"`
  2709. // The resource type.
  2710. ResourceType *string `locationName:"resourceType" type:"string"`
  2711. }
  2712. // String returns the string representation
  2713. func (s ListResourcesInput) String() string {
  2714. return awsutil.Prettify(s)
  2715. }
  2716. // GoString returns the string representation
  2717. func (s ListResourcesInput) GoString() string {
  2718. return s.String()
  2719. }
  2720. // Validate inspects the fields of the type to determine if they are valid.
  2721. func (s *ListResourcesInput) Validate() error {
  2722. invalidParams := request.ErrInvalidParams{Context: "ListResourcesInput"}
  2723. if s.MaxResults != nil && *s.MaxResults < 1 {
  2724. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2725. }
  2726. if s.ResourceOwner == nil {
  2727. invalidParams.Add(request.NewErrParamRequired("ResourceOwner"))
  2728. }
  2729. if invalidParams.Len() > 0 {
  2730. return invalidParams
  2731. }
  2732. return nil
  2733. }
  2734. // SetMaxResults sets the MaxResults field's value.
  2735. func (s *ListResourcesInput) SetMaxResults(v int64) *ListResourcesInput {
  2736. s.MaxResults = &v
  2737. return s
  2738. }
  2739. // SetNextToken sets the NextToken field's value.
  2740. func (s *ListResourcesInput) SetNextToken(v string) *ListResourcesInput {
  2741. s.NextToken = &v
  2742. return s
  2743. }
  2744. // SetPrincipal sets the Principal field's value.
  2745. func (s *ListResourcesInput) SetPrincipal(v string) *ListResourcesInput {
  2746. s.Principal = &v
  2747. return s
  2748. }
  2749. // SetResourceArns sets the ResourceArns field's value.
  2750. func (s *ListResourcesInput) SetResourceArns(v []*string) *ListResourcesInput {
  2751. s.ResourceArns = v
  2752. return s
  2753. }
  2754. // SetResourceOwner sets the ResourceOwner field's value.
  2755. func (s *ListResourcesInput) SetResourceOwner(v string) *ListResourcesInput {
  2756. s.ResourceOwner = &v
  2757. return s
  2758. }
  2759. // SetResourceShareArns sets the ResourceShareArns field's value.
  2760. func (s *ListResourcesInput) SetResourceShareArns(v []*string) *ListResourcesInput {
  2761. s.ResourceShareArns = v
  2762. return s
  2763. }
  2764. // SetResourceType sets the ResourceType field's value.
  2765. func (s *ListResourcesInput) SetResourceType(v string) *ListResourcesInput {
  2766. s.ResourceType = &v
  2767. return s
  2768. }
  2769. type ListResourcesOutput struct {
  2770. _ struct{} `type:"structure"`
  2771. // The token to use to retrieve the next page of results. This value is null
  2772. // when there are no more results to return.
  2773. NextToken *string `locationName:"nextToken" type:"string"`
  2774. // Information about the resources.
  2775. Resources []*Resource `locationName:"resources" type:"list"`
  2776. }
  2777. // String returns the string representation
  2778. func (s ListResourcesOutput) String() string {
  2779. return awsutil.Prettify(s)
  2780. }
  2781. // GoString returns the string representation
  2782. func (s ListResourcesOutput) GoString() string {
  2783. return s.String()
  2784. }
  2785. // SetNextToken sets the NextToken field's value.
  2786. func (s *ListResourcesOutput) SetNextToken(v string) *ListResourcesOutput {
  2787. s.NextToken = &v
  2788. return s
  2789. }
  2790. // SetResources sets the Resources field's value.
  2791. func (s *ListResourcesOutput) SetResources(v []*Resource) *ListResourcesOutput {
  2792. s.Resources = v
  2793. return s
  2794. }
  2795. // Describes a principal for use with AWS Resource Access Manager.
  2796. type Principal struct {
  2797. _ struct{} `type:"structure"`
  2798. // The time when the principal was associated with the resource share.
  2799. CreationTime *time.Time `locationName:"creationTime" type:"timestamp"`
  2800. // Indicates whether the principal belongs to the same organization as the AWS
  2801. // account that owns the resource share.
  2802. External *bool `locationName:"external" type:"boolean"`
  2803. // The ID of the principal.
  2804. Id *string `locationName:"id" type:"string"`
  2805. // The time when the association was last updated.
  2806. LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"`
  2807. // The Amazon Resource Name (ARN) of the resource share.
  2808. ResourceShareArn *string `locationName:"resourceShareArn" type:"string"`
  2809. }
  2810. // String returns the string representation
  2811. func (s Principal) String() string {
  2812. return awsutil.Prettify(s)
  2813. }
  2814. // GoString returns the string representation
  2815. func (s Principal) GoString() string {
  2816. return s.String()
  2817. }
  2818. // SetCreationTime sets the CreationTime field's value.
  2819. func (s *Principal) SetCreationTime(v time.Time) *Principal {
  2820. s.CreationTime = &v
  2821. return s
  2822. }
  2823. // SetExternal sets the External field's value.
  2824. func (s *Principal) SetExternal(v bool) *Principal {
  2825. s.External = &v
  2826. return s
  2827. }
  2828. // SetId sets the Id field's value.
  2829. func (s *Principal) SetId(v string) *Principal {
  2830. s.Id = &v
  2831. return s
  2832. }
  2833. // SetLastUpdatedTime sets the LastUpdatedTime field's value.
  2834. func (s *Principal) SetLastUpdatedTime(v time.Time) *Principal {
  2835. s.LastUpdatedTime = &v
  2836. return s
  2837. }
  2838. // SetResourceShareArn sets the ResourceShareArn field's value.
  2839. func (s *Principal) SetResourceShareArn(v string) *Principal {
  2840. s.ResourceShareArn = &v
  2841. return s
  2842. }
  2843. type RejectResourceShareInvitationInput struct {
  2844. _ struct{} `type:"structure"`
  2845. // A unique, case-sensitive identifier that you provide to ensure the idempotency
  2846. // of the request.
  2847. ClientToken *string `locationName:"clientToken" type:"string"`
  2848. // The Amazon Resource Name (ARN) of the invitation.
  2849. //
  2850. // ResourceShareInvitationArn is a required field
  2851. ResourceShareInvitationArn *string `locationName:"resourceShareInvitationArn" type:"string" required:"true"`
  2852. }
  2853. // String returns the string representation
  2854. func (s RejectResourceShareInvitationInput) String() string {
  2855. return awsutil.Prettify(s)
  2856. }
  2857. // GoString returns the string representation
  2858. func (s RejectResourceShareInvitationInput) GoString() string {
  2859. return s.String()
  2860. }
  2861. // Validate inspects the fields of the type to determine if they are valid.
  2862. func (s *RejectResourceShareInvitationInput) Validate() error {
  2863. invalidParams := request.ErrInvalidParams{Context: "RejectResourceShareInvitationInput"}
  2864. if s.ResourceShareInvitationArn == nil {
  2865. invalidParams.Add(request.NewErrParamRequired("ResourceShareInvitationArn"))
  2866. }
  2867. if invalidParams.Len() > 0 {
  2868. return invalidParams
  2869. }
  2870. return nil
  2871. }
  2872. // SetClientToken sets the ClientToken field's value.
  2873. func (s *RejectResourceShareInvitationInput) SetClientToken(v string) *RejectResourceShareInvitationInput {
  2874. s.ClientToken = &v
  2875. return s
  2876. }
  2877. // SetResourceShareInvitationArn sets the ResourceShareInvitationArn field's value.
  2878. func (s *RejectResourceShareInvitationInput) SetResourceShareInvitationArn(v string) *RejectResourceShareInvitationInput {
  2879. s.ResourceShareInvitationArn = &v
  2880. return s
  2881. }
  2882. type RejectResourceShareInvitationOutput struct {
  2883. _ struct{} `type:"structure"`
  2884. // A unique, case-sensitive identifier that you provide to ensure the idempotency
  2885. // of the request.
  2886. ClientToken *string `locationName:"clientToken" type:"string"`
  2887. // Information about the invitation.
  2888. ResourceShareInvitation *ResourceShareInvitation `locationName:"resourceShareInvitation" type:"structure"`
  2889. }
  2890. // String returns the string representation
  2891. func (s RejectResourceShareInvitationOutput) String() string {
  2892. return awsutil.Prettify(s)
  2893. }
  2894. // GoString returns the string representation
  2895. func (s RejectResourceShareInvitationOutput) GoString() string {
  2896. return s.String()
  2897. }
  2898. // SetClientToken sets the ClientToken field's value.
  2899. func (s *RejectResourceShareInvitationOutput) SetClientToken(v string) *RejectResourceShareInvitationOutput {
  2900. s.ClientToken = &v
  2901. return s
  2902. }
  2903. // SetResourceShareInvitation sets the ResourceShareInvitation field's value.
  2904. func (s *RejectResourceShareInvitationOutput) SetResourceShareInvitation(v *ResourceShareInvitation) *RejectResourceShareInvitationOutput {
  2905. s.ResourceShareInvitation = v
  2906. return s
  2907. }
  2908. // Describes a resource associated with a resource share.
  2909. type Resource struct {
  2910. _ struct{} `type:"structure"`
  2911. // The Amazon Resource Name (ARN) of the resource.
  2912. Arn *string `locationName:"arn" type:"string"`
  2913. // The time when the resource was associated with the resource share.
  2914. CreationTime *time.Time `locationName:"creationTime" type:"timestamp"`
  2915. // The time when the association was last updated.
  2916. LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"`
  2917. // The Amazon Resource Name (ARN) of the resource share.
  2918. ResourceShareArn *string `locationName:"resourceShareArn" type:"string"`
  2919. // The status of the resource.
  2920. Status *string `locationName:"status" type:"string" enum:"ResourceStatus"`
  2921. // A message about the status of the resource.
  2922. StatusMessage *string `locationName:"statusMessage" type:"string"`
  2923. // The resource type.
  2924. Type *string `locationName:"type" type:"string"`
  2925. }
  2926. // String returns the string representation
  2927. func (s Resource) String() string {
  2928. return awsutil.Prettify(s)
  2929. }
  2930. // GoString returns the string representation
  2931. func (s Resource) GoString() string {
  2932. return s.String()
  2933. }
  2934. // SetArn sets the Arn field's value.
  2935. func (s *Resource) SetArn(v string) *Resource {
  2936. s.Arn = &v
  2937. return s
  2938. }
  2939. // SetCreationTime sets the CreationTime field's value.
  2940. func (s *Resource) SetCreationTime(v time.Time) *Resource {
  2941. s.CreationTime = &v
  2942. return s
  2943. }
  2944. // SetLastUpdatedTime sets the LastUpdatedTime field's value.
  2945. func (s *Resource) SetLastUpdatedTime(v time.Time) *Resource {
  2946. s.LastUpdatedTime = &v
  2947. return s
  2948. }
  2949. // SetResourceShareArn sets the ResourceShareArn field's value.
  2950. func (s *Resource) SetResourceShareArn(v string) *Resource {
  2951. s.ResourceShareArn = &v
  2952. return s
  2953. }
  2954. // SetStatus sets the Status field's value.
  2955. func (s *Resource) SetStatus(v string) *Resource {
  2956. s.Status = &v
  2957. return s
  2958. }
  2959. // SetStatusMessage sets the StatusMessage field's value.
  2960. func (s *Resource) SetStatusMessage(v string) *Resource {
  2961. s.StatusMessage = &v
  2962. return s
  2963. }
  2964. // SetType sets the Type field's value.
  2965. func (s *Resource) SetType(v string) *Resource {
  2966. s.Type = &v
  2967. return s
  2968. }
  2969. // Describes a resource share.
  2970. type ResourceShare struct {
  2971. _ struct{} `type:"structure"`
  2972. // Indicates whether principals outside your organization can be associated
  2973. // with a resource share.
  2974. AllowExternalPrincipals *bool `locationName:"allowExternalPrincipals" type:"boolean"`
  2975. // The time when the resource share was created.
  2976. CreationTime *time.Time `locationName:"creationTime" type:"timestamp"`
  2977. // The time when the resource share was last updated.
  2978. LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"`
  2979. // The name of the resource share.
  2980. Name *string `locationName:"name" type:"string"`
  2981. // The ID of the AWS account that owns the resource share.
  2982. OwningAccountId *string `locationName:"owningAccountId" type:"string"`
  2983. // The Amazon Resource Name (ARN) of the resource share.
  2984. ResourceShareArn *string `locationName:"resourceShareArn" type:"string"`
  2985. // The status of the resource share.
  2986. Status *string `locationName:"status" type:"string" enum:"ResourceShareStatus"`
  2987. // A message about the status of the resource share.
  2988. StatusMessage *string `locationName:"statusMessage" type:"string"`
  2989. // The tags for the resource share.
  2990. Tags []*Tag `locationName:"tags" type:"list"`
  2991. }
  2992. // String returns the string representation
  2993. func (s ResourceShare) String() string {
  2994. return awsutil.Prettify(s)
  2995. }
  2996. // GoString returns the string representation
  2997. func (s ResourceShare) GoString() string {
  2998. return s.String()
  2999. }
  3000. // SetAllowExternalPrincipals sets the AllowExternalPrincipals field's value.
  3001. func (s *ResourceShare) SetAllowExternalPrincipals(v bool) *ResourceShare {
  3002. s.AllowExternalPrincipals = &v
  3003. return s
  3004. }
  3005. // SetCreationTime sets the CreationTime field's value.
  3006. func (s *ResourceShare) SetCreationTime(v time.Time) *ResourceShare {
  3007. s.CreationTime = &v
  3008. return s
  3009. }
  3010. // SetLastUpdatedTime sets the LastUpdatedTime field's value.
  3011. func (s *ResourceShare) SetLastUpdatedTime(v time.Time) *ResourceShare {
  3012. s.LastUpdatedTime = &v
  3013. return s
  3014. }
  3015. // SetName sets the Name field's value.
  3016. func (s *ResourceShare) SetName(v string) *ResourceShare {
  3017. s.Name = &v
  3018. return s
  3019. }
  3020. // SetOwningAccountId sets the OwningAccountId field's value.
  3021. func (s *ResourceShare) SetOwningAccountId(v string) *ResourceShare {
  3022. s.OwningAccountId = &v
  3023. return s
  3024. }
  3025. // SetResourceShareArn sets the ResourceShareArn field's value.
  3026. func (s *ResourceShare) SetResourceShareArn(v string) *ResourceShare {
  3027. s.ResourceShareArn = &v
  3028. return s
  3029. }
  3030. // SetStatus sets the Status field's value.
  3031. func (s *ResourceShare) SetStatus(v string) *ResourceShare {
  3032. s.Status = &v
  3033. return s
  3034. }
  3035. // SetStatusMessage sets the StatusMessage field's value.
  3036. func (s *ResourceShare) SetStatusMessage(v string) *ResourceShare {
  3037. s.StatusMessage = &v
  3038. return s
  3039. }
  3040. // SetTags sets the Tags field's value.
  3041. func (s *ResourceShare) SetTags(v []*Tag) *ResourceShare {
  3042. s.Tags = v
  3043. return s
  3044. }
  3045. // Describes an association with a resource share.
  3046. type ResourceShareAssociation struct {
  3047. _ struct{} `type:"structure"`
  3048. // The associated entity. For resource associations, this is the ARN of the
  3049. // resource. For principal associations, this is the ID of an AWS account or
  3050. // the ARN of an OU or organization from AWS Organizations.
  3051. AssociatedEntity *string `locationName:"associatedEntity" type:"string"`
  3052. // The association type.
  3053. AssociationType *string `locationName:"associationType" type:"string" enum:"ResourceShareAssociationType"`
  3054. // The time when the association was created.
  3055. CreationTime *time.Time `locationName:"creationTime" type:"timestamp"`
  3056. // Indicates whether the principal belongs to the same organization as the AWS
  3057. // account that owns the resource share.
  3058. External *bool `locationName:"external" type:"boolean"`
  3059. // The time when the association was last updated.
  3060. LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"`
  3061. // The Amazon Resource Name (ARN) of the resource share.
  3062. ResourceShareArn *string `locationName:"resourceShareArn" type:"string"`
  3063. // The status of the association.
  3064. Status *string `locationName:"status" type:"string" enum:"ResourceShareAssociationStatus"`
  3065. // A message about the status of the association.
  3066. StatusMessage *string `locationName:"statusMessage" type:"string"`
  3067. }
  3068. // String returns the string representation
  3069. func (s ResourceShareAssociation) String() string {
  3070. return awsutil.Prettify(s)
  3071. }
  3072. // GoString returns the string representation
  3073. func (s ResourceShareAssociation) GoString() string {
  3074. return s.String()
  3075. }
  3076. // SetAssociatedEntity sets the AssociatedEntity field's value.
  3077. func (s *ResourceShareAssociation) SetAssociatedEntity(v string) *ResourceShareAssociation {
  3078. s.AssociatedEntity = &v
  3079. return s
  3080. }
  3081. // SetAssociationType sets the AssociationType field's value.
  3082. func (s *ResourceShareAssociation) SetAssociationType(v string) *ResourceShareAssociation {
  3083. s.AssociationType = &v
  3084. return s
  3085. }
  3086. // SetCreationTime sets the CreationTime field's value.
  3087. func (s *ResourceShareAssociation) SetCreationTime(v time.Time) *ResourceShareAssociation {
  3088. s.CreationTime = &v
  3089. return s
  3090. }
  3091. // SetExternal sets the External field's value.
  3092. func (s *ResourceShareAssociation) SetExternal(v bool) *ResourceShareAssociation {
  3093. s.External = &v
  3094. return s
  3095. }
  3096. // SetLastUpdatedTime sets the LastUpdatedTime field's value.
  3097. func (s *ResourceShareAssociation) SetLastUpdatedTime(v time.Time) *ResourceShareAssociation {
  3098. s.LastUpdatedTime = &v
  3099. return s
  3100. }
  3101. // SetResourceShareArn sets the ResourceShareArn field's value.
  3102. func (s *ResourceShareAssociation) SetResourceShareArn(v string) *ResourceShareAssociation {
  3103. s.ResourceShareArn = &v
  3104. return s
  3105. }
  3106. // SetStatus sets the Status field's value.
  3107. func (s *ResourceShareAssociation) SetStatus(v string) *ResourceShareAssociation {
  3108. s.Status = &v
  3109. return s
  3110. }
  3111. // SetStatusMessage sets the StatusMessage field's value.
  3112. func (s *ResourceShareAssociation) SetStatusMessage(v string) *ResourceShareAssociation {
  3113. s.StatusMessage = &v
  3114. return s
  3115. }
  3116. // Describes an invitation to join a resource share.
  3117. type ResourceShareInvitation struct {
  3118. _ struct{} `type:"structure"`
  3119. // The date and time when the invitation was sent.
  3120. InvitationTimestamp *time.Time `locationName:"invitationTimestamp" type:"timestamp"`
  3121. // The ID of the AWS account that received the invitation.
  3122. ReceiverAccountId *string `locationName:"receiverAccountId" type:"string"`
  3123. // The Amazon Resource Name (ARN) of the resource share.
  3124. ResourceShareArn *string `locationName:"resourceShareArn" type:"string"`
  3125. // The resources associated with the resource share.
  3126. ResourceShareAssociations []*ResourceShareAssociation `locationName:"resourceShareAssociations" type:"list"`
  3127. // The Amazon Resource Name (ARN) of the invitation.
  3128. ResourceShareInvitationArn *string `locationName:"resourceShareInvitationArn" type:"string"`
  3129. // The name of the resource share.
  3130. ResourceShareName *string `locationName:"resourceShareName" type:"string"`
  3131. // The ID of the AWS account that sent the invitation.
  3132. SenderAccountId *string `locationName:"senderAccountId" type:"string"`
  3133. // The status of the invitation.
  3134. Status *string `locationName:"status" type:"string" enum:"ResourceShareInvitationStatus"`
  3135. }
  3136. // String returns the string representation
  3137. func (s ResourceShareInvitation) String() string {
  3138. return awsutil.Prettify(s)
  3139. }
  3140. // GoString returns the string representation
  3141. func (s ResourceShareInvitation) GoString() string {
  3142. return s.String()
  3143. }
  3144. // SetInvitationTimestamp sets the InvitationTimestamp field's value.
  3145. func (s *ResourceShareInvitation) SetInvitationTimestamp(v time.Time) *ResourceShareInvitation {
  3146. s.InvitationTimestamp = &v
  3147. return s
  3148. }
  3149. // SetReceiverAccountId sets the ReceiverAccountId field's value.
  3150. func (s *ResourceShareInvitation) SetReceiverAccountId(v string) *ResourceShareInvitation {
  3151. s.ReceiverAccountId = &v
  3152. return s
  3153. }
  3154. // SetResourceShareArn sets the ResourceShareArn field's value.
  3155. func (s *ResourceShareInvitation) SetResourceShareArn(v string) *ResourceShareInvitation {
  3156. s.ResourceShareArn = &v
  3157. return s
  3158. }
  3159. // SetResourceShareAssociations sets the ResourceShareAssociations field's value.
  3160. func (s *ResourceShareInvitation) SetResourceShareAssociations(v []*ResourceShareAssociation) *ResourceShareInvitation {
  3161. s.ResourceShareAssociations = v
  3162. return s
  3163. }
  3164. // SetResourceShareInvitationArn sets the ResourceShareInvitationArn field's value.
  3165. func (s *ResourceShareInvitation) SetResourceShareInvitationArn(v string) *ResourceShareInvitation {
  3166. s.ResourceShareInvitationArn = &v
  3167. return s
  3168. }
  3169. // SetResourceShareName sets the ResourceShareName field's value.
  3170. func (s *ResourceShareInvitation) SetResourceShareName(v string) *ResourceShareInvitation {
  3171. s.ResourceShareName = &v
  3172. return s
  3173. }
  3174. // SetSenderAccountId sets the SenderAccountId field's value.
  3175. func (s *ResourceShareInvitation) SetSenderAccountId(v string) *ResourceShareInvitation {
  3176. s.SenderAccountId = &v
  3177. return s
  3178. }
  3179. // SetStatus sets the Status field's value.
  3180. func (s *ResourceShareInvitation) SetStatus(v string) *ResourceShareInvitation {
  3181. s.Status = &v
  3182. return s
  3183. }
  3184. // Information about a tag.
  3185. type Tag struct {
  3186. _ struct{} `type:"structure"`
  3187. // The key of the tag.
  3188. Key *string `locationName:"key" type:"string"`
  3189. // The value of the tag.
  3190. Value *string `locationName:"value" type:"string"`
  3191. }
  3192. // String returns the string representation
  3193. func (s Tag) String() string {
  3194. return awsutil.Prettify(s)
  3195. }
  3196. // GoString returns the string representation
  3197. func (s Tag) GoString() string {
  3198. return s.String()
  3199. }
  3200. // SetKey sets the Key field's value.
  3201. func (s *Tag) SetKey(v string) *Tag {
  3202. s.Key = &v
  3203. return s
  3204. }
  3205. // SetValue sets the Value field's value.
  3206. func (s *Tag) SetValue(v string) *Tag {
  3207. s.Value = &v
  3208. return s
  3209. }
  3210. // Used to filter information based on tags.
  3211. type TagFilter struct {
  3212. _ struct{} `type:"structure"`
  3213. // The tag key.
  3214. TagKey *string `locationName:"tagKey" type:"string"`
  3215. // The tag values.
  3216. TagValues []*string `locationName:"tagValues" type:"list"`
  3217. }
  3218. // String returns the string representation
  3219. func (s TagFilter) String() string {
  3220. return awsutil.Prettify(s)
  3221. }
  3222. // GoString returns the string representation
  3223. func (s TagFilter) GoString() string {
  3224. return s.String()
  3225. }
  3226. // SetTagKey sets the TagKey field's value.
  3227. func (s *TagFilter) SetTagKey(v string) *TagFilter {
  3228. s.TagKey = &v
  3229. return s
  3230. }
  3231. // SetTagValues sets the TagValues field's value.
  3232. func (s *TagFilter) SetTagValues(v []*string) *TagFilter {
  3233. s.TagValues = v
  3234. return s
  3235. }
  3236. type TagResourceInput struct {
  3237. _ struct{} `type:"structure"`
  3238. // The Amazon Resource Name (ARN) of the resource share.
  3239. //
  3240. // ResourceShareArn is a required field
  3241. ResourceShareArn *string `locationName:"resourceShareArn" type:"string" required:"true"`
  3242. // One or more tags.
  3243. //
  3244. // Tags is a required field
  3245. Tags []*Tag `locationName:"tags" type:"list" required:"true"`
  3246. }
  3247. // String returns the string representation
  3248. func (s TagResourceInput) String() string {
  3249. return awsutil.Prettify(s)
  3250. }
  3251. // GoString returns the string representation
  3252. func (s TagResourceInput) GoString() string {
  3253. return s.String()
  3254. }
  3255. // Validate inspects the fields of the type to determine if they are valid.
  3256. func (s *TagResourceInput) Validate() error {
  3257. invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  3258. if s.ResourceShareArn == nil {
  3259. invalidParams.Add(request.NewErrParamRequired("ResourceShareArn"))
  3260. }
  3261. if s.Tags == nil {
  3262. invalidParams.Add(request.NewErrParamRequired("Tags"))
  3263. }
  3264. if invalidParams.Len() > 0 {
  3265. return invalidParams
  3266. }
  3267. return nil
  3268. }
  3269. // SetResourceShareArn sets the ResourceShareArn field's value.
  3270. func (s *TagResourceInput) SetResourceShareArn(v string) *TagResourceInput {
  3271. s.ResourceShareArn = &v
  3272. return s
  3273. }
  3274. // SetTags sets the Tags field's value.
  3275. func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput {
  3276. s.Tags = v
  3277. return s
  3278. }
  3279. type TagResourceOutput struct {
  3280. _ struct{} `type:"structure"`
  3281. }
  3282. // String returns the string representation
  3283. func (s TagResourceOutput) String() string {
  3284. return awsutil.Prettify(s)
  3285. }
  3286. // GoString returns the string representation
  3287. func (s TagResourceOutput) GoString() string {
  3288. return s.String()
  3289. }
  3290. type UntagResourceInput struct {
  3291. _ struct{} `type:"structure"`
  3292. // The Amazon Resource Name (ARN) of the resource share.
  3293. //
  3294. // ResourceShareArn is a required field
  3295. ResourceShareArn *string `locationName:"resourceShareArn" type:"string" required:"true"`
  3296. // The tag keys of the tags to remove.
  3297. //
  3298. // TagKeys is a required field
  3299. TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"`
  3300. }
  3301. // String returns the string representation
  3302. func (s UntagResourceInput) String() string {
  3303. return awsutil.Prettify(s)
  3304. }
  3305. // GoString returns the string representation
  3306. func (s UntagResourceInput) GoString() string {
  3307. return s.String()
  3308. }
  3309. // Validate inspects the fields of the type to determine if they are valid.
  3310. func (s *UntagResourceInput) Validate() error {
  3311. invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  3312. if s.ResourceShareArn == nil {
  3313. invalidParams.Add(request.NewErrParamRequired("ResourceShareArn"))
  3314. }
  3315. if s.TagKeys == nil {
  3316. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  3317. }
  3318. if invalidParams.Len() > 0 {
  3319. return invalidParams
  3320. }
  3321. return nil
  3322. }
  3323. // SetResourceShareArn sets the ResourceShareArn field's value.
  3324. func (s *UntagResourceInput) SetResourceShareArn(v string) *UntagResourceInput {
  3325. s.ResourceShareArn = &v
  3326. return s
  3327. }
  3328. // SetTagKeys sets the TagKeys field's value.
  3329. func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
  3330. s.TagKeys = v
  3331. return s
  3332. }
  3333. type UntagResourceOutput struct {
  3334. _ struct{} `type:"structure"`
  3335. }
  3336. // String returns the string representation
  3337. func (s UntagResourceOutput) String() string {
  3338. return awsutil.Prettify(s)
  3339. }
  3340. // GoString returns the string representation
  3341. func (s UntagResourceOutput) GoString() string {
  3342. return s.String()
  3343. }
  3344. type UpdateResourceShareInput struct {
  3345. _ struct{} `type:"structure"`
  3346. // Indicates whether principals outside your organization can be associated
  3347. // with a resource share.
  3348. AllowExternalPrincipals *bool `locationName:"allowExternalPrincipals" type:"boolean"`
  3349. // A unique, case-sensitive identifier that you provide to ensure the idempotency
  3350. // of the request.
  3351. ClientToken *string `locationName:"clientToken" type:"string"`
  3352. // The name of the resource share.
  3353. Name *string `locationName:"name" type:"string"`
  3354. // The Amazon Resource Name (ARN) of the resource share.
  3355. //
  3356. // ResourceShareArn is a required field
  3357. ResourceShareArn *string `locationName:"resourceShareArn" type:"string" required:"true"`
  3358. }
  3359. // String returns the string representation
  3360. func (s UpdateResourceShareInput) String() string {
  3361. return awsutil.Prettify(s)
  3362. }
  3363. // GoString returns the string representation
  3364. func (s UpdateResourceShareInput) GoString() string {
  3365. return s.String()
  3366. }
  3367. // Validate inspects the fields of the type to determine if they are valid.
  3368. func (s *UpdateResourceShareInput) Validate() error {
  3369. invalidParams := request.ErrInvalidParams{Context: "UpdateResourceShareInput"}
  3370. if s.ResourceShareArn == nil {
  3371. invalidParams.Add(request.NewErrParamRequired("ResourceShareArn"))
  3372. }
  3373. if invalidParams.Len() > 0 {
  3374. return invalidParams
  3375. }
  3376. return nil
  3377. }
  3378. // SetAllowExternalPrincipals sets the AllowExternalPrincipals field's value.
  3379. func (s *UpdateResourceShareInput) SetAllowExternalPrincipals(v bool) *UpdateResourceShareInput {
  3380. s.AllowExternalPrincipals = &v
  3381. return s
  3382. }
  3383. // SetClientToken sets the ClientToken field's value.
  3384. func (s *UpdateResourceShareInput) SetClientToken(v string) *UpdateResourceShareInput {
  3385. s.ClientToken = &v
  3386. return s
  3387. }
  3388. // SetName sets the Name field's value.
  3389. func (s *UpdateResourceShareInput) SetName(v string) *UpdateResourceShareInput {
  3390. s.Name = &v
  3391. return s
  3392. }
  3393. // SetResourceShareArn sets the ResourceShareArn field's value.
  3394. func (s *UpdateResourceShareInput) SetResourceShareArn(v string) *UpdateResourceShareInput {
  3395. s.ResourceShareArn = &v
  3396. return s
  3397. }
  3398. type UpdateResourceShareOutput struct {
  3399. _ struct{} `type:"structure"`
  3400. // A unique, case-sensitive identifier that you provide to ensure the idempotency
  3401. // of the request.
  3402. ClientToken *string `locationName:"clientToken" type:"string"`
  3403. // Information about the resource share.
  3404. ResourceShare *ResourceShare `locationName:"resourceShare" type:"structure"`
  3405. }
  3406. // String returns the string representation
  3407. func (s UpdateResourceShareOutput) String() string {
  3408. return awsutil.Prettify(s)
  3409. }
  3410. // GoString returns the string representation
  3411. func (s UpdateResourceShareOutput) GoString() string {
  3412. return s.String()
  3413. }
  3414. // SetClientToken sets the ClientToken field's value.
  3415. func (s *UpdateResourceShareOutput) SetClientToken(v string) *UpdateResourceShareOutput {
  3416. s.ClientToken = &v
  3417. return s
  3418. }
  3419. // SetResourceShare sets the ResourceShare field's value.
  3420. func (s *UpdateResourceShareOutput) SetResourceShare(v *ResourceShare) *UpdateResourceShareOutput {
  3421. s.ResourceShare = v
  3422. return s
  3423. }
  3424. const (
  3425. // ResourceOwnerSelf is a ResourceOwner enum value
  3426. ResourceOwnerSelf = "SELF"
  3427. // ResourceOwnerOtherAccounts is a ResourceOwner enum value
  3428. ResourceOwnerOtherAccounts = "OTHER-ACCOUNTS"
  3429. )
  3430. const (
  3431. // ResourceShareAssociationStatusAssociating is a ResourceShareAssociationStatus enum value
  3432. ResourceShareAssociationStatusAssociating = "ASSOCIATING"
  3433. // ResourceShareAssociationStatusAssociated is a ResourceShareAssociationStatus enum value
  3434. ResourceShareAssociationStatusAssociated = "ASSOCIATED"
  3435. // ResourceShareAssociationStatusFailed is a ResourceShareAssociationStatus enum value
  3436. ResourceShareAssociationStatusFailed = "FAILED"
  3437. // ResourceShareAssociationStatusDisassociating is a ResourceShareAssociationStatus enum value
  3438. ResourceShareAssociationStatusDisassociating = "DISASSOCIATING"
  3439. // ResourceShareAssociationStatusDisassociated is a ResourceShareAssociationStatus enum value
  3440. ResourceShareAssociationStatusDisassociated = "DISASSOCIATED"
  3441. )
  3442. const (
  3443. // ResourceShareAssociationTypePrincipal is a ResourceShareAssociationType enum value
  3444. ResourceShareAssociationTypePrincipal = "PRINCIPAL"
  3445. // ResourceShareAssociationTypeResource is a ResourceShareAssociationType enum value
  3446. ResourceShareAssociationTypeResource = "RESOURCE"
  3447. )
  3448. const (
  3449. // ResourceShareInvitationStatusPending is a ResourceShareInvitationStatus enum value
  3450. ResourceShareInvitationStatusPending = "PENDING"
  3451. // ResourceShareInvitationStatusAccepted is a ResourceShareInvitationStatus enum value
  3452. ResourceShareInvitationStatusAccepted = "ACCEPTED"
  3453. // ResourceShareInvitationStatusRejected is a ResourceShareInvitationStatus enum value
  3454. ResourceShareInvitationStatusRejected = "REJECTED"
  3455. // ResourceShareInvitationStatusExpired is a ResourceShareInvitationStatus enum value
  3456. ResourceShareInvitationStatusExpired = "EXPIRED"
  3457. )
  3458. const (
  3459. // ResourceShareStatusPending is a ResourceShareStatus enum value
  3460. ResourceShareStatusPending = "PENDING"
  3461. // ResourceShareStatusActive is a ResourceShareStatus enum value
  3462. ResourceShareStatusActive = "ACTIVE"
  3463. // ResourceShareStatusFailed is a ResourceShareStatus enum value
  3464. ResourceShareStatusFailed = "FAILED"
  3465. // ResourceShareStatusDeleting is a ResourceShareStatus enum value
  3466. ResourceShareStatusDeleting = "DELETING"
  3467. // ResourceShareStatusDeleted is a ResourceShareStatus enum value
  3468. ResourceShareStatusDeleted = "DELETED"
  3469. )
  3470. const (
  3471. // ResourceStatusAvailable is a ResourceStatus enum value
  3472. ResourceStatusAvailable = "AVAILABLE"
  3473. // ResourceStatusZonalResourceInaccessible is a ResourceStatus enum value
  3474. ResourceStatusZonalResourceInaccessible = "ZONAL_RESOURCE_INACCESSIBLE"
  3475. // ResourceStatusLimitExceeded is a ResourceStatus enum value
  3476. ResourceStatusLimitExceeded = "LIMIT_EXCEEDED"
  3477. // ResourceStatusUnavailable is a ResourceStatus enum value
  3478. ResourceStatusUnavailable = "UNAVAILABLE"
  3479. )