api.go 1.1 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package organizations
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  11. )
  12. const opAcceptHandshake = "AcceptHandshake"
  13. // AcceptHandshakeRequest generates a "aws/request.Request" representing the
  14. // client's request for the AcceptHandshake operation. The "output" return
  15. // value will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See AcceptHandshake for more information on using the AcceptHandshake
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. // // Example sending a request using the AcceptHandshakeRequest method.
  28. // req, resp := client.AcceptHandshakeRequest(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/organizations-2016-11-28/AcceptHandshake
  36. func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req *request.Request, output *AcceptHandshakeOutput) {
  37. op := &request.Operation{
  38. Name: opAcceptHandshake,
  39. HTTPMethod: "POST",
  40. HTTPPath: "/",
  41. }
  42. if input == nil {
  43. input = &AcceptHandshakeInput{}
  44. }
  45. output = &AcceptHandshakeOutput{}
  46. req = c.newRequest(op, input, output)
  47. return
  48. }
  49. // AcceptHandshake API operation for AWS Organizations.
  50. //
  51. // Sends a response to the originator of a handshake agreeing to the action
  52. // proposed by the handshake request.
  53. //
  54. // You can only call this operation by the following principals when they also
  55. // have the relevant IAM permissions:
  56. //
  57. // - Invitation to join or Approve all features request handshakes: only
  58. // a principal from the member account. The user who calls the API for an
  59. // invitation to join must have the organizations:AcceptHandshake permission.
  60. // If you enabled all features in the organization, the user must also have
  61. // the iam:CreateServiceLinkedRole permission so that Organizations can create
  62. // the required service-linked role named AWSServiceRoleForOrganizations.
  63. // For more information, see Organizations and Service-Linked Roles (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integration_services.html#orgs_integration_service-linked-roles)
  64. // in the Organizations User Guide.
  65. //
  66. // - Enable all features final confirmation handshake: only a principal from
  67. // the management account. For more information about invitations, see Inviting
  68. // an Amazon Web Services account to join your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_invites.html)
  69. // in the Organizations User Guide. For more information about requests to
  70. // enable all features in the organization, see Enabling all features in
  71. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
  72. // in the Organizations User Guide.
  73. //
  74. // After you accept a handshake, it continues to appear in the results of relevant
  75. // APIs for only 30 days. After that, it's deleted.
  76. //
  77. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  78. // with awserr.Error's Code and Message methods to get detailed information about
  79. // the error.
  80. //
  81. // See the AWS API reference guide for AWS Organizations's
  82. // API operation AcceptHandshake for usage and error information.
  83. //
  84. // Returned Error Types:
  85. //
  86. // - AccessDeniedException
  87. // You don't have permissions to perform the requested operation. The user or
  88. // role that is making the request must have at least one IAM permissions policy
  89. // attached that grants the required permissions. For more information, see
  90. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  91. // in the IAM User Guide.
  92. //
  93. // - AWSOrganizationsNotInUseException
  94. // Your account isn't a member of an organization. To make this request, you
  95. // must use the credentials of an account that belongs to an organization.
  96. //
  97. // - HandshakeConstraintViolationException
  98. // The requested operation would violate the constraint identified in the reason
  99. // code.
  100. //
  101. // Some of the reasons in the following list might not be applicable to this
  102. // specific API or operation:
  103. //
  104. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  105. // the number of accounts in an organization. Note that deleted and closed
  106. // accounts still count toward your limit. If you get this exception immediately
  107. // after creating the organization, wait one hour and try again. If after
  108. // an hour it continues to fail with this error, contact Amazon Web Services
  109. // Support (https://docs.aws.amazon.com/support/home#/).
  110. //
  111. // - ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because
  112. // the invited account is already a member of an organization.
  113. //
  114. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  115. // handshakes that you can send in one day.
  116. //
  117. // - INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations
  118. // to join an organization while it's in the process of enabling all features.
  119. // You can resume inviting accounts after you finalize the process when all
  120. // accounts have agreed to the change.
  121. //
  122. // - ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid
  123. // because the organization has already enabled all features.
  124. //
  125. // - ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION: The handshake
  126. // request is invalid because the organization has already started the process
  127. // to enable all features.
  128. //
  129. // - ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because
  130. // the account is from a different marketplace than the accounts in the organization.
  131. // For example, accounts with India addresses must be associated with the
  132. // AISPL marketplace. All accounts in an organization must be from the same
  133. // marketplace.
  134. //
  135. // - ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to
  136. // change the membership of an account too quickly after its previous change.
  137. //
  138. // - PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an
  139. // account that doesn't have a payment instrument, such as a credit card,
  140. // associated with it.
  141. //
  142. // - HandshakeNotFoundException
  143. // We can't find a handshake with the HandshakeId that you specified.
  144. //
  145. // - InvalidHandshakeTransitionException
  146. // You can't perform the operation on the handshake in its current state. For
  147. // example, you can't cancel a handshake that was already accepted or accept
  148. // a handshake that was already declined.
  149. //
  150. // - HandshakeAlreadyInStateException
  151. // The specified handshake is already in the requested state. For example, you
  152. // can't accept a handshake that was already accepted.
  153. //
  154. // - InvalidInputException
  155. // The requested operation failed because you provided invalid values for one
  156. // or more of the request parameters. This exception includes a reason that
  157. // contains additional information about the violated limit:
  158. //
  159. // Some of the reasons in the following list might not be applicable to this
  160. // specific API or operation.
  161. //
  162. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  163. // the same entity.
  164. //
  165. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  166. // Services and can't be modified.
  167. //
  168. // - INPUT_REQUIRED: You must include a value for all required parameters.
  169. //
  170. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  171. // for the invited account owner.
  172. //
  173. // - INVALID_ENUM: You specified an invalid value.
  174. //
  175. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  176. //
  177. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  178. // characters.
  179. //
  180. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  181. // at least one invalid value.
  182. //
  183. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  184. // from the response to a previous call of the operation.
  185. //
  186. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  187. // organization, or email) as a party.
  188. //
  189. // - INVALID_PATTERN: You provided a value that doesn't match the required
  190. // pattern.
  191. //
  192. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  193. // match the required pattern.
  194. //
  195. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  196. // name can't begin with the reserved prefix AWSServiceRoleFor.
  197. //
  198. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  199. // Name (ARN) for the organization.
  200. //
  201. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  202. //
  203. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  204. // tag. You can’t add, edit, or delete system tag keys because they're
  205. // reserved for Amazon Web Services use. System tags don’t count against
  206. // your tags per resource limit.
  207. //
  208. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  209. // for the operation.
  210. //
  211. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  212. // than allowed.
  213. //
  214. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  215. // value than allowed.
  216. //
  217. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  218. // than allowed.
  219. //
  220. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  221. // value than allowed.
  222. //
  223. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  224. // between entities in the same root.
  225. //
  226. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  227. // target entity.
  228. //
  229. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  230. // isn't recognized.
  231. //
  232. // - ConcurrentModificationException
  233. // The target of the operation is currently being modified by a different request.
  234. // Try again later.
  235. //
  236. // - ServiceException
  237. // Organizations can't complete your request because of an internal service
  238. // error. Try again later.
  239. //
  240. // - TooManyRequestsException
  241. // You have sent too many requests in too short a period of time. The quota
  242. // helps protect against denial-of-service attacks. Try again later.
  243. //
  244. // For information about quotas that affect Organizations, see Quotas for Organizations
  245. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  246. // the Organizations User Guide.
  247. //
  248. // - AccessDeniedForDependencyException
  249. // The operation that you attempted requires you to have the iam:CreateServiceLinkedRole
  250. // for organizations.amazonaws.com permission so that Organizations can create
  251. // the required service-linked role. You don't have that permission.
  252. //
  253. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/AcceptHandshake
  254. func (c *Organizations) AcceptHandshake(input *AcceptHandshakeInput) (*AcceptHandshakeOutput, error) {
  255. req, out := c.AcceptHandshakeRequest(input)
  256. return out, req.Send()
  257. }
  258. // AcceptHandshakeWithContext is the same as AcceptHandshake with the addition of
  259. // the ability to pass a context and additional request options.
  260. //
  261. // See AcceptHandshake for details on how to use this API operation.
  262. //
  263. // The context must be non-nil and will be used for request cancellation. If
  264. // the context is nil a panic will occur. In the future the SDK may create
  265. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  266. // for more information on using Contexts.
  267. func (c *Organizations) AcceptHandshakeWithContext(ctx aws.Context, input *AcceptHandshakeInput, opts ...request.Option) (*AcceptHandshakeOutput, error) {
  268. req, out := c.AcceptHandshakeRequest(input)
  269. req.SetContext(ctx)
  270. req.ApplyOptions(opts...)
  271. return out, req.Send()
  272. }
  273. const opAttachPolicy = "AttachPolicy"
  274. // AttachPolicyRequest generates a "aws/request.Request" representing the
  275. // client's request for the AttachPolicy operation. The "output" return
  276. // value will be populated with the request's response once the request completes
  277. // successfully.
  278. //
  279. // Use "Send" method on the returned Request to send the API call to the service.
  280. // the "output" return value is not valid until after Send returns without error.
  281. //
  282. // See AttachPolicy for more information on using the AttachPolicy
  283. // API call, and error handling.
  284. //
  285. // This method is useful when you want to inject custom logic or configuration
  286. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  287. //
  288. // // Example sending a request using the AttachPolicyRequest method.
  289. // req, resp := client.AttachPolicyRequest(params)
  290. //
  291. // err := req.Send()
  292. // if err == nil { // resp is now filled
  293. // fmt.Println(resp)
  294. // }
  295. //
  296. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/AttachPolicy
  297. func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *request.Request, output *AttachPolicyOutput) {
  298. op := &request.Operation{
  299. Name: opAttachPolicy,
  300. HTTPMethod: "POST",
  301. HTTPPath: "/",
  302. }
  303. if input == nil {
  304. input = &AttachPolicyInput{}
  305. }
  306. output = &AttachPolicyOutput{}
  307. req = c.newRequest(op, input, output)
  308. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  309. return
  310. }
  311. // AttachPolicy API operation for AWS Organizations.
  312. //
  313. // Attaches a policy to a root, an organizational unit (OU), or an individual
  314. // account. How the policy affects accounts depends on the type of policy. Refer
  315. // to the Organizations User Guide for information about each policy type:
  316. //
  317. // - AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
  318. //
  319. // - BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html)
  320. //
  321. // - SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html)
  322. //
  323. // - TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
  324. //
  325. // This operation can be called only from the organization's management account.
  326. //
  327. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  328. // with awserr.Error's Code and Message methods to get detailed information about
  329. // the error.
  330. //
  331. // See the AWS API reference guide for AWS Organizations's
  332. // API operation AttachPolicy for usage and error information.
  333. //
  334. // Returned Error Types:
  335. //
  336. // - AccessDeniedException
  337. // You don't have permissions to perform the requested operation. The user or
  338. // role that is making the request must have at least one IAM permissions policy
  339. // attached that grants the required permissions. For more information, see
  340. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  341. // in the IAM User Guide.
  342. //
  343. // - AWSOrganizationsNotInUseException
  344. // Your account isn't a member of an organization. To make this request, you
  345. // must use the credentials of an account that belongs to an organization.
  346. //
  347. // - ConcurrentModificationException
  348. // The target of the operation is currently being modified by a different request.
  349. // Try again later.
  350. //
  351. // - ConstraintViolationException
  352. // Performing this operation violates a minimum or maximum value limit. For
  353. // example, attempting to remove the last service control policy (SCP) from
  354. // an OU or root, inviting or creating too many accounts to the organization,
  355. // or attaching too many policies to an account, OU, or root. This exception
  356. // includes a reason that contains additional information about the violated
  357. // limit:
  358. //
  359. // Some of the reasons in the following list might not be applicable to this
  360. // specific API or operation.
  361. //
  362. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  363. // account from the organization. You can't remove the management account.
  364. // Instead, after you remove all member accounts, delete the organization
  365. // itself.
  366. //
  367. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  368. // an account from the organization that doesn't yet have enough information
  369. // to exist as a standalone account. This account requires you to first complete
  370. // phone verification. Follow the steps at Removing a member account from
  371. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  372. // in the Organizations User Guide.
  373. //
  374. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  375. // of accounts that you can create in one day.
  376. //
  377. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  378. // the number of accounts in an organization. If you need more accounts,
  379. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  380. // to request an increase in your limit. Or the number of invitations that
  381. // you tried to send would cause you to exceed the limit of accounts in your
  382. // organization. Send fewer invitations or contact Amazon Web Services Support
  383. // to request an increase in the number of accounts. Deleted and closed accounts
  384. // still count toward your limit. If you get this exception when running
  385. // a command immediately after creating the organization, wait one hour and
  386. // try again. After an hour, if the command continues to fail with this error,
  387. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  388. //
  389. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  390. // register the management account of the organization as a delegated administrator
  391. // for an Amazon Web Services service integrated with Organizations. You
  392. // can designate only a member account as a delegated administrator.
  393. //
  394. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  395. // account. To close the management account for the organization, you must
  396. // first either remove or close all member accounts in the organization.
  397. // Follow standard account closure process using root credentials.​
  398. //
  399. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  400. // an account that is registered as a delegated administrator for a service
  401. // integrated with your organization. To complete this operation, you must
  402. // first deregister this account as a delegated administrator.
  403. //
  404. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  405. // for the past 30 days.
  406. //
  407. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  408. // of accounts that you can close at a time. ​
  409. //
  410. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  411. // organization in the specified region, you must enable all features mode.
  412. //
  413. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  414. // an Amazon Web Services account as a delegated administrator for an Amazon
  415. // Web Services service that already has a delegated administrator. To complete
  416. // this operation, you must first deregister any existing delegated administrators
  417. // for this service.
  418. //
  419. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  420. // valid for a limited period of time. You must resubmit the request and
  421. // generate a new verfication code.
  422. //
  423. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  424. // handshakes that you can send in one day.
  425. //
  426. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  427. // supported payment method is associated with the account. Amazon Web Services
  428. // does not support cards issued by financial institutions in Russia or Belarus.
  429. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  430. //
  431. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  432. // in this organization, you first must migrate the organization's management
  433. // account to the marketplace that corresponds to the management account's
  434. // address. For example, accounts with India addresses must be associated
  435. // with the AISPL marketplace. All accounts in an organization must be associated
  436. // with the same marketplace.
  437. //
  438. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  439. // Web Services /> Regions in China. To create an organization, the master
  440. // must have a valid business license. For more information, contact customer
  441. // support.
  442. //
  443. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  444. // must first provide a valid contact address and phone number for the management
  445. // account. Then try the operation again.
  446. //
  447. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  448. // management account must have an associated account in the Amazon Web Services
  449. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  450. // in the Amazon Web Services GovCloud User Guide.
  451. //
  452. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  453. // with this management account, you first must associate a valid payment
  454. // instrument, such as a credit card, with the account. Follow the steps
  455. // at To leave an organization when all required account information has
  456. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  457. // in the Organizations User Guide.
  458. //
  459. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  460. // to register more delegated administrators than allowed for the service
  461. // principal.
  462. //
  463. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  464. // number of policies of a certain type that can be attached to an entity
  465. // at one time.
  466. //
  467. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  468. // on this resource.
  469. //
  470. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  471. // with this member account, you first must associate a valid payment instrument,
  472. // such as a credit card, with the account. Follow the steps at To leave
  473. // an organization when all required account information has not yet been
  474. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  475. // in the Organizations User Guide.
  476. //
  477. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  478. // policy from an entity that would cause the entity to have fewer than the
  479. // minimum number of policies of a certain type required.
  480. //
  481. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  482. // that requires the organization to be configured to support all features.
  483. // An organization that supports only consolidated billing features can't
  484. // perform this operation.
  485. //
  486. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  487. // too many levels deep.
  488. //
  489. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  490. // that you can have in an organization.
  491. //
  492. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  493. // is larger than the maximum size.
  494. //
  495. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  496. // policies that you can have in an organization.
  497. //
  498. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  499. // before you enabled service access. Call the EnableAWSServiceAccess API
  500. // first.
  501. //
  502. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  503. // tags that are not compliant with the tag policy requirements for this
  504. // account.
  505. //
  506. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  507. // there is a waiting period before you can remove it from the organization.
  508. // If you get an error that indicates that a wait period is required, try
  509. // again in a few days.
  510. //
  511. // - DuplicatePolicyAttachmentException
  512. // The selected policy is already attached to the specified target.
  513. //
  514. // - InvalidInputException
  515. // The requested operation failed because you provided invalid values for one
  516. // or more of the request parameters. This exception includes a reason that
  517. // contains additional information about the violated limit:
  518. //
  519. // Some of the reasons in the following list might not be applicable to this
  520. // specific API or operation.
  521. //
  522. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  523. // the same entity.
  524. //
  525. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  526. // Services and can't be modified.
  527. //
  528. // - INPUT_REQUIRED: You must include a value for all required parameters.
  529. //
  530. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  531. // for the invited account owner.
  532. //
  533. // - INVALID_ENUM: You specified an invalid value.
  534. //
  535. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  536. //
  537. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  538. // characters.
  539. //
  540. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  541. // at least one invalid value.
  542. //
  543. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  544. // from the response to a previous call of the operation.
  545. //
  546. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  547. // organization, or email) as a party.
  548. //
  549. // - INVALID_PATTERN: You provided a value that doesn't match the required
  550. // pattern.
  551. //
  552. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  553. // match the required pattern.
  554. //
  555. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  556. // name can't begin with the reserved prefix AWSServiceRoleFor.
  557. //
  558. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  559. // Name (ARN) for the organization.
  560. //
  561. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  562. //
  563. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  564. // tag. You can’t add, edit, or delete system tag keys because they're
  565. // reserved for Amazon Web Services use. System tags don’t count against
  566. // your tags per resource limit.
  567. //
  568. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  569. // for the operation.
  570. //
  571. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  572. // than allowed.
  573. //
  574. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  575. // value than allowed.
  576. //
  577. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  578. // than allowed.
  579. //
  580. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  581. // value than allowed.
  582. //
  583. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  584. // between entities in the same root.
  585. //
  586. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  587. // target entity.
  588. //
  589. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  590. // isn't recognized.
  591. //
  592. // - PolicyNotFoundException
  593. // We can't find a policy with the PolicyId that you specified.
  594. //
  595. // - PolicyTypeNotEnabledException
  596. // The specified policy type isn't currently enabled in this root. You can't
  597. // attach policies of the specified type to entities in a root until you enable
  598. // that type in the root. For more information, see Enabling All Features in
  599. // Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
  600. // in the Organizations User Guide.
  601. //
  602. // - ServiceException
  603. // Organizations can't complete your request because of an internal service
  604. // error. Try again later.
  605. //
  606. // - TargetNotFoundException
  607. // We can't find a root, OU, account, or policy with the TargetId that you specified.
  608. //
  609. // - TooManyRequestsException
  610. // You have sent too many requests in too short a period of time. The quota
  611. // helps protect against denial-of-service attacks. Try again later.
  612. //
  613. // For information about quotas that affect Organizations, see Quotas for Organizations
  614. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  615. // the Organizations User Guide.
  616. //
  617. // - UnsupportedAPIEndpointException
  618. // This action isn't available in the current Amazon Web Services Region.
  619. //
  620. // - PolicyChangesInProgressException
  621. // Changes to the effective policy are in progress, and its contents can't be
  622. // returned. Try the operation again later.
  623. //
  624. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/AttachPolicy
  625. func (c *Organizations) AttachPolicy(input *AttachPolicyInput) (*AttachPolicyOutput, error) {
  626. req, out := c.AttachPolicyRequest(input)
  627. return out, req.Send()
  628. }
  629. // AttachPolicyWithContext is the same as AttachPolicy with the addition of
  630. // the ability to pass a context and additional request options.
  631. //
  632. // See AttachPolicy for details on how to use this API operation.
  633. //
  634. // The context must be non-nil and will be used for request cancellation. If
  635. // the context is nil a panic will occur. In the future the SDK may create
  636. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  637. // for more information on using Contexts.
  638. func (c *Organizations) AttachPolicyWithContext(ctx aws.Context, input *AttachPolicyInput, opts ...request.Option) (*AttachPolicyOutput, error) {
  639. req, out := c.AttachPolicyRequest(input)
  640. req.SetContext(ctx)
  641. req.ApplyOptions(opts...)
  642. return out, req.Send()
  643. }
  644. const opCancelHandshake = "CancelHandshake"
  645. // CancelHandshakeRequest generates a "aws/request.Request" representing the
  646. // client's request for the CancelHandshake operation. The "output" return
  647. // value will be populated with the request's response once the request completes
  648. // successfully.
  649. //
  650. // Use "Send" method on the returned Request to send the API call to the service.
  651. // the "output" return value is not valid until after Send returns without error.
  652. //
  653. // See CancelHandshake for more information on using the CancelHandshake
  654. // API call, and error handling.
  655. //
  656. // This method is useful when you want to inject custom logic or configuration
  657. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  658. //
  659. // // Example sending a request using the CancelHandshakeRequest method.
  660. // req, resp := client.CancelHandshakeRequest(params)
  661. //
  662. // err := req.Send()
  663. // if err == nil { // resp is now filled
  664. // fmt.Println(resp)
  665. // }
  666. //
  667. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CancelHandshake
  668. func (c *Organizations) CancelHandshakeRequest(input *CancelHandshakeInput) (req *request.Request, output *CancelHandshakeOutput) {
  669. op := &request.Operation{
  670. Name: opCancelHandshake,
  671. HTTPMethod: "POST",
  672. HTTPPath: "/",
  673. }
  674. if input == nil {
  675. input = &CancelHandshakeInput{}
  676. }
  677. output = &CancelHandshakeOutput{}
  678. req = c.newRequest(op, input, output)
  679. return
  680. }
  681. // CancelHandshake API operation for AWS Organizations.
  682. //
  683. // Cancels a handshake. Canceling a handshake sets the handshake state to CANCELED.
  684. //
  685. // This operation can be called only from the account that originated the handshake.
  686. // The recipient of the handshake can't cancel it, but can use DeclineHandshake
  687. // instead. After a handshake is canceled, the recipient can no longer respond
  688. // to that handshake.
  689. //
  690. // After you cancel a handshake, it continues to appear in the results of relevant
  691. // APIs for only 30 days. After that, it's deleted.
  692. //
  693. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  694. // with awserr.Error's Code and Message methods to get detailed information about
  695. // the error.
  696. //
  697. // See the AWS API reference guide for AWS Organizations's
  698. // API operation CancelHandshake for usage and error information.
  699. //
  700. // Returned Error Types:
  701. //
  702. // - AccessDeniedException
  703. // You don't have permissions to perform the requested operation. The user or
  704. // role that is making the request must have at least one IAM permissions policy
  705. // attached that grants the required permissions. For more information, see
  706. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  707. // in the IAM User Guide.
  708. //
  709. // - ConcurrentModificationException
  710. // The target of the operation is currently being modified by a different request.
  711. // Try again later.
  712. //
  713. // - HandshakeNotFoundException
  714. // We can't find a handshake with the HandshakeId that you specified.
  715. //
  716. // - InvalidHandshakeTransitionException
  717. // You can't perform the operation on the handshake in its current state. For
  718. // example, you can't cancel a handshake that was already accepted or accept
  719. // a handshake that was already declined.
  720. //
  721. // - HandshakeAlreadyInStateException
  722. // The specified handshake is already in the requested state. For example, you
  723. // can't accept a handshake that was already accepted.
  724. //
  725. // - InvalidInputException
  726. // The requested operation failed because you provided invalid values for one
  727. // or more of the request parameters. This exception includes a reason that
  728. // contains additional information about the violated limit:
  729. //
  730. // Some of the reasons in the following list might not be applicable to this
  731. // specific API or operation.
  732. //
  733. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  734. // the same entity.
  735. //
  736. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  737. // Services and can't be modified.
  738. //
  739. // - INPUT_REQUIRED: You must include a value for all required parameters.
  740. //
  741. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  742. // for the invited account owner.
  743. //
  744. // - INVALID_ENUM: You specified an invalid value.
  745. //
  746. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  747. //
  748. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  749. // characters.
  750. //
  751. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  752. // at least one invalid value.
  753. //
  754. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  755. // from the response to a previous call of the operation.
  756. //
  757. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  758. // organization, or email) as a party.
  759. //
  760. // - INVALID_PATTERN: You provided a value that doesn't match the required
  761. // pattern.
  762. //
  763. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  764. // match the required pattern.
  765. //
  766. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  767. // name can't begin with the reserved prefix AWSServiceRoleFor.
  768. //
  769. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  770. // Name (ARN) for the organization.
  771. //
  772. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  773. //
  774. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  775. // tag. You can’t add, edit, or delete system tag keys because they're
  776. // reserved for Amazon Web Services use. System tags don’t count against
  777. // your tags per resource limit.
  778. //
  779. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  780. // for the operation.
  781. //
  782. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  783. // than allowed.
  784. //
  785. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  786. // value than allowed.
  787. //
  788. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  789. // than allowed.
  790. //
  791. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  792. // value than allowed.
  793. //
  794. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  795. // between entities in the same root.
  796. //
  797. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  798. // target entity.
  799. //
  800. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  801. // isn't recognized.
  802. //
  803. // - ServiceException
  804. // Organizations can't complete your request because of an internal service
  805. // error. Try again later.
  806. //
  807. // - TooManyRequestsException
  808. // You have sent too many requests in too short a period of time. The quota
  809. // helps protect against denial-of-service attacks. Try again later.
  810. //
  811. // For information about quotas that affect Organizations, see Quotas for Organizations
  812. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  813. // the Organizations User Guide.
  814. //
  815. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CancelHandshake
  816. func (c *Organizations) CancelHandshake(input *CancelHandshakeInput) (*CancelHandshakeOutput, error) {
  817. req, out := c.CancelHandshakeRequest(input)
  818. return out, req.Send()
  819. }
  820. // CancelHandshakeWithContext is the same as CancelHandshake with the addition of
  821. // the ability to pass a context and additional request options.
  822. //
  823. // See CancelHandshake for details on how to use this API operation.
  824. //
  825. // The context must be non-nil and will be used for request cancellation. If
  826. // the context is nil a panic will occur. In the future the SDK may create
  827. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  828. // for more information on using Contexts.
  829. func (c *Organizations) CancelHandshakeWithContext(ctx aws.Context, input *CancelHandshakeInput, opts ...request.Option) (*CancelHandshakeOutput, error) {
  830. req, out := c.CancelHandshakeRequest(input)
  831. req.SetContext(ctx)
  832. req.ApplyOptions(opts...)
  833. return out, req.Send()
  834. }
  835. const opCloseAccount = "CloseAccount"
  836. // CloseAccountRequest generates a "aws/request.Request" representing the
  837. // client's request for the CloseAccount operation. The "output" return
  838. // value will be populated with the request's response once the request completes
  839. // successfully.
  840. //
  841. // Use "Send" method on the returned Request to send the API call to the service.
  842. // the "output" return value is not valid until after Send returns without error.
  843. //
  844. // See CloseAccount for more information on using the CloseAccount
  845. // API call, and error handling.
  846. //
  847. // This method is useful when you want to inject custom logic or configuration
  848. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  849. //
  850. // // Example sending a request using the CloseAccountRequest method.
  851. // req, resp := client.CloseAccountRequest(params)
  852. //
  853. // err := req.Send()
  854. // if err == nil { // resp is now filled
  855. // fmt.Println(resp)
  856. // }
  857. //
  858. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CloseAccount
  859. func (c *Organizations) CloseAccountRequest(input *CloseAccountInput) (req *request.Request, output *CloseAccountOutput) {
  860. op := &request.Operation{
  861. Name: opCloseAccount,
  862. HTTPMethod: "POST",
  863. HTTPPath: "/",
  864. }
  865. if input == nil {
  866. input = &CloseAccountInput{}
  867. }
  868. output = &CloseAccountOutput{}
  869. req = c.newRequest(op, input, output)
  870. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  871. return
  872. }
  873. // CloseAccount API operation for AWS Organizations.
  874. //
  875. // Closes an Amazon Web Services member account within an organization. You
  876. // can't close the management account with this API. This is an asynchronous
  877. // request that Amazon Web Services performs in the background. Because CloseAccount
  878. // operates asynchronously, it can return a successful completion message even
  879. // though account closure might still be in progress. You need to wait a few
  880. // minutes before the account is fully closed. To check the status of the request,
  881. // do one of the following:
  882. //
  883. // - Use the AccountId that you sent in the CloseAccount request to provide
  884. // as a parameter to the DescribeAccount operation. While the close account
  885. // request is in progress, Account status will indicate PENDING_CLOSURE.
  886. // When the close account request completes, the status will change to SUSPENDED.
  887. //
  888. // - Check the CloudTrail log for the CloseAccountResult event that gets
  889. // published after the account closes successfully. For information on using
  890. // CloudTrail with Organizations, see Logging and monitoring in Organizations
  891. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html#orgs_cloudtrail-integration)
  892. // in the Organizations User Guide.
  893. //
  894. // - You can only close 10% of active member accounts within a rolling 30
  895. // day period. This quota is not bound by a calendar month, but starts when
  896. // you close an account. Within 30 days of that initial account closure,
  897. // you can't exceed the 10% account closure limit.
  898. //
  899. // - To reinstate a closed account, contact Amazon Web Services Support within
  900. // the 90-day grace period while the account is in SUSPENDED status.
  901. //
  902. // - If the Amazon Web Services account you attempt to close is linked to
  903. // an Amazon Web Services GovCloud (US) account, the CloseAccount request
  904. // will close both accounts. To learn important pre-closure details, see
  905. // Closing an Amazon Web Services GovCloud (US) account (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/Closing-govcloud-account.html)
  906. // in the Amazon Web Services GovCloud User Guide.
  907. //
  908. // For more information about closing accounts, see Closing an Amazon Web Services
  909. // account (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html)
  910. // in the Organizations User Guide.
  911. //
  912. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  913. // with awserr.Error's Code and Message methods to get detailed information about
  914. // the error.
  915. //
  916. // See the AWS API reference guide for AWS Organizations's
  917. // API operation CloseAccount for usage and error information.
  918. //
  919. // Returned Error Types:
  920. //
  921. // - AccessDeniedException
  922. // You don't have permissions to perform the requested operation. The user or
  923. // role that is making the request must have at least one IAM permissions policy
  924. // attached that grants the required permissions. For more information, see
  925. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  926. // in the IAM User Guide.
  927. //
  928. // - AccountAlreadyClosedException
  929. // You attempted to close an account that is already closed.
  930. //
  931. // - AccountNotFoundException
  932. // We can't find an Amazon Web Services account with the AccountId that you
  933. // specified, or the account whose credentials you used to make this request
  934. // isn't a member of an organization.
  935. //
  936. // - AWSOrganizationsNotInUseException
  937. // Your account isn't a member of an organization. To make this request, you
  938. // must use the credentials of an account that belongs to an organization.
  939. //
  940. // - ConcurrentModificationException
  941. // The target of the operation is currently being modified by a different request.
  942. // Try again later.
  943. //
  944. // - ConflictException
  945. // The request failed because it conflicts with the current state of the specified
  946. // resource.
  947. //
  948. // - ConstraintViolationException
  949. // Performing this operation violates a minimum or maximum value limit. For
  950. // example, attempting to remove the last service control policy (SCP) from
  951. // an OU or root, inviting or creating too many accounts to the organization,
  952. // or attaching too many policies to an account, OU, or root. This exception
  953. // includes a reason that contains additional information about the violated
  954. // limit:
  955. //
  956. // Some of the reasons in the following list might not be applicable to this
  957. // specific API or operation.
  958. //
  959. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  960. // account from the organization. You can't remove the management account.
  961. // Instead, after you remove all member accounts, delete the organization
  962. // itself.
  963. //
  964. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  965. // an account from the organization that doesn't yet have enough information
  966. // to exist as a standalone account. This account requires you to first complete
  967. // phone verification. Follow the steps at Removing a member account from
  968. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  969. // in the Organizations User Guide.
  970. //
  971. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  972. // of accounts that you can create in one day.
  973. //
  974. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  975. // the number of accounts in an organization. If you need more accounts,
  976. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  977. // to request an increase in your limit. Or the number of invitations that
  978. // you tried to send would cause you to exceed the limit of accounts in your
  979. // organization. Send fewer invitations or contact Amazon Web Services Support
  980. // to request an increase in the number of accounts. Deleted and closed accounts
  981. // still count toward your limit. If you get this exception when running
  982. // a command immediately after creating the organization, wait one hour and
  983. // try again. After an hour, if the command continues to fail with this error,
  984. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  985. //
  986. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  987. // register the management account of the organization as a delegated administrator
  988. // for an Amazon Web Services service integrated with Organizations. You
  989. // can designate only a member account as a delegated administrator.
  990. //
  991. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  992. // account. To close the management account for the organization, you must
  993. // first either remove or close all member accounts in the organization.
  994. // Follow standard account closure process using root credentials.​
  995. //
  996. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  997. // an account that is registered as a delegated administrator for a service
  998. // integrated with your organization. To complete this operation, you must
  999. // first deregister this account as a delegated administrator.
  1000. //
  1001. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  1002. // for the past 30 days.
  1003. //
  1004. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  1005. // of accounts that you can close at a time. ​
  1006. //
  1007. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  1008. // organization in the specified region, you must enable all features mode.
  1009. //
  1010. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  1011. // an Amazon Web Services account as a delegated administrator for an Amazon
  1012. // Web Services service that already has a delegated administrator. To complete
  1013. // this operation, you must first deregister any existing delegated administrators
  1014. // for this service.
  1015. //
  1016. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  1017. // valid for a limited period of time. You must resubmit the request and
  1018. // generate a new verfication code.
  1019. //
  1020. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  1021. // handshakes that you can send in one day.
  1022. //
  1023. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  1024. // supported payment method is associated with the account. Amazon Web Services
  1025. // does not support cards issued by financial institutions in Russia or Belarus.
  1026. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  1027. //
  1028. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  1029. // in this organization, you first must migrate the organization's management
  1030. // account to the marketplace that corresponds to the management account's
  1031. // address. For example, accounts with India addresses must be associated
  1032. // with the AISPL marketplace. All accounts in an organization must be associated
  1033. // with the same marketplace.
  1034. //
  1035. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  1036. // Web Services /> Regions in China. To create an organization, the master
  1037. // must have a valid business license. For more information, contact customer
  1038. // support.
  1039. //
  1040. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  1041. // must first provide a valid contact address and phone number for the management
  1042. // account. Then try the operation again.
  1043. //
  1044. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  1045. // management account must have an associated account in the Amazon Web Services
  1046. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  1047. // in the Amazon Web Services GovCloud User Guide.
  1048. //
  1049. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  1050. // with this management account, you first must associate a valid payment
  1051. // instrument, such as a credit card, with the account. Follow the steps
  1052. // at To leave an organization when all required account information has
  1053. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  1054. // in the Organizations User Guide.
  1055. //
  1056. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  1057. // to register more delegated administrators than allowed for the service
  1058. // principal.
  1059. //
  1060. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  1061. // number of policies of a certain type that can be attached to an entity
  1062. // at one time.
  1063. //
  1064. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  1065. // on this resource.
  1066. //
  1067. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  1068. // with this member account, you first must associate a valid payment instrument,
  1069. // such as a credit card, with the account. Follow the steps at To leave
  1070. // an organization when all required account information has not yet been
  1071. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  1072. // in the Organizations User Guide.
  1073. //
  1074. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  1075. // policy from an entity that would cause the entity to have fewer than the
  1076. // minimum number of policies of a certain type required.
  1077. //
  1078. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  1079. // that requires the organization to be configured to support all features.
  1080. // An organization that supports only consolidated billing features can't
  1081. // perform this operation.
  1082. //
  1083. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  1084. // too many levels deep.
  1085. //
  1086. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  1087. // that you can have in an organization.
  1088. //
  1089. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  1090. // is larger than the maximum size.
  1091. //
  1092. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  1093. // policies that you can have in an organization.
  1094. //
  1095. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  1096. // before you enabled service access. Call the EnableAWSServiceAccess API
  1097. // first.
  1098. //
  1099. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  1100. // tags that are not compliant with the tag policy requirements for this
  1101. // account.
  1102. //
  1103. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  1104. // there is a waiting period before you can remove it from the organization.
  1105. // If you get an error that indicates that a wait period is required, try
  1106. // again in a few days.
  1107. //
  1108. // - InvalidInputException
  1109. // The requested operation failed because you provided invalid values for one
  1110. // or more of the request parameters. This exception includes a reason that
  1111. // contains additional information about the violated limit:
  1112. //
  1113. // Some of the reasons in the following list might not be applicable to this
  1114. // specific API or operation.
  1115. //
  1116. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  1117. // the same entity.
  1118. //
  1119. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  1120. // Services and can't be modified.
  1121. //
  1122. // - INPUT_REQUIRED: You must include a value for all required parameters.
  1123. //
  1124. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  1125. // for the invited account owner.
  1126. //
  1127. // - INVALID_ENUM: You specified an invalid value.
  1128. //
  1129. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  1130. //
  1131. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  1132. // characters.
  1133. //
  1134. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  1135. // at least one invalid value.
  1136. //
  1137. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  1138. // from the response to a previous call of the operation.
  1139. //
  1140. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  1141. // organization, or email) as a party.
  1142. //
  1143. // - INVALID_PATTERN: You provided a value that doesn't match the required
  1144. // pattern.
  1145. //
  1146. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  1147. // match the required pattern.
  1148. //
  1149. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  1150. // name can't begin with the reserved prefix AWSServiceRoleFor.
  1151. //
  1152. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  1153. // Name (ARN) for the organization.
  1154. //
  1155. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  1156. //
  1157. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  1158. // tag. You can’t add, edit, or delete system tag keys because they're
  1159. // reserved for Amazon Web Services use. System tags don’t count against
  1160. // your tags per resource limit.
  1161. //
  1162. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  1163. // for the operation.
  1164. //
  1165. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  1166. // than allowed.
  1167. //
  1168. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  1169. // value than allowed.
  1170. //
  1171. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  1172. // than allowed.
  1173. //
  1174. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  1175. // value than allowed.
  1176. //
  1177. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  1178. // between entities in the same root.
  1179. //
  1180. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  1181. // target entity.
  1182. //
  1183. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  1184. // isn't recognized.
  1185. //
  1186. // - ServiceException
  1187. // Organizations can't complete your request because of an internal service
  1188. // error. Try again later.
  1189. //
  1190. // - TooManyRequestsException
  1191. // You have sent too many requests in too short a period of time. The quota
  1192. // helps protect against denial-of-service attacks. Try again later.
  1193. //
  1194. // For information about quotas that affect Organizations, see Quotas for Organizations
  1195. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  1196. // the Organizations User Guide.
  1197. //
  1198. // - UnsupportedAPIEndpointException
  1199. // This action isn't available in the current Amazon Web Services Region.
  1200. //
  1201. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CloseAccount
  1202. func (c *Organizations) CloseAccount(input *CloseAccountInput) (*CloseAccountOutput, error) {
  1203. req, out := c.CloseAccountRequest(input)
  1204. return out, req.Send()
  1205. }
  1206. // CloseAccountWithContext is the same as CloseAccount with the addition of
  1207. // the ability to pass a context and additional request options.
  1208. //
  1209. // See CloseAccount for details on how to use this API operation.
  1210. //
  1211. // The context must be non-nil and will be used for request cancellation. If
  1212. // the context is nil a panic will occur. In the future the SDK may create
  1213. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1214. // for more information on using Contexts.
  1215. func (c *Organizations) CloseAccountWithContext(ctx aws.Context, input *CloseAccountInput, opts ...request.Option) (*CloseAccountOutput, error) {
  1216. req, out := c.CloseAccountRequest(input)
  1217. req.SetContext(ctx)
  1218. req.ApplyOptions(opts...)
  1219. return out, req.Send()
  1220. }
  1221. const opCreateAccount = "CreateAccount"
  1222. // CreateAccountRequest generates a "aws/request.Request" representing the
  1223. // client's request for the CreateAccount operation. The "output" return
  1224. // value will be populated with the request's response once the request completes
  1225. // successfully.
  1226. //
  1227. // Use "Send" method on the returned Request to send the API call to the service.
  1228. // the "output" return value is not valid until after Send returns without error.
  1229. //
  1230. // See CreateAccount for more information on using the CreateAccount
  1231. // API call, and error handling.
  1232. //
  1233. // This method is useful when you want to inject custom logic or configuration
  1234. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1235. //
  1236. // // Example sending a request using the CreateAccountRequest method.
  1237. // req, resp := client.CreateAccountRequest(params)
  1238. //
  1239. // err := req.Send()
  1240. // if err == nil { // resp is now filled
  1241. // fmt.Println(resp)
  1242. // }
  1243. //
  1244. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateAccount
  1245. func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *request.Request, output *CreateAccountOutput) {
  1246. op := &request.Operation{
  1247. Name: opCreateAccount,
  1248. HTTPMethod: "POST",
  1249. HTTPPath: "/",
  1250. }
  1251. if input == nil {
  1252. input = &CreateAccountInput{}
  1253. }
  1254. output = &CreateAccountOutput{}
  1255. req = c.newRequest(op, input, output)
  1256. return
  1257. }
  1258. // CreateAccount API operation for AWS Organizations.
  1259. //
  1260. // Creates an Amazon Web Services account that is automatically a member of
  1261. // the organization whose credentials made the request. This is an asynchronous
  1262. // request that Amazon Web Services performs in the background. Because CreateAccount
  1263. // operates asynchronously, it can return a successful completion message even
  1264. // though account initialization might still be in progress. You might need
  1265. // to wait a few minutes before you can successfully access the account. To
  1266. // check the status of the request, do one of the following:
  1267. //
  1268. // - Use the Id value of the CreateAccountStatus response element from this
  1269. // operation to provide as a parameter to the DescribeCreateAccountStatus
  1270. // operation.
  1271. //
  1272. // - Check the CloudTrail log for the CreateAccountResult event. For information
  1273. // on using CloudTrail with Organizations, see Logging and monitoring in
  1274. // Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html#orgs_cloudtrail-integration)
  1275. // in the Organizations User Guide.
  1276. //
  1277. // The user who calls the API to create an account must have the organizations:CreateAccount
  1278. // permission. If you enabled all features in the organization, Organizations
  1279. // creates the required service-linked role named AWSServiceRoleForOrganizations.
  1280. // For more information, see Organizations and Service-Linked Roles (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_integrate_services-using_slrs)
  1281. // in the Organizations User Guide.
  1282. //
  1283. // If the request includes tags, then the requester must have the organizations:TagResource
  1284. // permission.
  1285. //
  1286. // Organizations preconfigures the new member account with a role (named OrganizationAccountAccessRole
  1287. // by default) that grants users in the management account administrator permissions
  1288. // in the new member account. Principals in the management account can assume
  1289. // the role. Organizations clones the company name and address information for
  1290. // the new account from the organization's management account.
  1291. //
  1292. // This operation can be called only from the organization's management account.
  1293. //
  1294. // For more information about creating accounts, see Creating an Amazon Web
  1295. // Services account in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html)
  1296. // in the Organizations User Guide.
  1297. //
  1298. // - When you create an account in an organization using the Organizations
  1299. // console, API, or CLI commands, the information required for the account
  1300. // to operate as a standalone account, such as a payment method and signing
  1301. // the end user license agreement (EULA) is not automatically collected.
  1302. // If you must remove an account from your organization later, you can do
  1303. // so only after you provide the missing information. Follow the steps at
  1304. // To leave an organization as a member account (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  1305. // in the Organizations User Guide.
  1306. //
  1307. // - If you get an exception that indicates that you exceeded your account
  1308. // limits for the organization, contact Amazon Web Services Support (https://console.aws.amazon.com/support/home#/).
  1309. //
  1310. // - If you get an exception that indicates that the operation failed because
  1311. // your organization is still initializing, wait one hour and then try again.
  1312. // If the error persists, contact Amazon Web Services Support (https://console.aws.amazon.com/support/home#/).
  1313. //
  1314. // - Using CreateAccount to create multiple temporary accounts isn't recommended.
  1315. // You can only close an account from the Billing and Cost Management console,
  1316. // and you must be signed in as the root user. For information on the requirements
  1317. // and process for closing an account, see Closing an Amazon Web Services
  1318. // account (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html)
  1319. // in the Organizations User Guide.
  1320. //
  1321. // When you create a member account with this operation, you can choose whether
  1322. // to create the account with the IAM User and Role Access to Billing Information
  1323. // switch enabled. If you enable it, IAM users and roles that have appropriate
  1324. // permissions can view billing information for the account. If you disable
  1325. // it, only the account root user can access billing information. For information
  1326. // about how to disable this switch for an account, see Granting Access to Your
  1327. // Billing Information and Tools (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html).
  1328. //
  1329. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1330. // with awserr.Error's Code and Message methods to get detailed information about
  1331. // the error.
  1332. //
  1333. // See the AWS API reference guide for AWS Organizations's
  1334. // API operation CreateAccount for usage and error information.
  1335. //
  1336. // Returned Error Types:
  1337. //
  1338. // - AccessDeniedException
  1339. // You don't have permissions to perform the requested operation. The user or
  1340. // role that is making the request must have at least one IAM permissions policy
  1341. // attached that grants the required permissions. For more information, see
  1342. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  1343. // in the IAM User Guide.
  1344. //
  1345. // - AWSOrganizationsNotInUseException
  1346. // Your account isn't a member of an organization. To make this request, you
  1347. // must use the credentials of an account that belongs to an organization.
  1348. //
  1349. // - ConcurrentModificationException
  1350. // The target of the operation is currently being modified by a different request.
  1351. // Try again later.
  1352. //
  1353. // - ConstraintViolationException
  1354. // Performing this operation violates a minimum or maximum value limit. For
  1355. // example, attempting to remove the last service control policy (SCP) from
  1356. // an OU or root, inviting or creating too many accounts to the organization,
  1357. // or attaching too many policies to an account, OU, or root. This exception
  1358. // includes a reason that contains additional information about the violated
  1359. // limit:
  1360. //
  1361. // Some of the reasons in the following list might not be applicable to this
  1362. // specific API or operation.
  1363. //
  1364. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  1365. // account from the organization. You can't remove the management account.
  1366. // Instead, after you remove all member accounts, delete the organization
  1367. // itself.
  1368. //
  1369. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  1370. // an account from the organization that doesn't yet have enough information
  1371. // to exist as a standalone account. This account requires you to first complete
  1372. // phone verification. Follow the steps at Removing a member account from
  1373. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  1374. // in the Organizations User Guide.
  1375. //
  1376. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  1377. // of accounts that you can create in one day.
  1378. //
  1379. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  1380. // the number of accounts in an organization. If you need more accounts,
  1381. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  1382. // to request an increase in your limit. Or the number of invitations that
  1383. // you tried to send would cause you to exceed the limit of accounts in your
  1384. // organization. Send fewer invitations or contact Amazon Web Services Support
  1385. // to request an increase in the number of accounts. Deleted and closed accounts
  1386. // still count toward your limit. If you get this exception when running
  1387. // a command immediately after creating the organization, wait one hour and
  1388. // try again. After an hour, if the command continues to fail with this error,
  1389. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  1390. //
  1391. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  1392. // register the management account of the organization as a delegated administrator
  1393. // for an Amazon Web Services service integrated with Organizations. You
  1394. // can designate only a member account as a delegated administrator.
  1395. //
  1396. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  1397. // account. To close the management account for the organization, you must
  1398. // first either remove or close all member accounts in the organization.
  1399. // Follow standard account closure process using root credentials.​
  1400. //
  1401. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  1402. // an account that is registered as a delegated administrator for a service
  1403. // integrated with your organization. To complete this operation, you must
  1404. // first deregister this account as a delegated administrator.
  1405. //
  1406. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  1407. // for the past 30 days.
  1408. //
  1409. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  1410. // of accounts that you can close at a time. ​
  1411. //
  1412. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  1413. // organization in the specified region, you must enable all features mode.
  1414. //
  1415. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  1416. // an Amazon Web Services account as a delegated administrator for an Amazon
  1417. // Web Services service that already has a delegated administrator. To complete
  1418. // this operation, you must first deregister any existing delegated administrators
  1419. // for this service.
  1420. //
  1421. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  1422. // valid for a limited period of time. You must resubmit the request and
  1423. // generate a new verfication code.
  1424. //
  1425. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  1426. // handshakes that you can send in one day.
  1427. //
  1428. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  1429. // supported payment method is associated with the account. Amazon Web Services
  1430. // does not support cards issued by financial institutions in Russia or Belarus.
  1431. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  1432. //
  1433. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  1434. // in this organization, you first must migrate the organization's management
  1435. // account to the marketplace that corresponds to the management account's
  1436. // address. For example, accounts with India addresses must be associated
  1437. // with the AISPL marketplace. All accounts in an organization must be associated
  1438. // with the same marketplace.
  1439. //
  1440. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  1441. // Web Services /> Regions in China. To create an organization, the master
  1442. // must have a valid business license. For more information, contact customer
  1443. // support.
  1444. //
  1445. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  1446. // must first provide a valid contact address and phone number for the management
  1447. // account. Then try the operation again.
  1448. //
  1449. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  1450. // management account must have an associated account in the Amazon Web Services
  1451. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  1452. // in the Amazon Web Services GovCloud User Guide.
  1453. //
  1454. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  1455. // with this management account, you first must associate a valid payment
  1456. // instrument, such as a credit card, with the account. Follow the steps
  1457. // at To leave an organization when all required account information has
  1458. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  1459. // in the Organizations User Guide.
  1460. //
  1461. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  1462. // to register more delegated administrators than allowed for the service
  1463. // principal.
  1464. //
  1465. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  1466. // number of policies of a certain type that can be attached to an entity
  1467. // at one time.
  1468. //
  1469. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  1470. // on this resource.
  1471. //
  1472. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  1473. // with this member account, you first must associate a valid payment instrument,
  1474. // such as a credit card, with the account. Follow the steps at To leave
  1475. // an organization when all required account information has not yet been
  1476. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  1477. // in the Organizations User Guide.
  1478. //
  1479. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  1480. // policy from an entity that would cause the entity to have fewer than the
  1481. // minimum number of policies of a certain type required.
  1482. //
  1483. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  1484. // that requires the organization to be configured to support all features.
  1485. // An organization that supports only consolidated billing features can't
  1486. // perform this operation.
  1487. //
  1488. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  1489. // too many levels deep.
  1490. //
  1491. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  1492. // that you can have in an organization.
  1493. //
  1494. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  1495. // is larger than the maximum size.
  1496. //
  1497. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  1498. // policies that you can have in an organization.
  1499. //
  1500. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  1501. // before you enabled service access. Call the EnableAWSServiceAccess API
  1502. // first.
  1503. //
  1504. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  1505. // tags that are not compliant with the tag policy requirements for this
  1506. // account.
  1507. //
  1508. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  1509. // there is a waiting period before you can remove it from the organization.
  1510. // If you get an error that indicates that a wait period is required, try
  1511. // again in a few days.
  1512. //
  1513. // - InvalidInputException
  1514. // The requested operation failed because you provided invalid values for one
  1515. // or more of the request parameters. This exception includes a reason that
  1516. // contains additional information about the violated limit:
  1517. //
  1518. // Some of the reasons in the following list might not be applicable to this
  1519. // specific API or operation.
  1520. //
  1521. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  1522. // the same entity.
  1523. //
  1524. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  1525. // Services and can't be modified.
  1526. //
  1527. // - INPUT_REQUIRED: You must include a value for all required parameters.
  1528. //
  1529. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  1530. // for the invited account owner.
  1531. //
  1532. // - INVALID_ENUM: You specified an invalid value.
  1533. //
  1534. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  1535. //
  1536. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  1537. // characters.
  1538. //
  1539. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  1540. // at least one invalid value.
  1541. //
  1542. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  1543. // from the response to a previous call of the operation.
  1544. //
  1545. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  1546. // organization, or email) as a party.
  1547. //
  1548. // - INVALID_PATTERN: You provided a value that doesn't match the required
  1549. // pattern.
  1550. //
  1551. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  1552. // match the required pattern.
  1553. //
  1554. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  1555. // name can't begin with the reserved prefix AWSServiceRoleFor.
  1556. //
  1557. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  1558. // Name (ARN) for the organization.
  1559. //
  1560. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  1561. //
  1562. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  1563. // tag. You can’t add, edit, or delete system tag keys because they're
  1564. // reserved for Amazon Web Services use. System tags don’t count against
  1565. // your tags per resource limit.
  1566. //
  1567. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  1568. // for the operation.
  1569. //
  1570. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  1571. // than allowed.
  1572. //
  1573. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  1574. // value than allowed.
  1575. //
  1576. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  1577. // than allowed.
  1578. //
  1579. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  1580. // value than allowed.
  1581. //
  1582. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  1583. // between entities in the same root.
  1584. //
  1585. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  1586. // target entity.
  1587. //
  1588. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  1589. // isn't recognized.
  1590. //
  1591. // - FinalizingOrganizationException
  1592. // Organizations couldn't perform the operation because your organization hasn't
  1593. // finished initializing. This can take up to an hour. Try again later. If after
  1594. // one hour you continue to receive this error, contact Amazon Web Services
  1595. // Support (https://console.aws.amazon.com/support/home#/).
  1596. //
  1597. // - ServiceException
  1598. // Organizations can't complete your request because of an internal service
  1599. // error. Try again later.
  1600. //
  1601. // - TooManyRequestsException
  1602. // You have sent too many requests in too short a period of time. The quota
  1603. // helps protect against denial-of-service attacks. Try again later.
  1604. //
  1605. // For information about quotas that affect Organizations, see Quotas for Organizations
  1606. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  1607. // the Organizations User Guide.
  1608. //
  1609. // - UnsupportedAPIEndpointException
  1610. // This action isn't available in the current Amazon Web Services Region.
  1611. //
  1612. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateAccount
  1613. func (c *Organizations) CreateAccount(input *CreateAccountInput) (*CreateAccountOutput, error) {
  1614. req, out := c.CreateAccountRequest(input)
  1615. return out, req.Send()
  1616. }
  1617. // CreateAccountWithContext is the same as CreateAccount with the addition of
  1618. // the ability to pass a context and additional request options.
  1619. //
  1620. // See CreateAccount 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 *Organizations) CreateAccountWithContext(ctx aws.Context, input *CreateAccountInput, opts ...request.Option) (*CreateAccountOutput, error) {
  1627. req, out := c.CreateAccountRequest(input)
  1628. req.SetContext(ctx)
  1629. req.ApplyOptions(opts...)
  1630. return out, req.Send()
  1631. }
  1632. const opCreateGovCloudAccount = "CreateGovCloudAccount"
  1633. // CreateGovCloudAccountRequest generates a "aws/request.Request" representing the
  1634. // client's request for the CreateGovCloudAccount 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 CreateGovCloudAccount for more information on using the CreateGovCloudAccount
  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. // // Example sending a request using the CreateGovCloudAccountRequest method.
  1648. // req, resp := client.CreateGovCloudAccountRequest(params)
  1649. //
  1650. // err := req.Send()
  1651. // if err == nil { // resp is now filled
  1652. // fmt.Println(resp)
  1653. // }
  1654. //
  1655. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateGovCloudAccount
  1656. func (c *Organizations) CreateGovCloudAccountRequest(input *CreateGovCloudAccountInput) (req *request.Request, output *CreateGovCloudAccountOutput) {
  1657. op := &request.Operation{
  1658. Name: opCreateGovCloudAccount,
  1659. HTTPMethod: "POST",
  1660. HTTPPath: "/",
  1661. }
  1662. if input == nil {
  1663. input = &CreateGovCloudAccountInput{}
  1664. }
  1665. output = &CreateGovCloudAccountOutput{}
  1666. req = c.newRequest(op, input, output)
  1667. return
  1668. }
  1669. // CreateGovCloudAccount API operation for AWS Organizations.
  1670. //
  1671. // This action is available if all of the following are true:
  1672. //
  1673. // - You're authorized to create accounts in the Amazon Web Services GovCloud
  1674. // (US) Region. For more information on the Amazon Web Services GovCloud
  1675. // (US) Region, see the Amazon Web Services GovCloud User Guide. (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/welcome.html)
  1676. //
  1677. // - You already have an account in the Amazon Web Services GovCloud (US)
  1678. // Region that is paired with a management account of an organization in
  1679. // the commercial Region.
  1680. //
  1681. // - You call this action from the management account of your organization
  1682. // in the commercial Region.
  1683. //
  1684. // - You have the organizations:CreateGovCloudAccount permission.
  1685. //
  1686. // Organizations automatically creates the required service-linked role named
  1687. // AWSServiceRoleForOrganizations. For more information, see Organizations and
  1688. // Service-Linked Roles (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_integrate_services-using_slrs)
  1689. // in the Organizations User Guide.
  1690. //
  1691. // Amazon Web Services automatically enables CloudTrail for Amazon Web Services
  1692. // GovCloud (US) accounts, but you should also do the following:
  1693. //
  1694. // - Verify that CloudTrail is enabled to store logs.
  1695. //
  1696. // - Create an Amazon S3 bucket for CloudTrail log storage. For more information,
  1697. // see Verifying CloudTrail Is Enabled (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/verifying-cloudtrail.html)
  1698. // in the Amazon Web Services GovCloud User Guide.
  1699. //
  1700. // If the request includes tags, then the requester must have the organizations:TagResource
  1701. // permission. The tags are attached to the commercial account associated with
  1702. // the GovCloud account, rather than the GovCloud account itself. To add tags
  1703. // to the GovCloud account, call the TagResource operation in the GovCloud Region
  1704. // after the new GovCloud account exists.
  1705. //
  1706. // You call this action from the management account of your organization in
  1707. // the commercial Region to create a standalone Amazon Web Services account
  1708. // in the Amazon Web Services GovCloud (US) Region. After the account is created,
  1709. // the management account of an organization in the Amazon Web Services GovCloud
  1710. // (US) Region can invite it to that organization. For more information on inviting
  1711. // standalone accounts in the Amazon Web Services GovCloud (US) to join an organization,
  1712. // see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  1713. // in the Amazon Web Services GovCloud User Guide.
  1714. //
  1715. // Calling CreateGovCloudAccount is an asynchronous request that Amazon Web
  1716. // Services performs in the background. Because CreateGovCloudAccount operates
  1717. // asynchronously, it can return a successful completion message even though
  1718. // account initialization might still be in progress. You might need to wait
  1719. // a few minutes before you can successfully access the account. To check the
  1720. // status of the request, do one of the following:
  1721. //
  1722. // - Use the OperationId response element from this operation to provide
  1723. // as a parameter to the DescribeCreateAccountStatus operation.
  1724. //
  1725. // - Check the CloudTrail log for the CreateAccountResult event. For information
  1726. // on using CloudTrail with Organizations, see Monitoring the Activity in
  1727. // Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_monitoring.html)
  1728. // in the Organizations User Guide.
  1729. //
  1730. // When you call the CreateGovCloudAccount action, you create two accounts:
  1731. // a standalone account in the Amazon Web Services GovCloud (US) Region and
  1732. // an associated account in the commercial Region for billing and support purposes.
  1733. // The account in the commercial Region is automatically a member of the organization
  1734. // whose credentials made the request. Both accounts are associated with the
  1735. // same email address.
  1736. //
  1737. // A role is created in the new account in the commercial Region that allows
  1738. // the management account in the organization in the commercial Region to assume
  1739. // it. An Amazon Web Services GovCloud (US) account is then created and associated
  1740. // with the commercial account that you just created. A role is also created
  1741. // in the new Amazon Web Services GovCloud (US) account that can be assumed
  1742. // by the Amazon Web Services GovCloud (US) account that is associated with
  1743. // the management account of the commercial organization. For more information
  1744. // and to view a diagram that explains how account access works, see Organizations
  1745. // (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  1746. // in the Amazon Web Services GovCloud User Guide.
  1747. //
  1748. // For more information about creating accounts, see Creating an Amazon Web
  1749. // Services account in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html)
  1750. // in the Organizations User Guide.
  1751. //
  1752. // - When you create an account in an organization using the Organizations
  1753. // console, API, or CLI commands, the information required for the account
  1754. // to operate as a standalone account is not automatically collected. This
  1755. // includes a payment method and signing the end user license agreement (EULA).
  1756. // If you must remove an account from your organization later, you can do
  1757. // so only after you provide the missing information. Follow the steps at
  1758. // To leave an organization as a member account (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  1759. // in the Organizations User Guide.
  1760. //
  1761. // - If you get an exception that indicates that you exceeded your account
  1762. // limits for the organization, contact Amazon Web Services Support (https://console.aws.amazon.com/support/home#/).
  1763. //
  1764. // - If you get an exception that indicates that the operation failed because
  1765. // your organization is still initializing, wait one hour and then try again.
  1766. // If the error persists, contact Amazon Web Services Support (https://console.aws.amazon.com/support/home#/).
  1767. //
  1768. // - Using CreateGovCloudAccount to create multiple temporary accounts isn't
  1769. // recommended. You can only close an account from the Amazon Web Services
  1770. // Billing and Cost Management console, and you must be signed in as the
  1771. // root user. For information on the requirements and process for closing
  1772. // an account, see Closing an Amazon Web Services account (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html)
  1773. // in the Organizations User Guide.
  1774. //
  1775. // When you create a member account with this operation, you can choose whether
  1776. // to create the account with the IAM User and Role Access to Billing Information
  1777. // switch enabled. If you enable it, IAM users and roles that have appropriate
  1778. // permissions can view billing information for the account. If you disable
  1779. // it, only the account root user can access billing information. For information
  1780. // about how to disable this switch for an account, see Granting Access to Your
  1781. // Billing Information and Tools (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html).
  1782. //
  1783. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1784. // with awserr.Error's Code and Message methods to get detailed information about
  1785. // the error.
  1786. //
  1787. // See the AWS API reference guide for AWS Organizations's
  1788. // API operation CreateGovCloudAccount for usage and error information.
  1789. //
  1790. // Returned Error Types:
  1791. //
  1792. // - AccessDeniedException
  1793. // You don't have permissions to perform the requested operation. The user or
  1794. // role that is making the request must have at least one IAM permissions policy
  1795. // attached that grants the required permissions. For more information, see
  1796. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  1797. // in the IAM User Guide.
  1798. //
  1799. // - AWSOrganizationsNotInUseException
  1800. // Your account isn't a member of an organization. To make this request, you
  1801. // must use the credentials of an account that belongs to an organization.
  1802. //
  1803. // - ConcurrentModificationException
  1804. // The target of the operation is currently being modified by a different request.
  1805. // Try again later.
  1806. //
  1807. // - ConstraintViolationException
  1808. // Performing this operation violates a minimum or maximum value limit. For
  1809. // example, attempting to remove the last service control policy (SCP) from
  1810. // an OU or root, inviting or creating too many accounts to the organization,
  1811. // or attaching too many policies to an account, OU, or root. This exception
  1812. // includes a reason that contains additional information about the violated
  1813. // limit:
  1814. //
  1815. // Some of the reasons in the following list might not be applicable to this
  1816. // specific API or operation.
  1817. //
  1818. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  1819. // account from the organization. You can't remove the management account.
  1820. // Instead, after you remove all member accounts, delete the organization
  1821. // itself.
  1822. //
  1823. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  1824. // an account from the organization that doesn't yet have enough information
  1825. // to exist as a standalone account. This account requires you to first complete
  1826. // phone verification. Follow the steps at Removing a member account from
  1827. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  1828. // in the Organizations User Guide.
  1829. //
  1830. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  1831. // of accounts that you can create in one day.
  1832. //
  1833. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  1834. // the number of accounts in an organization. If you need more accounts,
  1835. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  1836. // to request an increase in your limit. Or the number of invitations that
  1837. // you tried to send would cause you to exceed the limit of accounts in your
  1838. // organization. Send fewer invitations or contact Amazon Web Services Support
  1839. // to request an increase in the number of accounts. Deleted and closed accounts
  1840. // still count toward your limit. If you get this exception when running
  1841. // a command immediately after creating the organization, wait one hour and
  1842. // try again. After an hour, if the command continues to fail with this error,
  1843. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  1844. //
  1845. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  1846. // register the management account of the organization as a delegated administrator
  1847. // for an Amazon Web Services service integrated with Organizations. You
  1848. // can designate only a member account as a delegated administrator.
  1849. //
  1850. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  1851. // account. To close the management account for the organization, you must
  1852. // first either remove or close all member accounts in the organization.
  1853. // Follow standard account closure process using root credentials.​
  1854. //
  1855. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  1856. // an account that is registered as a delegated administrator for a service
  1857. // integrated with your organization. To complete this operation, you must
  1858. // first deregister this account as a delegated administrator.
  1859. //
  1860. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  1861. // for the past 30 days.
  1862. //
  1863. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  1864. // of accounts that you can close at a time. ​
  1865. //
  1866. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  1867. // organization in the specified region, you must enable all features mode.
  1868. //
  1869. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  1870. // an Amazon Web Services account as a delegated administrator for an Amazon
  1871. // Web Services service that already has a delegated administrator. To complete
  1872. // this operation, you must first deregister any existing delegated administrators
  1873. // for this service.
  1874. //
  1875. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  1876. // valid for a limited period of time. You must resubmit the request and
  1877. // generate a new verfication code.
  1878. //
  1879. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  1880. // handshakes that you can send in one day.
  1881. //
  1882. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  1883. // supported payment method is associated with the account. Amazon Web Services
  1884. // does not support cards issued by financial institutions in Russia or Belarus.
  1885. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  1886. //
  1887. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  1888. // in this organization, you first must migrate the organization's management
  1889. // account to the marketplace that corresponds to the management account's
  1890. // address. For example, accounts with India addresses must be associated
  1891. // with the AISPL marketplace. All accounts in an organization must be associated
  1892. // with the same marketplace.
  1893. //
  1894. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  1895. // Web Services /> Regions in China. To create an organization, the master
  1896. // must have a valid business license. For more information, contact customer
  1897. // support.
  1898. //
  1899. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  1900. // must first provide a valid contact address and phone number for the management
  1901. // account. Then try the operation again.
  1902. //
  1903. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  1904. // management account must have an associated account in the Amazon Web Services
  1905. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  1906. // in the Amazon Web Services GovCloud User Guide.
  1907. //
  1908. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  1909. // with this management account, you first must associate a valid payment
  1910. // instrument, such as a credit card, with the account. Follow the steps
  1911. // at To leave an organization when all required account information has
  1912. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  1913. // in the Organizations User Guide.
  1914. //
  1915. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  1916. // to register more delegated administrators than allowed for the service
  1917. // principal.
  1918. //
  1919. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  1920. // number of policies of a certain type that can be attached to an entity
  1921. // at one time.
  1922. //
  1923. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  1924. // on this resource.
  1925. //
  1926. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  1927. // with this member account, you first must associate a valid payment instrument,
  1928. // such as a credit card, with the account. Follow the steps at To leave
  1929. // an organization when all required account information has not yet been
  1930. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  1931. // in the Organizations User Guide.
  1932. //
  1933. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  1934. // policy from an entity that would cause the entity to have fewer than the
  1935. // minimum number of policies of a certain type required.
  1936. //
  1937. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  1938. // that requires the organization to be configured to support all features.
  1939. // An organization that supports only consolidated billing features can't
  1940. // perform this operation.
  1941. //
  1942. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  1943. // too many levels deep.
  1944. //
  1945. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  1946. // that you can have in an organization.
  1947. //
  1948. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  1949. // is larger than the maximum size.
  1950. //
  1951. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  1952. // policies that you can have in an organization.
  1953. //
  1954. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  1955. // before you enabled service access. Call the EnableAWSServiceAccess API
  1956. // first.
  1957. //
  1958. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  1959. // tags that are not compliant with the tag policy requirements for this
  1960. // account.
  1961. //
  1962. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  1963. // there is a waiting period before you can remove it from the organization.
  1964. // If you get an error that indicates that a wait period is required, try
  1965. // again in a few days.
  1966. //
  1967. // - InvalidInputException
  1968. // The requested operation failed because you provided invalid values for one
  1969. // or more of the request parameters. This exception includes a reason that
  1970. // contains additional information about the violated limit:
  1971. //
  1972. // Some of the reasons in the following list might not be applicable to this
  1973. // specific API or operation.
  1974. //
  1975. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  1976. // the same entity.
  1977. //
  1978. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  1979. // Services and can't be modified.
  1980. //
  1981. // - INPUT_REQUIRED: You must include a value for all required parameters.
  1982. //
  1983. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  1984. // for the invited account owner.
  1985. //
  1986. // - INVALID_ENUM: You specified an invalid value.
  1987. //
  1988. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  1989. //
  1990. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  1991. // characters.
  1992. //
  1993. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  1994. // at least one invalid value.
  1995. //
  1996. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  1997. // from the response to a previous call of the operation.
  1998. //
  1999. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  2000. // organization, or email) as a party.
  2001. //
  2002. // - INVALID_PATTERN: You provided a value that doesn't match the required
  2003. // pattern.
  2004. //
  2005. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  2006. // match the required pattern.
  2007. //
  2008. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  2009. // name can't begin with the reserved prefix AWSServiceRoleFor.
  2010. //
  2011. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  2012. // Name (ARN) for the organization.
  2013. //
  2014. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  2015. //
  2016. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  2017. // tag. You can’t add, edit, or delete system tag keys because they're
  2018. // reserved for Amazon Web Services use. System tags don’t count against
  2019. // your tags per resource limit.
  2020. //
  2021. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  2022. // for the operation.
  2023. //
  2024. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  2025. // than allowed.
  2026. //
  2027. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  2028. // value than allowed.
  2029. //
  2030. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  2031. // than allowed.
  2032. //
  2033. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  2034. // value than allowed.
  2035. //
  2036. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  2037. // between entities in the same root.
  2038. //
  2039. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  2040. // target entity.
  2041. //
  2042. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  2043. // isn't recognized.
  2044. //
  2045. // - FinalizingOrganizationException
  2046. // Organizations couldn't perform the operation because your organization hasn't
  2047. // finished initializing. This can take up to an hour. Try again later. If after
  2048. // one hour you continue to receive this error, contact Amazon Web Services
  2049. // Support (https://console.aws.amazon.com/support/home#/).
  2050. //
  2051. // - ServiceException
  2052. // Organizations can't complete your request because of an internal service
  2053. // error. Try again later.
  2054. //
  2055. // - TooManyRequestsException
  2056. // You have sent too many requests in too short a period of time. The quota
  2057. // helps protect against denial-of-service attacks. Try again later.
  2058. //
  2059. // For information about quotas that affect Organizations, see Quotas for Organizations
  2060. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  2061. // the Organizations User Guide.
  2062. //
  2063. // - UnsupportedAPIEndpointException
  2064. // This action isn't available in the current Amazon Web Services Region.
  2065. //
  2066. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateGovCloudAccount
  2067. func (c *Organizations) CreateGovCloudAccount(input *CreateGovCloudAccountInput) (*CreateGovCloudAccountOutput, error) {
  2068. req, out := c.CreateGovCloudAccountRequest(input)
  2069. return out, req.Send()
  2070. }
  2071. // CreateGovCloudAccountWithContext is the same as CreateGovCloudAccount with the addition of
  2072. // the ability to pass a context and additional request options.
  2073. //
  2074. // See CreateGovCloudAccount for details on how to use this API operation.
  2075. //
  2076. // The context must be non-nil and will be used for request cancellation. If
  2077. // the context is nil a panic will occur. In the future the SDK may create
  2078. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2079. // for more information on using Contexts.
  2080. func (c *Organizations) CreateGovCloudAccountWithContext(ctx aws.Context, input *CreateGovCloudAccountInput, opts ...request.Option) (*CreateGovCloudAccountOutput, error) {
  2081. req, out := c.CreateGovCloudAccountRequest(input)
  2082. req.SetContext(ctx)
  2083. req.ApplyOptions(opts...)
  2084. return out, req.Send()
  2085. }
  2086. const opCreateOrganization = "CreateOrganization"
  2087. // CreateOrganizationRequest generates a "aws/request.Request" representing the
  2088. // client's request for the CreateOrganization operation. The "output" return
  2089. // value will be populated with the request's response once the request completes
  2090. // successfully.
  2091. //
  2092. // Use "Send" method on the returned Request to send the API call to the service.
  2093. // the "output" return value is not valid until after Send returns without error.
  2094. //
  2095. // See CreateOrganization for more information on using the CreateOrganization
  2096. // API call, and error handling.
  2097. //
  2098. // This method is useful when you want to inject custom logic or configuration
  2099. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2100. //
  2101. // // Example sending a request using the CreateOrganizationRequest method.
  2102. // req, resp := client.CreateOrganizationRequest(params)
  2103. //
  2104. // err := req.Send()
  2105. // if err == nil { // resp is now filled
  2106. // fmt.Println(resp)
  2107. // }
  2108. //
  2109. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateOrganization
  2110. func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput) (req *request.Request, output *CreateOrganizationOutput) {
  2111. op := &request.Operation{
  2112. Name: opCreateOrganization,
  2113. HTTPMethod: "POST",
  2114. HTTPPath: "/",
  2115. }
  2116. if input == nil {
  2117. input = &CreateOrganizationInput{}
  2118. }
  2119. output = &CreateOrganizationOutput{}
  2120. req = c.newRequest(op, input, output)
  2121. return
  2122. }
  2123. // CreateOrganization API operation for AWS Organizations.
  2124. //
  2125. // Creates an Amazon Web Services organization. The account whose user is calling
  2126. // the CreateOrganization operation automatically becomes the management account
  2127. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account)
  2128. // of the new organization.
  2129. //
  2130. // This operation must be called using credentials from the account that is
  2131. // to become the new organization's management account. The principal must also
  2132. // have the relevant IAM permissions.
  2133. //
  2134. // By default (or if you set the FeatureSet parameter to ALL), the new organization
  2135. // is created with all features enabled and service control policies automatically
  2136. // enabled in the root. If you instead choose to create the organization supporting
  2137. // only the consolidated billing features by setting the FeatureSet parameter
  2138. // to CONSOLIDATED_BILLING", no policy types are enabled by default, and you
  2139. // can't use organization policies
  2140. //
  2141. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2142. // with awserr.Error's Code and Message methods to get detailed information about
  2143. // the error.
  2144. //
  2145. // See the AWS API reference guide for AWS Organizations's
  2146. // API operation CreateOrganization for usage and error information.
  2147. //
  2148. // Returned Error Types:
  2149. //
  2150. // - AccessDeniedException
  2151. // You don't have permissions to perform the requested operation. The user or
  2152. // role that is making the request must have at least one IAM permissions policy
  2153. // attached that grants the required permissions. For more information, see
  2154. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  2155. // in the IAM User Guide.
  2156. //
  2157. // - AlreadyInOrganizationException
  2158. // This account is already a member of an organization. An account can belong
  2159. // to only one organization at a time.
  2160. //
  2161. // - ConcurrentModificationException
  2162. // The target of the operation is currently being modified by a different request.
  2163. // Try again later.
  2164. //
  2165. // - ConstraintViolationException
  2166. // Performing this operation violates a minimum or maximum value limit. For
  2167. // example, attempting to remove the last service control policy (SCP) from
  2168. // an OU or root, inviting or creating too many accounts to the organization,
  2169. // or attaching too many policies to an account, OU, or root. This exception
  2170. // includes a reason that contains additional information about the violated
  2171. // limit:
  2172. //
  2173. // Some of the reasons in the following list might not be applicable to this
  2174. // specific API or operation.
  2175. //
  2176. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  2177. // account from the organization. You can't remove the management account.
  2178. // Instead, after you remove all member accounts, delete the organization
  2179. // itself.
  2180. //
  2181. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  2182. // an account from the organization that doesn't yet have enough information
  2183. // to exist as a standalone account. This account requires you to first complete
  2184. // phone verification. Follow the steps at Removing a member account from
  2185. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  2186. // in the Organizations User Guide.
  2187. //
  2188. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  2189. // of accounts that you can create in one day.
  2190. //
  2191. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  2192. // the number of accounts in an organization. If you need more accounts,
  2193. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  2194. // to request an increase in your limit. Or the number of invitations that
  2195. // you tried to send would cause you to exceed the limit of accounts in your
  2196. // organization. Send fewer invitations or contact Amazon Web Services Support
  2197. // to request an increase in the number of accounts. Deleted and closed accounts
  2198. // still count toward your limit. If you get this exception when running
  2199. // a command immediately after creating the organization, wait one hour and
  2200. // try again. After an hour, if the command continues to fail with this error,
  2201. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  2202. //
  2203. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  2204. // register the management account of the organization as a delegated administrator
  2205. // for an Amazon Web Services service integrated with Organizations. You
  2206. // can designate only a member account as a delegated administrator.
  2207. //
  2208. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  2209. // account. To close the management account for the organization, you must
  2210. // first either remove or close all member accounts in the organization.
  2211. // Follow standard account closure process using root credentials.​
  2212. //
  2213. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  2214. // an account that is registered as a delegated administrator for a service
  2215. // integrated with your organization. To complete this operation, you must
  2216. // first deregister this account as a delegated administrator.
  2217. //
  2218. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  2219. // for the past 30 days.
  2220. //
  2221. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  2222. // of accounts that you can close at a time. ​
  2223. //
  2224. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  2225. // organization in the specified region, you must enable all features mode.
  2226. //
  2227. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  2228. // an Amazon Web Services account as a delegated administrator for an Amazon
  2229. // Web Services service that already has a delegated administrator. To complete
  2230. // this operation, you must first deregister any existing delegated administrators
  2231. // for this service.
  2232. //
  2233. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  2234. // valid for a limited period of time. You must resubmit the request and
  2235. // generate a new verfication code.
  2236. //
  2237. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  2238. // handshakes that you can send in one day.
  2239. //
  2240. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  2241. // supported payment method is associated with the account. Amazon Web Services
  2242. // does not support cards issued by financial institutions in Russia or Belarus.
  2243. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  2244. //
  2245. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  2246. // in this organization, you first must migrate the organization's management
  2247. // account to the marketplace that corresponds to the management account's
  2248. // address. For example, accounts with India addresses must be associated
  2249. // with the AISPL marketplace. All accounts in an organization must be associated
  2250. // with the same marketplace.
  2251. //
  2252. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  2253. // Web Services /> Regions in China. To create an organization, the master
  2254. // must have a valid business license. For more information, contact customer
  2255. // support.
  2256. //
  2257. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  2258. // must first provide a valid contact address and phone number for the management
  2259. // account. Then try the operation again.
  2260. //
  2261. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  2262. // management account must have an associated account in the Amazon Web Services
  2263. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  2264. // in the Amazon Web Services GovCloud User Guide.
  2265. //
  2266. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  2267. // with this management account, you first must associate a valid payment
  2268. // instrument, such as a credit card, with the account. Follow the steps
  2269. // at To leave an organization when all required account information has
  2270. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  2271. // in the Organizations User Guide.
  2272. //
  2273. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  2274. // to register more delegated administrators than allowed for the service
  2275. // principal.
  2276. //
  2277. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  2278. // number of policies of a certain type that can be attached to an entity
  2279. // at one time.
  2280. //
  2281. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  2282. // on this resource.
  2283. //
  2284. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  2285. // with this member account, you first must associate a valid payment instrument,
  2286. // such as a credit card, with the account. Follow the steps at To leave
  2287. // an organization when all required account information has not yet been
  2288. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  2289. // in the Organizations User Guide.
  2290. //
  2291. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  2292. // policy from an entity that would cause the entity to have fewer than the
  2293. // minimum number of policies of a certain type required.
  2294. //
  2295. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  2296. // that requires the organization to be configured to support all features.
  2297. // An organization that supports only consolidated billing features can't
  2298. // perform this operation.
  2299. //
  2300. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  2301. // too many levels deep.
  2302. //
  2303. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  2304. // that you can have in an organization.
  2305. //
  2306. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  2307. // is larger than the maximum size.
  2308. //
  2309. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  2310. // policies that you can have in an organization.
  2311. //
  2312. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  2313. // before you enabled service access. Call the EnableAWSServiceAccess API
  2314. // first.
  2315. //
  2316. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  2317. // tags that are not compliant with the tag policy requirements for this
  2318. // account.
  2319. //
  2320. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  2321. // there is a waiting period before you can remove it from the organization.
  2322. // If you get an error that indicates that a wait period is required, try
  2323. // again in a few days.
  2324. //
  2325. // - InvalidInputException
  2326. // The requested operation failed because you provided invalid values for one
  2327. // or more of the request parameters. This exception includes a reason that
  2328. // contains additional information about the violated limit:
  2329. //
  2330. // Some of the reasons in the following list might not be applicable to this
  2331. // specific API or operation.
  2332. //
  2333. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  2334. // the same entity.
  2335. //
  2336. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  2337. // Services and can't be modified.
  2338. //
  2339. // - INPUT_REQUIRED: You must include a value for all required parameters.
  2340. //
  2341. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  2342. // for the invited account owner.
  2343. //
  2344. // - INVALID_ENUM: You specified an invalid value.
  2345. //
  2346. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  2347. //
  2348. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  2349. // characters.
  2350. //
  2351. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  2352. // at least one invalid value.
  2353. //
  2354. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  2355. // from the response to a previous call of the operation.
  2356. //
  2357. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  2358. // organization, or email) as a party.
  2359. //
  2360. // - INVALID_PATTERN: You provided a value that doesn't match the required
  2361. // pattern.
  2362. //
  2363. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  2364. // match the required pattern.
  2365. //
  2366. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  2367. // name can't begin with the reserved prefix AWSServiceRoleFor.
  2368. //
  2369. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  2370. // Name (ARN) for the organization.
  2371. //
  2372. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  2373. //
  2374. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  2375. // tag. You can’t add, edit, or delete system tag keys because they're
  2376. // reserved for Amazon Web Services use. System tags don’t count against
  2377. // your tags per resource limit.
  2378. //
  2379. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  2380. // for the operation.
  2381. //
  2382. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  2383. // than allowed.
  2384. //
  2385. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  2386. // value than allowed.
  2387. //
  2388. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  2389. // than allowed.
  2390. //
  2391. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  2392. // value than allowed.
  2393. //
  2394. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  2395. // between entities in the same root.
  2396. //
  2397. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  2398. // target entity.
  2399. //
  2400. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  2401. // isn't recognized.
  2402. //
  2403. // - ServiceException
  2404. // Organizations can't complete your request because of an internal service
  2405. // error. Try again later.
  2406. //
  2407. // - TooManyRequestsException
  2408. // You have sent too many requests in too short a period of time. The quota
  2409. // helps protect against denial-of-service attacks. Try again later.
  2410. //
  2411. // For information about quotas that affect Organizations, see Quotas for Organizations
  2412. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  2413. // the Organizations User Guide.
  2414. //
  2415. // - AccessDeniedForDependencyException
  2416. // The operation that you attempted requires you to have the iam:CreateServiceLinkedRole
  2417. // for organizations.amazonaws.com permission so that Organizations can create
  2418. // the required service-linked role. You don't have that permission.
  2419. //
  2420. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateOrganization
  2421. func (c *Organizations) CreateOrganization(input *CreateOrganizationInput) (*CreateOrganizationOutput, error) {
  2422. req, out := c.CreateOrganizationRequest(input)
  2423. return out, req.Send()
  2424. }
  2425. // CreateOrganizationWithContext is the same as CreateOrganization with the addition of
  2426. // the ability to pass a context and additional request options.
  2427. //
  2428. // See CreateOrganization for details on how to use this API operation.
  2429. //
  2430. // The context must be non-nil and will be used for request cancellation. If
  2431. // the context is nil a panic will occur. In the future the SDK may create
  2432. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2433. // for more information on using Contexts.
  2434. func (c *Organizations) CreateOrganizationWithContext(ctx aws.Context, input *CreateOrganizationInput, opts ...request.Option) (*CreateOrganizationOutput, error) {
  2435. req, out := c.CreateOrganizationRequest(input)
  2436. req.SetContext(ctx)
  2437. req.ApplyOptions(opts...)
  2438. return out, req.Send()
  2439. }
  2440. const opCreateOrganizationalUnit = "CreateOrganizationalUnit"
  2441. // CreateOrganizationalUnitRequest generates a "aws/request.Request" representing the
  2442. // client's request for the CreateOrganizationalUnit operation. The "output" return
  2443. // value will be populated with the request's response once the request completes
  2444. // successfully.
  2445. //
  2446. // Use "Send" method on the returned Request to send the API call to the service.
  2447. // the "output" return value is not valid until after Send returns without error.
  2448. //
  2449. // See CreateOrganizationalUnit for more information on using the CreateOrganizationalUnit
  2450. // API call, and error handling.
  2451. //
  2452. // This method is useful when you want to inject custom logic or configuration
  2453. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2454. //
  2455. // // Example sending a request using the CreateOrganizationalUnitRequest method.
  2456. // req, resp := client.CreateOrganizationalUnitRequest(params)
  2457. //
  2458. // err := req.Send()
  2459. // if err == nil { // resp is now filled
  2460. // fmt.Println(resp)
  2461. // }
  2462. //
  2463. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateOrganizationalUnit
  2464. func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizationalUnitInput) (req *request.Request, output *CreateOrganizationalUnitOutput) {
  2465. op := &request.Operation{
  2466. Name: opCreateOrganizationalUnit,
  2467. HTTPMethod: "POST",
  2468. HTTPPath: "/",
  2469. }
  2470. if input == nil {
  2471. input = &CreateOrganizationalUnitInput{}
  2472. }
  2473. output = &CreateOrganizationalUnitOutput{}
  2474. req = c.newRequest(op, input, output)
  2475. return
  2476. }
  2477. // CreateOrganizationalUnit API operation for AWS Organizations.
  2478. //
  2479. // Creates an organizational unit (OU) within a root or parent OU. An OU is
  2480. // a container for accounts that enables you to organize your accounts to apply
  2481. // policies according to your business requirements. The number of levels deep
  2482. // that you can nest OUs is dependent upon the policy types enabled for that
  2483. // root. For service control policies, the limit is five.
  2484. //
  2485. // For more information about OUs, see Managing Organizational Units (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_ous.html)
  2486. // in the Organizations User Guide.
  2487. //
  2488. // If the request includes tags, then the requester must have the organizations:TagResource
  2489. // permission.
  2490. //
  2491. // This operation can be called only from the organization's management account.
  2492. //
  2493. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2494. // with awserr.Error's Code and Message methods to get detailed information about
  2495. // the error.
  2496. //
  2497. // See the AWS API reference guide for AWS Organizations's
  2498. // API operation CreateOrganizationalUnit for usage and error information.
  2499. //
  2500. // Returned Error Types:
  2501. //
  2502. // - AccessDeniedException
  2503. // You don't have permissions to perform the requested operation. The user or
  2504. // role that is making the request must have at least one IAM permissions policy
  2505. // attached that grants the required permissions. For more information, see
  2506. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  2507. // in the IAM User Guide.
  2508. //
  2509. // - AWSOrganizationsNotInUseException
  2510. // Your account isn't a member of an organization. To make this request, you
  2511. // must use the credentials of an account that belongs to an organization.
  2512. //
  2513. // - ConcurrentModificationException
  2514. // The target of the operation is currently being modified by a different request.
  2515. // Try again later.
  2516. //
  2517. // - ConstraintViolationException
  2518. // Performing this operation violates a minimum or maximum value limit. For
  2519. // example, attempting to remove the last service control policy (SCP) from
  2520. // an OU or root, inviting or creating too many accounts to the organization,
  2521. // or attaching too many policies to an account, OU, or root. This exception
  2522. // includes a reason that contains additional information about the violated
  2523. // limit:
  2524. //
  2525. // Some of the reasons in the following list might not be applicable to this
  2526. // specific API or operation.
  2527. //
  2528. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  2529. // account from the organization. You can't remove the management account.
  2530. // Instead, after you remove all member accounts, delete the organization
  2531. // itself.
  2532. //
  2533. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  2534. // an account from the organization that doesn't yet have enough information
  2535. // to exist as a standalone account. This account requires you to first complete
  2536. // phone verification. Follow the steps at Removing a member account from
  2537. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  2538. // in the Organizations User Guide.
  2539. //
  2540. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  2541. // of accounts that you can create in one day.
  2542. //
  2543. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  2544. // the number of accounts in an organization. If you need more accounts,
  2545. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  2546. // to request an increase in your limit. Or the number of invitations that
  2547. // you tried to send would cause you to exceed the limit of accounts in your
  2548. // organization. Send fewer invitations or contact Amazon Web Services Support
  2549. // to request an increase in the number of accounts. Deleted and closed accounts
  2550. // still count toward your limit. If you get this exception when running
  2551. // a command immediately after creating the organization, wait one hour and
  2552. // try again. After an hour, if the command continues to fail with this error,
  2553. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  2554. //
  2555. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  2556. // register the management account of the organization as a delegated administrator
  2557. // for an Amazon Web Services service integrated with Organizations. You
  2558. // can designate only a member account as a delegated administrator.
  2559. //
  2560. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  2561. // account. To close the management account for the organization, you must
  2562. // first either remove or close all member accounts in the organization.
  2563. // Follow standard account closure process using root credentials.​
  2564. //
  2565. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  2566. // an account that is registered as a delegated administrator for a service
  2567. // integrated with your organization. To complete this operation, you must
  2568. // first deregister this account as a delegated administrator.
  2569. //
  2570. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  2571. // for the past 30 days.
  2572. //
  2573. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  2574. // of accounts that you can close at a time. ​
  2575. //
  2576. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  2577. // organization in the specified region, you must enable all features mode.
  2578. //
  2579. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  2580. // an Amazon Web Services account as a delegated administrator for an Amazon
  2581. // Web Services service that already has a delegated administrator. To complete
  2582. // this operation, you must first deregister any existing delegated administrators
  2583. // for this service.
  2584. //
  2585. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  2586. // valid for a limited period of time. You must resubmit the request and
  2587. // generate a new verfication code.
  2588. //
  2589. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  2590. // handshakes that you can send in one day.
  2591. //
  2592. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  2593. // supported payment method is associated with the account. Amazon Web Services
  2594. // does not support cards issued by financial institutions in Russia or Belarus.
  2595. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  2596. //
  2597. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  2598. // in this organization, you first must migrate the organization's management
  2599. // account to the marketplace that corresponds to the management account's
  2600. // address. For example, accounts with India addresses must be associated
  2601. // with the AISPL marketplace. All accounts in an organization must be associated
  2602. // with the same marketplace.
  2603. //
  2604. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  2605. // Web Services /> Regions in China. To create an organization, the master
  2606. // must have a valid business license. For more information, contact customer
  2607. // support.
  2608. //
  2609. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  2610. // must first provide a valid contact address and phone number for the management
  2611. // account. Then try the operation again.
  2612. //
  2613. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  2614. // management account must have an associated account in the Amazon Web Services
  2615. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  2616. // in the Amazon Web Services GovCloud User Guide.
  2617. //
  2618. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  2619. // with this management account, you first must associate a valid payment
  2620. // instrument, such as a credit card, with the account. Follow the steps
  2621. // at To leave an organization when all required account information has
  2622. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  2623. // in the Organizations User Guide.
  2624. //
  2625. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  2626. // to register more delegated administrators than allowed for the service
  2627. // principal.
  2628. //
  2629. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  2630. // number of policies of a certain type that can be attached to an entity
  2631. // at one time.
  2632. //
  2633. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  2634. // on this resource.
  2635. //
  2636. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  2637. // with this member account, you first must associate a valid payment instrument,
  2638. // such as a credit card, with the account. Follow the steps at To leave
  2639. // an organization when all required account information has not yet been
  2640. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  2641. // in the Organizations User Guide.
  2642. //
  2643. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  2644. // policy from an entity that would cause the entity to have fewer than the
  2645. // minimum number of policies of a certain type required.
  2646. //
  2647. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  2648. // that requires the organization to be configured to support all features.
  2649. // An organization that supports only consolidated billing features can't
  2650. // perform this operation.
  2651. //
  2652. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  2653. // too many levels deep.
  2654. //
  2655. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  2656. // that you can have in an organization.
  2657. //
  2658. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  2659. // is larger than the maximum size.
  2660. //
  2661. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  2662. // policies that you can have in an organization.
  2663. //
  2664. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  2665. // before you enabled service access. Call the EnableAWSServiceAccess API
  2666. // first.
  2667. //
  2668. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  2669. // tags that are not compliant with the tag policy requirements for this
  2670. // account.
  2671. //
  2672. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  2673. // there is a waiting period before you can remove it from the organization.
  2674. // If you get an error that indicates that a wait period is required, try
  2675. // again in a few days.
  2676. //
  2677. // - DuplicateOrganizationalUnitException
  2678. // An OU with the same name already exists.
  2679. //
  2680. // - InvalidInputException
  2681. // The requested operation failed because you provided invalid values for one
  2682. // or more of the request parameters. This exception includes a reason that
  2683. // contains additional information about the violated limit:
  2684. //
  2685. // Some of the reasons in the following list might not be applicable to this
  2686. // specific API or operation.
  2687. //
  2688. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  2689. // the same entity.
  2690. //
  2691. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  2692. // Services and can't be modified.
  2693. //
  2694. // - INPUT_REQUIRED: You must include a value for all required parameters.
  2695. //
  2696. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  2697. // for the invited account owner.
  2698. //
  2699. // - INVALID_ENUM: You specified an invalid value.
  2700. //
  2701. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  2702. //
  2703. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  2704. // characters.
  2705. //
  2706. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  2707. // at least one invalid value.
  2708. //
  2709. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  2710. // from the response to a previous call of the operation.
  2711. //
  2712. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  2713. // organization, or email) as a party.
  2714. //
  2715. // - INVALID_PATTERN: You provided a value that doesn't match the required
  2716. // pattern.
  2717. //
  2718. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  2719. // match the required pattern.
  2720. //
  2721. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  2722. // name can't begin with the reserved prefix AWSServiceRoleFor.
  2723. //
  2724. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  2725. // Name (ARN) for the organization.
  2726. //
  2727. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  2728. //
  2729. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  2730. // tag. You can’t add, edit, or delete system tag keys because they're
  2731. // reserved for Amazon Web Services use. System tags don’t count against
  2732. // your tags per resource limit.
  2733. //
  2734. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  2735. // for the operation.
  2736. //
  2737. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  2738. // than allowed.
  2739. //
  2740. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  2741. // value than allowed.
  2742. //
  2743. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  2744. // than allowed.
  2745. //
  2746. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  2747. // value than allowed.
  2748. //
  2749. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  2750. // between entities in the same root.
  2751. //
  2752. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  2753. // target entity.
  2754. //
  2755. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  2756. // isn't recognized.
  2757. //
  2758. // - ParentNotFoundException
  2759. // We can't find a root or OU with the ParentId that you specified.
  2760. //
  2761. // - ServiceException
  2762. // Organizations can't complete your request because of an internal service
  2763. // error. Try again later.
  2764. //
  2765. // - TooManyRequestsException
  2766. // You have sent too many requests in too short a period of time. The quota
  2767. // helps protect against denial-of-service attacks. Try again later.
  2768. //
  2769. // For information about quotas that affect Organizations, see Quotas for Organizations
  2770. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  2771. // the Organizations User Guide.
  2772. //
  2773. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateOrganizationalUnit
  2774. func (c *Organizations) CreateOrganizationalUnit(input *CreateOrganizationalUnitInput) (*CreateOrganizationalUnitOutput, error) {
  2775. req, out := c.CreateOrganizationalUnitRequest(input)
  2776. return out, req.Send()
  2777. }
  2778. // CreateOrganizationalUnitWithContext is the same as CreateOrganizationalUnit with the addition of
  2779. // the ability to pass a context and additional request options.
  2780. //
  2781. // See CreateOrganizationalUnit for details on how to use this API operation.
  2782. //
  2783. // The context must be non-nil and will be used for request cancellation. If
  2784. // the context is nil a panic will occur. In the future the SDK may create
  2785. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2786. // for more information on using Contexts.
  2787. func (c *Organizations) CreateOrganizationalUnitWithContext(ctx aws.Context, input *CreateOrganizationalUnitInput, opts ...request.Option) (*CreateOrganizationalUnitOutput, error) {
  2788. req, out := c.CreateOrganizationalUnitRequest(input)
  2789. req.SetContext(ctx)
  2790. req.ApplyOptions(opts...)
  2791. return out, req.Send()
  2792. }
  2793. const opCreatePolicy = "CreatePolicy"
  2794. // CreatePolicyRequest generates a "aws/request.Request" representing the
  2795. // client's request for the CreatePolicy operation. The "output" return
  2796. // value will be populated with the request's response once the request completes
  2797. // successfully.
  2798. //
  2799. // Use "Send" method on the returned Request to send the API call to the service.
  2800. // the "output" return value is not valid until after Send returns without error.
  2801. //
  2802. // See CreatePolicy for more information on using the CreatePolicy
  2803. // API call, and error handling.
  2804. //
  2805. // This method is useful when you want to inject custom logic or configuration
  2806. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2807. //
  2808. // // Example sending a request using the CreatePolicyRequest method.
  2809. // req, resp := client.CreatePolicyRequest(params)
  2810. //
  2811. // err := req.Send()
  2812. // if err == nil { // resp is now filled
  2813. // fmt.Println(resp)
  2814. // }
  2815. //
  2816. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreatePolicy
  2817. func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *request.Request, output *CreatePolicyOutput) {
  2818. op := &request.Operation{
  2819. Name: opCreatePolicy,
  2820. HTTPMethod: "POST",
  2821. HTTPPath: "/",
  2822. }
  2823. if input == nil {
  2824. input = &CreatePolicyInput{}
  2825. }
  2826. output = &CreatePolicyOutput{}
  2827. req = c.newRequest(op, input, output)
  2828. return
  2829. }
  2830. // CreatePolicy API operation for AWS Organizations.
  2831. //
  2832. // Creates a policy of a specified type that you can attach to a root, an organizational
  2833. // unit (OU), or an individual Amazon Web Services account.
  2834. //
  2835. // For more information about policies and their use, see Managing Organization
  2836. // Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html).
  2837. //
  2838. // If the request includes tags, then the requester must have the organizations:TagResource
  2839. // permission.
  2840. //
  2841. // This operation can be called only from the organization's management account.
  2842. //
  2843. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2844. // with awserr.Error's Code and Message methods to get detailed information about
  2845. // the error.
  2846. //
  2847. // See the AWS API reference guide for AWS Organizations's
  2848. // API operation CreatePolicy for usage and error information.
  2849. //
  2850. // Returned Error Types:
  2851. //
  2852. // - AccessDeniedException
  2853. // You don't have permissions to perform the requested operation. The user or
  2854. // role that is making the request must have at least one IAM permissions policy
  2855. // attached that grants the required permissions. For more information, see
  2856. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  2857. // in the IAM User Guide.
  2858. //
  2859. // - AWSOrganizationsNotInUseException
  2860. // Your account isn't a member of an organization. To make this request, you
  2861. // must use the credentials of an account that belongs to an organization.
  2862. //
  2863. // - ConcurrentModificationException
  2864. // The target of the operation is currently being modified by a different request.
  2865. // Try again later.
  2866. //
  2867. // - ConstraintViolationException
  2868. // Performing this operation violates a minimum or maximum value limit. For
  2869. // example, attempting to remove the last service control policy (SCP) from
  2870. // an OU or root, inviting or creating too many accounts to the organization,
  2871. // or attaching too many policies to an account, OU, or root. This exception
  2872. // includes a reason that contains additional information about the violated
  2873. // limit:
  2874. //
  2875. // Some of the reasons in the following list might not be applicable to this
  2876. // specific API or operation.
  2877. //
  2878. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  2879. // account from the organization. You can't remove the management account.
  2880. // Instead, after you remove all member accounts, delete the organization
  2881. // itself.
  2882. //
  2883. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  2884. // an account from the organization that doesn't yet have enough information
  2885. // to exist as a standalone account. This account requires you to first complete
  2886. // phone verification. Follow the steps at Removing a member account from
  2887. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  2888. // in the Organizations User Guide.
  2889. //
  2890. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  2891. // of accounts that you can create in one day.
  2892. //
  2893. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  2894. // the number of accounts in an organization. If you need more accounts,
  2895. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  2896. // to request an increase in your limit. Or the number of invitations that
  2897. // you tried to send would cause you to exceed the limit of accounts in your
  2898. // organization. Send fewer invitations or contact Amazon Web Services Support
  2899. // to request an increase in the number of accounts. Deleted and closed accounts
  2900. // still count toward your limit. If you get this exception when running
  2901. // a command immediately after creating the organization, wait one hour and
  2902. // try again. After an hour, if the command continues to fail with this error,
  2903. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  2904. //
  2905. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  2906. // register the management account of the organization as a delegated administrator
  2907. // for an Amazon Web Services service integrated with Organizations. You
  2908. // can designate only a member account as a delegated administrator.
  2909. //
  2910. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  2911. // account. To close the management account for the organization, you must
  2912. // first either remove or close all member accounts in the organization.
  2913. // Follow standard account closure process using root credentials.​
  2914. //
  2915. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  2916. // an account that is registered as a delegated administrator for a service
  2917. // integrated with your organization. To complete this operation, you must
  2918. // first deregister this account as a delegated administrator.
  2919. //
  2920. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  2921. // for the past 30 days.
  2922. //
  2923. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  2924. // of accounts that you can close at a time. ​
  2925. //
  2926. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  2927. // organization in the specified region, you must enable all features mode.
  2928. //
  2929. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  2930. // an Amazon Web Services account as a delegated administrator for an Amazon
  2931. // Web Services service that already has a delegated administrator. To complete
  2932. // this operation, you must first deregister any existing delegated administrators
  2933. // for this service.
  2934. //
  2935. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  2936. // valid for a limited period of time. You must resubmit the request and
  2937. // generate a new verfication code.
  2938. //
  2939. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  2940. // handshakes that you can send in one day.
  2941. //
  2942. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  2943. // supported payment method is associated with the account. Amazon Web Services
  2944. // does not support cards issued by financial institutions in Russia or Belarus.
  2945. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  2946. //
  2947. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  2948. // in this organization, you first must migrate the organization's management
  2949. // account to the marketplace that corresponds to the management account's
  2950. // address. For example, accounts with India addresses must be associated
  2951. // with the AISPL marketplace. All accounts in an organization must be associated
  2952. // with the same marketplace.
  2953. //
  2954. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  2955. // Web Services /> Regions in China. To create an organization, the master
  2956. // must have a valid business license. For more information, contact customer
  2957. // support.
  2958. //
  2959. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  2960. // must first provide a valid contact address and phone number for the management
  2961. // account. Then try the operation again.
  2962. //
  2963. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  2964. // management account must have an associated account in the Amazon Web Services
  2965. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  2966. // in the Amazon Web Services GovCloud User Guide.
  2967. //
  2968. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  2969. // with this management account, you first must associate a valid payment
  2970. // instrument, such as a credit card, with the account. Follow the steps
  2971. // at To leave an organization when all required account information has
  2972. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  2973. // in the Organizations User Guide.
  2974. //
  2975. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  2976. // to register more delegated administrators than allowed for the service
  2977. // principal.
  2978. //
  2979. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  2980. // number of policies of a certain type that can be attached to an entity
  2981. // at one time.
  2982. //
  2983. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  2984. // on this resource.
  2985. //
  2986. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  2987. // with this member account, you first must associate a valid payment instrument,
  2988. // such as a credit card, with the account. Follow the steps at To leave
  2989. // an organization when all required account information has not yet been
  2990. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  2991. // in the Organizations User Guide.
  2992. //
  2993. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  2994. // policy from an entity that would cause the entity to have fewer than the
  2995. // minimum number of policies of a certain type required.
  2996. //
  2997. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  2998. // that requires the organization to be configured to support all features.
  2999. // An organization that supports only consolidated billing features can't
  3000. // perform this operation.
  3001. //
  3002. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  3003. // too many levels deep.
  3004. //
  3005. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  3006. // that you can have in an organization.
  3007. //
  3008. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  3009. // is larger than the maximum size.
  3010. //
  3011. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  3012. // policies that you can have in an organization.
  3013. //
  3014. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  3015. // before you enabled service access. Call the EnableAWSServiceAccess API
  3016. // first.
  3017. //
  3018. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  3019. // tags that are not compliant with the tag policy requirements for this
  3020. // account.
  3021. //
  3022. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  3023. // there is a waiting period before you can remove it from the organization.
  3024. // If you get an error that indicates that a wait period is required, try
  3025. // again in a few days.
  3026. //
  3027. // - DuplicatePolicyException
  3028. // A policy with the same name already exists.
  3029. //
  3030. // - InvalidInputException
  3031. // The requested operation failed because you provided invalid values for one
  3032. // or more of the request parameters. This exception includes a reason that
  3033. // contains additional information about the violated limit:
  3034. //
  3035. // Some of the reasons in the following list might not be applicable to this
  3036. // specific API or operation.
  3037. //
  3038. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  3039. // the same entity.
  3040. //
  3041. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  3042. // Services and can't be modified.
  3043. //
  3044. // - INPUT_REQUIRED: You must include a value for all required parameters.
  3045. //
  3046. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  3047. // for the invited account owner.
  3048. //
  3049. // - INVALID_ENUM: You specified an invalid value.
  3050. //
  3051. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  3052. //
  3053. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  3054. // characters.
  3055. //
  3056. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  3057. // at least one invalid value.
  3058. //
  3059. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  3060. // from the response to a previous call of the operation.
  3061. //
  3062. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  3063. // organization, or email) as a party.
  3064. //
  3065. // - INVALID_PATTERN: You provided a value that doesn't match the required
  3066. // pattern.
  3067. //
  3068. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  3069. // match the required pattern.
  3070. //
  3071. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  3072. // name can't begin with the reserved prefix AWSServiceRoleFor.
  3073. //
  3074. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  3075. // Name (ARN) for the organization.
  3076. //
  3077. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  3078. //
  3079. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  3080. // tag. You can’t add, edit, or delete system tag keys because they're
  3081. // reserved for Amazon Web Services use. System tags don’t count against
  3082. // your tags per resource limit.
  3083. //
  3084. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  3085. // for the operation.
  3086. //
  3087. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  3088. // than allowed.
  3089. //
  3090. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  3091. // value than allowed.
  3092. //
  3093. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  3094. // than allowed.
  3095. //
  3096. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  3097. // value than allowed.
  3098. //
  3099. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  3100. // between entities in the same root.
  3101. //
  3102. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  3103. // target entity.
  3104. //
  3105. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  3106. // isn't recognized.
  3107. //
  3108. // - MalformedPolicyDocumentException
  3109. // The provided policy document doesn't meet the requirements of the specified
  3110. // policy type. For example, the syntax might be incorrect. For details about
  3111. // service control policy syntax, see Service Control Policy Syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html)
  3112. // in the Organizations User Guide.
  3113. //
  3114. // - PolicyTypeNotAvailableForOrganizationException
  3115. // You can't use the specified policy type with the feature set currently enabled
  3116. // for this organization. For example, you can enable SCPs only after you enable
  3117. // all features in the organization. For more information, see Managing Organizations
  3118. // Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root)in
  3119. // the Organizations User Guide.
  3120. //
  3121. // - ServiceException
  3122. // Organizations can't complete your request because of an internal service
  3123. // error. Try again later.
  3124. //
  3125. // - TooManyRequestsException
  3126. // You have sent too many requests in too short a period of time. The quota
  3127. // helps protect against denial-of-service attacks. Try again later.
  3128. //
  3129. // For information about quotas that affect Organizations, see Quotas for Organizations
  3130. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  3131. // the Organizations User Guide.
  3132. //
  3133. // - UnsupportedAPIEndpointException
  3134. // This action isn't available in the current Amazon Web Services Region.
  3135. //
  3136. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreatePolicy
  3137. func (c *Organizations) CreatePolicy(input *CreatePolicyInput) (*CreatePolicyOutput, error) {
  3138. req, out := c.CreatePolicyRequest(input)
  3139. return out, req.Send()
  3140. }
  3141. // CreatePolicyWithContext is the same as CreatePolicy with the addition of
  3142. // the ability to pass a context and additional request options.
  3143. //
  3144. // See CreatePolicy for details on how to use this API operation.
  3145. //
  3146. // The context must be non-nil and will be used for request cancellation. If
  3147. // the context is nil a panic will occur. In the future the SDK may create
  3148. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3149. // for more information on using Contexts.
  3150. func (c *Organizations) CreatePolicyWithContext(ctx aws.Context, input *CreatePolicyInput, opts ...request.Option) (*CreatePolicyOutput, error) {
  3151. req, out := c.CreatePolicyRequest(input)
  3152. req.SetContext(ctx)
  3153. req.ApplyOptions(opts...)
  3154. return out, req.Send()
  3155. }
  3156. const opDeclineHandshake = "DeclineHandshake"
  3157. // DeclineHandshakeRequest generates a "aws/request.Request" representing the
  3158. // client's request for the DeclineHandshake operation. The "output" return
  3159. // value will be populated with the request's response once the request completes
  3160. // successfully.
  3161. //
  3162. // Use "Send" method on the returned Request to send the API call to the service.
  3163. // the "output" return value is not valid until after Send returns without error.
  3164. //
  3165. // See DeclineHandshake for more information on using the DeclineHandshake
  3166. // API call, and error handling.
  3167. //
  3168. // This method is useful when you want to inject custom logic or configuration
  3169. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3170. //
  3171. // // Example sending a request using the DeclineHandshakeRequest method.
  3172. // req, resp := client.DeclineHandshakeRequest(params)
  3173. //
  3174. // err := req.Send()
  3175. // if err == nil { // resp is now filled
  3176. // fmt.Println(resp)
  3177. // }
  3178. //
  3179. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeclineHandshake
  3180. func (c *Organizations) DeclineHandshakeRequest(input *DeclineHandshakeInput) (req *request.Request, output *DeclineHandshakeOutput) {
  3181. op := &request.Operation{
  3182. Name: opDeclineHandshake,
  3183. HTTPMethod: "POST",
  3184. HTTPPath: "/",
  3185. }
  3186. if input == nil {
  3187. input = &DeclineHandshakeInput{}
  3188. }
  3189. output = &DeclineHandshakeOutput{}
  3190. req = c.newRequest(op, input, output)
  3191. return
  3192. }
  3193. // DeclineHandshake API operation for AWS Organizations.
  3194. //
  3195. // Declines a handshake request. This sets the handshake state to DECLINED and
  3196. // effectively deactivates the request.
  3197. //
  3198. // This operation can be called only from the account that received the handshake.
  3199. // The originator of the handshake can use CancelHandshake instead. The originator
  3200. // can't reactivate a declined request, but can reinitiate the process with
  3201. // a new handshake request.
  3202. //
  3203. // After you decline a handshake, it continues to appear in the results of relevant
  3204. // APIs for only 30 days. After that, it's deleted.
  3205. //
  3206. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3207. // with awserr.Error's Code and Message methods to get detailed information about
  3208. // the error.
  3209. //
  3210. // See the AWS API reference guide for AWS Organizations's
  3211. // API operation DeclineHandshake for usage and error information.
  3212. //
  3213. // Returned Error Types:
  3214. //
  3215. // - AccessDeniedException
  3216. // You don't have permissions to perform the requested operation. The user or
  3217. // role that is making the request must have at least one IAM permissions policy
  3218. // attached that grants the required permissions. For more information, see
  3219. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  3220. // in the IAM User Guide.
  3221. //
  3222. // - ConcurrentModificationException
  3223. // The target of the operation is currently being modified by a different request.
  3224. // Try again later.
  3225. //
  3226. // - HandshakeNotFoundException
  3227. // We can't find a handshake with the HandshakeId that you specified.
  3228. //
  3229. // - InvalidHandshakeTransitionException
  3230. // You can't perform the operation on the handshake in its current state. For
  3231. // example, you can't cancel a handshake that was already accepted or accept
  3232. // a handshake that was already declined.
  3233. //
  3234. // - HandshakeAlreadyInStateException
  3235. // The specified handshake is already in the requested state. For example, you
  3236. // can't accept a handshake that was already accepted.
  3237. //
  3238. // - InvalidInputException
  3239. // The requested operation failed because you provided invalid values for one
  3240. // or more of the request parameters. This exception includes a reason that
  3241. // contains additional information about the violated limit:
  3242. //
  3243. // Some of the reasons in the following list might not be applicable to this
  3244. // specific API or operation.
  3245. //
  3246. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  3247. // the same entity.
  3248. //
  3249. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  3250. // Services and can't be modified.
  3251. //
  3252. // - INPUT_REQUIRED: You must include a value for all required parameters.
  3253. //
  3254. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  3255. // for the invited account owner.
  3256. //
  3257. // - INVALID_ENUM: You specified an invalid value.
  3258. //
  3259. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  3260. //
  3261. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  3262. // characters.
  3263. //
  3264. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  3265. // at least one invalid value.
  3266. //
  3267. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  3268. // from the response to a previous call of the operation.
  3269. //
  3270. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  3271. // organization, or email) as a party.
  3272. //
  3273. // - INVALID_PATTERN: You provided a value that doesn't match the required
  3274. // pattern.
  3275. //
  3276. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  3277. // match the required pattern.
  3278. //
  3279. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  3280. // name can't begin with the reserved prefix AWSServiceRoleFor.
  3281. //
  3282. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  3283. // Name (ARN) for the organization.
  3284. //
  3285. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  3286. //
  3287. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  3288. // tag. You can’t add, edit, or delete system tag keys because they're
  3289. // reserved for Amazon Web Services use. System tags don’t count against
  3290. // your tags per resource limit.
  3291. //
  3292. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  3293. // for the operation.
  3294. //
  3295. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  3296. // than allowed.
  3297. //
  3298. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  3299. // value than allowed.
  3300. //
  3301. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  3302. // than allowed.
  3303. //
  3304. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  3305. // value than allowed.
  3306. //
  3307. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  3308. // between entities in the same root.
  3309. //
  3310. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  3311. // target entity.
  3312. //
  3313. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  3314. // isn't recognized.
  3315. //
  3316. // - ServiceException
  3317. // Organizations can't complete your request because of an internal service
  3318. // error. Try again later.
  3319. //
  3320. // - TooManyRequestsException
  3321. // You have sent too many requests in too short a period of time. The quota
  3322. // helps protect against denial-of-service attacks. Try again later.
  3323. //
  3324. // For information about quotas that affect Organizations, see Quotas for Organizations
  3325. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  3326. // the Organizations User Guide.
  3327. //
  3328. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeclineHandshake
  3329. func (c *Organizations) DeclineHandshake(input *DeclineHandshakeInput) (*DeclineHandshakeOutput, error) {
  3330. req, out := c.DeclineHandshakeRequest(input)
  3331. return out, req.Send()
  3332. }
  3333. // DeclineHandshakeWithContext is the same as DeclineHandshake with the addition of
  3334. // the ability to pass a context and additional request options.
  3335. //
  3336. // See DeclineHandshake for details on how to use this API operation.
  3337. //
  3338. // The context must be non-nil and will be used for request cancellation. If
  3339. // the context is nil a panic will occur. In the future the SDK may create
  3340. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3341. // for more information on using Contexts.
  3342. func (c *Organizations) DeclineHandshakeWithContext(ctx aws.Context, input *DeclineHandshakeInput, opts ...request.Option) (*DeclineHandshakeOutput, error) {
  3343. req, out := c.DeclineHandshakeRequest(input)
  3344. req.SetContext(ctx)
  3345. req.ApplyOptions(opts...)
  3346. return out, req.Send()
  3347. }
  3348. const opDeleteOrganization = "DeleteOrganization"
  3349. // DeleteOrganizationRequest generates a "aws/request.Request" representing the
  3350. // client's request for the DeleteOrganization operation. The "output" return
  3351. // value will be populated with the request's response once the request completes
  3352. // successfully.
  3353. //
  3354. // Use "Send" method on the returned Request to send the API call to the service.
  3355. // the "output" return value is not valid until after Send returns without error.
  3356. //
  3357. // See DeleteOrganization for more information on using the DeleteOrganization
  3358. // API call, and error handling.
  3359. //
  3360. // This method is useful when you want to inject custom logic or configuration
  3361. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3362. //
  3363. // // Example sending a request using the DeleteOrganizationRequest method.
  3364. // req, resp := client.DeleteOrganizationRequest(params)
  3365. //
  3366. // err := req.Send()
  3367. // if err == nil { // resp is now filled
  3368. // fmt.Println(resp)
  3369. // }
  3370. //
  3371. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeleteOrganization
  3372. func (c *Organizations) DeleteOrganizationRequest(input *DeleteOrganizationInput) (req *request.Request, output *DeleteOrganizationOutput) {
  3373. op := &request.Operation{
  3374. Name: opDeleteOrganization,
  3375. HTTPMethod: "POST",
  3376. HTTPPath: "/",
  3377. }
  3378. if input == nil {
  3379. input = &DeleteOrganizationInput{}
  3380. }
  3381. output = &DeleteOrganizationOutput{}
  3382. req = c.newRequest(op, input, output)
  3383. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3384. return
  3385. }
  3386. // DeleteOrganization API operation for AWS Organizations.
  3387. //
  3388. // Deletes the organization. You can delete an organization only by using credentials
  3389. // from the management account. The organization must be empty of member accounts.
  3390. //
  3391. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3392. // with awserr.Error's Code and Message methods to get detailed information about
  3393. // the error.
  3394. //
  3395. // See the AWS API reference guide for AWS Organizations's
  3396. // API operation DeleteOrganization for usage and error information.
  3397. //
  3398. // Returned Error Types:
  3399. //
  3400. // - AccessDeniedException
  3401. // You don't have permissions to perform the requested operation. The user or
  3402. // role that is making the request must have at least one IAM permissions policy
  3403. // attached that grants the required permissions. For more information, see
  3404. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  3405. // in the IAM User Guide.
  3406. //
  3407. // - AWSOrganizationsNotInUseException
  3408. // Your account isn't a member of an organization. To make this request, you
  3409. // must use the credentials of an account that belongs to an organization.
  3410. //
  3411. // - ConcurrentModificationException
  3412. // The target of the operation is currently being modified by a different request.
  3413. // Try again later.
  3414. //
  3415. // - InvalidInputException
  3416. // The requested operation failed because you provided invalid values for one
  3417. // or more of the request parameters. This exception includes a reason that
  3418. // contains additional information about the violated limit:
  3419. //
  3420. // Some of the reasons in the following list might not be applicable to this
  3421. // specific API or operation.
  3422. //
  3423. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  3424. // the same entity.
  3425. //
  3426. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  3427. // Services and can't be modified.
  3428. //
  3429. // - INPUT_REQUIRED: You must include a value for all required parameters.
  3430. //
  3431. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  3432. // for the invited account owner.
  3433. //
  3434. // - INVALID_ENUM: You specified an invalid value.
  3435. //
  3436. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  3437. //
  3438. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  3439. // characters.
  3440. //
  3441. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  3442. // at least one invalid value.
  3443. //
  3444. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  3445. // from the response to a previous call of the operation.
  3446. //
  3447. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  3448. // organization, or email) as a party.
  3449. //
  3450. // - INVALID_PATTERN: You provided a value that doesn't match the required
  3451. // pattern.
  3452. //
  3453. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  3454. // match the required pattern.
  3455. //
  3456. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  3457. // name can't begin with the reserved prefix AWSServiceRoleFor.
  3458. //
  3459. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  3460. // Name (ARN) for the organization.
  3461. //
  3462. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  3463. //
  3464. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  3465. // tag. You can’t add, edit, or delete system tag keys because they're
  3466. // reserved for Amazon Web Services use. System tags don’t count against
  3467. // your tags per resource limit.
  3468. //
  3469. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  3470. // for the operation.
  3471. //
  3472. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  3473. // than allowed.
  3474. //
  3475. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  3476. // value than allowed.
  3477. //
  3478. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  3479. // than allowed.
  3480. //
  3481. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  3482. // value than allowed.
  3483. //
  3484. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  3485. // between entities in the same root.
  3486. //
  3487. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  3488. // target entity.
  3489. //
  3490. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  3491. // isn't recognized.
  3492. //
  3493. // - OrganizationNotEmptyException
  3494. // The organization isn't empty. To delete an organization, you must first remove
  3495. // all accounts except the management account, delete all OUs, and delete all
  3496. // policies.
  3497. //
  3498. // - ServiceException
  3499. // Organizations can't complete your request because of an internal service
  3500. // error. Try again later.
  3501. //
  3502. // - TooManyRequestsException
  3503. // You have sent too many requests in too short a period of time. The quota
  3504. // helps protect against denial-of-service attacks. Try again later.
  3505. //
  3506. // For information about quotas that affect Organizations, see Quotas for Organizations
  3507. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  3508. // the Organizations User Guide.
  3509. //
  3510. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeleteOrganization
  3511. func (c *Organizations) DeleteOrganization(input *DeleteOrganizationInput) (*DeleteOrganizationOutput, error) {
  3512. req, out := c.DeleteOrganizationRequest(input)
  3513. return out, req.Send()
  3514. }
  3515. // DeleteOrganizationWithContext is the same as DeleteOrganization with the addition of
  3516. // the ability to pass a context and additional request options.
  3517. //
  3518. // See DeleteOrganization for details on how to use this API operation.
  3519. //
  3520. // The context must be non-nil and will be used for request cancellation. If
  3521. // the context is nil a panic will occur. In the future the SDK may create
  3522. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3523. // for more information on using Contexts.
  3524. func (c *Organizations) DeleteOrganizationWithContext(ctx aws.Context, input *DeleteOrganizationInput, opts ...request.Option) (*DeleteOrganizationOutput, error) {
  3525. req, out := c.DeleteOrganizationRequest(input)
  3526. req.SetContext(ctx)
  3527. req.ApplyOptions(opts...)
  3528. return out, req.Send()
  3529. }
  3530. const opDeleteOrganizationalUnit = "DeleteOrganizationalUnit"
  3531. // DeleteOrganizationalUnitRequest generates a "aws/request.Request" representing the
  3532. // client's request for the DeleteOrganizationalUnit operation. The "output" return
  3533. // value will be populated with the request's response once the request completes
  3534. // successfully.
  3535. //
  3536. // Use "Send" method on the returned Request to send the API call to the service.
  3537. // the "output" return value is not valid until after Send returns without error.
  3538. //
  3539. // See DeleteOrganizationalUnit for more information on using the DeleteOrganizationalUnit
  3540. // API call, and error handling.
  3541. //
  3542. // This method is useful when you want to inject custom logic or configuration
  3543. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3544. //
  3545. // // Example sending a request using the DeleteOrganizationalUnitRequest method.
  3546. // req, resp := client.DeleteOrganizationalUnitRequest(params)
  3547. //
  3548. // err := req.Send()
  3549. // if err == nil { // resp is now filled
  3550. // fmt.Println(resp)
  3551. // }
  3552. //
  3553. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeleteOrganizationalUnit
  3554. func (c *Organizations) DeleteOrganizationalUnitRequest(input *DeleteOrganizationalUnitInput) (req *request.Request, output *DeleteOrganizationalUnitOutput) {
  3555. op := &request.Operation{
  3556. Name: opDeleteOrganizationalUnit,
  3557. HTTPMethod: "POST",
  3558. HTTPPath: "/",
  3559. }
  3560. if input == nil {
  3561. input = &DeleteOrganizationalUnitInput{}
  3562. }
  3563. output = &DeleteOrganizationalUnitOutput{}
  3564. req = c.newRequest(op, input, output)
  3565. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3566. return
  3567. }
  3568. // DeleteOrganizationalUnit API operation for AWS Organizations.
  3569. //
  3570. // Deletes an organizational unit (OU) from a root or another OU. You must first
  3571. // remove all accounts and child OUs from the OU that you want to delete.
  3572. //
  3573. // This operation can be called only from the organization's management account.
  3574. //
  3575. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3576. // with awserr.Error's Code and Message methods to get detailed information about
  3577. // the error.
  3578. //
  3579. // See the AWS API reference guide for AWS Organizations's
  3580. // API operation DeleteOrganizationalUnit for usage and error information.
  3581. //
  3582. // Returned Error Types:
  3583. //
  3584. // - AccessDeniedException
  3585. // You don't have permissions to perform the requested operation. The user or
  3586. // role that is making the request must have at least one IAM permissions policy
  3587. // attached that grants the required permissions. For more information, see
  3588. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  3589. // in the IAM User Guide.
  3590. //
  3591. // - AWSOrganizationsNotInUseException
  3592. // Your account isn't a member of an organization. To make this request, you
  3593. // must use the credentials of an account that belongs to an organization.
  3594. //
  3595. // - ConcurrentModificationException
  3596. // The target of the operation is currently being modified by a different request.
  3597. // Try again later.
  3598. //
  3599. // - InvalidInputException
  3600. // The requested operation failed because you provided invalid values for one
  3601. // or more of the request parameters. This exception includes a reason that
  3602. // contains additional information about the violated limit:
  3603. //
  3604. // Some of the reasons in the following list might not be applicable to this
  3605. // specific API or operation.
  3606. //
  3607. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  3608. // the same entity.
  3609. //
  3610. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  3611. // Services and can't be modified.
  3612. //
  3613. // - INPUT_REQUIRED: You must include a value for all required parameters.
  3614. //
  3615. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  3616. // for the invited account owner.
  3617. //
  3618. // - INVALID_ENUM: You specified an invalid value.
  3619. //
  3620. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  3621. //
  3622. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  3623. // characters.
  3624. //
  3625. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  3626. // at least one invalid value.
  3627. //
  3628. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  3629. // from the response to a previous call of the operation.
  3630. //
  3631. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  3632. // organization, or email) as a party.
  3633. //
  3634. // - INVALID_PATTERN: You provided a value that doesn't match the required
  3635. // pattern.
  3636. //
  3637. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  3638. // match the required pattern.
  3639. //
  3640. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  3641. // name can't begin with the reserved prefix AWSServiceRoleFor.
  3642. //
  3643. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  3644. // Name (ARN) for the organization.
  3645. //
  3646. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  3647. //
  3648. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  3649. // tag. You can’t add, edit, or delete system tag keys because they're
  3650. // reserved for Amazon Web Services use. System tags don’t count against
  3651. // your tags per resource limit.
  3652. //
  3653. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  3654. // for the operation.
  3655. //
  3656. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  3657. // than allowed.
  3658. //
  3659. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  3660. // value than allowed.
  3661. //
  3662. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  3663. // than allowed.
  3664. //
  3665. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  3666. // value than allowed.
  3667. //
  3668. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  3669. // between entities in the same root.
  3670. //
  3671. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  3672. // target entity.
  3673. //
  3674. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  3675. // isn't recognized.
  3676. //
  3677. // - OrganizationalUnitNotEmptyException
  3678. // The specified OU is not empty. Move all accounts to another root or to other
  3679. // OUs, remove all child OUs, and try the operation again.
  3680. //
  3681. // - OrganizationalUnitNotFoundException
  3682. // We can't find an OU with the OrganizationalUnitId that you specified.
  3683. //
  3684. // - ServiceException
  3685. // Organizations can't complete your request because of an internal service
  3686. // error. Try again later.
  3687. //
  3688. // - TooManyRequestsException
  3689. // You have sent too many requests in too short a period of time. The quota
  3690. // helps protect against denial-of-service attacks. Try again later.
  3691. //
  3692. // For information about quotas that affect Organizations, see Quotas for Organizations
  3693. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  3694. // the Organizations User Guide.
  3695. //
  3696. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeleteOrganizationalUnit
  3697. func (c *Organizations) DeleteOrganizationalUnit(input *DeleteOrganizationalUnitInput) (*DeleteOrganizationalUnitOutput, error) {
  3698. req, out := c.DeleteOrganizationalUnitRequest(input)
  3699. return out, req.Send()
  3700. }
  3701. // DeleteOrganizationalUnitWithContext is the same as DeleteOrganizationalUnit with the addition of
  3702. // the ability to pass a context and additional request options.
  3703. //
  3704. // See DeleteOrganizationalUnit for details on how to use this API operation.
  3705. //
  3706. // The context must be non-nil and will be used for request cancellation. If
  3707. // the context is nil a panic will occur. In the future the SDK may create
  3708. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3709. // for more information on using Contexts.
  3710. func (c *Organizations) DeleteOrganizationalUnitWithContext(ctx aws.Context, input *DeleteOrganizationalUnitInput, opts ...request.Option) (*DeleteOrganizationalUnitOutput, error) {
  3711. req, out := c.DeleteOrganizationalUnitRequest(input)
  3712. req.SetContext(ctx)
  3713. req.ApplyOptions(opts...)
  3714. return out, req.Send()
  3715. }
  3716. const opDeletePolicy = "DeletePolicy"
  3717. // DeletePolicyRequest generates a "aws/request.Request" representing the
  3718. // client's request for the DeletePolicy operation. The "output" return
  3719. // value will be populated with the request's response once the request completes
  3720. // successfully.
  3721. //
  3722. // Use "Send" method on the returned Request to send the API call to the service.
  3723. // the "output" return value is not valid until after Send returns without error.
  3724. //
  3725. // See DeletePolicy for more information on using the DeletePolicy
  3726. // API call, and error handling.
  3727. //
  3728. // This method is useful when you want to inject custom logic or configuration
  3729. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3730. //
  3731. // // Example sending a request using the DeletePolicyRequest method.
  3732. // req, resp := client.DeletePolicyRequest(params)
  3733. //
  3734. // err := req.Send()
  3735. // if err == nil { // resp is now filled
  3736. // fmt.Println(resp)
  3737. // }
  3738. //
  3739. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeletePolicy
  3740. func (c *Organizations) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) {
  3741. op := &request.Operation{
  3742. Name: opDeletePolicy,
  3743. HTTPMethod: "POST",
  3744. HTTPPath: "/",
  3745. }
  3746. if input == nil {
  3747. input = &DeletePolicyInput{}
  3748. }
  3749. output = &DeletePolicyOutput{}
  3750. req = c.newRequest(op, input, output)
  3751. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3752. return
  3753. }
  3754. // DeletePolicy API operation for AWS Organizations.
  3755. //
  3756. // Deletes the specified policy from your organization. Before you perform this
  3757. // operation, you must first detach the policy from all organizational units
  3758. // (OUs), roots, and accounts.
  3759. //
  3760. // This operation can be called only from the organization's management account.
  3761. //
  3762. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3763. // with awserr.Error's Code and Message methods to get detailed information about
  3764. // the error.
  3765. //
  3766. // See the AWS API reference guide for AWS Organizations's
  3767. // API operation DeletePolicy for usage and error information.
  3768. //
  3769. // Returned Error Types:
  3770. //
  3771. // - AccessDeniedException
  3772. // You don't have permissions to perform the requested operation. The user or
  3773. // role that is making the request must have at least one IAM permissions policy
  3774. // attached that grants the required permissions. For more information, see
  3775. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  3776. // in the IAM User Guide.
  3777. //
  3778. // - AWSOrganizationsNotInUseException
  3779. // Your account isn't a member of an organization. To make this request, you
  3780. // must use the credentials of an account that belongs to an organization.
  3781. //
  3782. // - ConcurrentModificationException
  3783. // The target of the operation is currently being modified by a different request.
  3784. // Try again later.
  3785. //
  3786. // - InvalidInputException
  3787. // The requested operation failed because you provided invalid values for one
  3788. // or more of the request parameters. This exception includes a reason that
  3789. // contains additional information about the violated limit:
  3790. //
  3791. // Some of the reasons in the following list might not be applicable to this
  3792. // specific API or operation.
  3793. //
  3794. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  3795. // the same entity.
  3796. //
  3797. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  3798. // Services and can't be modified.
  3799. //
  3800. // - INPUT_REQUIRED: You must include a value for all required parameters.
  3801. //
  3802. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  3803. // for the invited account owner.
  3804. //
  3805. // - INVALID_ENUM: You specified an invalid value.
  3806. //
  3807. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  3808. //
  3809. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  3810. // characters.
  3811. //
  3812. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  3813. // at least one invalid value.
  3814. //
  3815. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  3816. // from the response to a previous call of the operation.
  3817. //
  3818. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  3819. // organization, or email) as a party.
  3820. //
  3821. // - INVALID_PATTERN: You provided a value that doesn't match the required
  3822. // pattern.
  3823. //
  3824. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  3825. // match the required pattern.
  3826. //
  3827. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  3828. // name can't begin with the reserved prefix AWSServiceRoleFor.
  3829. //
  3830. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  3831. // Name (ARN) for the organization.
  3832. //
  3833. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  3834. //
  3835. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  3836. // tag. You can’t add, edit, or delete system tag keys because they're
  3837. // reserved for Amazon Web Services use. System tags don’t count against
  3838. // your tags per resource limit.
  3839. //
  3840. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  3841. // for the operation.
  3842. //
  3843. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  3844. // than allowed.
  3845. //
  3846. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  3847. // value than allowed.
  3848. //
  3849. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  3850. // than allowed.
  3851. //
  3852. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  3853. // value than allowed.
  3854. //
  3855. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  3856. // between entities in the same root.
  3857. //
  3858. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  3859. // target entity.
  3860. //
  3861. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  3862. // isn't recognized.
  3863. //
  3864. // - PolicyInUseException
  3865. // The policy is attached to one or more entities. You must detach it from all
  3866. // roots, OUs, and accounts before performing this operation.
  3867. //
  3868. // - PolicyNotFoundException
  3869. // We can't find a policy with the PolicyId that you specified.
  3870. //
  3871. // - ServiceException
  3872. // Organizations can't complete your request because of an internal service
  3873. // error. Try again later.
  3874. //
  3875. // - TooManyRequestsException
  3876. // You have sent too many requests in too short a period of time. The quota
  3877. // helps protect against denial-of-service attacks. Try again later.
  3878. //
  3879. // For information about quotas that affect Organizations, see Quotas for Organizations
  3880. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  3881. // the Organizations User Guide.
  3882. //
  3883. // - UnsupportedAPIEndpointException
  3884. // This action isn't available in the current Amazon Web Services Region.
  3885. //
  3886. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeletePolicy
  3887. func (c *Organizations) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) {
  3888. req, out := c.DeletePolicyRequest(input)
  3889. return out, req.Send()
  3890. }
  3891. // DeletePolicyWithContext is the same as DeletePolicy with the addition of
  3892. // the ability to pass a context and additional request options.
  3893. //
  3894. // See DeletePolicy for details on how to use this API operation.
  3895. //
  3896. // The context must be non-nil and will be used for request cancellation. If
  3897. // the context is nil a panic will occur. In the future the SDK may create
  3898. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3899. // for more information on using Contexts.
  3900. func (c *Organizations) DeletePolicyWithContext(ctx aws.Context, input *DeletePolicyInput, opts ...request.Option) (*DeletePolicyOutput, error) {
  3901. req, out := c.DeletePolicyRequest(input)
  3902. req.SetContext(ctx)
  3903. req.ApplyOptions(opts...)
  3904. return out, req.Send()
  3905. }
  3906. const opDeleteResourcePolicy = "DeleteResourcePolicy"
  3907. // DeleteResourcePolicyRequest generates a "aws/request.Request" representing the
  3908. // client's request for the DeleteResourcePolicy operation. The "output" return
  3909. // value will be populated with the request's response once the request completes
  3910. // successfully.
  3911. //
  3912. // Use "Send" method on the returned Request to send the API call to the service.
  3913. // the "output" return value is not valid until after Send returns without error.
  3914. //
  3915. // See DeleteResourcePolicy for more information on using the DeleteResourcePolicy
  3916. // API call, and error handling.
  3917. //
  3918. // This method is useful when you want to inject custom logic or configuration
  3919. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3920. //
  3921. // // Example sending a request using the DeleteResourcePolicyRequest method.
  3922. // req, resp := client.DeleteResourcePolicyRequest(params)
  3923. //
  3924. // err := req.Send()
  3925. // if err == nil { // resp is now filled
  3926. // fmt.Println(resp)
  3927. // }
  3928. //
  3929. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeleteResourcePolicy
  3930. func (c *Organizations) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) {
  3931. op := &request.Operation{
  3932. Name: opDeleteResourcePolicy,
  3933. HTTPMethod: "POST",
  3934. HTTPPath: "/",
  3935. }
  3936. if input == nil {
  3937. input = &DeleteResourcePolicyInput{}
  3938. }
  3939. output = &DeleteResourcePolicyOutput{}
  3940. req = c.newRequest(op, input, output)
  3941. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3942. return
  3943. }
  3944. // DeleteResourcePolicy API operation for AWS Organizations.
  3945. //
  3946. // Deletes the resource policy from your organization.
  3947. //
  3948. // You can only call this operation from the organization's management account.
  3949. //
  3950. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3951. // with awserr.Error's Code and Message methods to get detailed information about
  3952. // the error.
  3953. //
  3954. // See the AWS API reference guide for AWS Organizations's
  3955. // API operation DeleteResourcePolicy for usage and error information.
  3956. //
  3957. // Returned Error Types:
  3958. //
  3959. // - AccessDeniedException
  3960. // You don't have permissions to perform the requested operation. The user or
  3961. // role that is making the request must have at least one IAM permissions policy
  3962. // attached that grants the required permissions. For more information, see
  3963. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  3964. // in the IAM User Guide.
  3965. //
  3966. // - ServiceException
  3967. // Organizations can't complete your request because of an internal service
  3968. // error. Try again later.
  3969. //
  3970. // - UnsupportedAPIEndpointException
  3971. // This action isn't available in the current Amazon Web Services Region.
  3972. //
  3973. // - TooManyRequestsException
  3974. // You have sent too many requests in too short a period of time. The quota
  3975. // helps protect against denial-of-service attacks. Try again later.
  3976. //
  3977. // For information about quotas that affect Organizations, see Quotas for Organizations
  3978. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  3979. // the Organizations User Guide.
  3980. //
  3981. // - ConcurrentModificationException
  3982. // The target of the operation is currently being modified by a different request.
  3983. // Try again later.
  3984. //
  3985. // - ConstraintViolationException
  3986. // Performing this operation violates a minimum or maximum value limit. For
  3987. // example, attempting to remove the last service control policy (SCP) from
  3988. // an OU or root, inviting or creating too many accounts to the organization,
  3989. // or attaching too many policies to an account, OU, or root. This exception
  3990. // includes a reason that contains additional information about the violated
  3991. // limit:
  3992. //
  3993. // Some of the reasons in the following list might not be applicable to this
  3994. // specific API or operation.
  3995. //
  3996. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  3997. // account from the organization. You can't remove the management account.
  3998. // Instead, after you remove all member accounts, delete the organization
  3999. // itself.
  4000. //
  4001. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  4002. // an account from the organization that doesn't yet have enough information
  4003. // to exist as a standalone account. This account requires you to first complete
  4004. // phone verification. Follow the steps at Removing a member account from
  4005. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  4006. // in the Organizations User Guide.
  4007. //
  4008. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  4009. // of accounts that you can create in one day.
  4010. //
  4011. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  4012. // the number of accounts in an organization. If you need more accounts,
  4013. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  4014. // to request an increase in your limit. Or the number of invitations that
  4015. // you tried to send would cause you to exceed the limit of accounts in your
  4016. // organization. Send fewer invitations or contact Amazon Web Services Support
  4017. // to request an increase in the number of accounts. Deleted and closed accounts
  4018. // still count toward your limit. If you get this exception when running
  4019. // a command immediately after creating the organization, wait one hour and
  4020. // try again. After an hour, if the command continues to fail with this error,
  4021. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  4022. //
  4023. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  4024. // register the management account of the organization as a delegated administrator
  4025. // for an Amazon Web Services service integrated with Organizations. You
  4026. // can designate only a member account as a delegated administrator.
  4027. //
  4028. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  4029. // account. To close the management account for the organization, you must
  4030. // first either remove or close all member accounts in the organization.
  4031. // Follow standard account closure process using root credentials.​
  4032. //
  4033. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  4034. // an account that is registered as a delegated administrator for a service
  4035. // integrated with your organization. To complete this operation, you must
  4036. // first deregister this account as a delegated administrator.
  4037. //
  4038. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  4039. // for the past 30 days.
  4040. //
  4041. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  4042. // of accounts that you can close at a time. ​
  4043. //
  4044. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  4045. // organization in the specified region, you must enable all features mode.
  4046. //
  4047. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  4048. // an Amazon Web Services account as a delegated administrator for an Amazon
  4049. // Web Services service that already has a delegated administrator. To complete
  4050. // this operation, you must first deregister any existing delegated administrators
  4051. // for this service.
  4052. //
  4053. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  4054. // valid for a limited period of time. You must resubmit the request and
  4055. // generate a new verfication code.
  4056. //
  4057. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  4058. // handshakes that you can send in one day.
  4059. //
  4060. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  4061. // supported payment method is associated with the account. Amazon Web Services
  4062. // does not support cards issued by financial institutions in Russia or Belarus.
  4063. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  4064. //
  4065. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  4066. // in this organization, you first must migrate the organization's management
  4067. // account to the marketplace that corresponds to the management account's
  4068. // address. For example, accounts with India addresses must be associated
  4069. // with the AISPL marketplace. All accounts in an organization must be associated
  4070. // with the same marketplace.
  4071. //
  4072. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  4073. // Web Services /> Regions in China. To create an organization, the master
  4074. // must have a valid business license. For more information, contact customer
  4075. // support.
  4076. //
  4077. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  4078. // must first provide a valid contact address and phone number for the management
  4079. // account. Then try the operation again.
  4080. //
  4081. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  4082. // management account must have an associated account in the Amazon Web Services
  4083. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  4084. // in the Amazon Web Services GovCloud User Guide.
  4085. //
  4086. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  4087. // with this management account, you first must associate a valid payment
  4088. // instrument, such as a credit card, with the account. Follow the steps
  4089. // at To leave an organization when all required account information has
  4090. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  4091. // in the Organizations User Guide.
  4092. //
  4093. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  4094. // to register more delegated administrators than allowed for the service
  4095. // principal.
  4096. //
  4097. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  4098. // number of policies of a certain type that can be attached to an entity
  4099. // at one time.
  4100. //
  4101. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  4102. // on this resource.
  4103. //
  4104. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  4105. // with this member account, you first must associate a valid payment instrument,
  4106. // such as a credit card, with the account. Follow the steps at To leave
  4107. // an organization when all required account information has not yet been
  4108. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  4109. // in the Organizations User Guide.
  4110. //
  4111. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  4112. // policy from an entity that would cause the entity to have fewer than the
  4113. // minimum number of policies of a certain type required.
  4114. //
  4115. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  4116. // that requires the organization to be configured to support all features.
  4117. // An organization that supports only consolidated billing features can't
  4118. // perform this operation.
  4119. //
  4120. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  4121. // too many levels deep.
  4122. //
  4123. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  4124. // that you can have in an organization.
  4125. //
  4126. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  4127. // is larger than the maximum size.
  4128. //
  4129. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  4130. // policies that you can have in an organization.
  4131. //
  4132. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  4133. // before you enabled service access. Call the EnableAWSServiceAccess API
  4134. // first.
  4135. //
  4136. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  4137. // tags that are not compliant with the tag policy requirements for this
  4138. // account.
  4139. //
  4140. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  4141. // there is a waiting period before you can remove it from the organization.
  4142. // If you get an error that indicates that a wait period is required, try
  4143. // again in a few days.
  4144. //
  4145. // - AWSOrganizationsNotInUseException
  4146. // Your account isn't a member of an organization. To make this request, you
  4147. // must use the credentials of an account that belongs to an organization.
  4148. //
  4149. // - ResourcePolicyNotFoundException
  4150. // We can't find a resource policy request with the parameter that you specified.
  4151. //
  4152. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeleteResourcePolicy
  4153. func (c *Organizations) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) {
  4154. req, out := c.DeleteResourcePolicyRequest(input)
  4155. return out, req.Send()
  4156. }
  4157. // DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of
  4158. // the ability to pass a context and additional request options.
  4159. //
  4160. // See DeleteResourcePolicy for details on how to use this API operation.
  4161. //
  4162. // The context must be non-nil and will be used for request cancellation. If
  4163. // the context is nil a panic will occur. In the future the SDK may create
  4164. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4165. // for more information on using Contexts.
  4166. func (c *Organizations) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) {
  4167. req, out := c.DeleteResourcePolicyRequest(input)
  4168. req.SetContext(ctx)
  4169. req.ApplyOptions(opts...)
  4170. return out, req.Send()
  4171. }
  4172. const opDeregisterDelegatedAdministrator = "DeregisterDelegatedAdministrator"
  4173. // DeregisterDelegatedAdministratorRequest generates a "aws/request.Request" representing the
  4174. // client's request for the DeregisterDelegatedAdministrator operation. The "output" return
  4175. // value will be populated with the request's response once the request completes
  4176. // successfully.
  4177. //
  4178. // Use "Send" method on the returned Request to send the API call to the service.
  4179. // the "output" return value is not valid until after Send returns without error.
  4180. //
  4181. // See DeregisterDelegatedAdministrator for more information on using the DeregisterDelegatedAdministrator
  4182. // API call, and error handling.
  4183. //
  4184. // This method is useful when you want to inject custom logic or configuration
  4185. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4186. //
  4187. // // Example sending a request using the DeregisterDelegatedAdministratorRequest method.
  4188. // req, resp := client.DeregisterDelegatedAdministratorRequest(params)
  4189. //
  4190. // err := req.Send()
  4191. // if err == nil { // resp is now filled
  4192. // fmt.Println(resp)
  4193. // }
  4194. //
  4195. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeregisterDelegatedAdministrator
  4196. func (c *Organizations) DeregisterDelegatedAdministratorRequest(input *DeregisterDelegatedAdministratorInput) (req *request.Request, output *DeregisterDelegatedAdministratorOutput) {
  4197. op := &request.Operation{
  4198. Name: opDeregisterDelegatedAdministrator,
  4199. HTTPMethod: "POST",
  4200. HTTPPath: "/",
  4201. }
  4202. if input == nil {
  4203. input = &DeregisterDelegatedAdministratorInput{}
  4204. }
  4205. output = &DeregisterDelegatedAdministratorOutput{}
  4206. req = c.newRequest(op, input, output)
  4207. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4208. return
  4209. }
  4210. // DeregisterDelegatedAdministrator API operation for AWS Organizations.
  4211. //
  4212. // Removes the specified member Amazon Web Services account as a delegated administrator
  4213. // for the specified Amazon Web Services service.
  4214. //
  4215. // Deregistering a delegated administrator can have unintended impacts on the
  4216. // functionality of the enabled Amazon Web Services service. See the documentation
  4217. // for the enabled service before you deregister a delegated administrator so
  4218. // that you understand any potential impacts.
  4219. //
  4220. // You can run this action only for Amazon Web Services services that support
  4221. // this feature. For a current list of services that support it, see the column
  4222. // Supports Delegated Administrator in the table at Amazon Web Services Services
  4223. // that you can use with Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html)
  4224. // in the Organizations User Guide.
  4225. //
  4226. // This operation can be called only from the organization's management account.
  4227. //
  4228. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4229. // with awserr.Error's Code and Message methods to get detailed information about
  4230. // the error.
  4231. //
  4232. // See the AWS API reference guide for AWS Organizations's
  4233. // API operation DeregisterDelegatedAdministrator for usage and error information.
  4234. //
  4235. // Returned Error Types:
  4236. //
  4237. // - AccessDeniedException
  4238. // You don't have permissions to perform the requested operation. The user or
  4239. // role that is making the request must have at least one IAM permissions policy
  4240. // attached that grants the required permissions. For more information, see
  4241. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  4242. // in the IAM User Guide.
  4243. //
  4244. // - AccountNotFoundException
  4245. // We can't find an Amazon Web Services account with the AccountId that you
  4246. // specified, or the account whose credentials you used to make this request
  4247. // isn't a member of an organization.
  4248. //
  4249. // - AccountNotRegisteredException
  4250. // The specified account is not a delegated administrator for this Amazon Web
  4251. // Services service.
  4252. //
  4253. // - AWSOrganizationsNotInUseException
  4254. // Your account isn't a member of an organization. To make this request, you
  4255. // must use the credentials of an account that belongs to an organization.
  4256. //
  4257. // - ConcurrentModificationException
  4258. // The target of the operation is currently being modified by a different request.
  4259. // Try again later.
  4260. //
  4261. // - ConstraintViolationException
  4262. // Performing this operation violates a minimum or maximum value limit. For
  4263. // example, attempting to remove the last service control policy (SCP) from
  4264. // an OU or root, inviting or creating too many accounts to the organization,
  4265. // or attaching too many policies to an account, OU, or root. This exception
  4266. // includes a reason that contains additional information about the violated
  4267. // limit:
  4268. //
  4269. // Some of the reasons in the following list might not be applicable to this
  4270. // specific API or operation.
  4271. //
  4272. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  4273. // account from the organization. You can't remove the management account.
  4274. // Instead, after you remove all member accounts, delete the organization
  4275. // itself.
  4276. //
  4277. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  4278. // an account from the organization that doesn't yet have enough information
  4279. // to exist as a standalone account. This account requires you to first complete
  4280. // phone verification. Follow the steps at Removing a member account from
  4281. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  4282. // in the Organizations User Guide.
  4283. //
  4284. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  4285. // of accounts that you can create in one day.
  4286. //
  4287. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  4288. // the number of accounts in an organization. If you need more accounts,
  4289. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  4290. // to request an increase in your limit. Or the number of invitations that
  4291. // you tried to send would cause you to exceed the limit of accounts in your
  4292. // organization. Send fewer invitations or contact Amazon Web Services Support
  4293. // to request an increase in the number of accounts. Deleted and closed accounts
  4294. // still count toward your limit. If you get this exception when running
  4295. // a command immediately after creating the organization, wait one hour and
  4296. // try again. After an hour, if the command continues to fail with this error,
  4297. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  4298. //
  4299. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  4300. // register the management account of the organization as a delegated administrator
  4301. // for an Amazon Web Services service integrated with Organizations. You
  4302. // can designate only a member account as a delegated administrator.
  4303. //
  4304. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  4305. // account. To close the management account for the organization, you must
  4306. // first either remove or close all member accounts in the organization.
  4307. // Follow standard account closure process using root credentials.​
  4308. //
  4309. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  4310. // an account that is registered as a delegated administrator for a service
  4311. // integrated with your organization. To complete this operation, you must
  4312. // first deregister this account as a delegated administrator.
  4313. //
  4314. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  4315. // for the past 30 days.
  4316. //
  4317. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  4318. // of accounts that you can close at a time. ​
  4319. //
  4320. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  4321. // organization in the specified region, you must enable all features mode.
  4322. //
  4323. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  4324. // an Amazon Web Services account as a delegated administrator for an Amazon
  4325. // Web Services service that already has a delegated administrator. To complete
  4326. // this operation, you must first deregister any existing delegated administrators
  4327. // for this service.
  4328. //
  4329. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  4330. // valid for a limited period of time. You must resubmit the request and
  4331. // generate a new verfication code.
  4332. //
  4333. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  4334. // handshakes that you can send in one day.
  4335. //
  4336. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  4337. // supported payment method is associated with the account. Amazon Web Services
  4338. // does not support cards issued by financial institutions in Russia or Belarus.
  4339. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  4340. //
  4341. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  4342. // in this organization, you first must migrate the organization's management
  4343. // account to the marketplace that corresponds to the management account's
  4344. // address. For example, accounts with India addresses must be associated
  4345. // with the AISPL marketplace. All accounts in an organization must be associated
  4346. // with the same marketplace.
  4347. //
  4348. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  4349. // Web Services /> Regions in China. To create an organization, the master
  4350. // must have a valid business license. For more information, contact customer
  4351. // support.
  4352. //
  4353. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  4354. // must first provide a valid contact address and phone number for the management
  4355. // account. Then try the operation again.
  4356. //
  4357. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  4358. // management account must have an associated account in the Amazon Web Services
  4359. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  4360. // in the Amazon Web Services GovCloud User Guide.
  4361. //
  4362. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  4363. // with this management account, you first must associate a valid payment
  4364. // instrument, such as a credit card, with the account. Follow the steps
  4365. // at To leave an organization when all required account information has
  4366. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  4367. // in the Organizations User Guide.
  4368. //
  4369. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  4370. // to register more delegated administrators than allowed for the service
  4371. // principal.
  4372. //
  4373. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  4374. // number of policies of a certain type that can be attached to an entity
  4375. // at one time.
  4376. //
  4377. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  4378. // on this resource.
  4379. //
  4380. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  4381. // with this member account, you first must associate a valid payment instrument,
  4382. // such as a credit card, with the account. Follow the steps at To leave
  4383. // an organization when all required account information has not yet been
  4384. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  4385. // in the Organizations User Guide.
  4386. //
  4387. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  4388. // policy from an entity that would cause the entity to have fewer than the
  4389. // minimum number of policies of a certain type required.
  4390. //
  4391. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  4392. // that requires the organization to be configured to support all features.
  4393. // An organization that supports only consolidated billing features can't
  4394. // perform this operation.
  4395. //
  4396. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  4397. // too many levels deep.
  4398. //
  4399. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  4400. // that you can have in an organization.
  4401. //
  4402. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  4403. // is larger than the maximum size.
  4404. //
  4405. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  4406. // policies that you can have in an organization.
  4407. //
  4408. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  4409. // before you enabled service access. Call the EnableAWSServiceAccess API
  4410. // first.
  4411. //
  4412. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  4413. // tags that are not compliant with the tag policy requirements for this
  4414. // account.
  4415. //
  4416. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  4417. // there is a waiting period before you can remove it from the organization.
  4418. // If you get an error that indicates that a wait period is required, try
  4419. // again in a few days.
  4420. //
  4421. // - InvalidInputException
  4422. // The requested operation failed because you provided invalid values for one
  4423. // or more of the request parameters. This exception includes a reason that
  4424. // contains additional information about the violated limit:
  4425. //
  4426. // Some of the reasons in the following list might not be applicable to this
  4427. // specific API or operation.
  4428. //
  4429. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  4430. // the same entity.
  4431. //
  4432. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  4433. // Services and can't be modified.
  4434. //
  4435. // - INPUT_REQUIRED: You must include a value for all required parameters.
  4436. //
  4437. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  4438. // for the invited account owner.
  4439. //
  4440. // - INVALID_ENUM: You specified an invalid value.
  4441. //
  4442. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  4443. //
  4444. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  4445. // characters.
  4446. //
  4447. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  4448. // at least one invalid value.
  4449. //
  4450. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  4451. // from the response to a previous call of the operation.
  4452. //
  4453. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  4454. // organization, or email) as a party.
  4455. //
  4456. // - INVALID_PATTERN: You provided a value that doesn't match the required
  4457. // pattern.
  4458. //
  4459. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  4460. // match the required pattern.
  4461. //
  4462. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  4463. // name can't begin with the reserved prefix AWSServiceRoleFor.
  4464. //
  4465. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  4466. // Name (ARN) for the organization.
  4467. //
  4468. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  4469. //
  4470. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  4471. // tag. You can’t add, edit, or delete system tag keys because they're
  4472. // reserved for Amazon Web Services use. System tags don’t count against
  4473. // your tags per resource limit.
  4474. //
  4475. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  4476. // for the operation.
  4477. //
  4478. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  4479. // than allowed.
  4480. //
  4481. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  4482. // value than allowed.
  4483. //
  4484. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  4485. // than allowed.
  4486. //
  4487. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  4488. // value than allowed.
  4489. //
  4490. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  4491. // between entities in the same root.
  4492. //
  4493. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  4494. // target entity.
  4495. //
  4496. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  4497. // isn't recognized.
  4498. //
  4499. // - TooManyRequestsException
  4500. // You have sent too many requests in too short a period of time. The quota
  4501. // helps protect against denial-of-service attacks. Try again later.
  4502. //
  4503. // For information about quotas that affect Organizations, see Quotas for Organizations
  4504. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  4505. // the Organizations User Guide.
  4506. //
  4507. // - ServiceException
  4508. // Organizations can't complete your request because of an internal service
  4509. // error. Try again later.
  4510. //
  4511. // - UnsupportedAPIEndpointException
  4512. // This action isn't available in the current Amazon Web Services Region.
  4513. //
  4514. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeregisterDelegatedAdministrator
  4515. func (c *Organizations) DeregisterDelegatedAdministrator(input *DeregisterDelegatedAdministratorInput) (*DeregisterDelegatedAdministratorOutput, error) {
  4516. req, out := c.DeregisterDelegatedAdministratorRequest(input)
  4517. return out, req.Send()
  4518. }
  4519. // DeregisterDelegatedAdministratorWithContext is the same as DeregisterDelegatedAdministrator with the addition of
  4520. // the ability to pass a context and additional request options.
  4521. //
  4522. // See DeregisterDelegatedAdministrator for details on how to use this API operation.
  4523. //
  4524. // The context must be non-nil and will be used for request cancellation. If
  4525. // the context is nil a panic will occur. In the future the SDK may create
  4526. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4527. // for more information on using Contexts.
  4528. func (c *Organizations) DeregisterDelegatedAdministratorWithContext(ctx aws.Context, input *DeregisterDelegatedAdministratorInput, opts ...request.Option) (*DeregisterDelegatedAdministratorOutput, error) {
  4529. req, out := c.DeregisterDelegatedAdministratorRequest(input)
  4530. req.SetContext(ctx)
  4531. req.ApplyOptions(opts...)
  4532. return out, req.Send()
  4533. }
  4534. const opDescribeAccount = "DescribeAccount"
  4535. // DescribeAccountRequest generates a "aws/request.Request" representing the
  4536. // client's request for the DescribeAccount operation. The "output" return
  4537. // value will be populated with the request's response once the request completes
  4538. // successfully.
  4539. //
  4540. // Use "Send" method on the returned Request to send the API call to the service.
  4541. // the "output" return value is not valid until after Send returns without error.
  4542. //
  4543. // See DescribeAccount for more information on using the DescribeAccount
  4544. // API call, and error handling.
  4545. //
  4546. // This method is useful when you want to inject custom logic or configuration
  4547. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4548. //
  4549. // // Example sending a request using the DescribeAccountRequest method.
  4550. // req, resp := client.DescribeAccountRequest(params)
  4551. //
  4552. // err := req.Send()
  4553. // if err == nil { // resp is now filled
  4554. // fmt.Println(resp)
  4555. // }
  4556. //
  4557. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeAccount
  4558. func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req *request.Request, output *DescribeAccountOutput) {
  4559. op := &request.Operation{
  4560. Name: opDescribeAccount,
  4561. HTTPMethod: "POST",
  4562. HTTPPath: "/",
  4563. }
  4564. if input == nil {
  4565. input = &DescribeAccountInput{}
  4566. }
  4567. output = &DescribeAccountOutput{}
  4568. req = c.newRequest(op, input, output)
  4569. return
  4570. }
  4571. // DescribeAccount API operation for AWS Organizations.
  4572. //
  4573. // Retrieves Organizations-related information about the specified account.
  4574. //
  4575. // This operation can be called only from the organization's management account
  4576. // or by a member account that is a delegated administrator for an Amazon Web
  4577. // Services service.
  4578. //
  4579. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4580. // with awserr.Error's Code and Message methods to get detailed information about
  4581. // the error.
  4582. //
  4583. // See the AWS API reference guide for AWS Organizations's
  4584. // API operation DescribeAccount for usage and error information.
  4585. //
  4586. // Returned Error Types:
  4587. //
  4588. // - AccessDeniedException
  4589. // You don't have permissions to perform the requested operation. The user or
  4590. // role that is making the request must have at least one IAM permissions policy
  4591. // attached that grants the required permissions. For more information, see
  4592. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  4593. // in the IAM User Guide.
  4594. //
  4595. // - AccountNotFoundException
  4596. // We can't find an Amazon Web Services account with the AccountId that you
  4597. // specified, or the account whose credentials you used to make this request
  4598. // isn't a member of an organization.
  4599. //
  4600. // - AWSOrganizationsNotInUseException
  4601. // Your account isn't a member of an organization. To make this request, you
  4602. // must use the credentials of an account that belongs to an organization.
  4603. //
  4604. // - InvalidInputException
  4605. // The requested operation failed because you provided invalid values for one
  4606. // or more of the request parameters. This exception includes a reason that
  4607. // contains additional information about the violated limit:
  4608. //
  4609. // Some of the reasons in the following list might not be applicable to this
  4610. // specific API or operation.
  4611. //
  4612. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  4613. // the same entity.
  4614. //
  4615. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  4616. // Services and can't be modified.
  4617. //
  4618. // - INPUT_REQUIRED: You must include a value for all required parameters.
  4619. //
  4620. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  4621. // for the invited account owner.
  4622. //
  4623. // - INVALID_ENUM: You specified an invalid value.
  4624. //
  4625. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  4626. //
  4627. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  4628. // characters.
  4629. //
  4630. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  4631. // at least one invalid value.
  4632. //
  4633. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  4634. // from the response to a previous call of the operation.
  4635. //
  4636. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  4637. // organization, or email) as a party.
  4638. //
  4639. // - INVALID_PATTERN: You provided a value that doesn't match the required
  4640. // pattern.
  4641. //
  4642. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  4643. // match the required pattern.
  4644. //
  4645. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  4646. // name can't begin with the reserved prefix AWSServiceRoleFor.
  4647. //
  4648. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  4649. // Name (ARN) for the organization.
  4650. //
  4651. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  4652. //
  4653. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  4654. // tag. You can’t add, edit, or delete system tag keys because they're
  4655. // reserved for Amazon Web Services use. System tags don’t count against
  4656. // your tags per resource limit.
  4657. //
  4658. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  4659. // for the operation.
  4660. //
  4661. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  4662. // than allowed.
  4663. //
  4664. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  4665. // value than allowed.
  4666. //
  4667. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  4668. // than allowed.
  4669. //
  4670. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  4671. // value than allowed.
  4672. //
  4673. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  4674. // between entities in the same root.
  4675. //
  4676. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  4677. // target entity.
  4678. //
  4679. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  4680. // isn't recognized.
  4681. //
  4682. // - ServiceException
  4683. // Organizations can't complete your request because of an internal service
  4684. // error. Try again later.
  4685. //
  4686. // - TooManyRequestsException
  4687. // You have sent too many requests in too short a period of time. The quota
  4688. // helps protect against denial-of-service attacks. Try again later.
  4689. //
  4690. // For information about quotas that affect Organizations, see Quotas for Organizations
  4691. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  4692. // the Organizations User Guide.
  4693. //
  4694. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeAccount
  4695. func (c *Organizations) DescribeAccount(input *DescribeAccountInput) (*DescribeAccountOutput, error) {
  4696. req, out := c.DescribeAccountRequest(input)
  4697. return out, req.Send()
  4698. }
  4699. // DescribeAccountWithContext is the same as DescribeAccount with the addition of
  4700. // the ability to pass a context and additional request options.
  4701. //
  4702. // See DescribeAccount for details on how to use this API operation.
  4703. //
  4704. // The context must be non-nil and will be used for request cancellation. If
  4705. // the context is nil a panic will occur. In the future the SDK may create
  4706. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4707. // for more information on using Contexts.
  4708. func (c *Organizations) DescribeAccountWithContext(ctx aws.Context, input *DescribeAccountInput, opts ...request.Option) (*DescribeAccountOutput, error) {
  4709. req, out := c.DescribeAccountRequest(input)
  4710. req.SetContext(ctx)
  4711. req.ApplyOptions(opts...)
  4712. return out, req.Send()
  4713. }
  4714. const opDescribeCreateAccountStatus = "DescribeCreateAccountStatus"
  4715. // DescribeCreateAccountStatusRequest generates a "aws/request.Request" representing the
  4716. // client's request for the DescribeCreateAccountStatus operation. The "output" return
  4717. // value will be populated with the request's response once the request completes
  4718. // successfully.
  4719. //
  4720. // Use "Send" method on the returned Request to send the API call to the service.
  4721. // the "output" return value is not valid until after Send returns without error.
  4722. //
  4723. // See DescribeCreateAccountStatus for more information on using the DescribeCreateAccountStatus
  4724. // API call, and error handling.
  4725. //
  4726. // This method is useful when you want to inject custom logic or configuration
  4727. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4728. //
  4729. // // Example sending a request using the DescribeCreateAccountStatusRequest method.
  4730. // req, resp := client.DescribeCreateAccountStatusRequest(params)
  4731. //
  4732. // err := req.Send()
  4733. // if err == nil { // resp is now filled
  4734. // fmt.Println(resp)
  4735. // }
  4736. //
  4737. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeCreateAccountStatus
  4738. func (c *Organizations) DescribeCreateAccountStatusRequest(input *DescribeCreateAccountStatusInput) (req *request.Request, output *DescribeCreateAccountStatusOutput) {
  4739. op := &request.Operation{
  4740. Name: opDescribeCreateAccountStatus,
  4741. HTTPMethod: "POST",
  4742. HTTPPath: "/",
  4743. }
  4744. if input == nil {
  4745. input = &DescribeCreateAccountStatusInput{}
  4746. }
  4747. output = &DescribeCreateAccountStatusOutput{}
  4748. req = c.newRequest(op, input, output)
  4749. return
  4750. }
  4751. // DescribeCreateAccountStatus API operation for AWS Organizations.
  4752. //
  4753. // Retrieves the current status of an asynchronous request to create an account.
  4754. //
  4755. // This operation can be called only from the organization's management account
  4756. // or by a member account that is a delegated administrator for an Amazon Web
  4757. // Services service.
  4758. //
  4759. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4760. // with awserr.Error's Code and Message methods to get detailed information about
  4761. // the error.
  4762. //
  4763. // See the AWS API reference guide for AWS Organizations's
  4764. // API operation DescribeCreateAccountStatus for usage and error information.
  4765. //
  4766. // Returned Error Types:
  4767. //
  4768. // - AccessDeniedException
  4769. // You don't have permissions to perform the requested operation. The user or
  4770. // role that is making the request must have at least one IAM permissions policy
  4771. // attached that grants the required permissions. For more information, see
  4772. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  4773. // in the IAM User Guide.
  4774. //
  4775. // - AWSOrganizationsNotInUseException
  4776. // Your account isn't a member of an organization. To make this request, you
  4777. // must use the credentials of an account that belongs to an organization.
  4778. //
  4779. // - CreateAccountStatusNotFoundException
  4780. // We can't find an create account request with the CreateAccountRequestId that
  4781. // you specified.
  4782. //
  4783. // - InvalidInputException
  4784. // The requested operation failed because you provided invalid values for one
  4785. // or more of the request parameters. This exception includes a reason that
  4786. // contains additional information about the violated limit:
  4787. //
  4788. // Some of the reasons in the following list might not be applicable to this
  4789. // specific API or operation.
  4790. //
  4791. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  4792. // the same entity.
  4793. //
  4794. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  4795. // Services and can't be modified.
  4796. //
  4797. // - INPUT_REQUIRED: You must include a value for all required parameters.
  4798. //
  4799. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  4800. // for the invited account owner.
  4801. //
  4802. // - INVALID_ENUM: You specified an invalid value.
  4803. //
  4804. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  4805. //
  4806. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  4807. // characters.
  4808. //
  4809. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  4810. // at least one invalid value.
  4811. //
  4812. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  4813. // from the response to a previous call of the operation.
  4814. //
  4815. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  4816. // organization, or email) as a party.
  4817. //
  4818. // - INVALID_PATTERN: You provided a value that doesn't match the required
  4819. // pattern.
  4820. //
  4821. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  4822. // match the required pattern.
  4823. //
  4824. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  4825. // name can't begin with the reserved prefix AWSServiceRoleFor.
  4826. //
  4827. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  4828. // Name (ARN) for the organization.
  4829. //
  4830. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  4831. //
  4832. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  4833. // tag. You can’t add, edit, or delete system tag keys because they're
  4834. // reserved for Amazon Web Services use. System tags don’t count against
  4835. // your tags per resource limit.
  4836. //
  4837. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  4838. // for the operation.
  4839. //
  4840. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  4841. // than allowed.
  4842. //
  4843. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  4844. // value than allowed.
  4845. //
  4846. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  4847. // than allowed.
  4848. //
  4849. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  4850. // value than allowed.
  4851. //
  4852. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  4853. // between entities in the same root.
  4854. //
  4855. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  4856. // target entity.
  4857. //
  4858. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  4859. // isn't recognized.
  4860. //
  4861. // - ServiceException
  4862. // Organizations can't complete your request because of an internal service
  4863. // error. Try again later.
  4864. //
  4865. // - TooManyRequestsException
  4866. // You have sent too many requests in too short a period of time. The quota
  4867. // helps protect against denial-of-service attacks. Try again later.
  4868. //
  4869. // For information about quotas that affect Organizations, see Quotas for Organizations
  4870. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  4871. // the Organizations User Guide.
  4872. //
  4873. // - UnsupportedAPIEndpointException
  4874. // This action isn't available in the current Amazon Web Services Region.
  4875. //
  4876. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeCreateAccountStatus
  4877. func (c *Organizations) DescribeCreateAccountStatus(input *DescribeCreateAccountStatusInput) (*DescribeCreateAccountStatusOutput, error) {
  4878. req, out := c.DescribeCreateAccountStatusRequest(input)
  4879. return out, req.Send()
  4880. }
  4881. // DescribeCreateAccountStatusWithContext is the same as DescribeCreateAccountStatus with the addition of
  4882. // the ability to pass a context and additional request options.
  4883. //
  4884. // See DescribeCreateAccountStatus for details on how to use this API operation.
  4885. //
  4886. // The context must be non-nil and will be used for request cancellation. If
  4887. // the context is nil a panic will occur. In the future the SDK may create
  4888. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4889. // for more information on using Contexts.
  4890. func (c *Organizations) DescribeCreateAccountStatusWithContext(ctx aws.Context, input *DescribeCreateAccountStatusInput, opts ...request.Option) (*DescribeCreateAccountStatusOutput, error) {
  4891. req, out := c.DescribeCreateAccountStatusRequest(input)
  4892. req.SetContext(ctx)
  4893. req.ApplyOptions(opts...)
  4894. return out, req.Send()
  4895. }
  4896. const opDescribeEffectivePolicy = "DescribeEffectivePolicy"
  4897. // DescribeEffectivePolicyRequest generates a "aws/request.Request" representing the
  4898. // client's request for the DescribeEffectivePolicy operation. The "output" return
  4899. // value will be populated with the request's response once the request completes
  4900. // successfully.
  4901. //
  4902. // Use "Send" method on the returned Request to send the API call to the service.
  4903. // the "output" return value is not valid until after Send returns without error.
  4904. //
  4905. // See DescribeEffectivePolicy for more information on using the DescribeEffectivePolicy
  4906. // API call, and error handling.
  4907. //
  4908. // This method is useful when you want to inject custom logic or configuration
  4909. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4910. //
  4911. // // Example sending a request using the DescribeEffectivePolicyRequest method.
  4912. // req, resp := client.DescribeEffectivePolicyRequest(params)
  4913. //
  4914. // err := req.Send()
  4915. // if err == nil { // resp is now filled
  4916. // fmt.Println(resp)
  4917. // }
  4918. //
  4919. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeEffectivePolicy
  4920. func (c *Organizations) DescribeEffectivePolicyRequest(input *DescribeEffectivePolicyInput) (req *request.Request, output *DescribeEffectivePolicyOutput) {
  4921. op := &request.Operation{
  4922. Name: opDescribeEffectivePolicy,
  4923. HTTPMethod: "POST",
  4924. HTTPPath: "/",
  4925. }
  4926. if input == nil {
  4927. input = &DescribeEffectivePolicyInput{}
  4928. }
  4929. output = &DescribeEffectivePolicyOutput{}
  4930. req = c.newRequest(op, input, output)
  4931. return
  4932. }
  4933. // DescribeEffectivePolicy API operation for AWS Organizations.
  4934. //
  4935. // Returns the contents of the effective policy for specified policy type and
  4936. // account. The effective policy is the aggregation of any policies of the specified
  4937. // type that the account inherits, plus any policy of that type that is directly
  4938. // attached to the account.
  4939. //
  4940. // This operation applies only to policy types other than service control policies
  4941. // (SCPs).
  4942. //
  4943. // For more information about policy inheritance, see How Policy Inheritance
  4944. // Works (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies-inheritance.html)
  4945. // in the Organizations User Guide.
  4946. //
  4947. // This operation can be called only from the organization's management account
  4948. // or by a member account that is a delegated administrator for an Amazon Web
  4949. // Services service.
  4950. //
  4951. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4952. // with awserr.Error's Code and Message methods to get detailed information about
  4953. // the error.
  4954. //
  4955. // See the AWS API reference guide for AWS Organizations's
  4956. // API operation DescribeEffectivePolicy for usage and error information.
  4957. //
  4958. // Returned Error Types:
  4959. //
  4960. // - AccessDeniedException
  4961. // You don't have permissions to perform the requested operation. The user or
  4962. // role that is making the request must have at least one IAM permissions policy
  4963. // attached that grants the required permissions. For more information, see
  4964. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  4965. // in the IAM User Guide.
  4966. //
  4967. // - AWSOrganizationsNotInUseException
  4968. // Your account isn't a member of an organization. To make this request, you
  4969. // must use the credentials of an account that belongs to an organization.
  4970. //
  4971. // - ConstraintViolationException
  4972. // Performing this operation violates a minimum or maximum value limit. For
  4973. // example, attempting to remove the last service control policy (SCP) from
  4974. // an OU or root, inviting or creating too many accounts to the organization,
  4975. // or attaching too many policies to an account, OU, or root. This exception
  4976. // includes a reason that contains additional information about the violated
  4977. // limit:
  4978. //
  4979. // Some of the reasons in the following list might not be applicable to this
  4980. // specific API or operation.
  4981. //
  4982. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  4983. // account from the organization. You can't remove the management account.
  4984. // Instead, after you remove all member accounts, delete the organization
  4985. // itself.
  4986. //
  4987. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  4988. // an account from the organization that doesn't yet have enough information
  4989. // to exist as a standalone account. This account requires you to first complete
  4990. // phone verification. Follow the steps at Removing a member account from
  4991. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  4992. // in the Organizations User Guide.
  4993. //
  4994. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  4995. // of accounts that you can create in one day.
  4996. //
  4997. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  4998. // the number of accounts in an organization. If you need more accounts,
  4999. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  5000. // to request an increase in your limit. Or the number of invitations that
  5001. // you tried to send would cause you to exceed the limit of accounts in your
  5002. // organization. Send fewer invitations or contact Amazon Web Services Support
  5003. // to request an increase in the number of accounts. Deleted and closed accounts
  5004. // still count toward your limit. If you get this exception when running
  5005. // a command immediately after creating the organization, wait one hour and
  5006. // try again. After an hour, if the command continues to fail with this error,
  5007. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  5008. //
  5009. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  5010. // register the management account of the organization as a delegated administrator
  5011. // for an Amazon Web Services service integrated with Organizations. You
  5012. // can designate only a member account as a delegated administrator.
  5013. //
  5014. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  5015. // account. To close the management account for the organization, you must
  5016. // first either remove or close all member accounts in the organization.
  5017. // Follow standard account closure process using root credentials.​
  5018. //
  5019. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  5020. // an account that is registered as a delegated administrator for a service
  5021. // integrated with your organization. To complete this operation, you must
  5022. // first deregister this account as a delegated administrator.
  5023. //
  5024. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  5025. // for the past 30 days.
  5026. //
  5027. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  5028. // of accounts that you can close at a time. ​
  5029. //
  5030. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  5031. // organization in the specified region, you must enable all features mode.
  5032. //
  5033. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  5034. // an Amazon Web Services account as a delegated administrator for an Amazon
  5035. // Web Services service that already has a delegated administrator. To complete
  5036. // this operation, you must first deregister any existing delegated administrators
  5037. // for this service.
  5038. //
  5039. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  5040. // valid for a limited period of time. You must resubmit the request and
  5041. // generate a new verfication code.
  5042. //
  5043. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  5044. // handshakes that you can send in one day.
  5045. //
  5046. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  5047. // supported payment method is associated with the account. Amazon Web Services
  5048. // does not support cards issued by financial institutions in Russia or Belarus.
  5049. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  5050. //
  5051. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  5052. // in this organization, you first must migrate the organization's management
  5053. // account to the marketplace that corresponds to the management account's
  5054. // address. For example, accounts with India addresses must be associated
  5055. // with the AISPL marketplace. All accounts in an organization must be associated
  5056. // with the same marketplace.
  5057. //
  5058. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  5059. // Web Services /> Regions in China. To create an organization, the master
  5060. // must have a valid business license. For more information, contact customer
  5061. // support.
  5062. //
  5063. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  5064. // must first provide a valid contact address and phone number for the management
  5065. // account. Then try the operation again.
  5066. //
  5067. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  5068. // management account must have an associated account in the Amazon Web Services
  5069. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  5070. // in the Amazon Web Services GovCloud User Guide.
  5071. //
  5072. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  5073. // with this management account, you first must associate a valid payment
  5074. // instrument, such as a credit card, with the account. Follow the steps
  5075. // at To leave an organization when all required account information has
  5076. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  5077. // in the Organizations User Guide.
  5078. //
  5079. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  5080. // to register more delegated administrators than allowed for the service
  5081. // principal.
  5082. //
  5083. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  5084. // number of policies of a certain type that can be attached to an entity
  5085. // at one time.
  5086. //
  5087. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  5088. // on this resource.
  5089. //
  5090. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  5091. // with this member account, you first must associate a valid payment instrument,
  5092. // such as a credit card, with the account. Follow the steps at To leave
  5093. // an organization when all required account information has not yet been
  5094. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  5095. // in the Organizations User Guide.
  5096. //
  5097. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  5098. // policy from an entity that would cause the entity to have fewer than the
  5099. // minimum number of policies of a certain type required.
  5100. //
  5101. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  5102. // that requires the organization to be configured to support all features.
  5103. // An organization that supports only consolidated billing features can't
  5104. // perform this operation.
  5105. //
  5106. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  5107. // too many levels deep.
  5108. //
  5109. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  5110. // that you can have in an organization.
  5111. //
  5112. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  5113. // is larger than the maximum size.
  5114. //
  5115. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  5116. // policies that you can have in an organization.
  5117. //
  5118. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  5119. // before you enabled service access. Call the EnableAWSServiceAccess API
  5120. // first.
  5121. //
  5122. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  5123. // tags that are not compliant with the tag policy requirements for this
  5124. // account.
  5125. //
  5126. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  5127. // there is a waiting period before you can remove it from the organization.
  5128. // If you get an error that indicates that a wait period is required, try
  5129. // again in a few days.
  5130. //
  5131. // - ServiceException
  5132. // Organizations can't complete your request because of an internal service
  5133. // error. Try again later.
  5134. //
  5135. // - TooManyRequestsException
  5136. // You have sent too many requests in too short a period of time. The quota
  5137. // helps protect against denial-of-service attacks. Try again later.
  5138. //
  5139. // For information about quotas that affect Organizations, see Quotas for Organizations
  5140. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  5141. // the Organizations User Guide.
  5142. //
  5143. // - TargetNotFoundException
  5144. // We can't find a root, OU, account, or policy with the TargetId that you specified.
  5145. //
  5146. // - EffectivePolicyNotFoundException
  5147. // If you ran this action on the management account, this policy type is not
  5148. // enabled. If you ran the action on a member account, the account doesn't have
  5149. // an effective policy of this type. Contact the administrator of your organization
  5150. // about attaching a policy of this type to the account.
  5151. //
  5152. // - InvalidInputException
  5153. // The requested operation failed because you provided invalid values for one
  5154. // or more of the request parameters. This exception includes a reason that
  5155. // contains additional information about the violated limit:
  5156. //
  5157. // Some of the reasons in the following list might not be applicable to this
  5158. // specific API or operation.
  5159. //
  5160. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  5161. // the same entity.
  5162. //
  5163. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  5164. // Services and can't be modified.
  5165. //
  5166. // - INPUT_REQUIRED: You must include a value for all required parameters.
  5167. //
  5168. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  5169. // for the invited account owner.
  5170. //
  5171. // - INVALID_ENUM: You specified an invalid value.
  5172. //
  5173. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  5174. //
  5175. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  5176. // characters.
  5177. //
  5178. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  5179. // at least one invalid value.
  5180. //
  5181. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  5182. // from the response to a previous call of the operation.
  5183. //
  5184. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  5185. // organization, or email) as a party.
  5186. //
  5187. // - INVALID_PATTERN: You provided a value that doesn't match the required
  5188. // pattern.
  5189. //
  5190. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  5191. // match the required pattern.
  5192. //
  5193. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  5194. // name can't begin with the reserved prefix AWSServiceRoleFor.
  5195. //
  5196. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  5197. // Name (ARN) for the organization.
  5198. //
  5199. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  5200. //
  5201. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  5202. // tag. You can’t add, edit, or delete system tag keys because they're
  5203. // reserved for Amazon Web Services use. System tags don’t count against
  5204. // your tags per resource limit.
  5205. //
  5206. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  5207. // for the operation.
  5208. //
  5209. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  5210. // than allowed.
  5211. //
  5212. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  5213. // value than allowed.
  5214. //
  5215. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  5216. // than allowed.
  5217. //
  5218. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  5219. // value than allowed.
  5220. //
  5221. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  5222. // between entities in the same root.
  5223. //
  5224. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  5225. // target entity.
  5226. //
  5227. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  5228. // isn't recognized.
  5229. //
  5230. // - UnsupportedAPIEndpointException
  5231. // This action isn't available in the current Amazon Web Services Region.
  5232. //
  5233. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeEffectivePolicy
  5234. func (c *Organizations) DescribeEffectivePolicy(input *DescribeEffectivePolicyInput) (*DescribeEffectivePolicyOutput, error) {
  5235. req, out := c.DescribeEffectivePolicyRequest(input)
  5236. return out, req.Send()
  5237. }
  5238. // DescribeEffectivePolicyWithContext is the same as DescribeEffectivePolicy with the addition of
  5239. // the ability to pass a context and additional request options.
  5240. //
  5241. // See DescribeEffectivePolicy for details on how to use this API operation.
  5242. //
  5243. // The context must be non-nil and will be used for request cancellation. If
  5244. // the context is nil a panic will occur. In the future the SDK may create
  5245. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5246. // for more information on using Contexts.
  5247. func (c *Organizations) DescribeEffectivePolicyWithContext(ctx aws.Context, input *DescribeEffectivePolicyInput, opts ...request.Option) (*DescribeEffectivePolicyOutput, error) {
  5248. req, out := c.DescribeEffectivePolicyRequest(input)
  5249. req.SetContext(ctx)
  5250. req.ApplyOptions(opts...)
  5251. return out, req.Send()
  5252. }
  5253. const opDescribeHandshake = "DescribeHandshake"
  5254. // DescribeHandshakeRequest generates a "aws/request.Request" representing the
  5255. // client's request for the DescribeHandshake operation. The "output" return
  5256. // value will be populated with the request's response once the request completes
  5257. // successfully.
  5258. //
  5259. // Use "Send" method on the returned Request to send the API call to the service.
  5260. // the "output" return value is not valid until after Send returns without error.
  5261. //
  5262. // See DescribeHandshake for more information on using the DescribeHandshake
  5263. // API call, and error handling.
  5264. //
  5265. // This method is useful when you want to inject custom logic or configuration
  5266. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5267. //
  5268. // // Example sending a request using the DescribeHandshakeRequest method.
  5269. // req, resp := client.DescribeHandshakeRequest(params)
  5270. //
  5271. // err := req.Send()
  5272. // if err == nil { // resp is now filled
  5273. // fmt.Println(resp)
  5274. // }
  5275. //
  5276. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeHandshake
  5277. func (c *Organizations) DescribeHandshakeRequest(input *DescribeHandshakeInput) (req *request.Request, output *DescribeHandshakeOutput) {
  5278. op := &request.Operation{
  5279. Name: opDescribeHandshake,
  5280. HTTPMethod: "POST",
  5281. HTTPPath: "/",
  5282. }
  5283. if input == nil {
  5284. input = &DescribeHandshakeInput{}
  5285. }
  5286. output = &DescribeHandshakeOutput{}
  5287. req = c.newRequest(op, input, output)
  5288. return
  5289. }
  5290. // DescribeHandshake API operation for AWS Organizations.
  5291. //
  5292. // Retrieves information about a previously requested handshake. The handshake
  5293. // ID comes from the response to the original InviteAccountToOrganization operation
  5294. // that generated the handshake.
  5295. //
  5296. // You can access handshakes that are ACCEPTED, DECLINED, or CANCELED for only
  5297. // 30 days after they change to that state. They're then deleted and no longer
  5298. // accessible.
  5299. //
  5300. // This operation can be called from any account in the organization.
  5301. //
  5302. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5303. // with awserr.Error's Code and Message methods to get detailed information about
  5304. // the error.
  5305. //
  5306. // See the AWS API reference guide for AWS Organizations's
  5307. // API operation DescribeHandshake for usage and error information.
  5308. //
  5309. // Returned Error Types:
  5310. //
  5311. // - AccessDeniedException
  5312. // You don't have permissions to perform the requested operation. The user or
  5313. // role that is making the request must have at least one IAM permissions policy
  5314. // attached that grants the required permissions. For more information, see
  5315. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  5316. // in the IAM User Guide.
  5317. //
  5318. // - ConcurrentModificationException
  5319. // The target of the operation is currently being modified by a different request.
  5320. // Try again later.
  5321. //
  5322. // - HandshakeNotFoundException
  5323. // We can't find a handshake with the HandshakeId that you specified.
  5324. //
  5325. // - InvalidInputException
  5326. // The requested operation failed because you provided invalid values for one
  5327. // or more of the request parameters. This exception includes a reason that
  5328. // contains additional information about the violated limit:
  5329. //
  5330. // Some of the reasons in the following list might not be applicable to this
  5331. // specific API or operation.
  5332. //
  5333. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  5334. // the same entity.
  5335. //
  5336. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  5337. // Services and can't be modified.
  5338. //
  5339. // - INPUT_REQUIRED: You must include a value for all required parameters.
  5340. //
  5341. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  5342. // for the invited account owner.
  5343. //
  5344. // - INVALID_ENUM: You specified an invalid value.
  5345. //
  5346. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  5347. //
  5348. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  5349. // characters.
  5350. //
  5351. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  5352. // at least one invalid value.
  5353. //
  5354. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  5355. // from the response to a previous call of the operation.
  5356. //
  5357. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  5358. // organization, or email) as a party.
  5359. //
  5360. // - INVALID_PATTERN: You provided a value that doesn't match the required
  5361. // pattern.
  5362. //
  5363. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  5364. // match the required pattern.
  5365. //
  5366. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  5367. // name can't begin with the reserved prefix AWSServiceRoleFor.
  5368. //
  5369. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  5370. // Name (ARN) for the organization.
  5371. //
  5372. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  5373. //
  5374. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  5375. // tag. You can’t add, edit, or delete system tag keys because they're
  5376. // reserved for Amazon Web Services use. System tags don’t count against
  5377. // your tags per resource limit.
  5378. //
  5379. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  5380. // for the operation.
  5381. //
  5382. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  5383. // than allowed.
  5384. //
  5385. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  5386. // value than allowed.
  5387. //
  5388. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  5389. // than allowed.
  5390. //
  5391. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  5392. // value than allowed.
  5393. //
  5394. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  5395. // between entities in the same root.
  5396. //
  5397. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  5398. // target entity.
  5399. //
  5400. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  5401. // isn't recognized.
  5402. //
  5403. // - ServiceException
  5404. // Organizations can't complete your request because of an internal service
  5405. // error. Try again later.
  5406. //
  5407. // - TooManyRequestsException
  5408. // You have sent too many requests in too short a period of time. The quota
  5409. // helps protect against denial-of-service attacks. Try again later.
  5410. //
  5411. // For information about quotas that affect Organizations, see Quotas for Organizations
  5412. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  5413. // the Organizations User Guide.
  5414. //
  5415. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeHandshake
  5416. func (c *Organizations) DescribeHandshake(input *DescribeHandshakeInput) (*DescribeHandshakeOutput, error) {
  5417. req, out := c.DescribeHandshakeRequest(input)
  5418. return out, req.Send()
  5419. }
  5420. // DescribeHandshakeWithContext is the same as DescribeHandshake with the addition of
  5421. // the ability to pass a context and additional request options.
  5422. //
  5423. // See DescribeHandshake for details on how to use this API operation.
  5424. //
  5425. // The context must be non-nil and will be used for request cancellation. If
  5426. // the context is nil a panic will occur. In the future the SDK may create
  5427. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5428. // for more information on using Contexts.
  5429. func (c *Organizations) DescribeHandshakeWithContext(ctx aws.Context, input *DescribeHandshakeInput, opts ...request.Option) (*DescribeHandshakeOutput, error) {
  5430. req, out := c.DescribeHandshakeRequest(input)
  5431. req.SetContext(ctx)
  5432. req.ApplyOptions(opts...)
  5433. return out, req.Send()
  5434. }
  5435. const opDescribeOrganization = "DescribeOrganization"
  5436. // DescribeOrganizationRequest generates a "aws/request.Request" representing the
  5437. // client's request for the DescribeOrganization operation. The "output" return
  5438. // value will be populated with the request's response once the request completes
  5439. // successfully.
  5440. //
  5441. // Use "Send" method on the returned Request to send the API call to the service.
  5442. // the "output" return value is not valid until after Send returns without error.
  5443. //
  5444. // See DescribeOrganization for more information on using the DescribeOrganization
  5445. // API call, and error handling.
  5446. //
  5447. // This method is useful when you want to inject custom logic or configuration
  5448. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5449. //
  5450. // // Example sending a request using the DescribeOrganizationRequest method.
  5451. // req, resp := client.DescribeOrganizationRequest(params)
  5452. //
  5453. // err := req.Send()
  5454. // if err == nil { // resp is now filled
  5455. // fmt.Println(resp)
  5456. // }
  5457. //
  5458. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeOrganization
  5459. func (c *Organizations) DescribeOrganizationRequest(input *DescribeOrganizationInput) (req *request.Request, output *DescribeOrganizationOutput) {
  5460. op := &request.Operation{
  5461. Name: opDescribeOrganization,
  5462. HTTPMethod: "POST",
  5463. HTTPPath: "/",
  5464. }
  5465. if input == nil {
  5466. input = &DescribeOrganizationInput{}
  5467. }
  5468. output = &DescribeOrganizationOutput{}
  5469. req = c.newRequest(op, input, output)
  5470. return
  5471. }
  5472. // DescribeOrganization API operation for AWS Organizations.
  5473. //
  5474. // Retrieves information about the organization that the user's account belongs
  5475. // to.
  5476. //
  5477. // This operation can be called from any account in the organization.
  5478. //
  5479. // Even if a policy type is shown as available in the organization, you can
  5480. // disable it separately at the root level with DisablePolicyType. Use ListRoots
  5481. // to see the status of policy types for a specified root.
  5482. //
  5483. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5484. // with awserr.Error's Code and Message methods to get detailed information about
  5485. // the error.
  5486. //
  5487. // See the AWS API reference guide for AWS Organizations's
  5488. // API operation DescribeOrganization for usage and error information.
  5489. //
  5490. // Returned Error Types:
  5491. //
  5492. // - AccessDeniedException
  5493. // You don't have permissions to perform the requested operation. The user or
  5494. // role that is making the request must have at least one IAM permissions policy
  5495. // attached that grants the required permissions. For more information, see
  5496. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  5497. // in the IAM User Guide.
  5498. //
  5499. // - AWSOrganizationsNotInUseException
  5500. // Your account isn't a member of an organization. To make this request, you
  5501. // must use the credentials of an account that belongs to an organization.
  5502. //
  5503. // - ConcurrentModificationException
  5504. // The target of the operation is currently being modified by a different request.
  5505. // Try again later.
  5506. //
  5507. // - ServiceException
  5508. // Organizations can't complete your request because of an internal service
  5509. // error. Try again later.
  5510. //
  5511. // - TooManyRequestsException
  5512. // You have sent too many requests in too short a period of time. The quota
  5513. // helps protect against denial-of-service attacks. Try again later.
  5514. //
  5515. // For information about quotas that affect Organizations, see Quotas for Organizations
  5516. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  5517. // the Organizations User Guide.
  5518. //
  5519. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeOrganization
  5520. func (c *Organizations) DescribeOrganization(input *DescribeOrganizationInput) (*DescribeOrganizationOutput, error) {
  5521. req, out := c.DescribeOrganizationRequest(input)
  5522. return out, req.Send()
  5523. }
  5524. // DescribeOrganizationWithContext is the same as DescribeOrganization with the addition of
  5525. // the ability to pass a context and additional request options.
  5526. //
  5527. // See DescribeOrganization for details on how to use this API operation.
  5528. //
  5529. // The context must be non-nil and will be used for request cancellation. If
  5530. // the context is nil a panic will occur. In the future the SDK may create
  5531. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5532. // for more information on using Contexts.
  5533. func (c *Organizations) DescribeOrganizationWithContext(ctx aws.Context, input *DescribeOrganizationInput, opts ...request.Option) (*DescribeOrganizationOutput, error) {
  5534. req, out := c.DescribeOrganizationRequest(input)
  5535. req.SetContext(ctx)
  5536. req.ApplyOptions(opts...)
  5537. return out, req.Send()
  5538. }
  5539. const opDescribeOrganizationalUnit = "DescribeOrganizationalUnit"
  5540. // DescribeOrganizationalUnitRequest generates a "aws/request.Request" representing the
  5541. // client's request for the DescribeOrganizationalUnit operation. The "output" return
  5542. // value will be populated with the request's response once the request completes
  5543. // successfully.
  5544. //
  5545. // Use "Send" method on the returned Request to send the API call to the service.
  5546. // the "output" return value is not valid until after Send returns without error.
  5547. //
  5548. // See DescribeOrganizationalUnit for more information on using the DescribeOrganizationalUnit
  5549. // API call, and error handling.
  5550. //
  5551. // This method is useful when you want to inject custom logic or configuration
  5552. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5553. //
  5554. // // Example sending a request using the DescribeOrganizationalUnitRequest method.
  5555. // req, resp := client.DescribeOrganizationalUnitRequest(params)
  5556. //
  5557. // err := req.Send()
  5558. // if err == nil { // resp is now filled
  5559. // fmt.Println(resp)
  5560. // }
  5561. //
  5562. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeOrganizationalUnit
  5563. func (c *Organizations) DescribeOrganizationalUnitRequest(input *DescribeOrganizationalUnitInput) (req *request.Request, output *DescribeOrganizationalUnitOutput) {
  5564. op := &request.Operation{
  5565. Name: opDescribeOrganizationalUnit,
  5566. HTTPMethod: "POST",
  5567. HTTPPath: "/",
  5568. }
  5569. if input == nil {
  5570. input = &DescribeOrganizationalUnitInput{}
  5571. }
  5572. output = &DescribeOrganizationalUnitOutput{}
  5573. req = c.newRequest(op, input, output)
  5574. return
  5575. }
  5576. // DescribeOrganizationalUnit API operation for AWS Organizations.
  5577. //
  5578. // Retrieves information about an organizational unit (OU).
  5579. //
  5580. // This operation can be called only from the organization's management account
  5581. // or by a member account that is a delegated administrator for an Amazon Web
  5582. // Services service.
  5583. //
  5584. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5585. // with awserr.Error's Code and Message methods to get detailed information about
  5586. // the error.
  5587. //
  5588. // See the AWS API reference guide for AWS Organizations's
  5589. // API operation DescribeOrganizationalUnit for usage and error information.
  5590. //
  5591. // Returned Error Types:
  5592. //
  5593. // - AccessDeniedException
  5594. // You don't have permissions to perform the requested operation. The user or
  5595. // role that is making the request must have at least one IAM permissions policy
  5596. // attached that grants the required permissions. For more information, see
  5597. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  5598. // in the IAM User Guide.
  5599. //
  5600. // - AWSOrganizationsNotInUseException
  5601. // Your account isn't a member of an organization. To make this request, you
  5602. // must use the credentials of an account that belongs to an organization.
  5603. //
  5604. // - InvalidInputException
  5605. // The requested operation failed because you provided invalid values for one
  5606. // or more of the request parameters. This exception includes a reason that
  5607. // contains additional information about the violated limit:
  5608. //
  5609. // Some of the reasons in the following list might not be applicable to this
  5610. // specific API or operation.
  5611. //
  5612. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  5613. // the same entity.
  5614. //
  5615. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  5616. // Services and can't be modified.
  5617. //
  5618. // - INPUT_REQUIRED: You must include a value for all required parameters.
  5619. //
  5620. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  5621. // for the invited account owner.
  5622. //
  5623. // - INVALID_ENUM: You specified an invalid value.
  5624. //
  5625. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  5626. //
  5627. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  5628. // characters.
  5629. //
  5630. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  5631. // at least one invalid value.
  5632. //
  5633. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  5634. // from the response to a previous call of the operation.
  5635. //
  5636. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  5637. // organization, or email) as a party.
  5638. //
  5639. // - INVALID_PATTERN: You provided a value that doesn't match the required
  5640. // pattern.
  5641. //
  5642. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  5643. // match the required pattern.
  5644. //
  5645. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  5646. // name can't begin with the reserved prefix AWSServiceRoleFor.
  5647. //
  5648. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  5649. // Name (ARN) for the organization.
  5650. //
  5651. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  5652. //
  5653. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  5654. // tag. You can’t add, edit, or delete system tag keys because they're
  5655. // reserved for Amazon Web Services use. System tags don’t count against
  5656. // your tags per resource limit.
  5657. //
  5658. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  5659. // for the operation.
  5660. //
  5661. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  5662. // than allowed.
  5663. //
  5664. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  5665. // value than allowed.
  5666. //
  5667. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  5668. // than allowed.
  5669. //
  5670. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  5671. // value than allowed.
  5672. //
  5673. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  5674. // between entities in the same root.
  5675. //
  5676. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  5677. // target entity.
  5678. //
  5679. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  5680. // isn't recognized.
  5681. //
  5682. // - OrganizationalUnitNotFoundException
  5683. // We can't find an OU with the OrganizationalUnitId that you specified.
  5684. //
  5685. // - ServiceException
  5686. // Organizations can't complete your request because of an internal service
  5687. // error. Try again later.
  5688. //
  5689. // - TooManyRequestsException
  5690. // You have sent too many requests in too short a period of time. The quota
  5691. // helps protect against denial-of-service attacks. Try again later.
  5692. //
  5693. // For information about quotas that affect Organizations, see Quotas for Organizations
  5694. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  5695. // the Organizations User Guide.
  5696. //
  5697. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeOrganizationalUnit
  5698. func (c *Organizations) DescribeOrganizationalUnit(input *DescribeOrganizationalUnitInput) (*DescribeOrganizationalUnitOutput, error) {
  5699. req, out := c.DescribeOrganizationalUnitRequest(input)
  5700. return out, req.Send()
  5701. }
  5702. // DescribeOrganizationalUnitWithContext is the same as DescribeOrganizationalUnit with the addition of
  5703. // the ability to pass a context and additional request options.
  5704. //
  5705. // See DescribeOrganizationalUnit for details on how to use this API operation.
  5706. //
  5707. // The context must be non-nil and will be used for request cancellation. If
  5708. // the context is nil a panic will occur. In the future the SDK may create
  5709. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5710. // for more information on using Contexts.
  5711. func (c *Organizations) DescribeOrganizationalUnitWithContext(ctx aws.Context, input *DescribeOrganizationalUnitInput, opts ...request.Option) (*DescribeOrganizationalUnitOutput, error) {
  5712. req, out := c.DescribeOrganizationalUnitRequest(input)
  5713. req.SetContext(ctx)
  5714. req.ApplyOptions(opts...)
  5715. return out, req.Send()
  5716. }
  5717. const opDescribePolicy = "DescribePolicy"
  5718. // DescribePolicyRequest generates a "aws/request.Request" representing the
  5719. // client's request for the DescribePolicy operation. The "output" return
  5720. // value will be populated with the request's response once the request completes
  5721. // successfully.
  5722. //
  5723. // Use "Send" method on the returned Request to send the API call to the service.
  5724. // the "output" return value is not valid until after Send returns without error.
  5725. //
  5726. // See DescribePolicy for more information on using the DescribePolicy
  5727. // API call, and error handling.
  5728. //
  5729. // This method is useful when you want to inject custom logic or configuration
  5730. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5731. //
  5732. // // Example sending a request using the DescribePolicyRequest method.
  5733. // req, resp := client.DescribePolicyRequest(params)
  5734. //
  5735. // err := req.Send()
  5736. // if err == nil { // resp is now filled
  5737. // fmt.Println(resp)
  5738. // }
  5739. //
  5740. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribePolicy
  5741. func (c *Organizations) DescribePolicyRequest(input *DescribePolicyInput) (req *request.Request, output *DescribePolicyOutput) {
  5742. op := &request.Operation{
  5743. Name: opDescribePolicy,
  5744. HTTPMethod: "POST",
  5745. HTTPPath: "/",
  5746. }
  5747. if input == nil {
  5748. input = &DescribePolicyInput{}
  5749. }
  5750. output = &DescribePolicyOutput{}
  5751. req = c.newRequest(op, input, output)
  5752. return
  5753. }
  5754. // DescribePolicy API operation for AWS Organizations.
  5755. //
  5756. // Retrieves information about a policy.
  5757. //
  5758. // This operation can be called only from the organization's management account
  5759. // or by a member account that is a delegated administrator for an Amazon Web
  5760. // Services service.
  5761. //
  5762. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5763. // with awserr.Error's Code and Message methods to get detailed information about
  5764. // the error.
  5765. //
  5766. // See the AWS API reference guide for AWS Organizations's
  5767. // API operation DescribePolicy for usage and error information.
  5768. //
  5769. // Returned Error Types:
  5770. //
  5771. // - AccessDeniedException
  5772. // You don't have permissions to perform the requested operation. The user or
  5773. // role that is making the request must have at least one IAM permissions policy
  5774. // attached that grants the required permissions. For more information, see
  5775. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  5776. // in the IAM User Guide.
  5777. //
  5778. // - AWSOrganizationsNotInUseException
  5779. // Your account isn't a member of an organization. To make this request, you
  5780. // must use the credentials of an account that belongs to an organization.
  5781. //
  5782. // - InvalidInputException
  5783. // The requested operation failed because you provided invalid values for one
  5784. // or more of the request parameters. This exception includes a reason that
  5785. // contains additional information about the violated limit:
  5786. //
  5787. // Some of the reasons in the following list might not be applicable to this
  5788. // specific API or operation.
  5789. //
  5790. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  5791. // the same entity.
  5792. //
  5793. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  5794. // Services and can't be modified.
  5795. //
  5796. // - INPUT_REQUIRED: You must include a value for all required parameters.
  5797. //
  5798. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  5799. // for the invited account owner.
  5800. //
  5801. // - INVALID_ENUM: You specified an invalid value.
  5802. //
  5803. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  5804. //
  5805. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  5806. // characters.
  5807. //
  5808. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  5809. // at least one invalid value.
  5810. //
  5811. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  5812. // from the response to a previous call of the operation.
  5813. //
  5814. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  5815. // organization, or email) as a party.
  5816. //
  5817. // - INVALID_PATTERN: You provided a value that doesn't match the required
  5818. // pattern.
  5819. //
  5820. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  5821. // match the required pattern.
  5822. //
  5823. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  5824. // name can't begin with the reserved prefix AWSServiceRoleFor.
  5825. //
  5826. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  5827. // Name (ARN) for the organization.
  5828. //
  5829. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  5830. //
  5831. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  5832. // tag. You can’t add, edit, or delete system tag keys because they're
  5833. // reserved for Amazon Web Services use. System tags don’t count against
  5834. // your tags per resource limit.
  5835. //
  5836. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  5837. // for the operation.
  5838. //
  5839. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  5840. // than allowed.
  5841. //
  5842. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  5843. // value than allowed.
  5844. //
  5845. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  5846. // than allowed.
  5847. //
  5848. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  5849. // value than allowed.
  5850. //
  5851. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  5852. // between entities in the same root.
  5853. //
  5854. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  5855. // target entity.
  5856. //
  5857. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  5858. // isn't recognized.
  5859. //
  5860. // - PolicyNotFoundException
  5861. // We can't find a policy with the PolicyId that you specified.
  5862. //
  5863. // - ServiceException
  5864. // Organizations can't complete your request because of an internal service
  5865. // error. Try again later.
  5866. //
  5867. // - TooManyRequestsException
  5868. // You have sent too many requests in too short a period of time. The quota
  5869. // helps protect against denial-of-service attacks. Try again later.
  5870. //
  5871. // For information about quotas that affect Organizations, see Quotas for Organizations
  5872. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  5873. // the Organizations User Guide.
  5874. //
  5875. // - UnsupportedAPIEndpointException
  5876. // This action isn't available in the current Amazon Web Services Region.
  5877. //
  5878. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribePolicy
  5879. func (c *Organizations) DescribePolicy(input *DescribePolicyInput) (*DescribePolicyOutput, error) {
  5880. req, out := c.DescribePolicyRequest(input)
  5881. return out, req.Send()
  5882. }
  5883. // DescribePolicyWithContext is the same as DescribePolicy with the addition of
  5884. // the ability to pass a context and additional request options.
  5885. //
  5886. // See DescribePolicy for details on how to use this API operation.
  5887. //
  5888. // The context must be non-nil and will be used for request cancellation. If
  5889. // the context is nil a panic will occur. In the future the SDK may create
  5890. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5891. // for more information on using Contexts.
  5892. func (c *Organizations) DescribePolicyWithContext(ctx aws.Context, input *DescribePolicyInput, opts ...request.Option) (*DescribePolicyOutput, error) {
  5893. req, out := c.DescribePolicyRequest(input)
  5894. req.SetContext(ctx)
  5895. req.ApplyOptions(opts...)
  5896. return out, req.Send()
  5897. }
  5898. const opDescribeResourcePolicy = "DescribeResourcePolicy"
  5899. // DescribeResourcePolicyRequest generates a "aws/request.Request" representing the
  5900. // client's request for the DescribeResourcePolicy operation. The "output" return
  5901. // value will be populated with the request's response once the request completes
  5902. // successfully.
  5903. //
  5904. // Use "Send" method on the returned Request to send the API call to the service.
  5905. // the "output" return value is not valid until after Send returns without error.
  5906. //
  5907. // See DescribeResourcePolicy for more information on using the DescribeResourcePolicy
  5908. // API call, and error handling.
  5909. //
  5910. // This method is useful when you want to inject custom logic or configuration
  5911. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5912. //
  5913. // // Example sending a request using the DescribeResourcePolicyRequest method.
  5914. // req, resp := client.DescribeResourcePolicyRequest(params)
  5915. //
  5916. // err := req.Send()
  5917. // if err == nil { // resp is now filled
  5918. // fmt.Println(resp)
  5919. // }
  5920. //
  5921. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeResourcePolicy
  5922. func (c *Organizations) DescribeResourcePolicyRequest(input *DescribeResourcePolicyInput) (req *request.Request, output *DescribeResourcePolicyOutput) {
  5923. op := &request.Operation{
  5924. Name: opDescribeResourcePolicy,
  5925. HTTPMethod: "POST",
  5926. HTTPPath: "/",
  5927. }
  5928. if input == nil {
  5929. input = &DescribeResourcePolicyInput{}
  5930. }
  5931. output = &DescribeResourcePolicyOutput{}
  5932. req = c.newRequest(op, input, output)
  5933. return
  5934. }
  5935. // DescribeResourcePolicy API operation for AWS Organizations.
  5936. //
  5937. // Retrieves information about a resource policy.
  5938. //
  5939. // You can only call this operation from the organization's management account
  5940. // or by a member account that is a delegated administrator for an AWS service.
  5941. //
  5942. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5943. // with awserr.Error's Code and Message methods to get detailed information about
  5944. // the error.
  5945. //
  5946. // See the AWS API reference guide for AWS Organizations's
  5947. // API operation DescribeResourcePolicy for usage and error information.
  5948. //
  5949. // Returned Error Types:
  5950. //
  5951. // - AccessDeniedException
  5952. // You don't have permissions to perform the requested operation. The user or
  5953. // role that is making the request must have at least one IAM permissions policy
  5954. // attached that grants the required permissions. For more information, see
  5955. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  5956. // in the IAM User Guide.
  5957. //
  5958. // - ServiceException
  5959. // Organizations can't complete your request because of an internal service
  5960. // error. Try again later.
  5961. //
  5962. // - UnsupportedAPIEndpointException
  5963. // This action isn't available in the current Amazon Web Services Region.
  5964. //
  5965. // - TooManyRequestsException
  5966. // You have sent too many requests in too short a period of time. The quota
  5967. // helps protect against denial-of-service attacks. Try again later.
  5968. //
  5969. // For information about quotas that affect Organizations, see Quotas for Organizations
  5970. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  5971. // the Organizations User Guide.
  5972. //
  5973. // - AWSOrganizationsNotInUseException
  5974. // Your account isn't a member of an organization. To make this request, you
  5975. // must use the credentials of an account that belongs to an organization.
  5976. //
  5977. // - ResourcePolicyNotFoundException
  5978. // We can't find a resource policy request with the parameter that you specified.
  5979. //
  5980. // - ConstraintViolationException
  5981. // Performing this operation violates a minimum or maximum value limit. For
  5982. // example, attempting to remove the last service control policy (SCP) from
  5983. // an OU or root, inviting or creating too many accounts to the organization,
  5984. // or attaching too many policies to an account, OU, or root. This exception
  5985. // includes a reason that contains additional information about the violated
  5986. // limit:
  5987. //
  5988. // Some of the reasons in the following list might not be applicable to this
  5989. // specific API or operation.
  5990. //
  5991. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  5992. // account from the organization. You can't remove the management account.
  5993. // Instead, after you remove all member accounts, delete the organization
  5994. // itself.
  5995. //
  5996. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  5997. // an account from the organization that doesn't yet have enough information
  5998. // to exist as a standalone account. This account requires you to first complete
  5999. // phone verification. Follow the steps at Removing a member account from
  6000. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  6001. // in the Organizations User Guide.
  6002. //
  6003. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  6004. // of accounts that you can create in one day.
  6005. //
  6006. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  6007. // the number of accounts in an organization. If you need more accounts,
  6008. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  6009. // to request an increase in your limit. Or the number of invitations that
  6010. // you tried to send would cause you to exceed the limit of accounts in your
  6011. // organization. Send fewer invitations or contact Amazon Web Services Support
  6012. // to request an increase in the number of accounts. Deleted and closed accounts
  6013. // still count toward your limit. If you get this exception when running
  6014. // a command immediately after creating the organization, wait one hour and
  6015. // try again. After an hour, if the command continues to fail with this error,
  6016. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  6017. //
  6018. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  6019. // register the management account of the organization as a delegated administrator
  6020. // for an Amazon Web Services service integrated with Organizations. You
  6021. // can designate only a member account as a delegated administrator.
  6022. //
  6023. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  6024. // account. To close the management account for the organization, you must
  6025. // first either remove or close all member accounts in the organization.
  6026. // Follow standard account closure process using root credentials.​
  6027. //
  6028. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  6029. // an account that is registered as a delegated administrator for a service
  6030. // integrated with your organization. To complete this operation, you must
  6031. // first deregister this account as a delegated administrator.
  6032. //
  6033. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  6034. // for the past 30 days.
  6035. //
  6036. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  6037. // of accounts that you can close at a time. ​
  6038. //
  6039. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  6040. // organization in the specified region, you must enable all features mode.
  6041. //
  6042. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  6043. // an Amazon Web Services account as a delegated administrator for an Amazon
  6044. // Web Services service that already has a delegated administrator. To complete
  6045. // this operation, you must first deregister any existing delegated administrators
  6046. // for this service.
  6047. //
  6048. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  6049. // valid for a limited period of time. You must resubmit the request and
  6050. // generate a new verfication code.
  6051. //
  6052. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  6053. // handshakes that you can send in one day.
  6054. //
  6055. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  6056. // supported payment method is associated with the account. Amazon Web Services
  6057. // does not support cards issued by financial institutions in Russia or Belarus.
  6058. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  6059. //
  6060. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  6061. // in this organization, you first must migrate the organization's management
  6062. // account to the marketplace that corresponds to the management account's
  6063. // address. For example, accounts with India addresses must be associated
  6064. // with the AISPL marketplace. All accounts in an organization must be associated
  6065. // with the same marketplace.
  6066. //
  6067. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  6068. // Web Services /> Regions in China. To create an organization, the master
  6069. // must have a valid business license. For more information, contact customer
  6070. // support.
  6071. //
  6072. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  6073. // must first provide a valid contact address and phone number for the management
  6074. // account. Then try the operation again.
  6075. //
  6076. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  6077. // management account must have an associated account in the Amazon Web Services
  6078. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  6079. // in the Amazon Web Services GovCloud User Guide.
  6080. //
  6081. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  6082. // with this management account, you first must associate a valid payment
  6083. // instrument, such as a credit card, with the account. Follow the steps
  6084. // at To leave an organization when all required account information has
  6085. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  6086. // in the Organizations User Guide.
  6087. //
  6088. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  6089. // to register more delegated administrators than allowed for the service
  6090. // principal.
  6091. //
  6092. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  6093. // number of policies of a certain type that can be attached to an entity
  6094. // at one time.
  6095. //
  6096. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  6097. // on this resource.
  6098. //
  6099. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  6100. // with this member account, you first must associate a valid payment instrument,
  6101. // such as a credit card, with the account. Follow the steps at To leave
  6102. // an organization when all required account information has not yet been
  6103. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  6104. // in the Organizations User Guide.
  6105. //
  6106. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  6107. // policy from an entity that would cause the entity to have fewer than the
  6108. // minimum number of policies of a certain type required.
  6109. //
  6110. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  6111. // that requires the organization to be configured to support all features.
  6112. // An organization that supports only consolidated billing features can't
  6113. // perform this operation.
  6114. //
  6115. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  6116. // too many levels deep.
  6117. //
  6118. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  6119. // that you can have in an organization.
  6120. //
  6121. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  6122. // is larger than the maximum size.
  6123. //
  6124. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  6125. // policies that you can have in an organization.
  6126. //
  6127. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  6128. // before you enabled service access. Call the EnableAWSServiceAccess API
  6129. // first.
  6130. //
  6131. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  6132. // tags that are not compliant with the tag policy requirements for this
  6133. // account.
  6134. //
  6135. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  6136. // there is a waiting period before you can remove it from the organization.
  6137. // If you get an error that indicates that a wait period is required, try
  6138. // again in a few days.
  6139. //
  6140. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeResourcePolicy
  6141. func (c *Organizations) DescribeResourcePolicy(input *DescribeResourcePolicyInput) (*DescribeResourcePolicyOutput, error) {
  6142. req, out := c.DescribeResourcePolicyRequest(input)
  6143. return out, req.Send()
  6144. }
  6145. // DescribeResourcePolicyWithContext is the same as DescribeResourcePolicy with the addition of
  6146. // the ability to pass a context and additional request options.
  6147. //
  6148. // See DescribeResourcePolicy for details on how to use this API operation.
  6149. //
  6150. // The context must be non-nil and will be used for request cancellation. If
  6151. // the context is nil a panic will occur. In the future the SDK may create
  6152. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6153. // for more information on using Contexts.
  6154. func (c *Organizations) DescribeResourcePolicyWithContext(ctx aws.Context, input *DescribeResourcePolicyInput, opts ...request.Option) (*DescribeResourcePolicyOutput, error) {
  6155. req, out := c.DescribeResourcePolicyRequest(input)
  6156. req.SetContext(ctx)
  6157. req.ApplyOptions(opts...)
  6158. return out, req.Send()
  6159. }
  6160. const opDetachPolicy = "DetachPolicy"
  6161. // DetachPolicyRequest generates a "aws/request.Request" representing the
  6162. // client's request for the DetachPolicy operation. The "output" return
  6163. // value will be populated with the request's response once the request completes
  6164. // successfully.
  6165. //
  6166. // Use "Send" method on the returned Request to send the API call to the service.
  6167. // the "output" return value is not valid until after Send returns without error.
  6168. //
  6169. // See DetachPolicy for more information on using the DetachPolicy
  6170. // API call, and error handling.
  6171. //
  6172. // This method is useful when you want to inject custom logic or configuration
  6173. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6174. //
  6175. // // Example sending a request using the DetachPolicyRequest method.
  6176. // req, resp := client.DetachPolicyRequest(params)
  6177. //
  6178. // err := req.Send()
  6179. // if err == nil { // resp is now filled
  6180. // fmt.Println(resp)
  6181. // }
  6182. //
  6183. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DetachPolicy
  6184. func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *request.Request, output *DetachPolicyOutput) {
  6185. op := &request.Operation{
  6186. Name: opDetachPolicy,
  6187. HTTPMethod: "POST",
  6188. HTTPPath: "/",
  6189. }
  6190. if input == nil {
  6191. input = &DetachPolicyInput{}
  6192. }
  6193. output = &DetachPolicyOutput{}
  6194. req = c.newRequest(op, input, output)
  6195. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  6196. return
  6197. }
  6198. // DetachPolicy API operation for AWS Organizations.
  6199. //
  6200. // Detaches a policy from a target root, organizational unit (OU), or account.
  6201. //
  6202. // If the policy being detached is a service control policy (SCP), the changes
  6203. // to permissions for Identity and Access Management (IAM) users and roles in
  6204. // affected accounts are immediate.
  6205. //
  6206. // Every root, OU, and account must have at least one SCP attached. If you want
  6207. // to replace the default FullAWSAccess policy with an SCP that limits the permissions
  6208. // that can be delegated, you must attach the replacement SCP before you can
  6209. // remove the default SCP. This is the authorization strategy of an "allow list
  6210. // (https://docs.aws.amazon.com/organizations/latest/userguide/SCP_strategies.html#orgs_policies_allowlist)".
  6211. // If you instead attach a second SCP and leave the FullAWSAccess SCP still
  6212. // attached, and specify "Effect": "Deny" in the second SCP to override the
  6213. // "Effect": "Allow" in the FullAWSAccess policy (or any other attached SCP),
  6214. // you're using the authorization strategy of a "deny list (https://docs.aws.amazon.com/organizations/latest/userguide/SCP_strategies.html#orgs_policies_denylist)".
  6215. //
  6216. // This operation can be called only from the organization's management account.
  6217. //
  6218. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6219. // with awserr.Error's Code and Message methods to get detailed information about
  6220. // the error.
  6221. //
  6222. // See the AWS API reference guide for AWS Organizations's
  6223. // API operation DetachPolicy for usage and error information.
  6224. //
  6225. // Returned Error Types:
  6226. //
  6227. // - AccessDeniedException
  6228. // You don't have permissions to perform the requested operation. The user or
  6229. // role that is making the request must have at least one IAM permissions policy
  6230. // attached that grants the required permissions. For more information, see
  6231. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  6232. // in the IAM User Guide.
  6233. //
  6234. // - AWSOrganizationsNotInUseException
  6235. // Your account isn't a member of an organization. To make this request, you
  6236. // must use the credentials of an account that belongs to an organization.
  6237. //
  6238. // - ConcurrentModificationException
  6239. // The target of the operation is currently being modified by a different request.
  6240. // Try again later.
  6241. //
  6242. // - ConstraintViolationException
  6243. // Performing this operation violates a minimum or maximum value limit. For
  6244. // example, attempting to remove the last service control policy (SCP) from
  6245. // an OU or root, inviting or creating too many accounts to the organization,
  6246. // or attaching too many policies to an account, OU, or root. This exception
  6247. // includes a reason that contains additional information about the violated
  6248. // limit:
  6249. //
  6250. // Some of the reasons in the following list might not be applicable to this
  6251. // specific API or operation.
  6252. //
  6253. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  6254. // account from the organization. You can't remove the management account.
  6255. // Instead, after you remove all member accounts, delete the organization
  6256. // itself.
  6257. //
  6258. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  6259. // an account from the organization that doesn't yet have enough information
  6260. // to exist as a standalone account. This account requires you to first complete
  6261. // phone verification. Follow the steps at Removing a member account from
  6262. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  6263. // in the Organizations User Guide.
  6264. //
  6265. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  6266. // of accounts that you can create in one day.
  6267. //
  6268. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  6269. // the number of accounts in an organization. If you need more accounts,
  6270. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  6271. // to request an increase in your limit. Or the number of invitations that
  6272. // you tried to send would cause you to exceed the limit of accounts in your
  6273. // organization. Send fewer invitations or contact Amazon Web Services Support
  6274. // to request an increase in the number of accounts. Deleted and closed accounts
  6275. // still count toward your limit. If you get this exception when running
  6276. // a command immediately after creating the organization, wait one hour and
  6277. // try again. After an hour, if the command continues to fail with this error,
  6278. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  6279. //
  6280. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  6281. // register the management account of the organization as a delegated administrator
  6282. // for an Amazon Web Services service integrated with Organizations. You
  6283. // can designate only a member account as a delegated administrator.
  6284. //
  6285. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  6286. // account. To close the management account for the organization, you must
  6287. // first either remove or close all member accounts in the organization.
  6288. // Follow standard account closure process using root credentials.​
  6289. //
  6290. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  6291. // an account that is registered as a delegated administrator for a service
  6292. // integrated with your organization. To complete this operation, you must
  6293. // first deregister this account as a delegated administrator.
  6294. //
  6295. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  6296. // for the past 30 days.
  6297. //
  6298. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  6299. // of accounts that you can close at a time. ​
  6300. //
  6301. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  6302. // organization in the specified region, you must enable all features mode.
  6303. //
  6304. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  6305. // an Amazon Web Services account as a delegated administrator for an Amazon
  6306. // Web Services service that already has a delegated administrator. To complete
  6307. // this operation, you must first deregister any existing delegated administrators
  6308. // for this service.
  6309. //
  6310. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  6311. // valid for a limited period of time. You must resubmit the request and
  6312. // generate a new verfication code.
  6313. //
  6314. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  6315. // handshakes that you can send in one day.
  6316. //
  6317. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  6318. // supported payment method is associated with the account. Amazon Web Services
  6319. // does not support cards issued by financial institutions in Russia or Belarus.
  6320. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  6321. //
  6322. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  6323. // in this organization, you first must migrate the organization's management
  6324. // account to the marketplace that corresponds to the management account's
  6325. // address. For example, accounts with India addresses must be associated
  6326. // with the AISPL marketplace. All accounts in an organization must be associated
  6327. // with the same marketplace.
  6328. //
  6329. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  6330. // Web Services /> Regions in China. To create an organization, the master
  6331. // must have a valid business license. For more information, contact customer
  6332. // support.
  6333. //
  6334. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  6335. // must first provide a valid contact address and phone number for the management
  6336. // account. Then try the operation again.
  6337. //
  6338. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  6339. // management account must have an associated account in the Amazon Web Services
  6340. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  6341. // in the Amazon Web Services GovCloud User Guide.
  6342. //
  6343. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  6344. // with this management account, you first must associate a valid payment
  6345. // instrument, such as a credit card, with the account. Follow the steps
  6346. // at To leave an organization when all required account information has
  6347. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  6348. // in the Organizations User Guide.
  6349. //
  6350. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  6351. // to register more delegated administrators than allowed for the service
  6352. // principal.
  6353. //
  6354. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  6355. // number of policies of a certain type that can be attached to an entity
  6356. // at one time.
  6357. //
  6358. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  6359. // on this resource.
  6360. //
  6361. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  6362. // with this member account, you first must associate a valid payment instrument,
  6363. // such as a credit card, with the account. Follow the steps at To leave
  6364. // an organization when all required account information has not yet been
  6365. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  6366. // in the Organizations User Guide.
  6367. //
  6368. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  6369. // policy from an entity that would cause the entity to have fewer than the
  6370. // minimum number of policies of a certain type required.
  6371. //
  6372. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  6373. // that requires the organization to be configured to support all features.
  6374. // An organization that supports only consolidated billing features can't
  6375. // perform this operation.
  6376. //
  6377. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  6378. // too many levels deep.
  6379. //
  6380. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  6381. // that you can have in an organization.
  6382. //
  6383. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  6384. // is larger than the maximum size.
  6385. //
  6386. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  6387. // policies that you can have in an organization.
  6388. //
  6389. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  6390. // before you enabled service access. Call the EnableAWSServiceAccess API
  6391. // first.
  6392. //
  6393. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  6394. // tags that are not compliant with the tag policy requirements for this
  6395. // account.
  6396. //
  6397. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  6398. // there is a waiting period before you can remove it from the organization.
  6399. // If you get an error that indicates that a wait period is required, try
  6400. // again in a few days.
  6401. //
  6402. // - InvalidInputException
  6403. // The requested operation failed because you provided invalid values for one
  6404. // or more of the request parameters. This exception includes a reason that
  6405. // contains additional information about the violated limit:
  6406. //
  6407. // Some of the reasons in the following list might not be applicable to this
  6408. // specific API or operation.
  6409. //
  6410. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  6411. // the same entity.
  6412. //
  6413. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  6414. // Services and can't be modified.
  6415. //
  6416. // - INPUT_REQUIRED: You must include a value for all required parameters.
  6417. //
  6418. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  6419. // for the invited account owner.
  6420. //
  6421. // - INVALID_ENUM: You specified an invalid value.
  6422. //
  6423. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  6424. //
  6425. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  6426. // characters.
  6427. //
  6428. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  6429. // at least one invalid value.
  6430. //
  6431. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  6432. // from the response to a previous call of the operation.
  6433. //
  6434. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  6435. // organization, or email) as a party.
  6436. //
  6437. // - INVALID_PATTERN: You provided a value that doesn't match the required
  6438. // pattern.
  6439. //
  6440. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  6441. // match the required pattern.
  6442. //
  6443. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  6444. // name can't begin with the reserved prefix AWSServiceRoleFor.
  6445. //
  6446. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  6447. // Name (ARN) for the organization.
  6448. //
  6449. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  6450. //
  6451. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  6452. // tag. You can’t add, edit, or delete system tag keys because they're
  6453. // reserved for Amazon Web Services use. System tags don’t count against
  6454. // your tags per resource limit.
  6455. //
  6456. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  6457. // for the operation.
  6458. //
  6459. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  6460. // than allowed.
  6461. //
  6462. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  6463. // value than allowed.
  6464. //
  6465. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  6466. // than allowed.
  6467. //
  6468. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  6469. // value than allowed.
  6470. //
  6471. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  6472. // between entities in the same root.
  6473. //
  6474. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  6475. // target entity.
  6476. //
  6477. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  6478. // isn't recognized.
  6479. //
  6480. // - PolicyNotAttachedException
  6481. // The policy isn't attached to the specified target in the specified root.
  6482. //
  6483. // - PolicyNotFoundException
  6484. // We can't find a policy with the PolicyId that you specified.
  6485. //
  6486. // - ServiceException
  6487. // Organizations can't complete your request because of an internal service
  6488. // error. Try again later.
  6489. //
  6490. // - TargetNotFoundException
  6491. // We can't find a root, OU, account, or policy with the TargetId that you specified.
  6492. //
  6493. // - TooManyRequestsException
  6494. // You have sent too many requests in too short a period of time. The quota
  6495. // helps protect against denial-of-service attacks. Try again later.
  6496. //
  6497. // For information about quotas that affect Organizations, see Quotas for Organizations
  6498. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  6499. // the Organizations User Guide.
  6500. //
  6501. // - UnsupportedAPIEndpointException
  6502. // This action isn't available in the current Amazon Web Services Region.
  6503. //
  6504. // - PolicyChangesInProgressException
  6505. // Changes to the effective policy are in progress, and its contents can't be
  6506. // returned. Try the operation again later.
  6507. //
  6508. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DetachPolicy
  6509. func (c *Organizations) DetachPolicy(input *DetachPolicyInput) (*DetachPolicyOutput, error) {
  6510. req, out := c.DetachPolicyRequest(input)
  6511. return out, req.Send()
  6512. }
  6513. // DetachPolicyWithContext is the same as DetachPolicy with the addition of
  6514. // the ability to pass a context and additional request options.
  6515. //
  6516. // See DetachPolicy for details on how to use this API operation.
  6517. //
  6518. // The context must be non-nil and will be used for request cancellation. If
  6519. // the context is nil a panic will occur. In the future the SDK may create
  6520. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6521. // for more information on using Contexts.
  6522. func (c *Organizations) DetachPolicyWithContext(ctx aws.Context, input *DetachPolicyInput, opts ...request.Option) (*DetachPolicyOutput, error) {
  6523. req, out := c.DetachPolicyRequest(input)
  6524. req.SetContext(ctx)
  6525. req.ApplyOptions(opts...)
  6526. return out, req.Send()
  6527. }
  6528. const opDisableAWSServiceAccess = "DisableAWSServiceAccess"
  6529. // DisableAWSServiceAccessRequest generates a "aws/request.Request" representing the
  6530. // client's request for the DisableAWSServiceAccess operation. The "output" return
  6531. // value will be populated with the request's response once the request completes
  6532. // successfully.
  6533. //
  6534. // Use "Send" method on the returned Request to send the API call to the service.
  6535. // the "output" return value is not valid until after Send returns without error.
  6536. //
  6537. // See DisableAWSServiceAccess for more information on using the DisableAWSServiceAccess
  6538. // API call, and error handling.
  6539. //
  6540. // This method is useful when you want to inject custom logic or configuration
  6541. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6542. //
  6543. // // Example sending a request using the DisableAWSServiceAccessRequest method.
  6544. // req, resp := client.DisableAWSServiceAccessRequest(params)
  6545. //
  6546. // err := req.Send()
  6547. // if err == nil { // resp is now filled
  6548. // fmt.Println(resp)
  6549. // }
  6550. //
  6551. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DisableAWSServiceAccess
  6552. func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceAccessInput) (req *request.Request, output *DisableAWSServiceAccessOutput) {
  6553. op := &request.Operation{
  6554. Name: opDisableAWSServiceAccess,
  6555. HTTPMethod: "POST",
  6556. HTTPPath: "/",
  6557. }
  6558. if input == nil {
  6559. input = &DisableAWSServiceAccessInput{}
  6560. }
  6561. output = &DisableAWSServiceAccessOutput{}
  6562. req = c.newRequest(op, input, output)
  6563. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  6564. return
  6565. }
  6566. // DisableAWSServiceAccess API operation for AWS Organizations.
  6567. //
  6568. // Disables the integration of an Amazon Web Services service (the service that
  6569. // is specified by ServicePrincipal) with Organizations. When you disable integration,
  6570. // the specified service no longer can create a service-linked role (https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html)
  6571. // in new accounts in your organization. This means the service can't perform
  6572. // operations on your behalf on any new accounts in your organization. The service
  6573. // can still perform operations in older accounts until the service completes
  6574. // its clean-up from Organizations.
  6575. //
  6576. // We strongly recommend that you don't use this command to disable integration
  6577. // between Organizations and the specified Amazon Web Services service. Instead,
  6578. // use the console or commands that are provided by the specified service. This
  6579. // lets the trusted service perform any required initialization when enabling
  6580. // trusted access, such as creating any required resources and any required
  6581. // clean up of resources when disabling trusted access.
  6582. //
  6583. // For information about how to disable trusted service access to your organization
  6584. // using the trusted service, see the Learn more link under the Supports Trusted
  6585. // Access column at Amazon Web Services services that you can use with Organizations
  6586. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html).
  6587. // on this page.
  6588. //
  6589. // If you disable access by using this command, it causes the following actions
  6590. // to occur:
  6591. //
  6592. // - The service can no longer create a service-linked role in the accounts
  6593. // in your organization. This means that the service can't perform operations
  6594. // on your behalf on any new accounts in your organization. The service can
  6595. // still perform operations in older accounts until the service completes
  6596. // its clean-up from Organizations.
  6597. //
  6598. // - The service can no longer perform tasks in the member accounts in the
  6599. // organization, unless those operations are explicitly permitted by the
  6600. // IAM policies that are attached to your roles. This includes any data aggregation
  6601. // from the member accounts to the management account, or to a delegated
  6602. // administrator account, where relevant.
  6603. //
  6604. // - Some services detect this and clean up any remaining data or resources
  6605. // related to the integration, while other services stop accessing the organization
  6606. // but leave any historical data and configuration in place to support a
  6607. // possible re-enabling of the integration.
  6608. //
  6609. // Using the other service's console or commands to disable the integration
  6610. // ensures that the other service is aware that it can clean up any resources
  6611. // that are required only for the integration. How the service cleans up its
  6612. // resources in the organization's accounts depends on that service. For more
  6613. // information, see the documentation for the other Amazon Web Services service.
  6614. //
  6615. // After you perform the DisableAWSServiceAccess operation, the specified service
  6616. // can no longer perform operations in your organization's accounts
  6617. //
  6618. // For more information about integrating other services with Organizations,
  6619. // including the list of services that work with Organizations, see Integrating
  6620. // Organizations with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
  6621. // in the Organizations User Guide.
  6622. //
  6623. // This operation can be called only from the organization's management account.
  6624. //
  6625. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6626. // with awserr.Error's Code and Message methods to get detailed information about
  6627. // the error.
  6628. //
  6629. // See the AWS API reference guide for AWS Organizations's
  6630. // API operation DisableAWSServiceAccess for usage and error information.
  6631. //
  6632. // Returned Error Types:
  6633. //
  6634. // - AccessDeniedException
  6635. // You don't have permissions to perform the requested operation. The user or
  6636. // role that is making the request must have at least one IAM permissions policy
  6637. // attached that grants the required permissions. For more information, see
  6638. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  6639. // in the IAM User Guide.
  6640. //
  6641. // - AWSOrganizationsNotInUseException
  6642. // Your account isn't a member of an organization. To make this request, you
  6643. // must use the credentials of an account that belongs to an organization.
  6644. //
  6645. // - ConcurrentModificationException
  6646. // The target of the operation is currently being modified by a different request.
  6647. // Try again later.
  6648. //
  6649. // - ConstraintViolationException
  6650. // Performing this operation violates a minimum or maximum value limit. For
  6651. // example, attempting to remove the last service control policy (SCP) from
  6652. // an OU or root, inviting or creating too many accounts to the organization,
  6653. // or attaching too many policies to an account, OU, or root. This exception
  6654. // includes a reason that contains additional information about the violated
  6655. // limit:
  6656. //
  6657. // Some of the reasons in the following list might not be applicable to this
  6658. // specific API or operation.
  6659. //
  6660. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  6661. // account from the organization. You can't remove the management account.
  6662. // Instead, after you remove all member accounts, delete the organization
  6663. // itself.
  6664. //
  6665. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  6666. // an account from the organization that doesn't yet have enough information
  6667. // to exist as a standalone account. This account requires you to first complete
  6668. // phone verification. Follow the steps at Removing a member account from
  6669. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  6670. // in the Organizations User Guide.
  6671. //
  6672. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  6673. // of accounts that you can create in one day.
  6674. //
  6675. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  6676. // the number of accounts in an organization. If you need more accounts,
  6677. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  6678. // to request an increase in your limit. Or the number of invitations that
  6679. // you tried to send would cause you to exceed the limit of accounts in your
  6680. // organization. Send fewer invitations or contact Amazon Web Services Support
  6681. // to request an increase in the number of accounts. Deleted and closed accounts
  6682. // still count toward your limit. If you get this exception when running
  6683. // a command immediately after creating the organization, wait one hour and
  6684. // try again. After an hour, if the command continues to fail with this error,
  6685. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  6686. //
  6687. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  6688. // register the management account of the organization as a delegated administrator
  6689. // for an Amazon Web Services service integrated with Organizations. You
  6690. // can designate only a member account as a delegated administrator.
  6691. //
  6692. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  6693. // account. To close the management account for the organization, you must
  6694. // first either remove or close all member accounts in the organization.
  6695. // Follow standard account closure process using root credentials.​
  6696. //
  6697. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  6698. // an account that is registered as a delegated administrator for a service
  6699. // integrated with your organization. To complete this operation, you must
  6700. // first deregister this account as a delegated administrator.
  6701. //
  6702. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  6703. // for the past 30 days.
  6704. //
  6705. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  6706. // of accounts that you can close at a time. ​
  6707. //
  6708. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  6709. // organization in the specified region, you must enable all features mode.
  6710. //
  6711. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  6712. // an Amazon Web Services account as a delegated administrator for an Amazon
  6713. // Web Services service that already has a delegated administrator. To complete
  6714. // this operation, you must first deregister any existing delegated administrators
  6715. // for this service.
  6716. //
  6717. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  6718. // valid for a limited period of time. You must resubmit the request and
  6719. // generate a new verfication code.
  6720. //
  6721. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  6722. // handshakes that you can send in one day.
  6723. //
  6724. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  6725. // supported payment method is associated with the account. Amazon Web Services
  6726. // does not support cards issued by financial institutions in Russia or Belarus.
  6727. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  6728. //
  6729. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  6730. // in this organization, you first must migrate the organization's management
  6731. // account to the marketplace that corresponds to the management account's
  6732. // address. For example, accounts with India addresses must be associated
  6733. // with the AISPL marketplace. All accounts in an organization must be associated
  6734. // with the same marketplace.
  6735. //
  6736. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  6737. // Web Services /> Regions in China. To create an organization, the master
  6738. // must have a valid business license. For more information, contact customer
  6739. // support.
  6740. //
  6741. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  6742. // must first provide a valid contact address and phone number for the management
  6743. // account. Then try the operation again.
  6744. //
  6745. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  6746. // management account must have an associated account in the Amazon Web Services
  6747. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  6748. // in the Amazon Web Services GovCloud User Guide.
  6749. //
  6750. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  6751. // with this management account, you first must associate a valid payment
  6752. // instrument, such as a credit card, with the account. Follow the steps
  6753. // at To leave an organization when all required account information has
  6754. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  6755. // in the Organizations User Guide.
  6756. //
  6757. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  6758. // to register more delegated administrators than allowed for the service
  6759. // principal.
  6760. //
  6761. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  6762. // number of policies of a certain type that can be attached to an entity
  6763. // at one time.
  6764. //
  6765. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  6766. // on this resource.
  6767. //
  6768. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  6769. // with this member account, you first must associate a valid payment instrument,
  6770. // such as a credit card, with the account. Follow the steps at To leave
  6771. // an organization when all required account information has not yet been
  6772. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  6773. // in the Organizations User Guide.
  6774. //
  6775. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  6776. // policy from an entity that would cause the entity to have fewer than the
  6777. // minimum number of policies of a certain type required.
  6778. //
  6779. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  6780. // that requires the organization to be configured to support all features.
  6781. // An organization that supports only consolidated billing features can't
  6782. // perform this operation.
  6783. //
  6784. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  6785. // too many levels deep.
  6786. //
  6787. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  6788. // that you can have in an organization.
  6789. //
  6790. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  6791. // is larger than the maximum size.
  6792. //
  6793. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  6794. // policies that you can have in an organization.
  6795. //
  6796. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  6797. // before you enabled service access. Call the EnableAWSServiceAccess API
  6798. // first.
  6799. //
  6800. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  6801. // tags that are not compliant with the tag policy requirements for this
  6802. // account.
  6803. //
  6804. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  6805. // there is a waiting period before you can remove it from the organization.
  6806. // If you get an error that indicates that a wait period is required, try
  6807. // again in a few days.
  6808. //
  6809. // - InvalidInputException
  6810. // The requested operation failed because you provided invalid values for one
  6811. // or more of the request parameters. This exception includes a reason that
  6812. // contains additional information about the violated limit:
  6813. //
  6814. // Some of the reasons in the following list might not be applicable to this
  6815. // specific API or operation.
  6816. //
  6817. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  6818. // the same entity.
  6819. //
  6820. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  6821. // Services and can't be modified.
  6822. //
  6823. // - INPUT_REQUIRED: You must include a value for all required parameters.
  6824. //
  6825. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  6826. // for the invited account owner.
  6827. //
  6828. // - INVALID_ENUM: You specified an invalid value.
  6829. //
  6830. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  6831. //
  6832. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  6833. // characters.
  6834. //
  6835. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  6836. // at least one invalid value.
  6837. //
  6838. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  6839. // from the response to a previous call of the operation.
  6840. //
  6841. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  6842. // organization, or email) as a party.
  6843. //
  6844. // - INVALID_PATTERN: You provided a value that doesn't match the required
  6845. // pattern.
  6846. //
  6847. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  6848. // match the required pattern.
  6849. //
  6850. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  6851. // name can't begin with the reserved prefix AWSServiceRoleFor.
  6852. //
  6853. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  6854. // Name (ARN) for the organization.
  6855. //
  6856. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  6857. //
  6858. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  6859. // tag. You can’t add, edit, or delete system tag keys because they're
  6860. // reserved for Amazon Web Services use. System tags don’t count against
  6861. // your tags per resource limit.
  6862. //
  6863. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  6864. // for the operation.
  6865. //
  6866. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  6867. // than allowed.
  6868. //
  6869. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  6870. // value than allowed.
  6871. //
  6872. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  6873. // than allowed.
  6874. //
  6875. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  6876. // value than allowed.
  6877. //
  6878. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  6879. // between entities in the same root.
  6880. //
  6881. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  6882. // target entity.
  6883. //
  6884. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  6885. // isn't recognized.
  6886. //
  6887. // - ServiceException
  6888. // Organizations can't complete your request because of an internal service
  6889. // error. Try again later.
  6890. //
  6891. // - TooManyRequestsException
  6892. // You have sent too many requests in too short a period of time. The quota
  6893. // helps protect against denial-of-service attacks. Try again later.
  6894. //
  6895. // For information about quotas that affect Organizations, see Quotas for Organizations
  6896. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  6897. // the Organizations User Guide.
  6898. //
  6899. // - UnsupportedAPIEndpointException
  6900. // This action isn't available in the current Amazon Web Services Region.
  6901. //
  6902. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DisableAWSServiceAccess
  6903. func (c *Organizations) DisableAWSServiceAccess(input *DisableAWSServiceAccessInput) (*DisableAWSServiceAccessOutput, error) {
  6904. req, out := c.DisableAWSServiceAccessRequest(input)
  6905. return out, req.Send()
  6906. }
  6907. // DisableAWSServiceAccessWithContext is the same as DisableAWSServiceAccess with the addition of
  6908. // the ability to pass a context and additional request options.
  6909. //
  6910. // See DisableAWSServiceAccess for details on how to use this API operation.
  6911. //
  6912. // The context must be non-nil and will be used for request cancellation. If
  6913. // the context is nil a panic will occur. In the future the SDK may create
  6914. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6915. // for more information on using Contexts.
  6916. func (c *Organizations) DisableAWSServiceAccessWithContext(ctx aws.Context, input *DisableAWSServiceAccessInput, opts ...request.Option) (*DisableAWSServiceAccessOutput, error) {
  6917. req, out := c.DisableAWSServiceAccessRequest(input)
  6918. req.SetContext(ctx)
  6919. req.ApplyOptions(opts...)
  6920. return out, req.Send()
  6921. }
  6922. const opDisablePolicyType = "DisablePolicyType"
  6923. // DisablePolicyTypeRequest generates a "aws/request.Request" representing the
  6924. // client's request for the DisablePolicyType operation. The "output" return
  6925. // value will be populated with the request's response once the request completes
  6926. // successfully.
  6927. //
  6928. // Use "Send" method on the returned Request to send the API call to the service.
  6929. // the "output" return value is not valid until after Send returns without error.
  6930. //
  6931. // See DisablePolicyType for more information on using the DisablePolicyType
  6932. // API call, and error handling.
  6933. //
  6934. // This method is useful when you want to inject custom logic or configuration
  6935. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6936. //
  6937. // // Example sending a request using the DisablePolicyTypeRequest method.
  6938. // req, resp := client.DisablePolicyTypeRequest(params)
  6939. //
  6940. // err := req.Send()
  6941. // if err == nil { // resp is now filled
  6942. // fmt.Println(resp)
  6943. // }
  6944. //
  6945. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DisablePolicyType
  6946. func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) (req *request.Request, output *DisablePolicyTypeOutput) {
  6947. op := &request.Operation{
  6948. Name: opDisablePolicyType,
  6949. HTTPMethod: "POST",
  6950. HTTPPath: "/",
  6951. }
  6952. if input == nil {
  6953. input = &DisablePolicyTypeInput{}
  6954. }
  6955. output = &DisablePolicyTypeOutput{}
  6956. req = c.newRequest(op, input, output)
  6957. return
  6958. }
  6959. // DisablePolicyType API operation for AWS Organizations.
  6960. //
  6961. // Disables an organizational policy type in a root. A policy of a certain type
  6962. // can be attached to entities in a root only if that type is enabled in the
  6963. // root. After you perform this operation, you no longer can attach policies
  6964. // of the specified type to that root or to any organizational unit (OU) or
  6965. // account in that root. You can undo this by using the EnablePolicyType operation.
  6966. //
  6967. // This is an asynchronous request that Amazon Web Services performs in the
  6968. // background. If you disable a policy type for a root, it still appears enabled
  6969. // for the organization if all features (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
  6970. // are enabled for the organization. Amazon Web Services recommends that you
  6971. // first use ListRoots to see the status of policy types for a specified root,
  6972. // and then use this operation.
  6973. //
  6974. // This operation can be called only from the organization's management account.
  6975. //
  6976. // To view the status of available policy types in the organization, use DescribeOrganization.
  6977. //
  6978. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6979. // with awserr.Error's Code and Message methods to get detailed information about
  6980. // the error.
  6981. //
  6982. // See the AWS API reference guide for AWS Organizations's
  6983. // API operation DisablePolicyType for usage and error information.
  6984. //
  6985. // Returned Error Types:
  6986. //
  6987. // - AccessDeniedException
  6988. // You don't have permissions to perform the requested operation. The user or
  6989. // role that is making the request must have at least one IAM permissions policy
  6990. // attached that grants the required permissions. For more information, see
  6991. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  6992. // in the IAM User Guide.
  6993. //
  6994. // - AWSOrganizationsNotInUseException
  6995. // Your account isn't a member of an organization. To make this request, you
  6996. // must use the credentials of an account that belongs to an organization.
  6997. //
  6998. // - ConcurrentModificationException
  6999. // The target of the operation is currently being modified by a different request.
  7000. // Try again later.
  7001. //
  7002. // - ConstraintViolationException
  7003. // Performing this operation violates a minimum or maximum value limit. For
  7004. // example, attempting to remove the last service control policy (SCP) from
  7005. // an OU or root, inviting or creating too many accounts to the organization,
  7006. // or attaching too many policies to an account, OU, or root. This exception
  7007. // includes a reason that contains additional information about the violated
  7008. // limit:
  7009. //
  7010. // Some of the reasons in the following list might not be applicable to this
  7011. // specific API or operation.
  7012. //
  7013. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  7014. // account from the organization. You can't remove the management account.
  7015. // Instead, after you remove all member accounts, delete the organization
  7016. // itself.
  7017. //
  7018. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  7019. // an account from the organization that doesn't yet have enough information
  7020. // to exist as a standalone account. This account requires you to first complete
  7021. // phone verification. Follow the steps at Removing a member account from
  7022. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  7023. // in the Organizations User Guide.
  7024. //
  7025. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  7026. // of accounts that you can create in one day.
  7027. //
  7028. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  7029. // the number of accounts in an organization. If you need more accounts,
  7030. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  7031. // to request an increase in your limit. Or the number of invitations that
  7032. // you tried to send would cause you to exceed the limit of accounts in your
  7033. // organization. Send fewer invitations or contact Amazon Web Services Support
  7034. // to request an increase in the number of accounts. Deleted and closed accounts
  7035. // still count toward your limit. If you get this exception when running
  7036. // a command immediately after creating the organization, wait one hour and
  7037. // try again. After an hour, if the command continues to fail with this error,
  7038. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  7039. //
  7040. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  7041. // register the management account of the organization as a delegated administrator
  7042. // for an Amazon Web Services service integrated with Organizations. You
  7043. // can designate only a member account as a delegated administrator.
  7044. //
  7045. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  7046. // account. To close the management account for the organization, you must
  7047. // first either remove or close all member accounts in the organization.
  7048. // Follow standard account closure process using root credentials.​
  7049. //
  7050. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  7051. // an account that is registered as a delegated administrator for a service
  7052. // integrated with your organization. To complete this operation, you must
  7053. // first deregister this account as a delegated administrator.
  7054. //
  7055. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  7056. // for the past 30 days.
  7057. //
  7058. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  7059. // of accounts that you can close at a time. ​
  7060. //
  7061. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  7062. // organization in the specified region, you must enable all features mode.
  7063. //
  7064. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  7065. // an Amazon Web Services account as a delegated administrator for an Amazon
  7066. // Web Services service that already has a delegated administrator. To complete
  7067. // this operation, you must first deregister any existing delegated administrators
  7068. // for this service.
  7069. //
  7070. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  7071. // valid for a limited period of time. You must resubmit the request and
  7072. // generate a new verfication code.
  7073. //
  7074. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  7075. // handshakes that you can send in one day.
  7076. //
  7077. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  7078. // supported payment method is associated with the account. Amazon Web Services
  7079. // does not support cards issued by financial institutions in Russia or Belarus.
  7080. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  7081. //
  7082. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  7083. // in this organization, you first must migrate the organization's management
  7084. // account to the marketplace that corresponds to the management account's
  7085. // address. For example, accounts with India addresses must be associated
  7086. // with the AISPL marketplace. All accounts in an organization must be associated
  7087. // with the same marketplace.
  7088. //
  7089. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  7090. // Web Services /> Regions in China. To create an organization, the master
  7091. // must have a valid business license. For more information, contact customer
  7092. // support.
  7093. //
  7094. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  7095. // must first provide a valid contact address and phone number for the management
  7096. // account. Then try the operation again.
  7097. //
  7098. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  7099. // management account must have an associated account in the Amazon Web Services
  7100. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  7101. // in the Amazon Web Services GovCloud User Guide.
  7102. //
  7103. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  7104. // with this management account, you first must associate a valid payment
  7105. // instrument, such as a credit card, with the account. Follow the steps
  7106. // at To leave an organization when all required account information has
  7107. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  7108. // in the Organizations User Guide.
  7109. //
  7110. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  7111. // to register more delegated administrators than allowed for the service
  7112. // principal.
  7113. //
  7114. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  7115. // number of policies of a certain type that can be attached to an entity
  7116. // at one time.
  7117. //
  7118. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  7119. // on this resource.
  7120. //
  7121. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  7122. // with this member account, you first must associate a valid payment instrument,
  7123. // such as a credit card, with the account. Follow the steps at To leave
  7124. // an organization when all required account information has not yet been
  7125. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  7126. // in the Organizations User Guide.
  7127. //
  7128. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  7129. // policy from an entity that would cause the entity to have fewer than the
  7130. // minimum number of policies of a certain type required.
  7131. //
  7132. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  7133. // that requires the organization to be configured to support all features.
  7134. // An organization that supports only consolidated billing features can't
  7135. // perform this operation.
  7136. //
  7137. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  7138. // too many levels deep.
  7139. //
  7140. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  7141. // that you can have in an organization.
  7142. //
  7143. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  7144. // is larger than the maximum size.
  7145. //
  7146. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  7147. // policies that you can have in an organization.
  7148. //
  7149. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  7150. // before you enabled service access. Call the EnableAWSServiceAccess API
  7151. // first.
  7152. //
  7153. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  7154. // tags that are not compliant with the tag policy requirements for this
  7155. // account.
  7156. //
  7157. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  7158. // there is a waiting period before you can remove it from the organization.
  7159. // If you get an error that indicates that a wait period is required, try
  7160. // again in a few days.
  7161. //
  7162. // - InvalidInputException
  7163. // The requested operation failed because you provided invalid values for one
  7164. // or more of the request parameters. This exception includes a reason that
  7165. // contains additional information about the violated limit:
  7166. //
  7167. // Some of the reasons in the following list might not be applicable to this
  7168. // specific API or operation.
  7169. //
  7170. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  7171. // the same entity.
  7172. //
  7173. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  7174. // Services and can't be modified.
  7175. //
  7176. // - INPUT_REQUIRED: You must include a value for all required parameters.
  7177. //
  7178. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  7179. // for the invited account owner.
  7180. //
  7181. // - INVALID_ENUM: You specified an invalid value.
  7182. //
  7183. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  7184. //
  7185. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  7186. // characters.
  7187. //
  7188. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  7189. // at least one invalid value.
  7190. //
  7191. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  7192. // from the response to a previous call of the operation.
  7193. //
  7194. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  7195. // organization, or email) as a party.
  7196. //
  7197. // - INVALID_PATTERN: You provided a value that doesn't match the required
  7198. // pattern.
  7199. //
  7200. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  7201. // match the required pattern.
  7202. //
  7203. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  7204. // name can't begin with the reserved prefix AWSServiceRoleFor.
  7205. //
  7206. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  7207. // Name (ARN) for the organization.
  7208. //
  7209. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  7210. //
  7211. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  7212. // tag. You can’t add, edit, or delete system tag keys because they're
  7213. // reserved for Amazon Web Services use. System tags don’t count against
  7214. // your tags per resource limit.
  7215. //
  7216. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  7217. // for the operation.
  7218. //
  7219. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  7220. // than allowed.
  7221. //
  7222. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  7223. // value than allowed.
  7224. //
  7225. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  7226. // than allowed.
  7227. //
  7228. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  7229. // value than allowed.
  7230. //
  7231. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  7232. // between entities in the same root.
  7233. //
  7234. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  7235. // target entity.
  7236. //
  7237. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  7238. // isn't recognized.
  7239. //
  7240. // - PolicyTypeNotEnabledException
  7241. // The specified policy type isn't currently enabled in this root. You can't
  7242. // attach policies of the specified type to entities in a root until you enable
  7243. // that type in the root. For more information, see Enabling All Features in
  7244. // Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
  7245. // in the Organizations User Guide.
  7246. //
  7247. // - RootNotFoundException
  7248. // We can't find a root with the RootId that you specified.
  7249. //
  7250. // - ServiceException
  7251. // Organizations can't complete your request because of an internal service
  7252. // error. Try again later.
  7253. //
  7254. // - TooManyRequestsException
  7255. // You have sent too many requests in too short a period of time. The quota
  7256. // helps protect against denial-of-service attacks. Try again later.
  7257. //
  7258. // For information about quotas that affect Organizations, see Quotas for Organizations
  7259. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  7260. // the Organizations User Guide.
  7261. //
  7262. // - UnsupportedAPIEndpointException
  7263. // This action isn't available in the current Amazon Web Services Region.
  7264. //
  7265. // - PolicyChangesInProgressException
  7266. // Changes to the effective policy are in progress, and its contents can't be
  7267. // returned. Try the operation again later.
  7268. //
  7269. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DisablePolicyType
  7270. func (c *Organizations) DisablePolicyType(input *DisablePolicyTypeInput) (*DisablePolicyTypeOutput, error) {
  7271. req, out := c.DisablePolicyTypeRequest(input)
  7272. return out, req.Send()
  7273. }
  7274. // DisablePolicyTypeWithContext is the same as DisablePolicyType with the addition of
  7275. // the ability to pass a context and additional request options.
  7276. //
  7277. // See DisablePolicyType for details on how to use this API operation.
  7278. //
  7279. // The context must be non-nil and will be used for request cancellation. If
  7280. // the context is nil a panic will occur. In the future the SDK may create
  7281. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  7282. // for more information on using Contexts.
  7283. func (c *Organizations) DisablePolicyTypeWithContext(ctx aws.Context, input *DisablePolicyTypeInput, opts ...request.Option) (*DisablePolicyTypeOutput, error) {
  7284. req, out := c.DisablePolicyTypeRequest(input)
  7285. req.SetContext(ctx)
  7286. req.ApplyOptions(opts...)
  7287. return out, req.Send()
  7288. }
  7289. const opEnableAWSServiceAccess = "EnableAWSServiceAccess"
  7290. // EnableAWSServiceAccessRequest generates a "aws/request.Request" representing the
  7291. // client's request for the EnableAWSServiceAccess operation. The "output" return
  7292. // value will be populated with the request's response once the request completes
  7293. // successfully.
  7294. //
  7295. // Use "Send" method on the returned Request to send the API call to the service.
  7296. // the "output" return value is not valid until after Send returns without error.
  7297. //
  7298. // See EnableAWSServiceAccess for more information on using the EnableAWSServiceAccess
  7299. // API call, and error handling.
  7300. //
  7301. // This method is useful when you want to inject custom logic or configuration
  7302. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  7303. //
  7304. // // Example sending a request using the EnableAWSServiceAccessRequest method.
  7305. // req, resp := client.EnableAWSServiceAccessRequest(params)
  7306. //
  7307. // err := req.Send()
  7308. // if err == nil { // resp is now filled
  7309. // fmt.Println(resp)
  7310. // }
  7311. //
  7312. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnableAWSServiceAccess
  7313. func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAccessInput) (req *request.Request, output *EnableAWSServiceAccessOutput) {
  7314. op := &request.Operation{
  7315. Name: opEnableAWSServiceAccess,
  7316. HTTPMethod: "POST",
  7317. HTTPPath: "/",
  7318. }
  7319. if input == nil {
  7320. input = &EnableAWSServiceAccessInput{}
  7321. }
  7322. output = &EnableAWSServiceAccessOutput{}
  7323. req = c.newRequest(op, input, output)
  7324. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  7325. return
  7326. }
  7327. // EnableAWSServiceAccess API operation for AWS Organizations.
  7328. //
  7329. // Enables the integration of an Amazon Web Services service (the service that
  7330. // is specified by ServicePrincipal) with Organizations. When you enable integration,
  7331. // you allow the specified service to create a service-linked role (https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html)
  7332. // in all the accounts in your organization. This allows the service to perform
  7333. // operations on your behalf in your organization and its accounts.
  7334. //
  7335. // We recommend that you enable integration between Organizations and the specified
  7336. // Amazon Web Services service by using the console or commands that are provided
  7337. // by the specified service. Doing so ensures that the service is aware that
  7338. // it can create the resources that are required for the integration. How the
  7339. // service creates those resources in the organization's accounts depends on
  7340. // that service. For more information, see the documentation for the other Amazon
  7341. // Web Services service.
  7342. //
  7343. // For more information about enabling services to integrate with Organizations,
  7344. // see Integrating Organizations with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
  7345. // in the Organizations User Guide.
  7346. //
  7347. // You can only call this operation from the organization's management account
  7348. // and only if the organization has enabled all features (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html).
  7349. //
  7350. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  7351. // with awserr.Error's Code and Message methods to get detailed information about
  7352. // the error.
  7353. //
  7354. // See the AWS API reference guide for AWS Organizations's
  7355. // API operation EnableAWSServiceAccess for usage and error information.
  7356. //
  7357. // Returned Error Types:
  7358. //
  7359. // - AccessDeniedException
  7360. // You don't have permissions to perform the requested operation. The user or
  7361. // role that is making the request must have at least one IAM permissions policy
  7362. // attached that grants the required permissions. For more information, see
  7363. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  7364. // in the IAM User Guide.
  7365. //
  7366. // - AWSOrganizationsNotInUseException
  7367. // Your account isn't a member of an organization. To make this request, you
  7368. // must use the credentials of an account that belongs to an organization.
  7369. //
  7370. // - ConcurrentModificationException
  7371. // The target of the operation is currently being modified by a different request.
  7372. // Try again later.
  7373. //
  7374. // - ConstraintViolationException
  7375. // Performing this operation violates a minimum or maximum value limit. For
  7376. // example, attempting to remove the last service control policy (SCP) from
  7377. // an OU or root, inviting or creating too many accounts to the organization,
  7378. // or attaching too many policies to an account, OU, or root. This exception
  7379. // includes a reason that contains additional information about the violated
  7380. // limit:
  7381. //
  7382. // Some of the reasons in the following list might not be applicable to this
  7383. // specific API or operation.
  7384. //
  7385. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  7386. // account from the organization. You can't remove the management account.
  7387. // Instead, after you remove all member accounts, delete the organization
  7388. // itself.
  7389. //
  7390. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  7391. // an account from the organization that doesn't yet have enough information
  7392. // to exist as a standalone account. This account requires you to first complete
  7393. // phone verification. Follow the steps at Removing a member account from
  7394. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  7395. // in the Organizations User Guide.
  7396. //
  7397. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  7398. // of accounts that you can create in one day.
  7399. //
  7400. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  7401. // the number of accounts in an organization. If you need more accounts,
  7402. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  7403. // to request an increase in your limit. Or the number of invitations that
  7404. // you tried to send would cause you to exceed the limit of accounts in your
  7405. // organization. Send fewer invitations or contact Amazon Web Services Support
  7406. // to request an increase in the number of accounts. Deleted and closed accounts
  7407. // still count toward your limit. If you get this exception when running
  7408. // a command immediately after creating the organization, wait one hour and
  7409. // try again. After an hour, if the command continues to fail with this error,
  7410. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  7411. //
  7412. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  7413. // register the management account of the organization as a delegated administrator
  7414. // for an Amazon Web Services service integrated with Organizations. You
  7415. // can designate only a member account as a delegated administrator.
  7416. //
  7417. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  7418. // account. To close the management account for the organization, you must
  7419. // first either remove or close all member accounts in the organization.
  7420. // Follow standard account closure process using root credentials.​
  7421. //
  7422. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  7423. // an account that is registered as a delegated administrator for a service
  7424. // integrated with your organization. To complete this operation, you must
  7425. // first deregister this account as a delegated administrator.
  7426. //
  7427. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  7428. // for the past 30 days.
  7429. //
  7430. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  7431. // of accounts that you can close at a time. ​
  7432. //
  7433. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  7434. // organization in the specified region, you must enable all features mode.
  7435. //
  7436. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  7437. // an Amazon Web Services account as a delegated administrator for an Amazon
  7438. // Web Services service that already has a delegated administrator. To complete
  7439. // this operation, you must first deregister any existing delegated administrators
  7440. // for this service.
  7441. //
  7442. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  7443. // valid for a limited period of time. You must resubmit the request and
  7444. // generate a new verfication code.
  7445. //
  7446. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  7447. // handshakes that you can send in one day.
  7448. //
  7449. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  7450. // supported payment method is associated with the account. Amazon Web Services
  7451. // does not support cards issued by financial institutions in Russia or Belarus.
  7452. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  7453. //
  7454. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  7455. // in this organization, you first must migrate the organization's management
  7456. // account to the marketplace that corresponds to the management account's
  7457. // address. For example, accounts with India addresses must be associated
  7458. // with the AISPL marketplace. All accounts in an organization must be associated
  7459. // with the same marketplace.
  7460. //
  7461. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  7462. // Web Services /> Regions in China. To create an organization, the master
  7463. // must have a valid business license. For more information, contact customer
  7464. // support.
  7465. //
  7466. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  7467. // must first provide a valid contact address and phone number for the management
  7468. // account. Then try the operation again.
  7469. //
  7470. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  7471. // management account must have an associated account in the Amazon Web Services
  7472. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  7473. // in the Amazon Web Services GovCloud User Guide.
  7474. //
  7475. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  7476. // with this management account, you first must associate a valid payment
  7477. // instrument, such as a credit card, with the account. Follow the steps
  7478. // at To leave an organization when all required account information has
  7479. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  7480. // in the Organizations User Guide.
  7481. //
  7482. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  7483. // to register more delegated administrators than allowed for the service
  7484. // principal.
  7485. //
  7486. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  7487. // number of policies of a certain type that can be attached to an entity
  7488. // at one time.
  7489. //
  7490. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  7491. // on this resource.
  7492. //
  7493. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  7494. // with this member account, you first must associate a valid payment instrument,
  7495. // such as a credit card, with the account. Follow the steps at To leave
  7496. // an organization when all required account information has not yet been
  7497. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  7498. // in the Organizations User Guide.
  7499. //
  7500. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  7501. // policy from an entity that would cause the entity to have fewer than the
  7502. // minimum number of policies of a certain type required.
  7503. //
  7504. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  7505. // that requires the organization to be configured to support all features.
  7506. // An organization that supports only consolidated billing features can't
  7507. // perform this operation.
  7508. //
  7509. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  7510. // too many levels deep.
  7511. //
  7512. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  7513. // that you can have in an organization.
  7514. //
  7515. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  7516. // is larger than the maximum size.
  7517. //
  7518. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  7519. // policies that you can have in an organization.
  7520. //
  7521. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  7522. // before you enabled service access. Call the EnableAWSServiceAccess API
  7523. // first.
  7524. //
  7525. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  7526. // tags that are not compliant with the tag policy requirements for this
  7527. // account.
  7528. //
  7529. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  7530. // there is a waiting period before you can remove it from the organization.
  7531. // If you get an error that indicates that a wait period is required, try
  7532. // again in a few days.
  7533. //
  7534. // - InvalidInputException
  7535. // The requested operation failed because you provided invalid values for one
  7536. // or more of the request parameters. This exception includes a reason that
  7537. // contains additional information about the violated limit:
  7538. //
  7539. // Some of the reasons in the following list might not be applicable to this
  7540. // specific API or operation.
  7541. //
  7542. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  7543. // the same entity.
  7544. //
  7545. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  7546. // Services and can't be modified.
  7547. //
  7548. // - INPUT_REQUIRED: You must include a value for all required parameters.
  7549. //
  7550. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  7551. // for the invited account owner.
  7552. //
  7553. // - INVALID_ENUM: You specified an invalid value.
  7554. //
  7555. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  7556. //
  7557. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  7558. // characters.
  7559. //
  7560. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  7561. // at least one invalid value.
  7562. //
  7563. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  7564. // from the response to a previous call of the operation.
  7565. //
  7566. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  7567. // organization, or email) as a party.
  7568. //
  7569. // - INVALID_PATTERN: You provided a value that doesn't match the required
  7570. // pattern.
  7571. //
  7572. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  7573. // match the required pattern.
  7574. //
  7575. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  7576. // name can't begin with the reserved prefix AWSServiceRoleFor.
  7577. //
  7578. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  7579. // Name (ARN) for the organization.
  7580. //
  7581. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  7582. //
  7583. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  7584. // tag. You can’t add, edit, or delete system tag keys because they're
  7585. // reserved for Amazon Web Services use. System tags don’t count against
  7586. // your tags per resource limit.
  7587. //
  7588. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  7589. // for the operation.
  7590. //
  7591. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  7592. // than allowed.
  7593. //
  7594. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  7595. // value than allowed.
  7596. //
  7597. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  7598. // than allowed.
  7599. //
  7600. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  7601. // value than allowed.
  7602. //
  7603. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  7604. // between entities in the same root.
  7605. //
  7606. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  7607. // target entity.
  7608. //
  7609. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  7610. // isn't recognized.
  7611. //
  7612. // - ServiceException
  7613. // Organizations can't complete your request because of an internal service
  7614. // error. Try again later.
  7615. //
  7616. // - TooManyRequestsException
  7617. // You have sent too many requests in too short a period of time. The quota
  7618. // helps protect against denial-of-service attacks. Try again later.
  7619. //
  7620. // For information about quotas that affect Organizations, see Quotas for Organizations
  7621. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  7622. // the Organizations User Guide.
  7623. //
  7624. // - UnsupportedAPIEndpointException
  7625. // This action isn't available in the current Amazon Web Services Region.
  7626. //
  7627. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnableAWSServiceAccess
  7628. func (c *Organizations) EnableAWSServiceAccess(input *EnableAWSServiceAccessInput) (*EnableAWSServiceAccessOutput, error) {
  7629. req, out := c.EnableAWSServiceAccessRequest(input)
  7630. return out, req.Send()
  7631. }
  7632. // EnableAWSServiceAccessWithContext is the same as EnableAWSServiceAccess with the addition of
  7633. // the ability to pass a context and additional request options.
  7634. //
  7635. // See EnableAWSServiceAccess for details on how to use this API operation.
  7636. //
  7637. // The context must be non-nil and will be used for request cancellation. If
  7638. // the context is nil a panic will occur. In the future the SDK may create
  7639. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  7640. // for more information on using Contexts.
  7641. func (c *Organizations) EnableAWSServiceAccessWithContext(ctx aws.Context, input *EnableAWSServiceAccessInput, opts ...request.Option) (*EnableAWSServiceAccessOutput, error) {
  7642. req, out := c.EnableAWSServiceAccessRequest(input)
  7643. req.SetContext(ctx)
  7644. req.ApplyOptions(opts...)
  7645. return out, req.Send()
  7646. }
  7647. const opEnableAllFeatures = "EnableAllFeatures"
  7648. // EnableAllFeaturesRequest generates a "aws/request.Request" representing the
  7649. // client's request for the EnableAllFeatures operation. The "output" return
  7650. // value will be populated with the request's response once the request completes
  7651. // successfully.
  7652. //
  7653. // Use "Send" method on the returned Request to send the API call to the service.
  7654. // the "output" return value is not valid until after Send returns without error.
  7655. //
  7656. // See EnableAllFeatures for more information on using the EnableAllFeatures
  7657. // API call, and error handling.
  7658. //
  7659. // This method is useful when you want to inject custom logic or configuration
  7660. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  7661. //
  7662. // // Example sending a request using the EnableAllFeaturesRequest method.
  7663. // req, resp := client.EnableAllFeaturesRequest(params)
  7664. //
  7665. // err := req.Send()
  7666. // if err == nil { // resp is now filled
  7667. // fmt.Println(resp)
  7668. // }
  7669. //
  7670. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnableAllFeatures
  7671. func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) (req *request.Request, output *EnableAllFeaturesOutput) {
  7672. op := &request.Operation{
  7673. Name: opEnableAllFeatures,
  7674. HTTPMethod: "POST",
  7675. HTTPPath: "/",
  7676. }
  7677. if input == nil {
  7678. input = &EnableAllFeaturesInput{}
  7679. }
  7680. output = &EnableAllFeaturesOutput{}
  7681. req = c.newRequest(op, input, output)
  7682. return
  7683. }
  7684. // EnableAllFeatures API operation for AWS Organizations.
  7685. //
  7686. // Enables all features in an organization. This enables the use of organization
  7687. // policies that can restrict the services and actions that can be called in
  7688. // each account. Until you enable all features, you have access only to consolidated
  7689. // billing, and you can't use any of the advanced account administration features
  7690. // that Organizations supports. For more information, see Enabling All Features
  7691. // in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
  7692. // in the Organizations User Guide.
  7693. //
  7694. // This operation is required only for organizations that were created explicitly
  7695. // with only the consolidated billing features enabled. Calling this operation
  7696. // sends a handshake to every invited account in the organization. The feature
  7697. // set change can be finalized and the additional features enabled only after
  7698. // all administrators in the invited accounts approve the change by accepting
  7699. // the handshake.
  7700. //
  7701. // After you enable all features, you can separately enable or disable individual
  7702. // policy types in a root using EnablePolicyType and DisablePolicyType. To see
  7703. // the status of policy types in a root, use ListRoots.
  7704. //
  7705. // After all invited member accounts accept the handshake, you finalize the
  7706. // feature set change by accepting the handshake that contains "Action": "ENABLE_ALL_FEATURES".
  7707. // This completes the change.
  7708. //
  7709. // After you enable all features in your organization, the management account
  7710. // in the organization can apply policies on all member accounts. These policies
  7711. // can restrict what users and even administrators in those accounts can do.
  7712. // The management account can apply policies that prevent accounts from leaving
  7713. // the organization. Ensure that your account administrators are aware of this.
  7714. //
  7715. // This operation can be called only from the organization's management account.
  7716. //
  7717. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  7718. // with awserr.Error's Code and Message methods to get detailed information about
  7719. // the error.
  7720. //
  7721. // See the AWS API reference guide for AWS Organizations's
  7722. // API operation EnableAllFeatures for usage and error information.
  7723. //
  7724. // Returned Error Types:
  7725. //
  7726. // - AccessDeniedException
  7727. // You don't have permissions to perform the requested operation. The user or
  7728. // role that is making the request must have at least one IAM permissions policy
  7729. // attached that grants the required permissions. For more information, see
  7730. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  7731. // in the IAM User Guide.
  7732. //
  7733. // - AWSOrganizationsNotInUseException
  7734. // Your account isn't a member of an organization. To make this request, you
  7735. // must use the credentials of an account that belongs to an organization.
  7736. //
  7737. // - ConcurrentModificationException
  7738. // The target of the operation is currently being modified by a different request.
  7739. // Try again later.
  7740. //
  7741. // - HandshakeConstraintViolationException
  7742. // The requested operation would violate the constraint identified in the reason
  7743. // code.
  7744. //
  7745. // Some of the reasons in the following list might not be applicable to this
  7746. // specific API or operation:
  7747. //
  7748. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  7749. // the number of accounts in an organization. Note that deleted and closed
  7750. // accounts still count toward your limit. If you get this exception immediately
  7751. // after creating the organization, wait one hour and try again. If after
  7752. // an hour it continues to fail with this error, contact Amazon Web Services
  7753. // Support (https://docs.aws.amazon.com/support/home#/).
  7754. //
  7755. // - ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because
  7756. // the invited account is already a member of an organization.
  7757. //
  7758. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  7759. // handshakes that you can send in one day.
  7760. //
  7761. // - INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations
  7762. // to join an organization while it's in the process of enabling all features.
  7763. // You can resume inviting accounts after you finalize the process when all
  7764. // accounts have agreed to the change.
  7765. //
  7766. // - ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid
  7767. // because the organization has already enabled all features.
  7768. //
  7769. // - ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION: The handshake
  7770. // request is invalid because the organization has already started the process
  7771. // to enable all features.
  7772. //
  7773. // - ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because
  7774. // the account is from a different marketplace than the accounts in the organization.
  7775. // For example, accounts with India addresses must be associated with the
  7776. // AISPL marketplace. All accounts in an organization must be from the same
  7777. // marketplace.
  7778. //
  7779. // - ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to
  7780. // change the membership of an account too quickly after its previous change.
  7781. //
  7782. // - PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an
  7783. // account that doesn't have a payment instrument, such as a credit card,
  7784. // associated with it.
  7785. //
  7786. // - InvalidInputException
  7787. // The requested operation failed because you provided invalid values for one
  7788. // or more of the request parameters. This exception includes a reason that
  7789. // contains additional information about the violated limit:
  7790. //
  7791. // Some of the reasons in the following list might not be applicable to this
  7792. // specific API or operation.
  7793. //
  7794. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  7795. // the same entity.
  7796. //
  7797. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  7798. // Services and can't be modified.
  7799. //
  7800. // - INPUT_REQUIRED: You must include a value for all required parameters.
  7801. //
  7802. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  7803. // for the invited account owner.
  7804. //
  7805. // - INVALID_ENUM: You specified an invalid value.
  7806. //
  7807. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  7808. //
  7809. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  7810. // characters.
  7811. //
  7812. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  7813. // at least one invalid value.
  7814. //
  7815. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  7816. // from the response to a previous call of the operation.
  7817. //
  7818. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  7819. // organization, or email) as a party.
  7820. //
  7821. // - INVALID_PATTERN: You provided a value that doesn't match the required
  7822. // pattern.
  7823. //
  7824. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  7825. // match the required pattern.
  7826. //
  7827. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  7828. // name can't begin with the reserved prefix AWSServiceRoleFor.
  7829. //
  7830. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  7831. // Name (ARN) for the organization.
  7832. //
  7833. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  7834. //
  7835. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  7836. // tag. You can’t add, edit, or delete system tag keys because they're
  7837. // reserved for Amazon Web Services use. System tags don’t count against
  7838. // your tags per resource limit.
  7839. //
  7840. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  7841. // for the operation.
  7842. //
  7843. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  7844. // than allowed.
  7845. //
  7846. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  7847. // value than allowed.
  7848. //
  7849. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  7850. // than allowed.
  7851. //
  7852. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  7853. // value than allowed.
  7854. //
  7855. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  7856. // between entities in the same root.
  7857. //
  7858. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  7859. // target entity.
  7860. //
  7861. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  7862. // isn't recognized.
  7863. //
  7864. // - ServiceException
  7865. // Organizations can't complete your request because of an internal service
  7866. // error. Try again later.
  7867. //
  7868. // - TooManyRequestsException
  7869. // You have sent too many requests in too short a period of time. The quota
  7870. // helps protect against denial-of-service attacks. Try again later.
  7871. //
  7872. // For information about quotas that affect Organizations, see Quotas for Organizations
  7873. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  7874. // the Organizations User Guide.
  7875. //
  7876. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnableAllFeatures
  7877. func (c *Organizations) EnableAllFeatures(input *EnableAllFeaturesInput) (*EnableAllFeaturesOutput, error) {
  7878. req, out := c.EnableAllFeaturesRequest(input)
  7879. return out, req.Send()
  7880. }
  7881. // EnableAllFeaturesWithContext is the same as EnableAllFeatures with the addition of
  7882. // the ability to pass a context and additional request options.
  7883. //
  7884. // See EnableAllFeatures for details on how to use this API operation.
  7885. //
  7886. // The context must be non-nil and will be used for request cancellation. If
  7887. // the context is nil a panic will occur. In the future the SDK may create
  7888. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  7889. // for more information on using Contexts.
  7890. func (c *Organizations) EnableAllFeaturesWithContext(ctx aws.Context, input *EnableAllFeaturesInput, opts ...request.Option) (*EnableAllFeaturesOutput, error) {
  7891. req, out := c.EnableAllFeaturesRequest(input)
  7892. req.SetContext(ctx)
  7893. req.ApplyOptions(opts...)
  7894. return out, req.Send()
  7895. }
  7896. const opEnablePolicyType = "EnablePolicyType"
  7897. // EnablePolicyTypeRequest generates a "aws/request.Request" representing the
  7898. // client's request for the EnablePolicyType operation. The "output" return
  7899. // value will be populated with the request's response once the request completes
  7900. // successfully.
  7901. //
  7902. // Use "Send" method on the returned Request to send the API call to the service.
  7903. // the "output" return value is not valid until after Send returns without error.
  7904. //
  7905. // See EnablePolicyType for more information on using the EnablePolicyType
  7906. // API call, and error handling.
  7907. //
  7908. // This method is useful when you want to inject custom logic or configuration
  7909. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  7910. //
  7911. // // Example sending a request using the EnablePolicyTypeRequest method.
  7912. // req, resp := client.EnablePolicyTypeRequest(params)
  7913. //
  7914. // err := req.Send()
  7915. // if err == nil { // resp is now filled
  7916. // fmt.Println(resp)
  7917. // }
  7918. //
  7919. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnablePolicyType
  7920. func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (req *request.Request, output *EnablePolicyTypeOutput) {
  7921. op := &request.Operation{
  7922. Name: opEnablePolicyType,
  7923. HTTPMethod: "POST",
  7924. HTTPPath: "/",
  7925. }
  7926. if input == nil {
  7927. input = &EnablePolicyTypeInput{}
  7928. }
  7929. output = &EnablePolicyTypeOutput{}
  7930. req = c.newRequest(op, input, output)
  7931. return
  7932. }
  7933. // EnablePolicyType API operation for AWS Organizations.
  7934. //
  7935. // Enables a policy type in a root. After you enable a policy type in a root,
  7936. // you can attach policies of that type to the root, any organizational unit
  7937. // (OU), or account in that root. You can undo this by using the DisablePolicyType
  7938. // operation.
  7939. //
  7940. // This is an asynchronous request that Amazon Web Services performs in the
  7941. // background. Amazon Web Services recommends that you first use ListRoots to
  7942. // see the status of policy types for a specified root, and then use this operation.
  7943. //
  7944. // This operation can be called only from the organization's management account.
  7945. //
  7946. // You can enable a policy type in a root only if that policy type is available
  7947. // in the organization. To view the status of available policy types in the
  7948. // organization, use DescribeOrganization.
  7949. //
  7950. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  7951. // with awserr.Error's Code and Message methods to get detailed information about
  7952. // the error.
  7953. //
  7954. // See the AWS API reference guide for AWS Organizations's
  7955. // API operation EnablePolicyType for usage and error information.
  7956. //
  7957. // Returned Error Types:
  7958. //
  7959. // - AccessDeniedException
  7960. // You don't have permissions to perform the requested operation. The user or
  7961. // role that is making the request must have at least one IAM permissions policy
  7962. // attached that grants the required permissions. For more information, see
  7963. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  7964. // in the IAM User Guide.
  7965. //
  7966. // - AWSOrganizationsNotInUseException
  7967. // Your account isn't a member of an organization. To make this request, you
  7968. // must use the credentials of an account that belongs to an organization.
  7969. //
  7970. // - ConcurrentModificationException
  7971. // The target of the operation is currently being modified by a different request.
  7972. // Try again later.
  7973. //
  7974. // - ConstraintViolationException
  7975. // Performing this operation violates a minimum or maximum value limit. For
  7976. // example, attempting to remove the last service control policy (SCP) from
  7977. // an OU or root, inviting or creating too many accounts to the organization,
  7978. // or attaching too many policies to an account, OU, or root. This exception
  7979. // includes a reason that contains additional information about the violated
  7980. // limit:
  7981. //
  7982. // Some of the reasons in the following list might not be applicable to this
  7983. // specific API or operation.
  7984. //
  7985. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  7986. // account from the organization. You can't remove the management account.
  7987. // Instead, after you remove all member accounts, delete the organization
  7988. // itself.
  7989. //
  7990. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  7991. // an account from the organization that doesn't yet have enough information
  7992. // to exist as a standalone account. This account requires you to first complete
  7993. // phone verification. Follow the steps at Removing a member account from
  7994. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  7995. // in the Organizations User Guide.
  7996. //
  7997. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  7998. // of accounts that you can create in one day.
  7999. //
  8000. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  8001. // the number of accounts in an organization. If you need more accounts,
  8002. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  8003. // to request an increase in your limit. Or the number of invitations that
  8004. // you tried to send would cause you to exceed the limit of accounts in your
  8005. // organization. Send fewer invitations or contact Amazon Web Services Support
  8006. // to request an increase in the number of accounts. Deleted and closed accounts
  8007. // still count toward your limit. If you get this exception when running
  8008. // a command immediately after creating the organization, wait one hour and
  8009. // try again. After an hour, if the command continues to fail with this error,
  8010. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  8011. //
  8012. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  8013. // register the management account of the organization as a delegated administrator
  8014. // for an Amazon Web Services service integrated with Organizations. You
  8015. // can designate only a member account as a delegated administrator.
  8016. //
  8017. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  8018. // account. To close the management account for the organization, you must
  8019. // first either remove or close all member accounts in the organization.
  8020. // Follow standard account closure process using root credentials.​
  8021. //
  8022. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  8023. // an account that is registered as a delegated administrator for a service
  8024. // integrated with your organization. To complete this operation, you must
  8025. // first deregister this account as a delegated administrator.
  8026. //
  8027. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  8028. // for the past 30 days.
  8029. //
  8030. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  8031. // of accounts that you can close at a time. ​
  8032. //
  8033. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  8034. // organization in the specified region, you must enable all features mode.
  8035. //
  8036. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  8037. // an Amazon Web Services account as a delegated administrator for an Amazon
  8038. // Web Services service that already has a delegated administrator. To complete
  8039. // this operation, you must first deregister any existing delegated administrators
  8040. // for this service.
  8041. //
  8042. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  8043. // valid for a limited period of time. You must resubmit the request and
  8044. // generate a new verfication code.
  8045. //
  8046. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  8047. // handshakes that you can send in one day.
  8048. //
  8049. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  8050. // supported payment method is associated with the account. Amazon Web Services
  8051. // does not support cards issued by financial institutions in Russia or Belarus.
  8052. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  8053. //
  8054. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  8055. // in this organization, you first must migrate the organization's management
  8056. // account to the marketplace that corresponds to the management account's
  8057. // address. For example, accounts with India addresses must be associated
  8058. // with the AISPL marketplace. All accounts in an organization must be associated
  8059. // with the same marketplace.
  8060. //
  8061. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  8062. // Web Services /> Regions in China. To create an organization, the master
  8063. // must have a valid business license. For more information, contact customer
  8064. // support.
  8065. //
  8066. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  8067. // must first provide a valid contact address and phone number for the management
  8068. // account. Then try the operation again.
  8069. //
  8070. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  8071. // management account must have an associated account in the Amazon Web Services
  8072. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  8073. // in the Amazon Web Services GovCloud User Guide.
  8074. //
  8075. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  8076. // with this management account, you first must associate a valid payment
  8077. // instrument, such as a credit card, with the account. Follow the steps
  8078. // at To leave an organization when all required account information has
  8079. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  8080. // in the Organizations User Guide.
  8081. //
  8082. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  8083. // to register more delegated administrators than allowed for the service
  8084. // principal.
  8085. //
  8086. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  8087. // number of policies of a certain type that can be attached to an entity
  8088. // at one time.
  8089. //
  8090. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  8091. // on this resource.
  8092. //
  8093. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  8094. // with this member account, you first must associate a valid payment instrument,
  8095. // such as a credit card, with the account. Follow the steps at To leave
  8096. // an organization when all required account information has not yet been
  8097. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  8098. // in the Organizations User Guide.
  8099. //
  8100. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  8101. // policy from an entity that would cause the entity to have fewer than the
  8102. // minimum number of policies of a certain type required.
  8103. //
  8104. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  8105. // that requires the organization to be configured to support all features.
  8106. // An organization that supports only consolidated billing features can't
  8107. // perform this operation.
  8108. //
  8109. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  8110. // too many levels deep.
  8111. //
  8112. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  8113. // that you can have in an organization.
  8114. //
  8115. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  8116. // is larger than the maximum size.
  8117. //
  8118. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  8119. // policies that you can have in an organization.
  8120. //
  8121. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  8122. // before you enabled service access. Call the EnableAWSServiceAccess API
  8123. // first.
  8124. //
  8125. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  8126. // tags that are not compliant with the tag policy requirements for this
  8127. // account.
  8128. //
  8129. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  8130. // there is a waiting period before you can remove it from the organization.
  8131. // If you get an error that indicates that a wait period is required, try
  8132. // again in a few days.
  8133. //
  8134. // - InvalidInputException
  8135. // The requested operation failed because you provided invalid values for one
  8136. // or more of the request parameters. This exception includes a reason that
  8137. // contains additional information about the violated limit:
  8138. //
  8139. // Some of the reasons in the following list might not be applicable to this
  8140. // specific API or operation.
  8141. //
  8142. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  8143. // the same entity.
  8144. //
  8145. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  8146. // Services and can't be modified.
  8147. //
  8148. // - INPUT_REQUIRED: You must include a value for all required parameters.
  8149. //
  8150. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  8151. // for the invited account owner.
  8152. //
  8153. // - INVALID_ENUM: You specified an invalid value.
  8154. //
  8155. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  8156. //
  8157. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  8158. // characters.
  8159. //
  8160. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  8161. // at least one invalid value.
  8162. //
  8163. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  8164. // from the response to a previous call of the operation.
  8165. //
  8166. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  8167. // organization, or email) as a party.
  8168. //
  8169. // - INVALID_PATTERN: You provided a value that doesn't match the required
  8170. // pattern.
  8171. //
  8172. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  8173. // match the required pattern.
  8174. //
  8175. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  8176. // name can't begin with the reserved prefix AWSServiceRoleFor.
  8177. //
  8178. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  8179. // Name (ARN) for the organization.
  8180. //
  8181. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  8182. //
  8183. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  8184. // tag. You can’t add, edit, or delete system tag keys because they're
  8185. // reserved for Amazon Web Services use. System tags don’t count against
  8186. // your tags per resource limit.
  8187. //
  8188. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  8189. // for the operation.
  8190. //
  8191. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  8192. // than allowed.
  8193. //
  8194. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  8195. // value than allowed.
  8196. //
  8197. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  8198. // than allowed.
  8199. //
  8200. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  8201. // value than allowed.
  8202. //
  8203. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  8204. // between entities in the same root.
  8205. //
  8206. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  8207. // target entity.
  8208. //
  8209. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  8210. // isn't recognized.
  8211. //
  8212. // - PolicyTypeAlreadyEnabledException
  8213. // The specified policy type is already enabled in the specified root.
  8214. //
  8215. // - RootNotFoundException
  8216. // We can't find a root with the RootId that you specified.
  8217. //
  8218. // - ServiceException
  8219. // Organizations can't complete your request because of an internal service
  8220. // error. Try again later.
  8221. //
  8222. // - TooManyRequestsException
  8223. // You have sent too many requests in too short a period of time. The quota
  8224. // helps protect against denial-of-service attacks. Try again later.
  8225. //
  8226. // For information about quotas that affect Organizations, see Quotas for Organizations
  8227. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  8228. // the Organizations User Guide.
  8229. //
  8230. // - PolicyTypeNotAvailableForOrganizationException
  8231. // You can't use the specified policy type with the feature set currently enabled
  8232. // for this organization. For example, you can enable SCPs only after you enable
  8233. // all features in the organization. For more information, see Managing Organizations
  8234. // Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root)in
  8235. // the Organizations User Guide.
  8236. //
  8237. // - UnsupportedAPIEndpointException
  8238. // This action isn't available in the current Amazon Web Services Region.
  8239. //
  8240. // - PolicyChangesInProgressException
  8241. // Changes to the effective policy are in progress, and its contents can't be
  8242. // returned. Try the operation again later.
  8243. //
  8244. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnablePolicyType
  8245. func (c *Organizations) EnablePolicyType(input *EnablePolicyTypeInput) (*EnablePolicyTypeOutput, error) {
  8246. req, out := c.EnablePolicyTypeRequest(input)
  8247. return out, req.Send()
  8248. }
  8249. // EnablePolicyTypeWithContext is the same as EnablePolicyType with the addition of
  8250. // the ability to pass a context and additional request options.
  8251. //
  8252. // See EnablePolicyType for details on how to use this API operation.
  8253. //
  8254. // The context must be non-nil and will be used for request cancellation. If
  8255. // the context is nil a panic will occur. In the future the SDK may create
  8256. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  8257. // for more information on using Contexts.
  8258. func (c *Organizations) EnablePolicyTypeWithContext(ctx aws.Context, input *EnablePolicyTypeInput, opts ...request.Option) (*EnablePolicyTypeOutput, error) {
  8259. req, out := c.EnablePolicyTypeRequest(input)
  8260. req.SetContext(ctx)
  8261. req.ApplyOptions(opts...)
  8262. return out, req.Send()
  8263. }
  8264. const opInviteAccountToOrganization = "InviteAccountToOrganization"
  8265. // InviteAccountToOrganizationRequest generates a "aws/request.Request" representing the
  8266. // client's request for the InviteAccountToOrganization operation. The "output" return
  8267. // value will be populated with the request's response once the request completes
  8268. // successfully.
  8269. //
  8270. // Use "Send" method on the returned Request to send the API call to the service.
  8271. // the "output" return value is not valid until after Send returns without error.
  8272. //
  8273. // See InviteAccountToOrganization for more information on using the InviteAccountToOrganization
  8274. // API call, and error handling.
  8275. //
  8276. // This method is useful when you want to inject custom logic or configuration
  8277. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  8278. //
  8279. // // Example sending a request using the InviteAccountToOrganizationRequest method.
  8280. // req, resp := client.InviteAccountToOrganizationRequest(params)
  8281. //
  8282. // err := req.Send()
  8283. // if err == nil { // resp is now filled
  8284. // fmt.Println(resp)
  8285. // }
  8286. //
  8287. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/InviteAccountToOrganization
  8288. func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountToOrganizationInput) (req *request.Request, output *InviteAccountToOrganizationOutput) {
  8289. op := &request.Operation{
  8290. Name: opInviteAccountToOrganization,
  8291. HTTPMethod: "POST",
  8292. HTTPPath: "/",
  8293. }
  8294. if input == nil {
  8295. input = &InviteAccountToOrganizationInput{}
  8296. }
  8297. output = &InviteAccountToOrganizationOutput{}
  8298. req = c.newRequest(op, input, output)
  8299. return
  8300. }
  8301. // InviteAccountToOrganization API operation for AWS Organizations.
  8302. //
  8303. // Sends an invitation to another account to join your organization as a member
  8304. // account. Organizations sends email on your behalf to the email address that
  8305. // is associated with the other account's owner. The invitation is implemented
  8306. // as a Handshake whose details are in the response.
  8307. //
  8308. // - You can invite Amazon Web Services accounts only from the same seller
  8309. // as the management account. For example, if your organization's management
  8310. // account was created by Amazon Internet Services Pvt. Ltd (AISPL), an Amazon
  8311. // Web Services seller in India, you can invite only other AISPL accounts
  8312. // to your organization. You can't combine accounts from AISPL and Amazon
  8313. // Web Services or from any other Amazon Web Services seller. For more information,
  8314. // see Consolidated Billing in India (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/useconsolidatedbilliing-India.html).
  8315. //
  8316. // - If you receive an exception that indicates that you exceeded your account
  8317. // limits for the organization or that the operation failed because your
  8318. // organization is still initializing, wait one hour and then try again.
  8319. // If the error persists after an hour, contact Amazon Web Services Support
  8320. // (https://console.aws.amazon.com/support/home#/).
  8321. //
  8322. // If the request includes tags, then the requester must have the organizations:TagResource
  8323. // permission.
  8324. //
  8325. // This operation can be called only from the organization's management account.
  8326. //
  8327. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  8328. // with awserr.Error's Code and Message methods to get detailed information about
  8329. // the error.
  8330. //
  8331. // See the AWS API reference guide for AWS Organizations's
  8332. // API operation InviteAccountToOrganization for usage and error information.
  8333. //
  8334. // Returned Error Types:
  8335. //
  8336. // - AccessDeniedException
  8337. // You don't have permissions to perform the requested operation. The user or
  8338. // role that is making the request must have at least one IAM permissions policy
  8339. // attached that grants the required permissions. For more information, see
  8340. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  8341. // in the IAM User Guide.
  8342. //
  8343. // - AWSOrganizationsNotInUseException
  8344. // Your account isn't a member of an organization. To make this request, you
  8345. // must use the credentials of an account that belongs to an organization.
  8346. //
  8347. // - AccountOwnerNotVerifiedException
  8348. // You can't invite an existing account to your organization until you verify
  8349. // that you own the email address associated with the management account. For
  8350. // more information, see Email Address Verification (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification)
  8351. // in the Organizations User Guide.
  8352. //
  8353. // - ConcurrentModificationException
  8354. // The target of the operation is currently being modified by a different request.
  8355. // Try again later.
  8356. //
  8357. // - HandshakeConstraintViolationException
  8358. // The requested operation would violate the constraint identified in the reason
  8359. // code.
  8360. //
  8361. // Some of the reasons in the following list might not be applicable to this
  8362. // specific API or operation:
  8363. //
  8364. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  8365. // the number of accounts in an organization. Note that deleted and closed
  8366. // accounts still count toward your limit. If you get this exception immediately
  8367. // after creating the organization, wait one hour and try again. If after
  8368. // an hour it continues to fail with this error, contact Amazon Web Services
  8369. // Support (https://docs.aws.amazon.com/support/home#/).
  8370. //
  8371. // - ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because
  8372. // the invited account is already a member of an organization.
  8373. //
  8374. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  8375. // handshakes that you can send in one day.
  8376. //
  8377. // - INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations
  8378. // to join an organization while it's in the process of enabling all features.
  8379. // You can resume inviting accounts after you finalize the process when all
  8380. // accounts have agreed to the change.
  8381. //
  8382. // - ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid
  8383. // because the organization has already enabled all features.
  8384. //
  8385. // - ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION: The handshake
  8386. // request is invalid because the organization has already started the process
  8387. // to enable all features.
  8388. //
  8389. // - ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because
  8390. // the account is from a different marketplace than the accounts in the organization.
  8391. // For example, accounts with India addresses must be associated with the
  8392. // AISPL marketplace. All accounts in an organization must be from the same
  8393. // marketplace.
  8394. //
  8395. // - ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to
  8396. // change the membership of an account too quickly after its previous change.
  8397. //
  8398. // - PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an
  8399. // account that doesn't have a payment instrument, such as a credit card,
  8400. // associated with it.
  8401. //
  8402. // - DuplicateHandshakeException
  8403. // A handshake with the same action and target already exists. For example,
  8404. // if you invited an account to join your organization, the invited account
  8405. // might already have a pending invitation from this organization. If you intend
  8406. // to resend an invitation to an account, ensure that existing handshakes that
  8407. // might be considered duplicates are canceled or declined.
  8408. //
  8409. // - ConstraintViolationException
  8410. // Performing this operation violates a minimum or maximum value limit. For
  8411. // example, attempting to remove the last service control policy (SCP) from
  8412. // an OU or root, inviting or creating too many accounts to the organization,
  8413. // or attaching too many policies to an account, OU, or root. This exception
  8414. // includes a reason that contains additional information about the violated
  8415. // limit:
  8416. //
  8417. // Some of the reasons in the following list might not be applicable to this
  8418. // specific API or operation.
  8419. //
  8420. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  8421. // account from the organization. You can't remove the management account.
  8422. // Instead, after you remove all member accounts, delete the organization
  8423. // itself.
  8424. //
  8425. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  8426. // an account from the organization that doesn't yet have enough information
  8427. // to exist as a standalone account. This account requires you to first complete
  8428. // phone verification. Follow the steps at Removing a member account from
  8429. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  8430. // in the Organizations User Guide.
  8431. //
  8432. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  8433. // of accounts that you can create in one day.
  8434. //
  8435. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  8436. // the number of accounts in an organization. If you need more accounts,
  8437. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  8438. // to request an increase in your limit. Or the number of invitations that
  8439. // you tried to send would cause you to exceed the limit of accounts in your
  8440. // organization. Send fewer invitations or contact Amazon Web Services Support
  8441. // to request an increase in the number of accounts. Deleted and closed accounts
  8442. // still count toward your limit. If you get this exception when running
  8443. // a command immediately after creating the organization, wait one hour and
  8444. // try again. After an hour, if the command continues to fail with this error,
  8445. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  8446. //
  8447. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  8448. // register the management account of the organization as a delegated administrator
  8449. // for an Amazon Web Services service integrated with Organizations. You
  8450. // can designate only a member account as a delegated administrator.
  8451. //
  8452. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  8453. // account. To close the management account for the organization, you must
  8454. // first either remove or close all member accounts in the organization.
  8455. // Follow standard account closure process using root credentials.​
  8456. //
  8457. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  8458. // an account that is registered as a delegated administrator for a service
  8459. // integrated with your organization. To complete this operation, you must
  8460. // first deregister this account as a delegated administrator.
  8461. //
  8462. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  8463. // for the past 30 days.
  8464. //
  8465. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  8466. // of accounts that you can close at a time. ​
  8467. //
  8468. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  8469. // organization in the specified region, you must enable all features mode.
  8470. //
  8471. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  8472. // an Amazon Web Services account as a delegated administrator for an Amazon
  8473. // Web Services service that already has a delegated administrator. To complete
  8474. // this operation, you must first deregister any existing delegated administrators
  8475. // for this service.
  8476. //
  8477. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  8478. // valid for a limited period of time. You must resubmit the request and
  8479. // generate a new verfication code.
  8480. //
  8481. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  8482. // handshakes that you can send in one day.
  8483. //
  8484. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  8485. // supported payment method is associated with the account. Amazon Web Services
  8486. // does not support cards issued by financial institutions in Russia or Belarus.
  8487. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  8488. //
  8489. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  8490. // in this organization, you first must migrate the organization's management
  8491. // account to the marketplace that corresponds to the management account's
  8492. // address. For example, accounts with India addresses must be associated
  8493. // with the AISPL marketplace. All accounts in an organization must be associated
  8494. // with the same marketplace.
  8495. //
  8496. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  8497. // Web Services /> Regions in China. To create an organization, the master
  8498. // must have a valid business license. For more information, contact customer
  8499. // support.
  8500. //
  8501. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  8502. // must first provide a valid contact address and phone number for the management
  8503. // account. Then try the operation again.
  8504. //
  8505. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  8506. // management account must have an associated account in the Amazon Web Services
  8507. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  8508. // in the Amazon Web Services GovCloud User Guide.
  8509. //
  8510. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  8511. // with this management account, you first must associate a valid payment
  8512. // instrument, such as a credit card, with the account. Follow the steps
  8513. // at To leave an organization when all required account information has
  8514. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  8515. // in the Organizations User Guide.
  8516. //
  8517. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  8518. // to register more delegated administrators than allowed for the service
  8519. // principal.
  8520. //
  8521. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  8522. // number of policies of a certain type that can be attached to an entity
  8523. // at one time.
  8524. //
  8525. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  8526. // on this resource.
  8527. //
  8528. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  8529. // with this member account, you first must associate a valid payment instrument,
  8530. // such as a credit card, with the account. Follow the steps at To leave
  8531. // an organization when all required account information has not yet been
  8532. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  8533. // in the Organizations User Guide.
  8534. //
  8535. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  8536. // policy from an entity that would cause the entity to have fewer than the
  8537. // minimum number of policies of a certain type required.
  8538. //
  8539. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  8540. // that requires the organization to be configured to support all features.
  8541. // An organization that supports only consolidated billing features can't
  8542. // perform this operation.
  8543. //
  8544. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  8545. // too many levels deep.
  8546. //
  8547. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  8548. // that you can have in an organization.
  8549. //
  8550. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  8551. // is larger than the maximum size.
  8552. //
  8553. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  8554. // policies that you can have in an organization.
  8555. //
  8556. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  8557. // before you enabled service access. Call the EnableAWSServiceAccess API
  8558. // first.
  8559. //
  8560. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  8561. // tags that are not compliant with the tag policy requirements for this
  8562. // account.
  8563. //
  8564. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  8565. // there is a waiting period before you can remove it from the organization.
  8566. // If you get an error that indicates that a wait period is required, try
  8567. // again in a few days.
  8568. //
  8569. // - InvalidInputException
  8570. // The requested operation failed because you provided invalid values for one
  8571. // or more of the request parameters. This exception includes a reason that
  8572. // contains additional information about the violated limit:
  8573. //
  8574. // Some of the reasons in the following list might not be applicable to this
  8575. // specific API or operation.
  8576. //
  8577. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  8578. // the same entity.
  8579. //
  8580. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  8581. // Services and can't be modified.
  8582. //
  8583. // - INPUT_REQUIRED: You must include a value for all required parameters.
  8584. //
  8585. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  8586. // for the invited account owner.
  8587. //
  8588. // - INVALID_ENUM: You specified an invalid value.
  8589. //
  8590. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  8591. //
  8592. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  8593. // characters.
  8594. //
  8595. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  8596. // at least one invalid value.
  8597. //
  8598. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  8599. // from the response to a previous call of the operation.
  8600. //
  8601. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  8602. // organization, or email) as a party.
  8603. //
  8604. // - INVALID_PATTERN: You provided a value that doesn't match the required
  8605. // pattern.
  8606. //
  8607. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  8608. // match the required pattern.
  8609. //
  8610. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  8611. // name can't begin with the reserved prefix AWSServiceRoleFor.
  8612. //
  8613. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  8614. // Name (ARN) for the organization.
  8615. //
  8616. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  8617. //
  8618. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  8619. // tag. You can’t add, edit, or delete system tag keys because they're
  8620. // reserved for Amazon Web Services use. System tags don’t count against
  8621. // your tags per resource limit.
  8622. //
  8623. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  8624. // for the operation.
  8625. //
  8626. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  8627. // than allowed.
  8628. //
  8629. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  8630. // value than allowed.
  8631. //
  8632. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  8633. // than allowed.
  8634. //
  8635. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  8636. // value than allowed.
  8637. //
  8638. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  8639. // between entities in the same root.
  8640. //
  8641. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  8642. // target entity.
  8643. //
  8644. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  8645. // isn't recognized.
  8646. //
  8647. // - FinalizingOrganizationException
  8648. // Organizations couldn't perform the operation because your organization hasn't
  8649. // finished initializing. This can take up to an hour. Try again later. If after
  8650. // one hour you continue to receive this error, contact Amazon Web Services
  8651. // Support (https://console.aws.amazon.com/support/home#/).
  8652. //
  8653. // - ServiceException
  8654. // Organizations can't complete your request because of an internal service
  8655. // error. Try again later.
  8656. //
  8657. // - TooManyRequestsException
  8658. // You have sent too many requests in too short a period of time. The quota
  8659. // helps protect against denial-of-service attacks. Try again later.
  8660. //
  8661. // For information about quotas that affect Organizations, see Quotas for Organizations
  8662. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  8663. // the Organizations User Guide.
  8664. //
  8665. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/InviteAccountToOrganization
  8666. func (c *Organizations) InviteAccountToOrganization(input *InviteAccountToOrganizationInput) (*InviteAccountToOrganizationOutput, error) {
  8667. req, out := c.InviteAccountToOrganizationRequest(input)
  8668. return out, req.Send()
  8669. }
  8670. // InviteAccountToOrganizationWithContext is the same as InviteAccountToOrganization with the addition of
  8671. // the ability to pass a context and additional request options.
  8672. //
  8673. // See InviteAccountToOrganization for details on how to use this API operation.
  8674. //
  8675. // The context must be non-nil and will be used for request cancellation. If
  8676. // the context is nil a panic will occur. In the future the SDK may create
  8677. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  8678. // for more information on using Contexts.
  8679. func (c *Organizations) InviteAccountToOrganizationWithContext(ctx aws.Context, input *InviteAccountToOrganizationInput, opts ...request.Option) (*InviteAccountToOrganizationOutput, error) {
  8680. req, out := c.InviteAccountToOrganizationRequest(input)
  8681. req.SetContext(ctx)
  8682. req.ApplyOptions(opts...)
  8683. return out, req.Send()
  8684. }
  8685. const opLeaveOrganization = "LeaveOrganization"
  8686. // LeaveOrganizationRequest generates a "aws/request.Request" representing the
  8687. // client's request for the LeaveOrganization operation. The "output" return
  8688. // value will be populated with the request's response once the request completes
  8689. // successfully.
  8690. //
  8691. // Use "Send" method on the returned Request to send the API call to the service.
  8692. // the "output" return value is not valid until after Send returns without error.
  8693. //
  8694. // See LeaveOrganization for more information on using the LeaveOrganization
  8695. // API call, and error handling.
  8696. //
  8697. // This method is useful when you want to inject custom logic or configuration
  8698. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  8699. //
  8700. // // Example sending a request using the LeaveOrganizationRequest method.
  8701. // req, resp := client.LeaveOrganizationRequest(params)
  8702. //
  8703. // err := req.Send()
  8704. // if err == nil { // resp is now filled
  8705. // fmt.Println(resp)
  8706. // }
  8707. //
  8708. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/LeaveOrganization
  8709. func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) (req *request.Request, output *LeaveOrganizationOutput) {
  8710. op := &request.Operation{
  8711. Name: opLeaveOrganization,
  8712. HTTPMethod: "POST",
  8713. HTTPPath: "/",
  8714. }
  8715. if input == nil {
  8716. input = &LeaveOrganizationInput{}
  8717. }
  8718. output = &LeaveOrganizationOutput{}
  8719. req = c.newRequest(op, input, output)
  8720. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  8721. return
  8722. }
  8723. // LeaveOrganization API operation for AWS Organizations.
  8724. //
  8725. // Removes a member account from its parent organization. This version of the
  8726. // operation is performed by the account that wants to leave. To remove a member
  8727. // account as a user in the management account, use RemoveAccountFromOrganization
  8728. // instead.
  8729. //
  8730. // This operation can be called only from a member account in the organization.
  8731. //
  8732. // - The management account in an organization with all features enabled
  8733. // can set service control policies (SCPs) that can restrict what administrators
  8734. // of member accounts can do. This includes preventing them from successfully
  8735. // calling LeaveOrganization and leaving the organization.
  8736. //
  8737. // - You can leave an organization as a member account only if the account
  8738. // is configured with the information required to operate as a standalone
  8739. // account. When you create an account in an organization using the Organizations
  8740. // console, API, or CLI commands, the information required of standalone
  8741. // accounts is not automatically collected. For each account that you want
  8742. // to make standalone, you must perform the following steps. If any of the
  8743. // steps are already completed for this account, that step doesn't appear.
  8744. // Choose a support plan Provide and verify the required contact information
  8745. // Provide a current payment method Amazon Web Services uses the payment
  8746. // method to charge for any billable (not free tier) Amazon Web Services
  8747. // activity that occurs while the account isn't attached to an organization.
  8748. // Follow the steps at To leave an organization when all required account
  8749. // information has not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  8750. // in the Organizations User Guide.
  8751. //
  8752. // - The account that you want to leave must not be a delegated administrator
  8753. // account for any Amazon Web Services service enabled for your organization.
  8754. // If the account is a delegated administrator, you must first change the
  8755. // delegated administrator account to another account that is remaining in
  8756. // the organization.
  8757. //
  8758. // - You can leave an organization only after you enable IAM user access
  8759. // to billing in your account. For more information, see Activating Access
  8760. // to the Billing and Cost Management Console (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate)
  8761. // in the Amazon Web Services Billing and Cost Management User Guide.
  8762. //
  8763. // - After the account leaves the organization, all tags that were attached
  8764. // to the account object in the organization are deleted. Amazon Web Services
  8765. // accounts outside of an organization do not support tags.
  8766. //
  8767. // - A newly created account has a waiting period before it can be removed
  8768. // from its organization. If you get an error that indicates that a wait
  8769. // period is required, then try again in a few days.
  8770. //
  8771. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  8772. // with awserr.Error's Code and Message methods to get detailed information about
  8773. // the error.
  8774. //
  8775. // See the AWS API reference guide for AWS Organizations's
  8776. // API operation LeaveOrganization for usage and error information.
  8777. //
  8778. // Returned Error Types:
  8779. //
  8780. // - AccessDeniedException
  8781. // You don't have permissions to perform the requested operation. The user or
  8782. // role that is making the request must have at least one IAM permissions policy
  8783. // attached that grants the required permissions. For more information, see
  8784. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  8785. // in the IAM User Guide.
  8786. //
  8787. // - AccountNotFoundException
  8788. // We can't find an Amazon Web Services account with the AccountId that you
  8789. // specified, or the account whose credentials you used to make this request
  8790. // isn't a member of an organization.
  8791. //
  8792. // - AWSOrganizationsNotInUseException
  8793. // Your account isn't a member of an organization. To make this request, you
  8794. // must use the credentials of an account that belongs to an organization.
  8795. //
  8796. // - ConcurrentModificationException
  8797. // The target of the operation is currently being modified by a different request.
  8798. // Try again later.
  8799. //
  8800. // - ConstraintViolationException
  8801. // Performing this operation violates a minimum or maximum value limit. For
  8802. // example, attempting to remove the last service control policy (SCP) from
  8803. // an OU or root, inviting or creating too many accounts to the organization,
  8804. // or attaching too many policies to an account, OU, or root. This exception
  8805. // includes a reason that contains additional information about the violated
  8806. // limit:
  8807. //
  8808. // Some of the reasons in the following list might not be applicable to this
  8809. // specific API or operation.
  8810. //
  8811. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  8812. // account from the organization. You can't remove the management account.
  8813. // Instead, after you remove all member accounts, delete the organization
  8814. // itself.
  8815. //
  8816. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  8817. // an account from the organization that doesn't yet have enough information
  8818. // to exist as a standalone account. This account requires you to first complete
  8819. // phone verification. Follow the steps at Removing a member account from
  8820. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  8821. // in the Organizations User Guide.
  8822. //
  8823. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  8824. // of accounts that you can create in one day.
  8825. //
  8826. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  8827. // the number of accounts in an organization. If you need more accounts,
  8828. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  8829. // to request an increase in your limit. Or the number of invitations that
  8830. // you tried to send would cause you to exceed the limit of accounts in your
  8831. // organization. Send fewer invitations or contact Amazon Web Services Support
  8832. // to request an increase in the number of accounts. Deleted and closed accounts
  8833. // still count toward your limit. If you get this exception when running
  8834. // a command immediately after creating the organization, wait one hour and
  8835. // try again. After an hour, if the command continues to fail with this error,
  8836. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  8837. //
  8838. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  8839. // register the management account of the organization as a delegated administrator
  8840. // for an Amazon Web Services service integrated with Organizations. You
  8841. // can designate only a member account as a delegated administrator.
  8842. //
  8843. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  8844. // account. To close the management account for the organization, you must
  8845. // first either remove or close all member accounts in the organization.
  8846. // Follow standard account closure process using root credentials.​
  8847. //
  8848. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  8849. // an account that is registered as a delegated administrator for a service
  8850. // integrated with your organization. To complete this operation, you must
  8851. // first deregister this account as a delegated administrator.
  8852. //
  8853. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  8854. // for the past 30 days.
  8855. //
  8856. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  8857. // of accounts that you can close at a time. ​
  8858. //
  8859. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  8860. // organization in the specified region, you must enable all features mode.
  8861. //
  8862. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  8863. // an Amazon Web Services account as a delegated administrator for an Amazon
  8864. // Web Services service that already has a delegated administrator. To complete
  8865. // this operation, you must first deregister any existing delegated administrators
  8866. // for this service.
  8867. //
  8868. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  8869. // valid for a limited period of time. You must resubmit the request and
  8870. // generate a new verfication code.
  8871. //
  8872. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  8873. // handshakes that you can send in one day.
  8874. //
  8875. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  8876. // supported payment method is associated with the account. Amazon Web Services
  8877. // does not support cards issued by financial institutions in Russia or Belarus.
  8878. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  8879. //
  8880. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  8881. // in this organization, you first must migrate the organization's management
  8882. // account to the marketplace that corresponds to the management account's
  8883. // address. For example, accounts with India addresses must be associated
  8884. // with the AISPL marketplace. All accounts in an organization must be associated
  8885. // with the same marketplace.
  8886. //
  8887. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  8888. // Web Services /> Regions in China. To create an organization, the master
  8889. // must have a valid business license. For more information, contact customer
  8890. // support.
  8891. //
  8892. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  8893. // must first provide a valid contact address and phone number for the management
  8894. // account. Then try the operation again.
  8895. //
  8896. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  8897. // management account must have an associated account in the Amazon Web Services
  8898. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  8899. // in the Amazon Web Services GovCloud User Guide.
  8900. //
  8901. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  8902. // with this management account, you first must associate a valid payment
  8903. // instrument, such as a credit card, with the account. Follow the steps
  8904. // at To leave an organization when all required account information has
  8905. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  8906. // in the Organizations User Guide.
  8907. //
  8908. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  8909. // to register more delegated administrators than allowed for the service
  8910. // principal.
  8911. //
  8912. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  8913. // number of policies of a certain type that can be attached to an entity
  8914. // at one time.
  8915. //
  8916. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  8917. // on this resource.
  8918. //
  8919. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  8920. // with this member account, you first must associate a valid payment instrument,
  8921. // such as a credit card, with the account. Follow the steps at To leave
  8922. // an organization when all required account information has not yet been
  8923. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  8924. // in the Organizations User Guide.
  8925. //
  8926. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  8927. // policy from an entity that would cause the entity to have fewer than the
  8928. // minimum number of policies of a certain type required.
  8929. //
  8930. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  8931. // that requires the organization to be configured to support all features.
  8932. // An organization that supports only consolidated billing features can't
  8933. // perform this operation.
  8934. //
  8935. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  8936. // too many levels deep.
  8937. //
  8938. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  8939. // that you can have in an organization.
  8940. //
  8941. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  8942. // is larger than the maximum size.
  8943. //
  8944. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  8945. // policies that you can have in an organization.
  8946. //
  8947. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  8948. // before you enabled service access. Call the EnableAWSServiceAccess API
  8949. // first.
  8950. //
  8951. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  8952. // tags that are not compliant with the tag policy requirements for this
  8953. // account.
  8954. //
  8955. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  8956. // there is a waiting period before you can remove it from the organization.
  8957. // If you get an error that indicates that a wait period is required, try
  8958. // again in a few days.
  8959. //
  8960. // - InvalidInputException
  8961. // The requested operation failed because you provided invalid values for one
  8962. // or more of the request parameters. This exception includes a reason that
  8963. // contains additional information about the violated limit:
  8964. //
  8965. // Some of the reasons in the following list might not be applicable to this
  8966. // specific API or operation.
  8967. //
  8968. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  8969. // the same entity.
  8970. //
  8971. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  8972. // Services and can't be modified.
  8973. //
  8974. // - INPUT_REQUIRED: You must include a value for all required parameters.
  8975. //
  8976. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  8977. // for the invited account owner.
  8978. //
  8979. // - INVALID_ENUM: You specified an invalid value.
  8980. //
  8981. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  8982. //
  8983. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  8984. // characters.
  8985. //
  8986. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  8987. // at least one invalid value.
  8988. //
  8989. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  8990. // from the response to a previous call of the operation.
  8991. //
  8992. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  8993. // organization, or email) as a party.
  8994. //
  8995. // - INVALID_PATTERN: You provided a value that doesn't match the required
  8996. // pattern.
  8997. //
  8998. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  8999. // match the required pattern.
  9000. //
  9001. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  9002. // name can't begin with the reserved prefix AWSServiceRoleFor.
  9003. //
  9004. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  9005. // Name (ARN) for the organization.
  9006. //
  9007. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  9008. //
  9009. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  9010. // tag. You can’t add, edit, or delete system tag keys because they're
  9011. // reserved for Amazon Web Services use. System tags don’t count against
  9012. // your tags per resource limit.
  9013. //
  9014. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  9015. // for the operation.
  9016. //
  9017. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  9018. // than allowed.
  9019. //
  9020. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  9021. // value than allowed.
  9022. //
  9023. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  9024. // than allowed.
  9025. //
  9026. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  9027. // value than allowed.
  9028. //
  9029. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  9030. // between entities in the same root.
  9031. //
  9032. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  9033. // target entity.
  9034. //
  9035. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  9036. // isn't recognized.
  9037. //
  9038. // - MasterCannotLeaveOrganizationException
  9039. // You can't remove a management account from an organization. If you want the
  9040. // management account to become a member account in another organization, you
  9041. // must first delete the current organization of the management account.
  9042. //
  9043. // - ServiceException
  9044. // Organizations can't complete your request because of an internal service
  9045. // error. Try again later.
  9046. //
  9047. // - TooManyRequestsException
  9048. // You have sent too many requests in too short a period of time. The quota
  9049. // helps protect against denial-of-service attacks. Try again later.
  9050. //
  9051. // For information about quotas that affect Organizations, see Quotas for Organizations
  9052. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  9053. // the Organizations User Guide.
  9054. //
  9055. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/LeaveOrganization
  9056. func (c *Organizations) LeaveOrganization(input *LeaveOrganizationInput) (*LeaveOrganizationOutput, error) {
  9057. req, out := c.LeaveOrganizationRequest(input)
  9058. return out, req.Send()
  9059. }
  9060. // LeaveOrganizationWithContext is the same as LeaveOrganization with the addition of
  9061. // the ability to pass a context and additional request options.
  9062. //
  9063. // See LeaveOrganization for details on how to use this API operation.
  9064. //
  9065. // The context must be non-nil and will be used for request cancellation. If
  9066. // the context is nil a panic will occur. In the future the SDK may create
  9067. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  9068. // for more information on using Contexts.
  9069. func (c *Organizations) LeaveOrganizationWithContext(ctx aws.Context, input *LeaveOrganizationInput, opts ...request.Option) (*LeaveOrganizationOutput, error) {
  9070. req, out := c.LeaveOrganizationRequest(input)
  9071. req.SetContext(ctx)
  9072. req.ApplyOptions(opts...)
  9073. return out, req.Send()
  9074. }
  9075. const opListAWSServiceAccessForOrganization = "ListAWSServiceAccessForOrganization"
  9076. // ListAWSServiceAccessForOrganizationRequest generates a "aws/request.Request" representing the
  9077. // client's request for the ListAWSServiceAccessForOrganization operation. The "output" return
  9078. // value will be populated with the request's response once the request completes
  9079. // successfully.
  9080. //
  9081. // Use "Send" method on the returned Request to send the API call to the service.
  9082. // the "output" return value is not valid until after Send returns without error.
  9083. //
  9084. // See ListAWSServiceAccessForOrganization for more information on using the ListAWSServiceAccessForOrganization
  9085. // API call, and error handling.
  9086. //
  9087. // This method is useful when you want to inject custom logic or configuration
  9088. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  9089. //
  9090. // // Example sending a request using the ListAWSServiceAccessForOrganizationRequest method.
  9091. // req, resp := client.ListAWSServiceAccessForOrganizationRequest(params)
  9092. //
  9093. // err := req.Send()
  9094. // if err == nil { // resp is now filled
  9095. // fmt.Println(resp)
  9096. // }
  9097. //
  9098. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAWSServiceAccessForOrganization
  9099. func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAWSServiceAccessForOrganizationInput) (req *request.Request, output *ListAWSServiceAccessForOrganizationOutput) {
  9100. op := &request.Operation{
  9101. Name: opListAWSServiceAccessForOrganization,
  9102. HTTPMethod: "POST",
  9103. HTTPPath: "/",
  9104. Paginator: &request.Paginator{
  9105. InputTokens: []string{"NextToken"},
  9106. OutputTokens: []string{"NextToken"},
  9107. LimitToken: "MaxResults",
  9108. TruncationToken: "",
  9109. },
  9110. }
  9111. if input == nil {
  9112. input = &ListAWSServiceAccessForOrganizationInput{}
  9113. }
  9114. output = &ListAWSServiceAccessForOrganizationOutput{}
  9115. req = c.newRequest(op, input, output)
  9116. return
  9117. }
  9118. // ListAWSServiceAccessForOrganization API operation for AWS Organizations.
  9119. //
  9120. // Returns a list of the Amazon Web Services services that you enabled to integrate
  9121. // with your organization. After a service on this list creates the resources
  9122. // that it requires for the integration, it can perform operations on your organization
  9123. // and its accounts.
  9124. //
  9125. // For more information about integrating other services with Organizations,
  9126. // including the list of services that currently work with Organizations, see
  9127. // Integrating Organizations with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
  9128. // in the Organizations User Guide.
  9129. //
  9130. // This operation can be called only from the organization's management account
  9131. // or by a member account that is a delegated administrator for an Amazon Web
  9132. // Services service.
  9133. //
  9134. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  9135. // with awserr.Error's Code and Message methods to get detailed information about
  9136. // the error.
  9137. //
  9138. // See the AWS API reference guide for AWS Organizations's
  9139. // API operation ListAWSServiceAccessForOrganization for usage and error information.
  9140. //
  9141. // Returned Error Types:
  9142. //
  9143. // - AccessDeniedException
  9144. // You don't have permissions to perform the requested operation. The user or
  9145. // role that is making the request must have at least one IAM permissions policy
  9146. // attached that grants the required permissions. For more information, see
  9147. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  9148. // in the IAM User Guide.
  9149. //
  9150. // - AWSOrganizationsNotInUseException
  9151. // Your account isn't a member of an organization. To make this request, you
  9152. // must use the credentials of an account that belongs to an organization.
  9153. //
  9154. // - ConstraintViolationException
  9155. // Performing this operation violates a minimum or maximum value limit. For
  9156. // example, attempting to remove the last service control policy (SCP) from
  9157. // an OU or root, inviting or creating too many accounts to the organization,
  9158. // or attaching too many policies to an account, OU, or root. This exception
  9159. // includes a reason that contains additional information about the violated
  9160. // limit:
  9161. //
  9162. // Some of the reasons in the following list might not be applicable to this
  9163. // specific API or operation.
  9164. //
  9165. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  9166. // account from the organization. You can't remove the management account.
  9167. // Instead, after you remove all member accounts, delete the organization
  9168. // itself.
  9169. //
  9170. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  9171. // an account from the organization that doesn't yet have enough information
  9172. // to exist as a standalone account. This account requires you to first complete
  9173. // phone verification. Follow the steps at Removing a member account from
  9174. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  9175. // in the Organizations User Guide.
  9176. //
  9177. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  9178. // of accounts that you can create in one day.
  9179. //
  9180. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  9181. // the number of accounts in an organization. If you need more accounts,
  9182. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  9183. // to request an increase in your limit. Or the number of invitations that
  9184. // you tried to send would cause you to exceed the limit of accounts in your
  9185. // organization. Send fewer invitations or contact Amazon Web Services Support
  9186. // to request an increase in the number of accounts. Deleted and closed accounts
  9187. // still count toward your limit. If you get this exception when running
  9188. // a command immediately after creating the organization, wait one hour and
  9189. // try again. After an hour, if the command continues to fail with this error,
  9190. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  9191. //
  9192. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  9193. // register the management account of the organization as a delegated administrator
  9194. // for an Amazon Web Services service integrated with Organizations. You
  9195. // can designate only a member account as a delegated administrator.
  9196. //
  9197. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  9198. // account. To close the management account for the organization, you must
  9199. // first either remove or close all member accounts in the organization.
  9200. // Follow standard account closure process using root credentials.​
  9201. //
  9202. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  9203. // an account that is registered as a delegated administrator for a service
  9204. // integrated with your organization. To complete this operation, you must
  9205. // first deregister this account as a delegated administrator.
  9206. //
  9207. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  9208. // for the past 30 days.
  9209. //
  9210. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  9211. // of accounts that you can close at a time. ​
  9212. //
  9213. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  9214. // organization in the specified region, you must enable all features mode.
  9215. //
  9216. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  9217. // an Amazon Web Services account as a delegated administrator for an Amazon
  9218. // Web Services service that already has a delegated administrator. To complete
  9219. // this operation, you must first deregister any existing delegated administrators
  9220. // for this service.
  9221. //
  9222. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  9223. // valid for a limited period of time. You must resubmit the request and
  9224. // generate a new verfication code.
  9225. //
  9226. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  9227. // handshakes that you can send in one day.
  9228. //
  9229. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  9230. // supported payment method is associated with the account. Amazon Web Services
  9231. // does not support cards issued by financial institutions in Russia or Belarus.
  9232. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  9233. //
  9234. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  9235. // in this organization, you first must migrate the organization's management
  9236. // account to the marketplace that corresponds to the management account's
  9237. // address. For example, accounts with India addresses must be associated
  9238. // with the AISPL marketplace. All accounts in an organization must be associated
  9239. // with the same marketplace.
  9240. //
  9241. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  9242. // Web Services /> Regions in China. To create an organization, the master
  9243. // must have a valid business license. For more information, contact customer
  9244. // support.
  9245. //
  9246. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  9247. // must first provide a valid contact address and phone number for the management
  9248. // account. Then try the operation again.
  9249. //
  9250. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  9251. // management account must have an associated account in the Amazon Web Services
  9252. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  9253. // in the Amazon Web Services GovCloud User Guide.
  9254. //
  9255. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  9256. // with this management account, you first must associate a valid payment
  9257. // instrument, such as a credit card, with the account. Follow the steps
  9258. // at To leave an organization when all required account information has
  9259. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  9260. // in the Organizations User Guide.
  9261. //
  9262. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  9263. // to register more delegated administrators than allowed for the service
  9264. // principal.
  9265. //
  9266. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  9267. // number of policies of a certain type that can be attached to an entity
  9268. // at one time.
  9269. //
  9270. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  9271. // on this resource.
  9272. //
  9273. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  9274. // with this member account, you first must associate a valid payment instrument,
  9275. // such as a credit card, with the account. Follow the steps at To leave
  9276. // an organization when all required account information has not yet been
  9277. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  9278. // in the Organizations User Guide.
  9279. //
  9280. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  9281. // policy from an entity that would cause the entity to have fewer than the
  9282. // minimum number of policies of a certain type required.
  9283. //
  9284. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  9285. // that requires the organization to be configured to support all features.
  9286. // An organization that supports only consolidated billing features can't
  9287. // perform this operation.
  9288. //
  9289. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  9290. // too many levels deep.
  9291. //
  9292. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  9293. // that you can have in an organization.
  9294. //
  9295. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  9296. // is larger than the maximum size.
  9297. //
  9298. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  9299. // policies that you can have in an organization.
  9300. //
  9301. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  9302. // before you enabled service access. Call the EnableAWSServiceAccess API
  9303. // first.
  9304. //
  9305. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  9306. // tags that are not compliant with the tag policy requirements for this
  9307. // account.
  9308. //
  9309. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  9310. // there is a waiting period before you can remove it from the organization.
  9311. // If you get an error that indicates that a wait period is required, try
  9312. // again in a few days.
  9313. //
  9314. // - InvalidInputException
  9315. // The requested operation failed because you provided invalid values for one
  9316. // or more of the request parameters. This exception includes a reason that
  9317. // contains additional information about the violated limit:
  9318. //
  9319. // Some of the reasons in the following list might not be applicable to this
  9320. // specific API or operation.
  9321. //
  9322. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  9323. // the same entity.
  9324. //
  9325. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  9326. // Services and can't be modified.
  9327. //
  9328. // - INPUT_REQUIRED: You must include a value for all required parameters.
  9329. //
  9330. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  9331. // for the invited account owner.
  9332. //
  9333. // - INVALID_ENUM: You specified an invalid value.
  9334. //
  9335. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  9336. //
  9337. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  9338. // characters.
  9339. //
  9340. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  9341. // at least one invalid value.
  9342. //
  9343. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  9344. // from the response to a previous call of the operation.
  9345. //
  9346. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  9347. // organization, or email) as a party.
  9348. //
  9349. // - INVALID_PATTERN: You provided a value that doesn't match the required
  9350. // pattern.
  9351. //
  9352. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  9353. // match the required pattern.
  9354. //
  9355. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  9356. // name can't begin with the reserved prefix AWSServiceRoleFor.
  9357. //
  9358. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  9359. // Name (ARN) for the organization.
  9360. //
  9361. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  9362. //
  9363. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  9364. // tag. You can’t add, edit, or delete system tag keys because they're
  9365. // reserved for Amazon Web Services use. System tags don’t count against
  9366. // your tags per resource limit.
  9367. //
  9368. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  9369. // for the operation.
  9370. //
  9371. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  9372. // than allowed.
  9373. //
  9374. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  9375. // value than allowed.
  9376. //
  9377. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  9378. // than allowed.
  9379. //
  9380. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  9381. // value than allowed.
  9382. //
  9383. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  9384. // between entities in the same root.
  9385. //
  9386. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  9387. // target entity.
  9388. //
  9389. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  9390. // isn't recognized.
  9391. //
  9392. // - ServiceException
  9393. // Organizations can't complete your request because of an internal service
  9394. // error. Try again later.
  9395. //
  9396. // - TooManyRequestsException
  9397. // You have sent too many requests in too short a period of time. The quota
  9398. // helps protect against denial-of-service attacks. Try again later.
  9399. //
  9400. // For information about quotas that affect Organizations, see Quotas for Organizations
  9401. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  9402. // the Organizations User Guide.
  9403. //
  9404. // - UnsupportedAPIEndpointException
  9405. // This action isn't available in the current Amazon Web Services Region.
  9406. //
  9407. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAWSServiceAccessForOrganization
  9408. func (c *Organizations) ListAWSServiceAccessForOrganization(input *ListAWSServiceAccessForOrganizationInput) (*ListAWSServiceAccessForOrganizationOutput, error) {
  9409. req, out := c.ListAWSServiceAccessForOrganizationRequest(input)
  9410. return out, req.Send()
  9411. }
  9412. // ListAWSServiceAccessForOrganizationWithContext is the same as ListAWSServiceAccessForOrganization with the addition of
  9413. // the ability to pass a context and additional request options.
  9414. //
  9415. // See ListAWSServiceAccessForOrganization for details on how to use this API operation.
  9416. //
  9417. // The context must be non-nil and will be used for request cancellation. If
  9418. // the context is nil a panic will occur. In the future the SDK may create
  9419. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  9420. // for more information on using Contexts.
  9421. func (c *Organizations) ListAWSServiceAccessForOrganizationWithContext(ctx aws.Context, input *ListAWSServiceAccessForOrganizationInput, opts ...request.Option) (*ListAWSServiceAccessForOrganizationOutput, error) {
  9422. req, out := c.ListAWSServiceAccessForOrganizationRequest(input)
  9423. req.SetContext(ctx)
  9424. req.ApplyOptions(opts...)
  9425. return out, req.Send()
  9426. }
  9427. // ListAWSServiceAccessForOrganizationPages iterates over the pages of a ListAWSServiceAccessForOrganization operation,
  9428. // calling the "fn" function with the response data for each page. To stop
  9429. // iterating, return false from the fn function.
  9430. //
  9431. // See ListAWSServiceAccessForOrganization method for more information on how to use this operation.
  9432. //
  9433. // Note: This operation can generate multiple requests to a service.
  9434. //
  9435. // // Example iterating over at most 3 pages of a ListAWSServiceAccessForOrganization operation.
  9436. // pageNum := 0
  9437. // err := client.ListAWSServiceAccessForOrganizationPages(params,
  9438. // func(page *organizations.ListAWSServiceAccessForOrganizationOutput, lastPage bool) bool {
  9439. // pageNum++
  9440. // fmt.Println(page)
  9441. // return pageNum <= 3
  9442. // })
  9443. func (c *Organizations) ListAWSServiceAccessForOrganizationPages(input *ListAWSServiceAccessForOrganizationInput, fn func(*ListAWSServiceAccessForOrganizationOutput, bool) bool) error {
  9444. return c.ListAWSServiceAccessForOrganizationPagesWithContext(aws.BackgroundContext(), input, fn)
  9445. }
  9446. // ListAWSServiceAccessForOrganizationPagesWithContext same as ListAWSServiceAccessForOrganizationPages except
  9447. // it takes a Context and allows setting request options on the pages.
  9448. //
  9449. // The context must be non-nil and will be used for request cancellation. If
  9450. // the context is nil a panic will occur. In the future the SDK may create
  9451. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  9452. // for more information on using Contexts.
  9453. func (c *Organizations) ListAWSServiceAccessForOrganizationPagesWithContext(ctx aws.Context, input *ListAWSServiceAccessForOrganizationInput, fn func(*ListAWSServiceAccessForOrganizationOutput, bool) bool, opts ...request.Option) error {
  9454. p := request.Pagination{
  9455. NewRequest: func() (*request.Request, error) {
  9456. var inCpy *ListAWSServiceAccessForOrganizationInput
  9457. if input != nil {
  9458. tmp := *input
  9459. inCpy = &tmp
  9460. }
  9461. req, _ := c.ListAWSServiceAccessForOrganizationRequest(inCpy)
  9462. req.SetContext(ctx)
  9463. req.ApplyOptions(opts...)
  9464. return req, nil
  9465. },
  9466. }
  9467. for p.Next() {
  9468. if !fn(p.Page().(*ListAWSServiceAccessForOrganizationOutput), !p.HasNextPage()) {
  9469. break
  9470. }
  9471. }
  9472. return p.Err()
  9473. }
  9474. const opListAccounts = "ListAccounts"
  9475. // ListAccountsRequest generates a "aws/request.Request" representing the
  9476. // client's request for the ListAccounts operation. The "output" return
  9477. // value will be populated with the request's response once the request completes
  9478. // successfully.
  9479. //
  9480. // Use "Send" method on the returned Request to send the API call to the service.
  9481. // the "output" return value is not valid until after Send returns without error.
  9482. //
  9483. // See ListAccounts for more information on using the ListAccounts
  9484. // API call, and error handling.
  9485. //
  9486. // This method is useful when you want to inject custom logic or configuration
  9487. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  9488. //
  9489. // // Example sending a request using the ListAccountsRequest method.
  9490. // req, resp := client.ListAccountsRequest(params)
  9491. //
  9492. // err := req.Send()
  9493. // if err == nil { // resp is now filled
  9494. // fmt.Println(resp)
  9495. // }
  9496. //
  9497. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAccounts
  9498. func (c *Organizations) ListAccountsRequest(input *ListAccountsInput) (req *request.Request, output *ListAccountsOutput) {
  9499. op := &request.Operation{
  9500. Name: opListAccounts,
  9501. HTTPMethod: "POST",
  9502. HTTPPath: "/",
  9503. Paginator: &request.Paginator{
  9504. InputTokens: []string{"NextToken"},
  9505. OutputTokens: []string{"NextToken"},
  9506. LimitToken: "MaxResults",
  9507. TruncationToken: "",
  9508. },
  9509. }
  9510. if input == nil {
  9511. input = &ListAccountsInput{}
  9512. }
  9513. output = &ListAccountsOutput{}
  9514. req = c.newRequest(op, input, output)
  9515. return
  9516. }
  9517. // ListAccounts API operation for AWS Organizations.
  9518. //
  9519. // Lists all the accounts in the organization. To request only the accounts
  9520. // in a specified root or organizational unit (OU), use the ListAccountsForParent
  9521. // operation instead.
  9522. //
  9523. // Always check the NextToken response parameter for a null value when calling
  9524. // a List* operation. These operations can occasionally return an empty set
  9525. // of results even when there are more results available. The NextToken response
  9526. // parameter value is null only when there are no more results to display.
  9527. //
  9528. // This operation can be called only from the organization's management account
  9529. // or by a member account that is a delegated administrator for an Amazon Web
  9530. // Services service.
  9531. //
  9532. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  9533. // with awserr.Error's Code and Message methods to get detailed information about
  9534. // the error.
  9535. //
  9536. // See the AWS API reference guide for AWS Organizations's
  9537. // API operation ListAccounts for usage and error information.
  9538. //
  9539. // Returned Error Types:
  9540. //
  9541. // - AccessDeniedException
  9542. // You don't have permissions to perform the requested operation. The user or
  9543. // role that is making the request must have at least one IAM permissions policy
  9544. // attached that grants the required permissions. For more information, see
  9545. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  9546. // in the IAM User Guide.
  9547. //
  9548. // - AWSOrganizationsNotInUseException
  9549. // Your account isn't a member of an organization. To make this request, you
  9550. // must use the credentials of an account that belongs to an organization.
  9551. //
  9552. // - InvalidInputException
  9553. // The requested operation failed because you provided invalid values for one
  9554. // or more of the request parameters. This exception includes a reason that
  9555. // contains additional information about the violated limit:
  9556. //
  9557. // Some of the reasons in the following list might not be applicable to this
  9558. // specific API or operation.
  9559. //
  9560. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  9561. // the same entity.
  9562. //
  9563. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  9564. // Services and can't be modified.
  9565. //
  9566. // - INPUT_REQUIRED: You must include a value for all required parameters.
  9567. //
  9568. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  9569. // for the invited account owner.
  9570. //
  9571. // - INVALID_ENUM: You specified an invalid value.
  9572. //
  9573. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  9574. //
  9575. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  9576. // characters.
  9577. //
  9578. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  9579. // at least one invalid value.
  9580. //
  9581. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  9582. // from the response to a previous call of the operation.
  9583. //
  9584. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  9585. // organization, or email) as a party.
  9586. //
  9587. // - INVALID_PATTERN: You provided a value that doesn't match the required
  9588. // pattern.
  9589. //
  9590. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  9591. // match the required pattern.
  9592. //
  9593. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  9594. // name can't begin with the reserved prefix AWSServiceRoleFor.
  9595. //
  9596. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  9597. // Name (ARN) for the organization.
  9598. //
  9599. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  9600. //
  9601. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  9602. // tag. You can’t add, edit, or delete system tag keys because they're
  9603. // reserved for Amazon Web Services use. System tags don’t count against
  9604. // your tags per resource limit.
  9605. //
  9606. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  9607. // for the operation.
  9608. //
  9609. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  9610. // than allowed.
  9611. //
  9612. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  9613. // value than allowed.
  9614. //
  9615. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  9616. // than allowed.
  9617. //
  9618. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  9619. // value than allowed.
  9620. //
  9621. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  9622. // between entities in the same root.
  9623. //
  9624. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  9625. // target entity.
  9626. //
  9627. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  9628. // isn't recognized.
  9629. //
  9630. // - ServiceException
  9631. // Organizations can't complete your request because of an internal service
  9632. // error. Try again later.
  9633. //
  9634. // - TooManyRequestsException
  9635. // You have sent too many requests in too short a period of time. The quota
  9636. // helps protect against denial-of-service attacks. Try again later.
  9637. //
  9638. // For information about quotas that affect Organizations, see Quotas for Organizations
  9639. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  9640. // the Organizations User Guide.
  9641. //
  9642. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAccounts
  9643. func (c *Organizations) ListAccounts(input *ListAccountsInput) (*ListAccountsOutput, error) {
  9644. req, out := c.ListAccountsRequest(input)
  9645. return out, req.Send()
  9646. }
  9647. // ListAccountsWithContext is the same as ListAccounts with the addition of
  9648. // the ability to pass a context and additional request options.
  9649. //
  9650. // See ListAccounts for details on how to use this API operation.
  9651. //
  9652. // The context must be non-nil and will be used for request cancellation. If
  9653. // the context is nil a panic will occur. In the future the SDK may create
  9654. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  9655. // for more information on using Contexts.
  9656. func (c *Organizations) ListAccountsWithContext(ctx aws.Context, input *ListAccountsInput, opts ...request.Option) (*ListAccountsOutput, error) {
  9657. req, out := c.ListAccountsRequest(input)
  9658. req.SetContext(ctx)
  9659. req.ApplyOptions(opts...)
  9660. return out, req.Send()
  9661. }
  9662. // ListAccountsPages iterates over the pages of a ListAccounts operation,
  9663. // calling the "fn" function with the response data for each page. To stop
  9664. // iterating, return false from the fn function.
  9665. //
  9666. // See ListAccounts method for more information on how to use this operation.
  9667. //
  9668. // Note: This operation can generate multiple requests to a service.
  9669. //
  9670. // // Example iterating over at most 3 pages of a ListAccounts operation.
  9671. // pageNum := 0
  9672. // err := client.ListAccountsPages(params,
  9673. // func(page *organizations.ListAccountsOutput, lastPage bool) bool {
  9674. // pageNum++
  9675. // fmt.Println(page)
  9676. // return pageNum <= 3
  9677. // })
  9678. func (c *Organizations) ListAccountsPages(input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool) error {
  9679. return c.ListAccountsPagesWithContext(aws.BackgroundContext(), input, fn)
  9680. }
  9681. // ListAccountsPagesWithContext same as ListAccountsPages except
  9682. // it takes a Context and allows setting request options on the pages.
  9683. //
  9684. // The context must be non-nil and will be used for request cancellation. If
  9685. // the context is nil a panic will occur. In the future the SDK may create
  9686. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  9687. // for more information on using Contexts.
  9688. func (c *Organizations) ListAccountsPagesWithContext(ctx aws.Context, input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool, opts ...request.Option) error {
  9689. p := request.Pagination{
  9690. NewRequest: func() (*request.Request, error) {
  9691. var inCpy *ListAccountsInput
  9692. if input != nil {
  9693. tmp := *input
  9694. inCpy = &tmp
  9695. }
  9696. req, _ := c.ListAccountsRequest(inCpy)
  9697. req.SetContext(ctx)
  9698. req.ApplyOptions(opts...)
  9699. return req, nil
  9700. },
  9701. }
  9702. for p.Next() {
  9703. if !fn(p.Page().(*ListAccountsOutput), !p.HasNextPage()) {
  9704. break
  9705. }
  9706. }
  9707. return p.Err()
  9708. }
  9709. const opListAccountsForParent = "ListAccountsForParent"
  9710. // ListAccountsForParentRequest generates a "aws/request.Request" representing the
  9711. // client's request for the ListAccountsForParent operation. The "output" return
  9712. // value will be populated with the request's response once the request completes
  9713. // successfully.
  9714. //
  9715. // Use "Send" method on the returned Request to send the API call to the service.
  9716. // the "output" return value is not valid until after Send returns without error.
  9717. //
  9718. // See ListAccountsForParent for more information on using the ListAccountsForParent
  9719. // API call, and error handling.
  9720. //
  9721. // This method is useful when you want to inject custom logic or configuration
  9722. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  9723. //
  9724. // // Example sending a request using the ListAccountsForParentRequest method.
  9725. // req, resp := client.ListAccountsForParentRequest(params)
  9726. //
  9727. // err := req.Send()
  9728. // if err == nil { // resp is now filled
  9729. // fmt.Println(resp)
  9730. // }
  9731. //
  9732. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAccountsForParent
  9733. func (c *Organizations) ListAccountsForParentRequest(input *ListAccountsForParentInput) (req *request.Request, output *ListAccountsForParentOutput) {
  9734. op := &request.Operation{
  9735. Name: opListAccountsForParent,
  9736. HTTPMethod: "POST",
  9737. HTTPPath: "/",
  9738. Paginator: &request.Paginator{
  9739. InputTokens: []string{"NextToken"},
  9740. OutputTokens: []string{"NextToken"},
  9741. LimitToken: "MaxResults",
  9742. TruncationToken: "",
  9743. },
  9744. }
  9745. if input == nil {
  9746. input = &ListAccountsForParentInput{}
  9747. }
  9748. output = &ListAccountsForParentOutput{}
  9749. req = c.newRequest(op, input, output)
  9750. return
  9751. }
  9752. // ListAccountsForParent API operation for AWS Organizations.
  9753. //
  9754. // Lists the accounts in an organization that are contained by the specified
  9755. // target root or organizational unit (OU). If you specify the root, you get
  9756. // a list of all the accounts that aren't in any OU. If you specify an OU, you
  9757. // get a list of all the accounts in only that OU and not in any child OUs.
  9758. // To get a list of all accounts in the organization, use the ListAccounts operation.
  9759. //
  9760. // Always check the NextToken response parameter for a null value when calling
  9761. // a List* operation. These operations can occasionally return an empty set
  9762. // of results even when there are more results available. The NextToken response
  9763. // parameter value is null only when there are no more results to display.
  9764. //
  9765. // This operation can be called only from the organization's management account
  9766. // or by a member account that is a delegated administrator for an Amazon Web
  9767. // Services service.
  9768. //
  9769. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  9770. // with awserr.Error's Code and Message methods to get detailed information about
  9771. // the error.
  9772. //
  9773. // See the AWS API reference guide for AWS Organizations's
  9774. // API operation ListAccountsForParent for usage and error information.
  9775. //
  9776. // Returned Error Types:
  9777. //
  9778. // - AccessDeniedException
  9779. // You don't have permissions to perform the requested operation. The user or
  9780. // role that is making the request must have at least one IAM permissions policy
  9781. // attached that grants the required permissions. For more information, see
  9782. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  9783. // in the IAM User Guide.
  9784. //
  9785. // - AWSOrganizationsNotInUseException
  9786. // Your account isn't a member of an organization. To make this request, you
  9787. // must use the credentials of an account that belongs to an organization.
  9788. //
  9789. // - InvalidInputException
  9790. // The requested operation failed because you provided invalid values for one
  9791. // or more of the request parameters. This exception includes a reason that
  9792. // contains additional information about the violated limit:
  9793. //
  9794. // Some of the reasons in the following list might not be applicable to this
  9795. // specific API or operation.
  9796. //
  9797. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  9798. // the same entity.
  9799. //
  9800. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  9801. // Services and can't be modified.
  9802. //
  9803. // - INPUT_REQUIRED: You must include a value for all required parameters.
  9804. //
  9805. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  9806. // for the invited account owner.
  9807. //
  9808. // - INVALID_ENUM: You specified an invalid value.
  9809. //
  9810. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  9811. //
  9812. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  9813. // characters.
  9814. //
  9815. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  9816. // at least one invalid value.
  9817. //
  9818. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  9819. // from the response to a previous call of the operation.
  9820. //
  9821. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  9822. // organization, or email) as a party.
  9823. //
  9824. // - INVALID_PATTERN: You provided a value that doesn't match the required
  9825. // pattern.
  9826. //
  9827. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  9828. // match the required pattern.
  9829. //
  9830. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  9831. // name can't begin with the reserved prefix AWSServiceRoleFor.
  9832. //
  9833. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  9834. // Name (ARN) for the organization.
  9835. //
  9836. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  9837. //
  9838. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  9839. // tag. You can’t add, edit, or delete system tag keys because they're
  9840. // reserved for Amazon Web Services use. System tags don’t count against
  9841. // your tags per resource limit.
  9842. //
  9843. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  9844. // for the operation.
  9845. //
  9846. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  9847. // than allowed.
  9848. //
  9849. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  9850. // value than allowed.
  9851. //
  9852. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  9853. // than allowed.
  9854. //
  9855. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  9856. // value than allowed.
  9857. //
  9858. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  9859. // between entities in the same root.
  9860. //
  9861. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  9862. // target entity.
  9863. //
  9864. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  9865. // isn't recognized.
  9866. //
  9867. // - ParentNotFoundException
  9868. // We can't find a root or OU with the ParentId that you specified.
  9869. //
  9870. // - ServiceException
  9871. // Organizations can't complete your request because of an internal service
  9872. // error. Try again later.
  9873. //
  9874. // - TooManyRequestsException
  9875. // You have sent too many requests in too short a period of time. The quota
  9876. // helps protect against denial-of-service attacks. Try again later.
  9877. //
  9878. // For information about quotas that affect Organizations, see Quotas for Organizations
  9879. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  9880. // the Organizations User Guide.
  9881. //
  9882. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAccountsForParent
  9883. func (c *Organizations) ListAccountsForParent(input *ListAccountsForParentInput) (*ListAccountsForParentOutput, error) {
  9884. req, out := c.ListAccountsForParentRequest(input)
  9885. return out, req.Send()
  9886. }
  9887. // ListAccountsForParentWithContext is the same as ListAccountsForParent with the addition of
  9888. // the ability to pass a context and additional request options.
  9889. //
  9890. // See ListAccountsForParent for details on how to use this API operation.
  9891. //
  9892. // The context must be non-nil and will be used for request cancellation. If
  9893. // the context is nil a panic will occur. In the future the SDK may create
  9894. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  9895. // for more information on using Contexts.
  9896. func (c *Organizations) ListAccountsForParentWithContext(ctx aws.Context, input *ListAccountsForParentInput, opts ...request.Option) (*ListAccountsForParentOutput, error) {
  9897. req, out := c.ListAccountsForParentRequest(input)
  9898. req.SetContext(ctx)
  9899. req.ApplyOptions(opts...)
  9900. return out, req.Send()
  9901. }
  9902. // ListAccountsForParentPages iterates over the pages of a ListAccountsForParent operation,
  9903. // calling the "fn" function with the response data for each page. To stop
  9904. // iterating, return false from the fn function.
  9905. //
  9906. // See ListAccountsForParent method for more information on how to use this operation.
  9907. //
  9908. // Note: This operation can generate multiple requests to a service.
  9909. //
  9910. // // Example iterating over at most 3 pages of a ListAccountsForParent operation.
  9911. // pageNum := 0
  9912. // err := client.ListAccountsForParentPages(params,
  9913. // func(page *organizations.ListAccountsForParentOutput, lastPage bool) bool {
  9914. // pageNum++
  9915. // fmt.Println(page)
  9916. // return pageNum <= 3
  9917. // })
  9918. func (c *Organizations) ListAccountsForParentPages(input *ListAccountsForParentInput, fn func(*ListAccountsForParentOutput, bool) bool) error {
  9919. return c.ListAccountsForParentPagesWithContext(aws.BackgroundContext(), input, fn)
  9920. }
  9921. // ListAccountsForParentPagesWithContext same as ListAccountsForParentPages except
  9922. // it takes a Context and allows setting request options on the pages.
  9923. //
  9924. // The context must be non-nil and will be used for request cancellation. If
  9925. // the context is nil a panic will occur. In the future the SDK may create
  9926. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  9927. // for more information on using Contexts.
  9928. func (c *Organizations) ListAccountsForParentPagesWithContext(ctx aws.Context, input *ListAccountsForParentInput, fn func(*ListAccountsForParentOutput, bool) bool, opts ...request.Option) error {
  9929. p := request.Pagination{
  9930. NewRequest: func() (*request.Request, error) {
  9931. var inCpy *ListAccountsForParentInput
  9932. if input != nil {
  9933. tmp := *input
  9934. inCpy = &tmp
  9935. }
  9936. req, _ := c.ListAccountsForParentRequest(inCpy)
  9937. req.SetContext(ctx)
  9938. req.ApplyOptions(opts...)
  9939. return req, nil
  9940. },
  9941. }
  9942. for p.Next() {
  9943. if !fn(p.Page().(*ListAccountsForParentOutput), !p.HasNextPage()) {
  9944. break
  9945. }
  9946. }
  9947. return p.Err()
  9948. }
  9949. const opListChildren = "ListChildren"
  9950. // ListChildrenRequest generates a "aws/request.Request" representing the
  9951. // client's request for the ListChildren operation. The "output" return
  9952. // value will be populated with the request's response once the request completes
  9953. // successfully.
  9954. //
  9955. // Use "Send" method on the returned Request to send the API call to the service.
  9956. // the "output" return value is not valid until after Send returns without error.
  9957. //
  9958. // See ListChildren for more information on using the ListChildren
  9959. // API call, and error handling.
  9960. //
  9961. // This method is useful when you want to inject custom logic or configuration
  9962. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  9963. //
  9964. // // Example sending a request using the ListChildrenRequest method.
  9965. // req, resp := client.ListChildrenRequest(params)
  9966. //
  9967. // err := req.Send()
  9968. // if err == nil { // resp is now filled
  9969. // fmt.Println(resp)
  9970. // }
  9971. //
  9972. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListChildren
  9973. func (c *Organizations) ListChildrenRequest(input *ListChildrenInput) (req *request.Request, output *ListChildrenOutput) {
  9974. op := &request.Operation{
  9975. Name: opListChildren,
  9976. HTTPMethod: "POST",
  9977. HTTPPath: "/",
  9978. Paginator: &request.Paginator{
  9979. InputTokens: []string{"NextToken"},
  9980. OutputTokens: []string{"NextToken"},
  9981. LimitToken: "MaxResults",
  9982. TruncationToken: "",
  9983. },
  9984. }
  9985. if input == nil {
  9986. input = &ListChildrenInput{}
  9987. }
  9988. output = &ListChildrenOutput{}
  9989. req = c.newRequest(op, input, output)
  9990. return
  9991. }
  9992. // ListChildren API operation for AWS Organizations.
  9993. //
  9994. // Lists all of the organizational units (OUs) or accounts that are contained
  9995. // in the specified parent OU or root. This operation, along with ListParents
  9996. // enables you to traverse the tree structure that makes up this root.
  9997. //
  9998. // Always check the NextToken response parameter for a null value when calling
  9999. // a List* operation. These operations can occasionally return an empty set
  10000. // of results even when there are more results available. The NextToken response
  10001. // parameter value is null only when there are no more results to display.
  10002. //
  10003. // This operation can be called only from the organization's management account
  10004. // or by a member account that is a delegated administrator for an Amazon Web
  10005. // Services service.
  10006. //
  10007. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  10008. // with awserr.Error's Code and Message methods to get detailed information about
  10009. // the error.
  10010. //
  10011. // See the AWS API reference guide for AWS Organizations's
  10012. // API operation ListChildren for usage and error information.
  10013. //
  10014. // Returned Error Types:
  10015. //
  10016. // - AccessDeniedException
  10017. // You don't have permissions to perform the requested operation. The user or
  10018. // role that is making the request must have at least one IAM permissions policy
  10019. // attached that grants the required permissions. For more information, see
  10020. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  10021. // in the IAM User Guide.
  10022. //
  10023. // - AWSOrganizationsNotInUseException
  10024. // Your account isn't a member of an organization. To make this request, you
  10025. // must use the credentials of an account that belongs to an organization.
  10026. //
  10027. // - InvalidInputException
  10028. // The requested operation failed because you provided invalid values for one
  10029. // or more of the request parameters. This exception includes a reason that
  10030. // contains additional information about the violated limit:
  10031. //
  10032. // Some of the reasons in the following list might not be applicable to this
  10033. // specific API or operation.
  10034. //
  10035. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  10036. // the same entity.
  10037. //
  10038. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  10039. // Services and can't be modified.
  10040. //
  10041. // - INPUT_REQUIRED: You must include a value for all required parameters.
  10042. //
  10043. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  10044. // for the invited account owner.
  10045. //
  10046. // - INVALID_ENUM: You specified an invalid value.
  10047. //
  10048. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  10049. //
  10050. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  10051. // characters.
  10052. //
  10053. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  10054. // at least one invalid value.
  10055. //
  10056. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  10057. // from the response to a previous call of the operation.
  10058. //
  10059. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  10060. // organization, or email) as a party.
  10061. //
  10062. // - INVALID_PATTERN: You provided a value that doesn't match the required
  10063. // pattern.
  10064. //
  10065. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  10066. // match the required pattern.
  10067. //
  10068. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  10069. // name can't begin with the reserved prefix AWSServiceRoleFor.
  10070. //
  10071. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  10072. // Name (ARN) for the organization.
  10073. //
  10074. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  10075. //
  10076. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  10077. // tag. You can’t add, edit, or delete system tag keys because they're
  10078. // reserved for Amazon Web Services use. System tags don’t count against
  10079. // your tags per resource limit.
  10080. //
  10081. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  10082. // for the operation.
  10083. //
  10084. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  10085. // than allowed.
  10086. //
  10087. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  10088. // value than allowed.
  10089. //
  10090. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  10091. // than allowed.
  10092. //
  10093. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  10094. // value than allowed.
  10095. //
  10096. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  10097. // between entities in the same root.
  10098. //
  10099. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  10100. // target entity.
  10101. //
  10102. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  10103. // isn't recognized.
  10104. //
  10105. // - ParentNotFoundException
  10106. // We can't find a root or OU with the ParentId that you specified.
  10107. //
  10108. // - ServiceException
  10109. // Organizations can't complete your request because of an internal service
  10110. // error. Try again later.
  10111. //
  10112. // - TooManyRequestsException
  10113. // You have sent too many requests in too short a period of time. The quota
  10114. // helps protect against denial-of-service attacks. Try again later.
  10115. //
  10116. // For information about quotas that affect Organizations, see Quotas for Organizations
  10117. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  10118. // the Organizations User Guide.
  10119. //
  10120. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListChildren
  10121. func (c *Organizations) ListChildren(input *ListChildrenInput) (*ListChildrenOutput, error) {
  10122. req, out := c.ListChildrenRequest(input)
  10123. return out, req.Send()
  10124. }
  10125. // ListChildrenWithContext is the same as ListChildren with the addition of
  10126. // the ability to pass a context and additional request options.
  10127. //
  10128. // See ListChildren for details on how to use this API operation.
  10129. //
  10130. // The context must be non-nil and will be used for request cancellation. If
  10131. // the context is nil a panic will occur. In the future the SDK may create
  10132. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  10133. // for more information on using Contexts.
  10134. func (c *Organizations) ListChildrenWithContext(ctx aws.Context, input *ListChildrenInput, opts ...request.Option) (*ListChildrenOutput, error) {
  10135. req, out := c.ListChildrenRequest(input)
  10136. req.SetContext(ctx)
  10137. req.ApplyOptions(opts...)
  10138. return out, req.Send()
  10139. }
  10140. // ListChildrenPages iterates over the pages of a ListChildren operation,
  10141. // calling the "fn" function with the response data for each page. To stop
  10142. // iterating, return false from the fn function.
  10143. //
  10144. // See ListChildren method for more information on how to use this operation.
  10145. //
  10146. // Note: This operation can generate multiple requests to a service.
  10147. //
  10148. // // Example iterating over at most 3 pages of a ListChildren operation.
  10149. // pageNum := 0
  10150. // err := client.ListChildrenPages(params,
  10151. // func(page *organizations.ListChildrenOutput, lastPage bool) bool {
  10152. // pageNum++
  10153. // fmt.Println(page)
  10154. // return pageNum <= 3
  10155. // })
  10156. func (c *Organizations) ListChildrenPages(input *ListChildrenInput, fn func(*ListChildrenOutput, bool) bool) error {
  10157. return c.ListChildrenPagesWithContext(aws.BackgroundContext(), input, fn)
  10158. }
  10159. // ListChildrenPagesWithContext same as ListChildrenPages except
  10160. // it takes a Context and allows setting request options on the pages.
  10161. //
  10162. // The context must be non-nil and will be used for request cancellation. If
  10163. // the context is nil a panic will occur. In the future the SDK may create
  10164. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  10165. // for more information on using Contexts.
  10166. func (c *Organizations) ListChildrenPagesWithContext(ctx aws.Context, input *ListChildrenInput, fn func(*ListChildrenOutput, bool) bool, opts ...request.Option) error {
  10167. p := request.Pagination{
  10168. NewRequest: func() (*request.Request, error) {
  10169. var inCpy *ListChildrenInput
  10170. if input != nil {
  10171. tmp := *input
  10172. inCpy = &tmp
  10173. }
  10174. req, _ := c.ListChildrenRequest(inCpy)
  10175. req.SetContext(ctx)
  10176. req.ApplyOptions(opts...)
  10177. return req, nil
  10178. },
  10179. }
  10180. for p.Next() {
  10181. if !fn(p.Page().(*ListChildrenOutput), !p.HasNextPage()) {
  10182. break
  10183. }
  10184. }
  10185. return p.Err()
  10186. }
  10187. const opListCreateAccountStatus = "ListCreateAccountStatus"
  10188. // ListCreateAccountStatusRequest generates a "aws/request.Request" representing the
  10189. // client's request for the ListCreateAccountStatus operation. The "output" return
  10190. // value will be populated with the request's response once the request completes
  10191. // successfully.
  10192. //
  10193. // Use "Send" method on the returned Request to send the API call to the service.
  10194. // the "output" return value is not valid until after Send returns without error.
  10195. //
  10196. // See ListCreateAccountStatus for more information on using the ListCreateAccountStatus
  10197. // API call, and error handling.
  10198. //
  10199. // This method is useful when you want to inject custom logic or configuration
  10200. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  10201. //
  10202. // // Example sending a request using the ListCreateAccountStatusRequest method.
  10203. // req, resp := client.ListCreateAccountStatusRequest(params)
  10204. //
  10205. // err := req.Send()
  10206. // if err == nil { // resp is now filled
  10207. // fmt.Println(resp)
  10208. // }
  10209. //
  10210. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListCreateAccountStatus
  10211. func (c *Organizations) ListCreateAccountStatusRequest(input *ListCreateAccountStatusInput) (req *request.Request, output *ListCreateAccountStatusOutput) {
  10212. op := &request.Operation{
  10213. Name: opListCreateAccountStatus,
  10214. HTTPMethod: "POST",
  10215. HTTPPath: "/",
  10216. Paginator: &request.Paginator{
  10217. InputTokens: []string{"NextToken"},
  10218. OutputTokens: []string{"NextToken"},
  10219. LimitToken: "MaxResults",
  10220. TruncationToken: "",
  10221. },
  10222. }
  10223. if input == nil {
  10224. input = &ListCreateAccountStatusInput{}
  10225. }
  10226. output = &ListCreateAccountStatusOutput{}
  10227. req = c.newRequest(op, input, output)
  10228. return
  10229. }
  10230. // ListCreateAccountStatus API operation for AWS Organizations.
  10231. //
  10232. // Lists the account creation requests that match the specified status that
  10233. // is currently being tracked for the organization.
  10234. //
  10235. // Always check the NextToken response parameter for a null value when calling
  10236. // a List* operation. These operations can occasionally return an empty set
  10237. // of results even when there are more results available. The NextToken response
  10238. // parameter value is null only when there are no more results to display.
  10239. //
  10240. // This operation can be called only from the organization's management account
  10241. // or by a member account that is a delegated administrator for an Amazon Web
  10242. // Services service.
  10243. //
  10244. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  10245. // with awserr.Error's Code and Message methods to get detailed information about
  10246. // the error.
  10247. //
  10248. // See the AWS API reference guide for AWS Organizations's
  10249. // API operation ListCreateAccountStatus for usage and error information.
  10250. //
  10251. // Returned Error Types:
  10252. //
  10253. // - AccessDeniedException
  10254. // You don't have permissions to perform the requested operation. The user or
  10255. // role that is making the request must have at least one IAM permissions policy
  10256. // attached that grants the required permissions. For more information, see
  10257. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  10258. // in the IAM User Guide.
  10259. //
  10260. // - AWSOrganizationsNotInUseException
  10261. // Your account isn't a member of an organization. To make this request, you
  10262. // must use the credentials of an account that belongs to an organization.
  10263. //
  10264. // - InvalidInputException
  10265. // The requested operation failed because you provided invalid values for one
  10266. // or more of the request parameters. This exception includes a reason that
  10267. // contains additional information about the violated limit:
  10268. //
  10269. // Some of the reasons in the following list might not be applicable to this
  10270. // specific API or operation.
  10271. //
  10272. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  10273. // the same entity.
  10274. //
  10275. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  10276. // Services and can't be modified.
  10277. //
  10278. // - INPUT_REQUIRED: You must include a value for all required parameters.
  10279. //
  10280. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  10281. // for the invited account owner.
  10282. //
  10283. // - INVALID_ENUM: You specified an invalid value.
  10284. //
  10285. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  10286. //
  10287. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  10288. // characters.
  10289. //
  10290. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  10291. // at least one invalid value.
  10292. //
  10293. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  10294. // from the response to a previous call of the operation.
  10295. //
  10296. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  10297. // organization, or email) as a party.
  10298. //
  10299. // - INVALID_PATTERN: You provided a value that doesn't match the required
  10300. // pattern.
  10301. //
  10302. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  10303. // match the required pattern.
  10304. //
  10305. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  10306. // name can't begin with the reserved prefix AWSServiceRoleFor.
  10307. //
  10308. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  10309. // Name (ARN) for the organization.
  10310. //
  10311. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  10312. //
  10313. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  10314. // tag. You can’t add, edit, or delete system tag keys because they're
  10315. // reserved for Amazon Web Services use. System tags don’t count against
  10316. // your tags per resource limit.
  10317. //
  10318. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  10319. // for the operation.
  10320. //
  10321. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  10322. // than allowed.
  10323. //
  10324. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  10325. // value than allowed.
  10326. //
  10327. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  10328. // than allowed.
  10329. //
  10330. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  10331. // value than allowed.
  10332. //
  10333. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  10334. // between entities in the same root.
  10335. //
  10336. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  10337. // target entity.
  10338. //
  10339. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  10340. // isn't recognized.
  10341. //
  10342. // - ServiceException
  10343. // Organizations can't complete your request because of an internal service
  10344. // error. Try again later.
  10345. //
  10346. // - TooManyRequestsException
  10347. // You have sent too many requests in too short a period of time. The quota
  10348. // helps protect against denial-of-service attacks. Try again later.
  10349. //
  10350. // For information about quotas that affect Organizations, see Quotas for Organizations
  10351. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  10352. // the Organizations User Guide.
  10353. //
  10354. // - UnsupportedAPIEndpointException
  10355. // This action isn't available in the current Amazon Web Services Region.
  10356. //
  10357. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListCreateAccountStatus
  10358. func (c *Organizations) ListCreateAccountStatus(input *ListCreateAccountStatusInput) (*ListCreateAccountStatusOutput, error) {
  10359. req, out := c.ListCreateAccountStatusRequest(input)
  10360. return out, req.Send()
  10361. }
  10362. // ListCreateAccountStatusWithContext is the same as ListCreateAccountStatus with the addition of
  10363. // the ability to pass a context and additional request options.
  10364. //
  10365. // See ListCreateAccountStatus for details on how to use this API operation.
  10366. //
  10367. // The context must be non-nil and will be used for request cancellation. If
  10368. // the context is nil a panic will occur. In the future the SDK may create
  10369. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  10370. // for more information on using Contexts.
  10371. func (c *Organizations) ListCreateAccountStatusWithContext(ctx aws.Context, input *ListCreateAccountStatusInput, opts ...request.Option) (*ListCreateAccountStatusOutput, error) {
  10372. req, out := c.ListCreateAccountStatusRequest(input)
  10373. req.SetContext(ctx)
  10374. req.ApplyOptions(opts...)
  10375. return out, req.Send()
  10376. }
  10377. // ListCreateAccountStatusPages iterates over the pages of a ListCreateAccountStatus operation,
  10378. // calling the "fn" function with the response data for each page. To stop
  10379. // iterating, return false from the fn function.
  10380. //
  10381. // See ListCreateAccountStatus method for more information on how to use this operation.
  10382. //
  10383. // Note: This operation can generate multiple requests to a service.
  10384. //
  10385. // // Example iterating over at most 3 pages of a ListCreateAccountStatus operation.
  10386. // pageNum := 0
  10387. // err := client.ListCreateAccountStatusPages(params,
  10388. // func(page *organizations.ListCreateAccountStatusOutput, lastPage bool) bool {
  10389. // pageNum++
  10390. // fmt.Println(page)
  10391. // return pageNum <= 3
  10392. // })
  10393. func (c *Organizations) ListCreateAccountStatusPages(input *ListCreateAccountStatusInput, fn func(*ListCreateAccountStatusOutput, bool) bool) error {
  10394. return c.ListCreateAccountStatusPagesWithContext(aws.BackgroundContext(), input, fn)
  10395. }
  10396. // ListCreateAccountStatusPagesWithContext same as ListCreateAccountStatusPages except
  10397. // it takes a Context and allows setting request options on the pages.
  10398. //
  10399. // The context must be non-nil and will be used for request cancellation. If
  10400. // the context is nil a panic will occur. In the future the SDK may create
  10401. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  10402. // for more information on using Contexts.
  10403. func (c *Organizations) ListCreateAccountStatusPagesWithContext(ctx aws.Context, input *ListCreateAccountStatusInput, fn func(*ListCreateAccountStatusOutput, bool) bool, opts ...request.Option) error {
  10404. p := request.Pagination{
  10405. NewRequest: func() (*request.Request, error) {
  10406. var inCpy *ListCreateAccountStatusInput
  10407. if input != nil {
  10408. tmp := *input
  10409. inCpy = &tmp
  10410. }
  10411. req, _ := c.ListCreateAccountStatusRequest(inCpy)
  10412. req.SetContext(ctx)
  10413. req.ApplyOptions(opts...)
  10414. return req, nil
  10415. },
  10416. }
  10417. for p.Next() {
  10418. if !fn(p.Page().(*ListCreateAccountStatusOutput), !p.HasNextPage()) {
  10419. break
  10420. }
  10421. }
  10422. return p.Err()
  10423. }
  10424. const opListDelegatedAdministrators = "ListDelegatedAdministrators"
  10425. // ListDelegatedAdministratorsRequest generates a "aws/request.Request" representing the
  10426. // client's request for the ListDelegatedAdministrators operation. The "output" return
  10427. // value will be populated with the request's response once the request completes
  10428. // successfully.
  10429. //
  10430. // Use "Send" method on the returned Request to send the API call to the service.
  10431. // the "output" return value is not valid until after Send returns without error.
  10432. //
  10433. // See ListDelegatedAdministrators for more information on using the ListDelegatedAdministrators
  10434. // API call, and error handling.
  10435. //
  10436. // This method is useful when you want to inject custom logic or configuration
  10437. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  10438. //
  10439. // // Example sending a request using the ListDelegatedAdministratorsRequest method.
  10440. // req, resp := client.ListDelegatedAdministratorsRequest(params)
  10441. //
  10442. // err := req.Send()
  10443. // if err == nil { // resp is now filled
  10444. // fmt.Println(resp)
  10445. // }
  10446. //
  10447. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListDelegatedAdministrators
  10448. func (c *Organizations) ListDelegatedAdministratorsRequest(input *ListDelegatedAdministratorsInput) (req *request.Request, output *ListDelegatedAdministratorsOutput) {
  10449. op := &request.Operation{
  10450. Name: opListDelegatedAdministrators,
  10451. HTTPMethod: "POST",
  10452. HTTPPath: "/",
  10453. Paginator: &request.Paginator{
  10454. InputTokens: []string{"NextToken"},
  10455. OutputTokens: []string{"NextToken"},
  10456. LimitToken: "MaxResults",
  10457. TruncationToken: "",
  10458. },
  10459. }
  10460. if input == nil {
  10461. input = &ListDelegatedAdministratorsInput{}
  10462. }
  10463. output = &ListDelegatedAdministratorsOutput{}
  10464. req = c.newRequest(op, input, output)
  10465. return
  10466. }
  10467. // ListDelegatedAdministrators API operation for AWS Organizations.
  10468. //
  10469. // Lists the Amazon Web Services accounts that are designated as delegated administrators
  10470. // in this organization.
  10471. //
  10472. // This operation can be called only from the organization's management account
  10473. // or by a member account that is a delegated administrator for an Amazon Web
  10474. // Services service.
  10475. //
  10476. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  10477. // with awserr.Error's Code and Message methods to get detailed information about
  10478. // the error.
  10479. //
  10480. // See the AWS API reference guide for AWS Organizations's
  10481. // API operation ListDelegatedAdministrators for usage and error information.
  10482. //
  10483. // Returned Error Types:
  10484. //
  10485. // - AccessDeniedException
  10486. // You don't have permissions to perform the requested operation. The user or
  10487. // role that is making the request must have at least one IAM permissions policy
  10488. // attached that grants the required permissions. For more information, see
  10489. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  10490. // in the IAM User Guide.
  10491. //
  10492. // - AWSOrganizationsNotInUseException
  10493. // Your account isn't a member of an organization. To make this request, you
  10494. // must use the credentials of an account that belongs to an organization.
  10495. //
  10496. // - ConstraintViolationException
  10497. // Performing this operation violates a minimum or maximum value limit. For
  10498. // example, attempting to remove the last service control policy (SCP) from
  10499. // an OU or root, inviting or creating too many accounts to the organization,
  10500. // or attaching too many policies to an account, OU, or root. This exception
  10501. // includes a reason that contains additional information about the violated
  10502. // limit:
  10503. //
  10504. // Some of the reasons in the following list might not be applicable to this
  10505. // specific API or operation.
  10506. //
  10507. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  10508. // account from the organization. You can't remove the management account.
  10509. // Instead, after you remove all member accounts, delete the organization
  10510. // itself.
  10511. //
  10512. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  10513. // an account from the organization that doesn't yet have enough information
  10514. // to exist as a standalone account. This account requires you to first complete
  10515. // phone verification. Follow the steps at Removing a member account from
  10516. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  10517. // in the Organizations User Guide.
  10518. //
  10519. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  10520. // of accounts that you can create in one day.
  10521. //
  10522. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  10523. // the number of accounts in an organization. If you need more accounts,
  10524. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  10525. // to request an increase in your limit. Or the number of invitations that
  10526. // you tried to send would cause you to exceed the limit of accounts in your
  10527. // organization. Send fewer invitations or contact Amazon Web Services Support
  10528. // to request an increase in the number of accounts. Deleted and closed accounts
  10529. // still count toward your limit. If you get this exception when running
  10530. // a command immediately after creating the organization, wait one hour and
  10531. // try again. After an hour, if the command continues to fail with this error,
  10532. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  10533. //
  10534. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  10535. // register the management account of the organization as a delegated administrator
  10536. // for an Amazon Web Services service integrated with Organizations. You
  10537. // can designate only a member account as a delegated administrator.
  10538. //
  10539. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  10540. // account. To close the management account for the organization, you must
  10541. // first either remove or close all member accounts in the organization.
  10542. // Follow standard account closure process using root credentials.​
  10543. //
  10544. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  10545. // an account that is registered as a delegated administrator for a service
  10546. // integrated with your organization. To complete this operation, you must
  10547. // first deregister this account as a delegated administrator.
  10548. //
  10549. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  10550. // for the past 30 days.
  10551. //
  10552. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  10553. // of accounts that you can close at a time. ​
  10554. //
  10555. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  10556. // organization in the specified region, you must enable all features mode.
  10557. //
  10558. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  10559. // an Amazon Web Services account as a delegated administrator for an Amazon
  10560. // Web Services service that already has a delegated administrator. To complete
  10561. // this operation, you must first deregister any existing delegated administrators
  10562. // for this service.
  10563. //
  10564. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  10565. // valid for a limited period of time. You must resubmit the request and
  10566. // generate a new verfication code.
  10567. //
  10568. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  10569. // handshakes that you can send in one day.
  10570. //
  10571. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  10572. // supported payment method is associated with the account. Amazon Web Services
  10573. // does not support cards issued by financial institutions in Russia or Belarus.
  10574. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  10575. //
  10576. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  10577. // in this organization, you first must migrate the organization's management
  10578. // account to the marketplace that corresponds to the management account's
  10579. // address. For example, accounts with India addresses must be associated
  10580. // with the AISPL marketplace. All accounts in an organization must be associated
  10581. // with the same marketplace.
  10582. //
  10583. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  10584. // Web Services /> Regions in China. To create an organization, the master
  10585. // must have a valid business license. For more information, contact customer
  10586. // support.
  10587. //
  10588. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  10589. // must first provide a valid contact address and phone number for the management
  10590. // account. Then try the operation again.
  10591. //
  10592. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  10593. // management account must have an associated account in the Amazon Web Services
  10594. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  10595. // in the Amazon Web Services GovCloud User Guide.
  10596. //
  10597. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  10598. // with this management account, you first must associate a valid payment
  10599. // instrument, such as a credit card, with the account. Follow the steps
  10600. // at To leave an organization when all required account information has
  10601. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  10602. // in the Organizations User Guide.
  10603. //
  10604. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  10605. // to register more delegated administrators than allowed for the service
  10606. // principal.
  10607. //
  10608. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  10609. // number of policies of a certain type that can be attached to an entity
  10610. // at one time.
  10611. //
  10612. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  10613. // on this resource.
  10614. //
  10615. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  10616. // with this member account, you first must associate a valid payment instrument,
  10617. // such as a credit card, with the account. Follow the steps at To leave
  10618. // an organization when all required account information has not yet been
  10619. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  10620. // in the Organizations User Guide.
  10621. //
  10622. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  10623. // policy from an entity that would cause the entity to have fewer than the
  10624. // minimum number of policies of a certain type required.
  10625. //
  10626. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  10627. // that requires the organization to be configured to support all features.
  10628. // An organization that supports only consolidated billing features can't
  10629. // perform this operation.
  10630. //
  10631. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  10632. // too many levels deep.
  10633. //
  10634. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  10635. // that you can have in an organization.
  10636. //
  10637. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  10638. // is larger than the maximum size.
  10639. //
  10640. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  10641. // policies that you can have in an organization.
  10642. //
  10643. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  10644. // before you enabled service access. Call the EnableAWSServiceAccess API
  10645. // first.
  10646. //
  10647. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  10648. // tags that are not compliant with the tag policy requirements for this
  10649. // account.
  10650. //
  10651. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  10652. // there is a waiting period before you can remove it from the organization.
  10653. // If you get an error that indicates that a wait period is required, try
  10654. // again in a few days.
  10655. //
  10656. // - InvalidInputException
  10657. // The requested operation failed because you provided invalid values for one
  10658. // or more of the request parameters. This exception includes a reason that
  10659. // contains additional information about the violated limit:
  10660. //
  10661. // Some of the reasons in the following list might not be applicable to this
  10662. // specific API or operation.
  10663. //
  10664. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  10665. // the same entity.
  10666. //
  10667. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  10668. // Services and can't be modified.
  10669. //
  10670. // - INPUT_REQUIRED: You must include a value for all required parameters.
  10671. //
  10672. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  10673. // for the invited account owner.
  10674. //
  10675. // - INVALID_ENUM: You specified an invalid value.
  10676. //
  10677. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  10678. //
  10679. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  10680. // characters.
  10681. //
  10682. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  10683. // at least one invalid value.
  10684. //
  10685. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  10686. // from the response to a previous call of the operation.
  10687. //
  10688. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  10689. // organization, or email) as a party.
  10690. //
  10691. // - INVALID_PATTERN: You provided a value that doesn't match the required
  10692. // pattern.
  10693. //
  10694. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  10695. // match the required pattern.
  10696. //
  10697. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  10698. // name can't begin with the reserved prefix AWSServiceRoleFor.
  10699. //
  10700. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  10701. // Name (ARN) for the organization.
  10702. //
  10703. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  10704. //
  10705. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  10706. // tag. You can’t add, edit, or delete system tag keys because they're
  10707. // reserved for Amazon Web Services use. System tags don’t count against
  10708. // your tags per resource limit.
  10709. //
  10710. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  10711. // for the operation.
  10712. //
  10713. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  10714. // than allowed.
  10715. //
  10716. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  10717. // value than allowed.
  10718. //
  10719. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  10720. // than allowed.
  10721. //
  10722. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  10723. // value than allowed.
  10724. //
  10725. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  10726. // between entities in the same root.
  10727. //
  10728. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  10729. // target entity.
  10730. //
  10731. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  10732. // isn't recognized.
  10733. //
  10734. // - TooManyRequestsException
  10735. // You have sent too many requests in too short a period of time. The quota
  10736. // helps protect against denial-of-service attacks. Try again later.
  10737. //
  10738. // For information about quotas that affect Organizations, see Quotas for Organizations
  10739. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  10740. // the Organizations User Guide.
  10741. //
  10742. // - ServiceException
  10743. // Organizations can't complete your request because of an internal service
  10744. // error. Try again later.
  10745. //
  10746. // - UnsupportedAPIEndpointException
  10747. // This action isn't available in the current Amazon Web Services Region.
  10748. //
  10749. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListDelegatedAdministrators
  10750. func (c *Organizations) ListDelegatedAdministrators(input *ListDelegatedAdministratorsInput) (*ListDelegatedAdministratorsOutput, error) {
  10751. req, out := c.ListDelegatedAdministratorsRequest(input)
  10752. return out, req.Send()
  10753. }
  10754. // ListDelegatedAdministratorsWithContext is the same as ListDelegatedAdministrators with the addition of
  10755. // the ability to pass a context and additional request options.
  10756. //
  10757. // See ListDelegatedAdministrators for details on how to use this API operation.
  10758. //
  10759. // The context must be non-nil and will be used for request cancellation. If
  10760. // the context is nil a panic will occur. In the future the SDK may create
  10761. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  10762. // for more information on using Contexts.
  10763. func (c *Organizations) ListDelegatedAdministratorsWithContext(ctx aws.Context, input *ListDelegatedAdministratorsInput, opts ...request.Option) (*ListDelegatedAdministratorsOutput, error) {
  10764. req, out := c.ListDelegatedAdministratorsRequest(input)
  10765. req.SetContext(ctx)
  10766. req.ApplyOptions(opts...)
  10767. return out, req.Send()
  10768. }
  10769. // ListDelegatedAdministratorsPages iterates over the pages of a ListDelegatedAdministrators operation,
  10770. // calling the "fn" function with the response data for each page. To stop
  10771. // iterating, return false from the fn function.
  10772. //
  10773. // See ListDelegatedAdministrators method for more information on how to use this operation.
  10774. //
  10775. // Note: This operation can generate multiple requests to a service.
  10776. //
  10777. // // Example iterating over at most 3 pages of a ListDelegatedAdministrators operation.
  10778. // pageNum := 0
  10779. // err := client.ListDelegatedAdministratorsPages(params,
  10780. // func(page *organizations.ListDelegatedAdministratorsOutput, lastPage bool) bool {
  10781. // pageNum++
  10782. // fmt.Println(page)
  10783. // return pageNum <= 3
  10784. // })
  10785. func (c *Organizations) ListDelegatedAdministratorsPages(input *ListDelegatedAdministratorsInput, fn func(*ListDelegatedAdministratorsOutput, bool) bool) error {
  10786. return c.ListDelegatedAdministratorsPagesWithContext(aws.BackgroundContext(), input, fn)
  10787. }
  10788. // ListDelegatedAdministratorsPagesWithContext same as ListDelegatedAdministratorsPages except
  10789. // it takes a Context and allows setting request options on the pages.
  10790. //
  10791. // The context must be non-nil and will be used for request cancellation. If
  10792. // the context is nil a panic will occur. In the future the SDK may create
  10793. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  10794. // for more information on using Contexts.
  10795. func (c *Organizations) ListDelegatedAdministratorsPagesWithContext(ctx aws.Context, input *ListDelegatedAdministratorsInput, fn func(*ListDelegatedAdministratorsOutput, bool) bool, opts ...request.Option) error {
  10796. p := request.Pagination{
  10797. NewRequest: func() (*request.Request, error) {
  10798. var inCpy *ListDelegatedAdministratorsInput
  10799. if input != nil {
  10800. tmp := *input
  10801. inCpy = &tmp
  10802. }
  10803. req, _ := c.ListDelegatedAdministratorsRequest(inCpy)
  10804. req.SetContext(ctx)
  10805. req.ApplyOptions(opts...)
  10806. return req, nil
  10807. },
  10808. }
  10809. for p.Next() {
  10810. if !fn(p.Page().(*ListDelegatedAdministratorsOutput), !p.HasNextPage()) {
  10811. break
  10812. }
  10813. }
  10814. return p.Err()
  10815. }
  10816. const opListDelegatedServicesForAccount = "ListDelegatedServicesForAccount"
  10817. // ListDelegatedServicesForAccountRequest generates a "aws/request.Request" representing the
  10818. // client's request for the ListDelegatedServicesForAccount operation. The "output" return
  10819. // value will be populated with the request's response once the request completes
  10820. // successfully.
  10821. //
  10822. // Use "Send" method on the returned Request to send the API call to the service.
  10823. // the "output" return value is not valid until after Send returns without error.
  10824. //
  10825. // See ListDelegatedServicesForAccount for more information on using the ListDelegatedServicesForAccount
  10826. // API call, and error handling.
  10827. //
  10828. // This method is useful when you want to inject custom logic or configuration
  10829. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  10830. //
  10831. // // Example sending a request using the ListDelegatedServicesForAccountRequest method.
  10832. // req, resp := client.ListDelegatedServicesForAccountRequest(params)
  10833. //
  10834. // err := req.Send()
  10835. // if err == nil { // resp is now filled
  10836. // fmt.Println(resp)
  10837. // }
  10838. //
  10839. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListDelegatedServicesForAccount
  10840. func (c *Organizations) ListDelegatedServicesForAccountRequest(input *ListDelegatedServicesForAccountInput) (req *request.Request, output *ListDelegatedServicesForAccountOutput) {
  10841. op := &request.Operation{
  10842. Name: opListDelegatedServicesForAccount,
  10843. HTTPMethod: "POST",
  10844. HTTPPath: "/",
  10845. Paginator: &request.Paginator{
  10846. InputTokens: []string{"NextToken"},
  10847. OutputTokens: []string{"NextToken"},
  10848. LimitToken: "MaxResults",
  10849. TruncationToken: "",
  10850. },
  10851. }
  10852. if input == nil {
  10853. input = &ListDelegatedServicesForAccountInput{}
  10854. }
  10855. output = &ListDelegatedServicesForAccountOutput{}
  10856. req = c.newRequest(op, input, output)
  10857. return
  10858. }
  10859. // ListDelegatedServicesForAccount API operation for AWS Organizations.
  10860. //
  10861. // List the Amazon Web Services services for which the specified account is
  10862. // a delegated administrator.
  10863. //
  10864. // This operation can be called only from the organization's management account
  10865. // or by a member account that is a delegated administrator for an Amazon Web
  10866. // Services service.
  10867. //
  10868. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  10869. // with awserr.Error's Code and Message methods to get detailed information about
  10870. // the error.
  10871. //
  10872. // See the AWS API reference guide for AWS Organizations's
  10873. // API operation ListDelegatedServicesForAccount for usage and error information.
  10874. //
  10875. // Returned Error Types:
  10876. //
  10877. // - AccessDeniedException
  10878. // You don't have permissions to perform the requested operation. The user or
  10879. // role that is making the request must have at least one IAM permissions policy
  10880. // attached that grants the required permissions. For more information, see
  10881. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  10882. // in the IAM User Guide.
  10883. //
  10884. // - AccountNotFoundException
  10885. // We can't find an Amazon Web Services account with the AccountId that you
  10886. // specified, or the account whose credentials you used to make this request
  10887. // isn't a member of an organization.
  10888. //
  10889. // - AccountNotRegisteredException
  10890. // The specified account is not a delegated administrator for this Amazon Web
  10891. // Services service.
  10892. //
  10893. // - AWSOrganizationsNotInUseException
  10894. // Your account isn't a member of an organization. To make this request, you
  10895. // must use the credentials of an account that belongs to an organization.
  10896. //
  10897. // - ConstraintViolationException
  10898. // Performing this operation violates a minimum or maximum value limit. For
  10899. // example, attempting to remove the last service control policy (SCP) from
  10900. // an OU or root, inviting or creating too many accounts to the organization,
  10901. // or attaching too many policies to an account, OU, or root. This exception
  10902. // includes a reason that contains additional information about the violated
  10903. // limit:
  10904. //
  10905. // Some of the reasons in the following list might not be applicable to this
  10906. // specific API or operation.
  10907. //
  10908. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  10909. // account from the organization. You can't remove the management account.
  10910. // Instead, after you remove all member accounts, delete the organization
  10911. // itself.
  10912. //
  10913. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  10914. // an account from the organization that doesn't yet have enough information
  10915. // to exist as a standalone account. This account requires you to first complete
  10916. // phone verification. Follow the steps at Removing a member account from
  10917. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  10918. // in the Organizations User Guide.
  10919. //
  10920. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  10921. // of accounts that you can create in one day.
  10922. //
  10923. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  10924. // the number of accounts in an organization. If you need more accounts,
  10925. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  10926. // to request an increase in your limit. Or the number of invitations that
  10927. // you tried to send would cause you to exceed the limit of accounts in your
  10928. // organization. Send fewer invitations or contact Amazon Web Services Support
  10929. // to request an increase in the number of accounts. Deleted and closed accounts
  10930. // still count toward your limit. If you get this exception when running
  10931. // a command immediately after creating the organization, wait one hour and
  10932. // try again. After an hour, if the command continues to fail with this error,
  10933. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  10934. //
  10935. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  10936. // register the management account of the organization as a delegated administrator
  10937. // for an Amazon Web Services service integrated with Organizations. You
  10938. // can designate only a member account as a delegated administrator.
  10939. //
  10940. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  10941. // account. To close the management account for the organization, you must
  10942. // first either remove or close all member accounts in the organization.
  10943. // Follow standard account closure process using root credentials.​
  10944. //
  10945. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  10946. // an account that is registered as a delegated administrator for a service
  10947. // integrated with your organization. To complete this operation, you must
  10948. // first deregister this account as a delegated administrator.
  10949. //
  10950. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  10951. // for the past 30 days.
  10952. //
  10953. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  10954. // of accounts that you can close at a time. ​
  10955. //
  10956. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  10957. // organization in the specified region, you must enable all features mode.
  10958. //
  10959. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  10960. // an Amazon Web Services account as a delegated administrator for an Amazon
  10961. // Web Services service that already has a delegated administrator. To complete
  10962. // this operation, you must first deregister any existing delegated administrators
  10963. // for this service.
  10964. //
  10965. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  10966. // valid for a limited period of time. You must resubmit the request and
  10967. // generate a new verfication code.
  10968. //
  10969. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  10970. // handshakes that you can send in one day.
  10971. //
  10972. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  10973. // supported payment method is associated with the account. Amazon Web Services
  10974. // does not support cards issued by financial institutions in Russia or Belarus.
  10975. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  10976. //
  10977. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  10978. // in this organization, you first must migrate the organization's management
  10979. // account to the marketplace that corresponds to the management account's
  10980. // address. For example, accounts with India addresses must be associated
  10981. // with the AISPL marketplace. All accounts in an organization must be associated
  10982. // with the same marketplace.
  10983. //
  10984. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  10985. // Web Services /> Regions in China. To create an organization, the master
  10986. // must have a valid business license. For more information, contact customer
  10987. // support.
  10988. //
  10989. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  10990. // must first provide a valid contact address and phone number for the management
  10991. // account. Then try the operation again.
  10992. //
  10993. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  10994. // management account must have an associated account in the Amazon Web Services
  10995. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  10996. // in the Amazon Web Services GovCloud User Guide.
  10997. //
  10998. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  10999. // with this management account, you first must associate a valid payment
  11000. // instrument, such as a credit card, with the account. Follow the steps
  11001. // at To leave an organization when all required account information has
  11002. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  11003. // in the Organizations User Guide.
  11004. //
  11005. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  11006. // to register more delegated administrators than allowed for the service
  11007. // principal.
  11008. //
  11009. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  11010. // number of policies of a certain type that can be attached to an entity
  11011. // at one time.
  11012. //
  11013. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  11014. // on this resource.
  11015. //
  11016. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  11017. // with this member account, you first must associate a valid payment instrument,
  11018. // such as a credit card, with the account. Follow the steps at To leave
  11019. // an organization when all required account information has not yet been
  11020. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  11021. // in the Organizations User Guide.
  11022. //
  11023. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  11024. // policy from an entity that would cause the entity to have fewer than the
  11025. // minimum number of policies of a certain type required.
  11026. //
  11027. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  11028. // that requires the organization to be configured to support all features.
  11029. // An organization that supports only consolidated billing features can't
  11030. // perform this operation.
  11031. //
  11032. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  11033. // too many levels deep.
  11034. //
  11035. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  11036. // that you can have in an organization.
  11037. //
  11038. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  11039. // is larger than the maximum size.
  11040. //
  11041. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  11042. // policies that you can have in an organization.
  11043. //
  11044. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  11045. // before you enabled service access. Call the EnableAWSServiceAccess API
  11046. // first.
  11047. //
  11048. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  11049. // tags that are not compliant with the tag policy requirements for this
  11050. // account.
  11051. //
  11052. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  11053. // there is a waiting period before you can remove it from the organization.
  11054. // If you get an error that indicates that a wait period is required, try
  11055. // again in a few days.
  11056. //
  11057. // - InvalidInputException
  11058. // The requested operation failed because you provided invalid values for one
  11059. // or more of the request parameters. This exception includes a reason that
  11060. // contains additional information about the violated limit:
  11061. //
  11062. // Some of the reasons in the following list might not be applicable to this
  11063. // specific API or operation.
  11064. //
  11065. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  11066. // the same entity.
  11067. //
  11068. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  11069. // Services and can't be modified.
  11070. //
  11071. // - INPUT_REQUIRED: You must include a value for all required parameters.
  11072. //
  11073. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  11074. // for the invited account owner.
  11075. //
  11076. // - INVALID_ENUM: You specified an invalid value.
  11077. //
  11078. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  11079. //
  11080. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  11081. // characters.
  11082. //
  11083. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  11084. // at least one invalid value.
  11085. //
  11086. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  11087. // from the response to a previous call of the operation.
  11088. //
  11089. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  11090. // organization, or email) as a party.
  11091. //
  11092. // - INVALID_PATTERN: You provided a value that doesn't match the required
  11093. // pattern.
  11094. //
  11095. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  11096. // match the required pattern.
  11097. //
  11098. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  11099. // name can't begin with the reserved prefix AWSServiceRoleFor.
  11100. //
  11101. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  11102. // Name (ARN) for the organization.
  11103. //
  11104. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  11105. //
  11106. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  11107. // tag. You can’t add, edit, or delete system tag keys because they're
  11108. // reserved for Amazon Web Services use. System tags don’t count against
  11109. // your tags per resource limit.
  11110. //
  11111. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  11112. // for the operation.
  11113. //
  11114. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  11115. // than allowed.
  11116. //
  11117. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  11118. // value than allowed.
  11119. //
  11120. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  11121. // than allowed.
  11122. //
  11123. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  11124. // value than allowed.
  11125. //
  11126. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  11127. // between entities in the same root.
  11128. //
  11129. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  11130. // target entity.
  11131. //
  11132. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  11133. // isn't recognized.
  11134. //
  11135. // - TooManyRequestsException
  11136. // You have sent too many requests in too short a period of time. The quota
  11137. // helps protect against denial-of-service attacks. Try again later.
  11138. //
  11139. // For information about quotas that affect Organizations, see Quotas for Organizations
  11140. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  11141. // the Organizations User Guide.
  11142. //
  11143. // - ServiceException
  11144. // Organizations can't complete your request because of an internal service
  11145. // error. Try again later.
  11146. //
  11147. // - UnsupportedAPIEndpointException
  11148. // This action isn't available in the current Amazon Web Services Region.
  11149. //
  11150. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListDelegatedServicesForAccount
  11151. func (c *Organizations) ListDelegatedServicesForAccount(input *ListDelegatedServicesForAccountInput) (*ListDelegatedServicesForAccountOutput, error) {
  11152. req, out := c.ListDelegatedServicesForAccountRequest(input)
  11153. return out, req.Send()
  11154. }
  11155. // ListDelegatedServicesForAccountWithContext is the same as ListDelegatedServicesForAccount with the addition of
  11156. // the ability to pass a context and additional request options.
  11157. //
  11158. // See ListDelegatedServicesForAccount for details on how to use this API operation.
  11159. //
  11160. // The context must be non-nil and will be used for request cancellation. If
  11161. // the context is nil a panic will occur. In the future the SDK may create
  11162. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  11163. // for more information on using Contexts.
  11164. func (c *Organizations) ListDelegatedServicesForAccountWithContext(ctx aws.Context, input *ListDelegatedServicesForAccountInput, opts ...request.Option) (*ListDelegatedServicesForAccountOutput, error) {
  11165. req, out := c.ListDelegatedServicesForAccountRequest(input)
  11166. req.SetContext(ctx)
  11167. req.ApplyOptions(opts...)
  11168. return out, req.Send()
  11169. }
  11170. // ListDelegatedServicesForAccountPages iterates over the pages of a ListDelegatedServicesForAccount operation,
  11171. // calling the "fn" function with the response data for each page. To stop
  11172. // iterating, return false from the fn function.
  11173. //
  11174. // See ListDelegatedServicesForAccount method for more information on how to use this operation.
  11175. //
  11176. // Note: This operation can generate multiple requests to a service.
  11177. //
  11178. // // Example iterating over at most 3 pages of a ListDelegatedServicesForAccount operation.
  11179. // pageNum := 0
  11180. // err := client.ListDelegatedServicesForAccountPages(params,
  11181. // func(page *organizations.ListDelegatedServicesForAccountOutput, lastPage bool) bool {
  11182. // pageNum++
  11183. // fmt.Println(page)
  11184. // return pageNum <= 3
  11185. // })
  11186. func (c *Organizations) ListDelegatedServicesForAccountPages(input *ListDelegatedServicesForAccountInput, fn func(*ListDelegatedServicesForAccountOutput, bool) bool) error {
  11187. return c.ListDelegatedServicesForAccountPagesWithContext(aws.BackgroundContext(), input, fn)
  11188. }
  11189. // ListDelegatedServicesForAccountPagesWithContext same as ListDelegatedServicesForAccountPages except
  11190. // it takes a Context and allows setting request options on the pages.
  11191. //
  11192. // The context must be non-nil and will be used for request cancellation. If
  11193. // the context is nil a panic will occur. In the future the SDK may create
  11194. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  11195. // for more information on using Contexts.
  11196. func (c *Organizations) ListDelegatedServicesForAccountPagesWithContext(ctx aws.Context, input *ListDelegatedServicesForAccountInput, fn func(*ListDelegatedServicesForAccountOutput, bool) bool, opts ...request.Option) error {
  11197. p := request.Pagination{
  11198. NewRequest: func() (*request.Request, error) {
  11199. var inCpy *ListDelegatedServicesForAccountInput
  11200. if input != nil {
  11201. tmp := *input
  11202. inCpy = &tmp
  11203. }
  11204. req, _ := c.ListDelegatedServicesForAccountRequest(inCpy)
  11205. req.SetContext(ctx)
  11206. req.ApplyOptions(opts...)
  11207. return req, nil
  11208. },
  11209. }
  11210. for p.Next() {
  11211. if !fn(p.Page().(*ListDelegatedServicesForAccountOutput), !p.HasNextPage()) {
  11212. break
  11213. }
  11214. }
  11215. return p.Err()
  11216. }
  11217. const opListHandshakesForAccount = "ListHandshakesForAccount"
  11218. // ListHandshakesForAccountRequest generates a "aws/request.Request" representing the
  11219. // client's request for the ListHandshakesForAccount operation. The "output" return
  11220. // value will be populated with the request's response once the request completes
  11221. // successfully.
  11222. //
  11223. // Use "Send" method on the returned Request to send the API call to the service.
  11224. // the "output" return value is not valid until after Send returns without error.
  11225. //
  11226. // See ListHandshakesForAccount for more information on using the ListHandshakesForAccount
  11227. // API call, and error handling.
  11228. //
  11229. // This method is useful when you want to inject custom logic or configuration
  11230. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  11231. //
  11232. // // Example sending a request using the ListHandshakesForAccountRequest method.
  11233. // req, resp := client.ListHandshakesForAccountRequest(params)
  11234. //
  11235. // err := req.Send()
  11236. // if err == nil { // resp is now filled
  11237. // fmt.Println(resp)
  11238. // }
  11239. //
  11240. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListHandshakesForAccount
  11241. func (c *Organizations) ListHandshakesForAccountRequest(input *ListHandshakesForAccountInput) (req *request.Request, output *ListHandshakesForAccountOutput) {
  11242. op := &request.Operation{
  11243. Name: opListHandshakesForAccount,
  11244. HTTPMethod: "POST",
  11245. HTTPPath: "/",
  11246. Paginator: &request.Paginator{
  11247. InputTokens: []string{"NextToken"},
  11248. OutputTokens: []string{"NextToken"},
  11249. LimitToken: "MaxResults",
  11250. TruncationToken: "",
  11251. },
  11252. }
  11253. if input == nil {
  11254. input = &ListHandshakesForAccountInput{}
  11255. }
  11256. output = &ListHandshakesForAccountOutput{}
  11257. req = c.newRequest(op, input, output)
  11258. return
  11259. }
  11260. // ListHandshakesForAccount API operation for AWS Organizations.
  11261. //
  11262. // Lists the current handshakes that are associated with the account of the
  11263. // requesting user.
  11264. //
  11265. // Handshakes that are ACCEPTED, DECLINED, CANCELED, or EXPIRED appear in the
  11266. // results of this API for only 30 days after changing to that state. After
  11267. // that, they're deleted and no longer accessible.
  11268. //
  11269. // Always check the NextToken response parameter for a null value when calling
  11270. // a List* operation. These operations can occasionally return an empty set
  11271. // of results even when there are more results available. The NextToken response
  11272. // parameter value is null only when there are no more results to display.
  11273. //
  11274. // This operation can be called from any account in the organization.
  11275. //
  11276. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  11277. // with awserr.Error's Code and Message methods to get detailed information about
  11278. // the error.
  11279. //
  11280. // See the AWS API reference guide for AWS Organizations's
  11281. // API operation ListHandshakesForAccount for usage and error information.
  11282. //
  11283. // Returned Error Types:
  11284. //
  11285. // - AccessDeniedException
  11286. // You don't have permissions to perform the requested operation. The user or
  11287. // role that is making the request must have at least one IAM permissions policy
  11288. // attached that grants the required permissions. For more information, see
  11289. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  11290. // in the IAM User Guide.
  11291. //
  11292. // - ConcurrentModificationException
  11293. // The target of the operation is currently being modified by a different request.
  11294. // Try again later.
  11295. //
  11296. // - InvalidInputException
  11297. // The requested operation failed because you provided invalid values for one
  11298. // or more of the request parameters. This exception includes a reason that
  11299. // contains additional information about the violated limit:
  11300. //
  11301. // Some of the reasons in the following list might not be applicable to this
  11302. // specific API or operation.
  11303. //
  11304. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  11305. // the same entity.
  11306. //
  11307. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  11308. // Services and can't be modified.
  11309. //
  11310. // - INPUT_REQUIRED: You must include a value for all required parameters.
  11311. //
  11312. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  11313. // for the invited account owner.
  11314. //
  11315. // - INVALID_ENUM: You specified an invalid value.
  11316. //
  11317. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  11318. //
  11319. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  11320. // characters.
  11321. //
  11322. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  11323. // at least one invalid value.
  11324. //
  11325. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  11326. // from the response to a previous call of the operation.
  11327. //
  11328. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  11329. // organization, or email) as a party.
  11330. //
  11331. // - INVALID_PATTERN: You provided a value that doesn't match the required
  11332. // pattern.
  11333. //
  11334. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  11335. // match the required pattern.
  11336. //
  11337. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  11338. // name can't begin with the reserved prefix AWSServiceRoleFor.
  11339. //
  11340. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  11341. // Name (ARN) for the organization.
  11342. //
  11343. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  11344. //
  11345. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  11346. // tag. You can’t add, edit, or delete system tag keys because they're
  11347. // reserved for Amazon Web Services use. System tags don’t count against
  11348. // your tags per resource limit.
  11349. //
  11350. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  11351. // for the operation.
  11352. //
  11353. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  11354. // than allowed.
  11355. //
  11356. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  11357. // value than allowed.
  11358. //
  11359. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  11360. // than allowed.
  11361. //
  11362. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  11363. // value than allowed.
  11364. //
  11365. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  11366. // between entities in the same root.
  11367. //
  11368. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  11369. // target entity.
  11370. //
  11371. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  11372. // isn't recognized.
  11373. //
  11374. // - ServiceException
  11375. // Organizations can't complete your request because of an internal service
  11376. // error. Try again later.
  11377. //
  11378. // - TooManyRequestsException
  11379. // You have sent too many requests in too short a period of time. The quota
  11380. // helps protect against denial-of-service attacks. Try again later.
  11381. //
  11382. // For information about quotas that affect Organizations, see Quotas for Organizations
  11383. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  11384. // the Organizations User Guide.
  11385. //
  11386. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListHandshakesForAccount
  11387. func (c *Organizations) ListHandshakesForAccount(input *ListHandshakesForAccountInput) (*ListHandshakesForAccountOutput, error) {
  11388. req, out := c.ListHandshakesForAccountRequest(input)
  11389. return out, req.Send()
  11390. }
  11391. // ListHandshakesForAccountWithContext is the same as ListHandshakesForAccount with the addition of
  11392. // the ability to pass a context and additional request options.
  11393. //
  11394. // See ListHandshakesForAccount for details on how to use this API operation.
  11395. //
  11396. // The context must be non-nil and will be used for request cancellation. If
  11397. // the context is nil a panic will occur. In the future the SDK may create
  11398. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  11399. // for more information on using Contexts.
  11400. func (c *Organizations) ListHandshakesForAccountWithContext(ctx aws.Context, input *ListHandshakesForAccountInput, opts ...request.Option) (*ListHandshakesForAccountOutput, error) {
  11401. req, out := c.ListHandshakesForAccountRequest(input)
  11402. req.SetContext(ctx)
  11403. req.ApplyOptions(opts...)
  11404. return out, req.Send()
  11405. }
  11406. // ListHandshakesForAccountPages iterates over the pages of a ListHandshakesForAccount operation,
  11407. // calling the "fn" function with the response data for each page. To stop
  11408. // iterating, return false from the fn function.
  11409. //
  11410. // See ListHandshakesForAccount method for more information on how to use this operation.
  11411. //
  11412. // Note: This operation can generate multiple requests to a service.
  11413. //
  11414. // // Example iterating over at most 3 pages of a ListHandshakesForAccount operation.
  11415. // pageNum := 0
  11416. // err := client.ListHandshakesForAccountPages(params,
  11417. // func(page *organizations.ListHandshakesForAccountOutput, lastPage bool) bool {
  11418. // pageNum++
  11419. // fmt.Println(page)
  11420. // return pageNum <= 3
  11421. // })
  11422. func (c *Organizations) ListHandshakesForAccountPages(input *ListHandshakesForAccountInput, fn func(*ListHandshakesForAccountOutput, bool) bool) error {
  11423. return c.ListHandshakesForAccountPagesWithContext(aws.BackgroundContext(), input, fn)
  11424. }
  11425. // ListHandshakesForAccountPagesWithContext same as ListHandshakesForAccountPages except
  11426. // it takes a Context and allows setting request options on the pages.
  11427. //
  11428. // The context must be non-nil and will be used for request cancellation. If
  11429. // the context is nil a panic will occur. In the future the SDK may create
  11430. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  11431. // for more information on using Contexts.
  11432. func (c *Organizations) ListHandshakesForAccountPagesWithContext(ctx aws.Context, input *ListHandshakesForAccountInput, fn func(*ListHandshakesForAccountOutput, bool) bool, opts ...request.Option) error {
  11433. p := request.Pagination{
  11434. NewRequest: func() (*request.Request, error) {
  11435. var inCpy *ListHandshakesForAccountInput
  11436. if input != nil {
  11437. tmp := *input
  11438. inCpy = &tmp
  11439. }
  11440. req, _ := c.ListHandshakesForAccountRequest(inCpy)
  11441. req.SetContext(ctx)
  11442. req.ApplyOptions(opts...)
  11443. return req, nil
  11444. },
  11445. }
  11446. for p.Next() {
  11447. if !fn(p.Page().(*ListHandshakesForAccountOutput), !p.HasNextPage()) {
  11448. break
  11449. }
  11450. }
  11451. return p.Err()
  11452. }
  11453. const opListHandshakesForOrganization = "ListHandshakesForOrganization"
  11454. // ListHandshakesForOrganizationRequest generates a "aws/request.Request" representing the
  11455. // client's request for the ListHandshakesForOrganization operation. The "output" return
  11456. // value will be populated with the request's response once the request completes
  11457. // successfully.
  11458. //
  11459. // Use "Send" method on the returned Request to send the API call to the service.
  11460. // the "output" return value is not valid until after Send returns without error.
  11461. //
  11462. // See ListHandshakesForOrganization for more information on using the ListHandshakesForOrganization
  11463. // API call, and error handling.
  11464. //
  11465. // This method is useful when you want to inject custom logic or configuration
  11466. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  11467. //
  11468. // // Example sending a request using the ListHandshakesForOrganizationRequest method.
  11469. // req, resp := client.ListHandshakesForOrganizationRequest(params)
  11470. //
  11471. // err := req.Send()
  11472. // if err == nil { // resp is now filled
  11473. // fmt.Println(resp)
  11474. // }
  11475. //
  11476. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListHandshakesForOrganization
  11477. func (c *Organizations) ListHandshakesForOrganizationRequest(input *ListHandshakesForOrganizationInput) (req *request.Request, output *ListHandshakesForOrganizationOutput) {
  11478. op := &request.Operation{
  11479. Name: opListHandshakesForOrganization,
  11480. HTTPMethod: "POST",
  11481. HTTPPath: "/",
  11482. Paginator: &request.Paginator{
  11483. InputTokens: []string{"NextToken"},
  11484. OutputTokens: []string{"NextToken"},
  11485. LimitToken: "MaxResults",
  11486. TruncationToken: "",
  11487. },
  11488. }
  11489. if input == nil {
  11490. input = &ListHandshakesForOrganizationInput{}
  11491. }
  11492. output = &ListHandshakesForOrganizationOutput{}
  11493. req = c.newRequest(op, input, output)
  11494. return
  11495. }
  11496. // ListHandshakesForOrganization API operation for AWS Organizations.
  11497. //
  11498. // Lists the handshakes that are associated with the organization that the requesting
  11499. // user is part of. The ListHandshakesForOrganization operation returns a list
  11500. // of handshake structures. Each structure contains details and status about
  11501. // a handshake.
  11502. //
  11503. // Handshakes that are ACCEPTED, DECLINED, CANCELED, or EXPIRED appear in the
  11504. // results of this API for only 30 days after changing to that state. After
  11505. // that, they're deleted and no longer accessible.
  11506. //
  11507. // Always check the NextToken response parameter for a null value when calling
  11508. // a List* operation. These operations can occasionally return an empty set
  11509. // of results even when there are more results available. The NextToken response
  11510. // parameter value is null only when there are no more results to display.
  11511. //
  11512. // This operation can be called only from the organization's management account
  11513. // or by a member account that is a delegated administrator for an Amazon Web
  11514. // Services service.
  11515. //
  11516. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  11517. // with awserr.Error's Code and Message methods to get detailed information about
  11518. // the error.
  11519. //
  11520. // See the AWS API reference guide for AWS Organizations's
  11521. // API operation ListHandshakesForOrganization for usage and error information.
  11522. //
  11523. // Returned Error Types:
  11524. //
  11525. // - AccessDeniedException
  11526. // You don't have permissions to perform the requested operation. The user or
  11527. // role that is making the request must have at least one IAM permissions policy
  11528. // attached that grants the required permissions. For more information, see
  11529. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  11530. // in the IAM User Guide.
  11531. //
  11532. // - AWSOrganizationsNotInUseException
  11533. // Your account isn't a member of an organization. To make this request, you
  11534. // must use the credentials of an account that belongs to an organization.
  11535. //
  11536. // - ConcurrentModificationException
  11537. // The target of the operation is currently being modified by a different request.
  11538. // Try again later.
  11539. //
  11540. // - InvalidInputException
  11541. // The requested operation failed because you provided invalid values for one
  11542. // or more of the request parameters. This exception includes a reason that
  11543. // contains additional information about the violated limit:
  11544. //
  11545. // Some of the reasons in the following list might not be applicable to this
  11546. // specific API or operation.
  11547. //
  11548. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  11549. // the same entity.
  11550. //
  11551. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  11552. // Services and can't be modified.
  11553. //
  11554. // - INPUT_REQUIRED: You must include a value for all required parameters.
  11555. //
  11556. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  11557. // for the invited account owner.
  11558. //
  11559. // - INVALID_ENUM: You specified an invalid value.
  11560. //
  11561. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  11562. //
  11563. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  11564. // characters.
  11565. //
  11566. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  11567. // at least one invalid value.
  11568. //
  11569. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  11570. // from the response to a previous call of the operation.
  11571. //
  11572. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  11573. // organization, or email) as a party.
  11574. //
  11575. // - INVALID_PATTERN: You provided a value that doesn't match the required
  11576. // pattern.
  11577. //
  11578. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  11579. // match the required pattern.
  11580. //
  11581. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  11582. // name can't begin with the reserved prefix AWSServiceRoleFor.
  11583. //
  11584. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  11585. // Name (ARN) for the organization.
  11586. //
  11587. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  11588. //
  11589. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  11590. // tag. You can’t add, edit, or delete system tag keys because they're
  11591. // reserved for Amazon Web Services use. System tags don’t count against
  11592. // your tags per resource limit.
  11593. //
  11594. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  11595. // for the operation.
  11596. //
  11597. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  11598. // than allowed.
  11599. //
  11600. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  11601. // value than allowed.
  11602. //
  11603. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  11604. // than allowed.
  11605. //
  11606. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  11607. // value than allowed.
  11608. //
  11609. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  11610. // between entities in the same root.
  11611. //
  11612. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  11613. // target entity.
  11614. //
  11615. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  11616. // isn't recognized.
  11617. //
  11618. // - ServiceException
  11619. // Organizations can't complete your request because of an internal service
  11620. // error. Try again later.
  11621. //
  11622. // - TooManyRequestsException
  11623. // You have sent too many requests in too short a period of time. The quota
  11624. // helps protect against denial-of-service attacks. Try again later.
  11625. //
  11626. // For information about quotas that affect Organizations, see Quotas for Organizations
  11627. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  11628. // the Organizations User Guide.
  11629. //
  11630. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListHandshakesForOrganization
  11631. func (c *Organizations) ListHandshakesForOrganization(input *ListHandshakesForOrganizationInput) (*ListHandshakesForOrganizationOutput, error) {
  11632. req, out := c.ListHandshakesForOrganizationRequest(input)
  11633. return out, req.Send()
  11634. }
  11635. // ListHandshakesForOrganizationWithContext is the same as ListHandshakesForOrganization with the addition of
  11636. // the ability to pass a context and additional request options.
  11637. //
  11638. // See ListHandshakesForOrganization for details on how to use this API operation.
  11639. //
  11640. // The context must be non-nil and will be used for request cancellation. If
  11641. // the context is nil a panic will occur. In the future the SDK may create
  11642. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  11643. // for more information on using Contexts.
  11644. func (c *Organizations) ListHandshakesForOrganizationWithContext(ctx aws.Context, input *ListHandshakesForOrganizationInput, opts ...request.Option) (*ListHandshakesForOrganizationOutput, error) {
  11645. req, out := c.ListHandshakesForOrganizationRequest(input)
  11646. req.SetContext(ctx)
  11647. req.ApplyOptions(opts...)
  11648. return out, req.Send()
  11649. }
  11650. // ListHandshakesForOrganizationPages iterates over the pages of a ListHandshakesForOrganization operation,
  11651. // calling the "fn" function with the response data for each page. To stop
  11652. // iterating, return false from the fn function.
  11653. //
  11654. // See ListHandshakesForOrganization method for more information on how to use this operation.
  11655. //
  11656. // Note: This operation can generate multiple requests to a service.
  11657. //
  11658. // // Example iterating over at most 3 pages of a ListHandshakesForOrganization operation.
  11659. // pageNum := 0
  11660. // err := client.ListHandshakesForOrganizationPages(params,
  11661. // func(page *organizations.ListHandshakesForOrganizationOutput, lastPage bool) bool {
  11662. // pageNum++
  11663. // fmt.Println(page)
  11664. // return pageNum <= 3
  11665. // })
  11666. func (c *Organizations) ListHandshakesForOrganizationPages(input *ListHandshakesForOrganizationInput, fn func(*ListHandshakesForOrganizationOutput, bool) bool) error {
  11667. return c.ListHandshakesForOrganizationPagesWithContext(aws.BackgroundContext(), input, fn)
  11668. }
  11669. // ListHandshakesForOrganizationPagesWithContext same as ListHandshakesForOrganizationPages except
  11670. // it takes a Context and allows setting request options on the pages.
  11671. //
  11672. // The context must be non-nil and will be used for request cancellation. If
  11673. // the context is nil a panic will occur. In the future the SDK may create
  11674. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  11675. // for more information on using Contexts.
  11676. func (c *Organizations) ListHandshakesForOrganizationPagesWithContext(ctx aws.Context, input *ListHandshakesForOrganizationInput, fn func(*ListHandshakesForOrganizationOutput, bool) bool, opts ...request.Option) error {
  11677. p := request.Pagination{
  11678. NewRequest: func() (*request.Request, error) {
  11679. var inCpy *ListHandshakesForOrganizationInput
  11680. if input != nil {
  11681. tmp := *input
  11682. inCpy = &tmp
  11683. }
  11684. req, _ := c.ListHandshakesForOrganizationRequest(inCpy)
  11685. req.SetContext(ctx)
  11686. req.ApplyOptions(opts...)
  11687. return req, nil
  11688. },
  11689. }
  11690. for p.Next() {
  11691. if !fn(p.Page().(*ListHandshakesForOrganizationOutput), !p.HasNextPage()) {
  11692. break
  11693. }
  11694. }
  11695. return p.Err()
  11696. }
  11697. const opListOrganizationalUnitsForParent = "ListOrganizationalUnitsForParent"
  11698. // ListOrganizationalUnitsForParentRequest generates a "aws/request.Request" representing the
  11699. // client's request for the ListOrganizationalUnitsForParent operation. The "output" return
  11700. // value will be populated with the request's response once the request completes
  11701. // successfully.
  11702. //
  11703. // Use "Send" method on the returned Request to send the API call to the service.
  11704. // the "output" return value is not valid until after Send returns without error.
  11705. //
  11706. // See ListOrganizationalUnitsForParent for more information on using the ListOrganizationalUnitsForParent
  11707. // API call, and error handling.
  11708. //
  11709. // This method is useful when you want to inject custom logic or configuration
  11710. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  11711. //
  11712. // // Example sending a request using the ListOrganizationalUnitsForParentRequest method.
  11713. // req, resp := client.ListOrganizationalUnitsForParentRequest(params)
  11714. //
  11715. // err := req.Send()
  11716. // if err == nil { // resp is now filled
  11717. // fmt.Println(resp)
  11718. // }
  11719. //
  11720. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListOrganizationalUnitsForParent
  11721. func (c *Organizations) ListOrganizationalUnitsForParentRequest(input *ListOrganizationalUnitsForParentInput) (req *request.Request, output *ListOrganizationalUnitsForParentOutput) {
  11722. op := &request.Operation{
  11723. Name: opListOrganizationalUnitsForParent,
  11724. HTTPMethod: "POST",
  11725. HTTPPath: "/",
  11726. Paginator: &request.Paginator{
  11727. InputTokens: []string{"NextToken"},
  11728. OutputTokens: []string{"NextToken"},
  11729. LimitToken: "MaxResults",
  11730. TruncationToken: "",
  11731. },
  11732. }
  11733. if input == nil {
  11734. input = &ListOrganizationalUnitsForParentInput{}
  11735. }
  11736. output = &ListOrganizationalUnitsForParentOutput{}
  11737. req = c.newRequest(op, input, output)
  11738. return
  11739. }
  11740. // ListOrganizationalUnitsForParent API operation for AWS Organizations.
  11741. //
  11742. // Lists the organizational units (OUs) in a parent organizational unit or root.
  11743. //
  11744. // Always check the NextToken response parameter for a null value when calling
  11745. // a List* operation. These operations can occasionally return an empty set
  11746. // of results even when there are more results available. The NextToken response
  11747. // parameter value is null only when there are no more results to display.
  11748. //
  11749. // This operation can be called only from the organization's management account
  11750. // or by a member account that is a delegated administrator for an Amazon Web
  11751. // Services service.
  11752. //
  11753. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  11754. // with awserr.Error's Code and Message methods to get detailed information about
  11755. // the error.
  11756. //
  11757. // See the AWS API reference guide for AWS Organizations's
  11758. // API operation ListOrganizationalUnitsForParent for usage and error information.
  11759. //
  11760. // Returned Error Types:
  11761. //
  11762. // - AccessDeniedException
  11763. // You don't have permissions to perform the requested operation. The user or
  11764. // role that is making the request must have at least one IAM permissions policy
  11765. // attached that grants the required permissions. For more information, see
  11766. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  11767. // in the IAM User Guide.
  11768. //
  11769. // - AWSOrganizationsNotInUseException
  11770. // Your account isn't a member of an organization. To make this request, you
  11771. // must use the credentials of an account that belongs to an organization.
  11772. //
  11773. // - InvalidInputException
  11774. // The requested operation failed because you provided invalid values for one
  11775. // or more of the request parameters. This exception includes a reason that
  11776. // contains additional information about the violated limit:
  11777. //
  11778. // Some of the reasons in the following list might not be applicable to this
  11779. // specific API or operation.
  11780. //
  11781. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  11782. // the same entity.
  11783. //
  11784. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  11785. // Services and can't be modified.
  11786. //
  11787. // - INPUT_REQUIRED: You must include a value for all required parameters.
  11788. //
  11789. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  11790. // for the invited account owner.
  11791. //
  11792. // - INVALID_ENUM: You specified an invalid value.
  11793. //
  11794. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  11795. //
  11796. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  11797. // characters.
  11798. //
  11799. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  11800. // at least one invalid value.
  11801. //
  11802. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  11803. // from the response to a previous call of the operation.
  11804. //
  11805. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  11806. // organization, or email) as a party.
  11807. //
  11808. // - INVALID_PATTERN: You provided a value that doesn't match the required
  11809. // pattern.
  11810. //
  11811. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  11812. // match the required pattern.
  11813. //
  11814. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  11815. // name can't begin with the reserved prefix AWSServiceRoleFor.
  11816. //
  11817. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  11818. // Name (ARN) for the organization.
  11819. //
  11820. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  11821. //
  11822. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  11823. // tag. You can’t add, edit, or delete system tag keys because they're
  11824. // reserved for Amazon Web Services use. System tags don’t count against
  11825. // your tags per resource limit.
  11826. //
  11827. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  11828. // for the operation.
  11829. //
  11830. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  11831. // than allowed.
  11832. //
  11833. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  11834. // value than allowed.
  11835. //
  11836. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  11837. // than allowed.
  11838. //
  11839. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  11840. // value than allowed.
  11841. //
  11842. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  11843. // between entities in the same root.
  11844. //
  11845. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  11846. // target entity.
  11847. //
  11848. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  11849. // isn't recognized.
  11850. //
  11851. // - ParentNotFoundException
  11852. // We can't find a root or OU with the ParentId that you specified.
  11853. //
  11854. // - ServiceException
  11855. // Organizations can't complete your request because of an internal service
  11856. // error. Try again later.
  11857. //
  11858. // - TooManyRequestsException
  11859. // You have sent too many requests in too short a period of time. The quota
  11860. // helps protect against denial-of-service attacks. Try again later.
  11861. //
  11862. // For information about quotas that affect Organizations, see Quotas for Organizations
  11863. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  11864. // the Organizations User Guide.
  11865. //
  11866. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListOrganizationalUnitsForParent
  11867. func (c *Organizations) ListOrganizationalUnitsForParent(input *ListOrganizationalUnitsForParentInput) (*ListOrganizationalUnitsForParentOutput, error) {
  11868. req, out := c.ListOrganizationalUnitsForParentRequest(input)
  11869. return out, req.Send()
  11870. }
  11871. // ListOrganizationalUnitsForParentWithContext is the same as ListOrganizationalUnitsForParent with the addition of
  11872. // the ability to pass a context and additional request options.
  11873. //
  11874. // See ListOrganizationalUnitsForParent for details on how to use this API operation.
  11875. //
  11876. // The context must be non-nil and will be used for request cancellation. If
  11877. // the context is nil a panic will occur. In the future the SDK may create
  11878. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  11879. // for more information on using Contexts.
  11880. func (c *Organizations) ListOrganizationalUnitsForParentWithContext(ctx aws.Context, input *ListOrganizationalUnitsForParentInput, opts ...request.Option) (*ListOrganizationalUnitsForParentOutput, error) {
  11881. req, out := c.ListOrganizationalUnitsForParentRequest(input)
  11882. req.SetContext(ctx)
  11883. req.ApplyOptions(opts...)
  11884. return out, req.Send()
  11885. }
  11886. // ListOrganizationalUnitsForParentPages iterates over the pages of a ListOrganizationalUnitsForParent operation,
  11887. // calling the "fn" function with the response data for each page. To stop
  11888. // iterating, return false from the fn function.
  11889. //
  11890. // See ListOrganizationalUnitsForParent method for more information on how to use this operation.
  11891. //
  11892. // Note: This operation can generate multiple requests to a service.
  11893. //
  11894. // // Example iterating over at most 3 pages of a ListOrganizationalUnitsForParent operation.
  11895. // pageNum := 0
  11896. // err := client.ListOrganizationalUnitsForParentPages(params,
  11897. // func(page *organizations.ListOrganizationalUnitsForParentOutput, lastPage bool) bool {
  11898. // pageNum++
  11899. // fmt.Println(page)
  11900. // return pageNum <= 3
  11901. // })
  11902. func (c *Organizations) ListOrganizationalUnitsForParentPages(input *ListOrganizationalUnitsForParentInput, fn func(*ListOrganizationalUnitsForParentOutput, bool) bool) error {
  11903. return c.ListOrganizationalUnitsForParentPagesWithContext(aws.BackgroundContext(), input, fn)
  11904. }
  11905. // ListOrganizationalUnitsForParentPagesWithContext same as ListOrganizationalUnitsForParentPages except
  11906. // it takes a Context and allows setting request options on the pages.
  11907. //
  11908. // The context must be non-nil and will be used for request cancellation. If
  11909. // the context is nil a panic will occur. In the future the SDK may create
  11910. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  11911. // for more information on using Contexts.
  11912. func (c *Organizations) ListOrganizationalUnitsForParentPagesWithContext(ctx aws.Context, input *ListOrganizationalUnitsForParentInput, fn func(*ListOrganizationalUnitsForParentOutput, bool) bool, opts ...request.Option) error {
  11913. p := request.Pagination{
  11914. NewRequest: func() (*request.Request, error) {
  11915. var inCpy *ListOrganizationalUnitsForParentInput
  11916. if input != nil {
  11917. tmp := *input
  11918. inCpy = &tmp
  11919. }
  11920. req, _ := c.ListOrganizationalUnitsForParentRequest(inCpy)
  11921. req.SetContext(ctx)
  11922. req.ApplyOptions(opts...)
  11923. return req, nil
  11924. },
  11925. }
  11926. for p.Next() {
  11927. if !fn(p.Page().(*ListOrganizationalUnitsForParentOutput), !p.HasNextPage()) {
  11928. break
  11929. }
  11930. }
  11931. return p.Err()
  11932. }
  11933. const opListParents = "ListParents"
  11934. // ListParentsRequest generates a "aws/request.Request" representing the
  11935. // client's request for the ListParents operation. The "output" return
  11936. // value will be populated with the request's response once the request completes
  11937. // successfully.
  11938. //
  11939. // Use "Send" method on the returned Request to send the API call to the service.
  11940. // the "output" return value is not valid until after Send returns without error.
  11941. //
  11942. // See ListParents for more information on using the ListParents
  11943. // API call, and error handling.
  11944. //
  11945. // This method is useful when you want to inject custom logic or configuration
  11946. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  11947. //
  11948. // // Example sending a request using the ListParentsRequest method.
  11949. // req, resp := client.ListParentsRequest(params)
  11950. //
  11951. // err := req.Send()
  11952. // if err == nil { // resp is now filled
  11953. // fmt.Println(resp)
  11954. // }
  11955. //
  11956. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListParents
  11957. func (c *Organizations) ListParentsRequest(input *ListParentsInput) (req *request.Request, output *ListParentsOutput) {
  11958. op := &request.Operation{
  11959. Name: opListParents,
  11960. HTTPMethod: "POST",
  11961. HTTPPath: "/",
  11962. Paginator: &request.Paginator{
  11963. InputTokens: []string{"NextToken"},
  11964. OutputTokens: []string{"NextToken"},
  11965. LimitToken: "MaxResults",
  11966. TruncationToken: "",
  11967. },
  11968. }
  11969. if input == nil {
  11970. input = &ListParentsInput{}
  11971. }
  11972. output = &ListParentsOutput{}
  11973. req = c.newRequest(op, input, output)
  11974. return
  11975. }
  11976. // ListParents API operation for AWS Organizations.
  11977. //
  11978. // Lists the root or organizational units (OUs) that serve as the immediate
  11979. // parent of the specified child OU or account. This operation, along with ListChildren
  11980. // enables you to traverse the tree structure that makes up this root.
  11981. //
  11982. // Always check the NextToken response parameter for a null value when calling
  11983. // a List* operation. These operations can occasionally return an empty set
  11984. // of results even when there are more results available. The NextToken response
  11985. // parameter value is null only when there are no more results to display.
  11986. //
  11987. // This operation can be called only from the organization's management account
  11988. // or by a member account that is a delegated administrator for an Amazon Web
  11989. // Services service.
  11990. //
  11991. // In the current release, a child can have only a single parent.
  11992. //
  11993. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  11994. // with awserr.Error's Code and Message methods to get detailed information about
  11995. // the error.
  11996. //
  11997. // See the AWS API reference guide for AWS Organizations's
  11998. // API operation ListParents for usage and error information.
  11999. //
  12000. // Returned Error Types:
  12001. //
  12002. // - AccessDeniedException
  12003. // You don't have permissions to perform the requested operation. The user or
  12004. // role that is making the request must have at least one IAM permissions policy
  12005. // attached that grants the required permissions. For more information, see
  12006. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  12007. // in the IAM User Guide.
  12008. //
  12009. // - AWSOrganizationsNotInUseException
  12010. // Your account isn't a member of an organization. To make this request, you
  12011. // must use the credentials of an account that belongs to an organization.
  12012. //
  12013. // - ChildNotFoundException
  12014. // We can't find an organizational unit (OU) or Amazon Web Services account
  12015. // with the ChildId that you specified.
  12016. //
  12017. // - InvalidInputException
  12018. // The requested operation failed because you provided invalid values for one
  12019. // or more of the request parameters. This exception includes a reason that
  12020. // contains additional information about the violated limit:
  12021. //
  12022. // Some of the reasons in the following list might not be applicable to this
  12023. // specific API or operation.
  12024. //
  12025. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  12026. // the same entity.
  12027. //
  12028. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  12029. // Services and can't be modified.
  12030. //
  12031. // - INPUT_REQUIRED: You must include a value for all required parameters.
  12032. //
  12033. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  12034. // for the invited account owner.
  12035. //
  12036. // - INVALID_ENUM: You specified an invalid value.
  12037. //
  12038. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  12039. //
  12040. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  12041. // characters.
  12042. //
  12043. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  12044. // at least one invalid value.
  12045. //
  12046. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  12047. // from the response to a previous call of the operation.
  12048. //
  12049. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  12050. // organization, or email) as a party.
  12051. //
  12052. // - INVALID_PATTERN: You provided a value that doesn't match the required
  12053. // pattern.
  12054. //
  12055. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  12056. // match the required pattern.
  12057. //
  12058. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  12059. // name can't begin with the reserved prefix AWSServiceRoleFor.
  12060. //
  12061. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  12062. // Name (ARN) for the organization.
  12063. //
  12064. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  12065. //
  12066. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  12067. // tag. You can’t add, edit, or delete system tag keys because they're
  12068. // reserved for Amazon Web Services use. System tags don’t count against
  12069. // your tags per resource limit.
  12070. //
  12071. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  12072. // for the operation.
  12073. //
  12074. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  12075. // than allowed.
  12076. //
  12077. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  12078. // value than allowed.
  12079. //
  12080. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  12081. // than allowed.
  12082. //
  12083. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  12084. // value than allowed.
  12085. //
  12086. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  12087. // between entities in the same root.
  12088. //
  12089. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  12090. // target entity.
  12091. //
  12092. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  12093. // isn't recognized.
  12094. //
  12095. // - ServiceException
  12096. // Organizations can't complete your request because of an internal service
  12097. // error. Try again later.
  12098. //
  12099. // - TooManyRequestsException
  12100. // You have sent too many requests in too short a period of time. The quota
  12101. // helps protect against denial-of-service attacks. Try again later.
  12102. //
  12103. // For information about quotas that affect Organizations, see Quotas for Organizations
  12104. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  12105. // the Organizations User Guide.
  12106. //
  12107. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListParents
  12108. func (c *Organizations) ListParents(input *ListParentsInput) (*ListParentsOutput, error) {
  12109. req, out := c.ListParentsRequest(input)
  12110. return out, req.Send()
  12111. }
  12112. // ListParentsWithContext is the same as ListParents with the addition of
  12113. // the ability to pass a context and additional request options.
  12114. //
  12115. // See ListParents for details on how to use this API operation.
  12116. //
  12117. // The context must be non-nil and will be used for request cancellation. If
  12118. // the context is nil a panic will occur. In the future the SDK may create
  12119. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  12120. // for more information on using Contexts.
  12121. func (c *Organizations) ListParentsWithContext(ctx aws.Context, input *ListParentsInput, opts ...request.Option) (*ListParentsOutput, error) {
  12122. req, out := c.ListParentsRequest(input)
  12123. req.SetContext(ctx)
  12124. req.ApplyOptions(opts...)
  12125. return out, req.Send()
  12126. }
  12127. // ListParentsPages iterates over the pages of a ListParents operation,
  12128. // calling the "fn" function with the response data for each page. To stop
  12129. // iterating, return false from the fn function.
  12130. //
  12131. // See ListParents method for more information on how to use this operation.
  12132. //
  12133. // Note: This operation can generate multiple requests to a service.
  12134. //
  12135. // // Example iterating over at most 3 pages of a ListParents operation.
  12136. // pageNum := 0
  12137. // err := client.ListParentsPages(params,
  12138. // func(page *organizations.ListParentsOutput, lastPage bool) bool {
  12139. // pageNum++
  12140. // fmt.Println(page)
  12141. // return pageNum <= 3
  12142. // })
  12143. func (c *Organizations) ListParentsPages(input *ListParentsInput, fn func(*ListParentsOutput, bool) bool) error {
  12144. return c.ListParentsPagesWithContext(aws.BackgroundContext(), input, fn)
  12145. }
  12146. // ListParentsPagesWithContext same as ListParentsPages except
  12147. // it takes a Context and allows setting request options on the pages.
  12148. //
  12149. // The context must be non-nil and will be used for request cancellation. If
  12150. // the context is nil a panic will occur. In the future the SDK may create
  12151. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  12152. // for more information on using Contexts.
  12153. func (c *Organizations) ListParentsPagesWithContext(ctx aws.Context, input *ListParentsInput, fn func(*ListParentsOutput, bool) bool, opts ...request.Option) error {
  12154. p := request.Pagination{
  12155. NewRequest: func() (*request.Request, error) {
  12156. var inCpy *ListParentsInput
  12157. if input != nil {
  12158. tmp := *input
  12159. inCpy = &tmp
  12160. }
  12161. req, _ := c.ListParentsRequest(inCpy)
  12162. req.SetContext(ctx)
  12163. req.ApplyOptions(opts...)
  12164. return req, nil
  12165. },
  12166. }
  12167. for p.Next() {
  12168. if !fn(p.Page().(*ListParentsOutput), !p.HasNextPage()) {
  12169. break
  12170. }
  12171. }
  12172. return p.Err()
  12173. }
  12174. const opListPolicies = "ListPolicies"
  12175. // ListPoliciesRequest generates a "aws/request.Request" representing the
  12176. // client's request for the ListPolicies operation. The "output" return
  12177. // value will be populated with the request's response once the request completes
  12178. // successfully.
  12179. //
  12180. // Use "Send" method on the returned Request to send the API call to the service.
  12181. // the "output" return value is not valid until after Send returns without error.
  12182. //
  12183. // See ListPolicies for more information on using the ListPolicies
  12184. // API call, and error handling.
  12185. //
  12186. // This method is useful when you want to inject custom logic or configuration
  12187. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  12188. //
  12189. // // Example sending a request using the ListPoliciesRequest method.
  12190. // req, resp := client.ListPoliciesRequest(params)
  12191. //
  12192. // err := req.Send()
  12193. // if err == nil { // resp is now filled
  12194. // fmt.Println(resp)
  12195. // }
  12196. //
  12197. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListPolicies
  12198. func (c *Organizations) ListPoliciesRequest(input *ListPoliciesInput) (req *request.Request, output *ListPoliciesOutput) {
  12199. op := &request.Operation{
  12200. Name: opListPolicies,
  12201. HTTPMethod: "POST",
  12202. HTTPPath: "/",
  12203. Paginator: &request.Paginator{
  12204. InputTokens: []string{"NextToken"},
  12205. OutputTokens: []string{"NextToken"},
  12206. LimitToken: "MaxResults",
  12207. TruncationToken: "",
  12208. },
  12209. }
  12210. if input == nil {
  12211. input = &ListPoliciesInput{}
  12212. }
  12213. output = &ListPoliciesOutput{}
  12214. req = c.newRequest(op, input, output)
  12215. return
  12216. }
  12217. // ListPolicies API operation for AWS Organizations.
  12218. //
  12219. // Retrieves the list of all policies in an organization of a specified type.
  12220. //
  12221. // Always check the NextToken response parameter for a null value when calling
  12222. // a List* operation. These operations can occasionally return an empty set
  12223. // of results even when there are more results available. The NextToken response
  12224. // parameter value is null only when there are no more results to display.
  12225. //
  12226. // This operation can be called only from the organization's management account
  12227. // or by a member account that is a delegated administrator for an Amazon Web
  12228. // Services service.
  12229. //
  12230. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  12231. // with awserr.Error's Code and Message methods to get detailed information about
  12232. // the error.
  12233. //
  12234. // See the AWS API reference guide for AWS Organizations's
  12235. // API operation ListPolicies for usage and error information.
  12236. //
  12237. // Returned Error Types:
  12238. //
  12239. // - AccessDeniedException
  12240. // You don't have permissions to perform the requested operation. The user or
  12241. // role that is making the request must have at least one IAM permissions policy
  12242. // attached that grants the required permissions. For more information, see
  12243. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  12244. // in the IAM User Guide.
  12245. //
  12246. // - AWSOrganizationsNotInUseException
  12247. // Your account isn't a member of an organization. To make this request, you
  12248. // must use the credentials of an account that belongs to an organization.
  12249. //
  12250. // - InvalidInputException
  12251. // The requested operation failed because you provided invalid values for one
  12252. // or more of the request parameters. This exception includes a reason that
  12253. // contains additional information about the violated limit:
  12254. //
  12255. // Some of the reasons in the following list might not be applicable to this
  12256. // specific API or operation.
  12257. //
  12258. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  12259. // the same entity.
  12260. //
  12261. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  12262. // Services and can't be modified.
  12263. //
  12264. // - INPUT_REQUIRED: You must include a value for all required parameters.
  12265. //
  12266. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  12267. // for the invited account owner.
  12268. //
  12269. // - INVALID_ENUM: You specified an invalid value.
  12270. //
  12271. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  12272. //
  12273. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  12274. // characters.
  12275. //
  12276. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  12277. // at least one invalid value.
  12278. //
  12279. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  12280. // from the response to a previous call of the operation.
  12281. //
  12282. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  12283. // organization, or email) as a party.
  12284. //
  12285. // - INVALID_PATTERN: You provided a value that doesn't match the required
  12286. // pattern.
  12287. //
  12288. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  12289. // match the required pattern.
  12290. //
  12291. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  12292. // name can't begin with the reserved prefix AWSServiceRoleFor.
  12293. //
  12294. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  12295. // Name (ARN) for the organization.
  12296. //
  12297. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  12298. //
  12299. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  12300. // tag. You can’t add, edit, or delete system tag keys because they're
  12301. // reserved for Amazon Web Services use. System tags don’t count against
  12302. // your tags per resource limit.
  12303. //
  12304. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  12305. // for the operation.
  12306. //
  12307. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  12308. // than allowed.
  12309. //
  12310. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  12311. // value than allowed.
  12312. //
  12313. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  12314. // than allowed.
  12315. //
  12316. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  12317. // value than allowed.
  12318. //
  12319. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  12320. // between entities in the same root.
  12321. //
  12322. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  12323. // target entity.
  12324. //
  12325. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  12326. // isn't recognized.
  12327. //
  12328. // - ServiceException
  12329. // Organizations can't complete your request because of an internal service
  12330. // error. Try again later.
  12331. //
  12332. // - TooManyRequestsException
  12333. // You have sent too many requests in too short a period of time. The quota
  12334. // helps protect against denial-of-service attacks. Try again later.
  12335. //
  12336. // For information about quotas that affect Organizations, see Quotas for Organizations
  12337. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  12338. // the Organizations User Guide.
  12339. //
  12340. // - UnsupportedAPIEndpointException
  12341. // This action isn't available in the current Amazon Web Services Region.
  12342. //
  12343. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListPolicies
  12344. func (c *Organizations) ListPolicies(input *ListPoliciesInput) (*ListPoliciesOutput, error) {
  12345. req, out := c.ListPoliciesRequest(input)
  12346. return out, req.Send()
  12347. }
  12348. // ListPoliciesWithContext is the same as ListPolicies with the addition of
  12349. // the ability to pass a context and additional request options.
  12350. //
  12351. // See ListPolicies for details on how to use this API operation.
  12352. //
  12353. // The context must be non-nil and will be used for request cancellation. If
  12354. // the context is nil a panic will occur. In the future the SDK may create
  12355. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  12356. // for more information on using Contexts.
  12357. func (c *Organizations) ListPoliciesWithContext(ctx aws.Context, input *ListPoliciesInput, opts ...request.Option) (*ListPoliciesOutput, error) {
  12358. req, out := c.ListPoliciesRequest(input)
  12359. req.SetContext(ctx)
  12360. req.ApplyOptions(opts...)
  12361. return out, req.Send()
  12362. }
  12363. // ListPoliciesPages iterates over the pages of a ListPolicies operation,
  12364. // calling the "fn" function with the response data for each page. To stop
  12365. // iterating, return false from the fn function.
  12366. //
  12367. // See ListPolicies method for more information on how to use this operation.
  12368. //
  12369. // Note: This operation can generate multiple requests to a service.
  12370. //
  12371. // // Example iterating over at most 3 pages of a ListPolicies operation.
  12372. // pageNum := 0
  12373. // err := client.ListPoliciesPages(params,
  12374. // func(page *organizations.ListPoliciesOutput, lastPage bool) bool {
  12375. // pageNum++
  12376. // fmt.Println(page)
  12377. // return pageNum <= 3
  12378. // })
  12379. func (c *Organizations) ListPoliciesPages(input *ListPoliciesInput, fn func(*ListPoliciesOutput, bool) bool) error {
  12380. return c.ListPoliciesPagesWithContext(aws.BackgroundContext(), input, fn)
  12381. }
  12382. // ListPoliciesPagesWithContext same as ListPoliciesPages except
  12383. // it takes a Context and allows setting request options on the pages.
  12384. //
  12385. // The context must be non-nil and will be used for request cancellation. If
  12386. // the context is nil a panic will occur. In the future the SDK may create
  12387. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  12388. // for more information on using Contexts.
  12389. func (c *Organizations) ListPoliciesPagesWithContext(ctx aws.Context, input *ListPoliciesInput, fn func(*ListPoliciesOutput, bool) bool, opts ...request.Option) error {
  12390. p := request.Pagination{
  12391. NewRequest: func() (*request.Request, error) {
  12392. var inCpy *ListPoliciesInput
  12393. if input != nil {
  12394. tmp := *input
  12395. inCpy = &tmp
  12396. }
  12397. req, _ := c.ListPoliciesRequest(inCpy)
  12398. req.SetContext(ctx)
  12399. req.ApplyOptions(opts...)
  12400. return req, nil
  12401. },
  12402. }
  12403. for p.Next() {
  12404. if !fn(p.Page().(*ListPoliciesOutput), !p.HasNextPage()) {
  12405. break
  12406. }
  12407. }
  12408. return p.Err()
  12409. }
  12410. const opListPoliciesForTarget = "ListPoliciesForTarget"
  12411. // ListPoliciesForTargetRequest generates a "aws/request.Request" representing the
  12412. // client's request for the ListPoliciesForTarget operation. The "output" return
  12413. // value will be populated with the request's response once the request completes
  12414. // successfully.
  12415. //
  12416. // Use "Send" method on the returned Request to send the API call to the service.
  12417. // the "output" return value is not valid until after Send returns without error.
  12418. //
  12419. // See ListPoliciesForTarget for more information on using the ListPoliciesForTarget
  12420. // API call, and error handling.
  12421. //
  12422. // This method is useful when you want to inject custom logic or configuration
  12423. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  12424. //
  12425. // // Example sending a request using the ListPoliciesForTargetRequest method.
  12426. // req, resp := client.ListPoliciesForTargetRequest(params)
  12427. //
  12428. // err := req.Send()
  12429. // if err == nil { // resp is now filled
  12430. // fmt.Println(resp)
  12431. // }
  12432. //
  12433. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListPoliciesForTarget
  12434. func (c *Organizations) ListPoliciesForTargetRequest(input *ListPoliciesForTargetInput) (req *request.Request, output *ListPoliciesForTargetOutput) {
  12435. op := &request.Operation{
  12436. Name: opListPoliciesForTarget,
  12437. HTTPMethod: "POST",
  12438. HTTPPath: "/",
  12439. Paginator: &request.Paginator{
  12440. InputTokens: []string{"NextToken"},
  12441. OutputTokens: []string{"NextToken"},
  12442. LimitToken: "MaxResults",
  12443. TruncationToken: "",
  12444. },
  12445. }
  12446. if input == nil {
  12447. input = &ListPoliciesForTargetInput{}
  12448. }
  12449. output = &ListPoliciesForTargetOutput{}
  12450. req = c.newRequest(op, input, output)
  12451. return
  12452. }
  12453. // ListPoliciesForTarget API operation for AWS Organizations.
  12454. //
  12455. // Lists the policies that are directly attached to the specified target root,
  12456. // organizational unit (OU), or account. You must specify the policy type that
  12457. // you want included in the returned list.
  12458. //
  12459. // Always check the NextToken response parameter for a null value when calling
  12460. // a List* operation. These operations can occasionally return an empty set
  12461. // of results even when there are more results available. The NextToken response
  12462. // parameter value is null only when there are no more results to display.
  12463. //
  12464. // This operation can be called only from the organization's management account
  12465. // or by a member account that is a delegated administrator for an Amazon Web
  12466. // Services service.
  12467. //
  12468. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  12469. // with awserr.Error's Code and Message methods to get detailed information about
  12470. // the error.
  12471. //
  12472. // See the AWS API reference guide for AWS Organizations's
  12473. // API operation ListPoliciesForTarget for usage and error information.
  12474. //
  12475. // Returned Error Types:
  12476. //
  12477. // - AccessDeniedException
  12478. // You don't have permissions to perform the requested operation. The user or
  12479. // role that is making the request must have at least one IAM permissions policy
  12480. // attached that grants the required permissions. For more information, see
  12481. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  12482. // in the IAM User Guide.
  12483. //
  12484. // - AWSOrganizationsNotInUseException
  12485. // Your account isn't a member of an organization. To make this request, you
  12486. // must use the credentials of an account that belongs to an organization.
  12487. //
  12488. // - InvalidInputException
  12489. // The requested operation failed because you provided invalid values for one
  12490. // or more of the request parameters. This exception includes a reason that
  12491. // contains additional information about the violated limit:
  12492. //
  12493. // Some of the reasons in the following list might not be applicable to this
  12494. // specific API or operation.
  12495. //
  12496. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  12497. // the same entity.
  12498. //
  12499. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  12500. // Services and can't be modified.
  12501. //
  12502. // - INPUT_REQUIRED: You must include a value for all required parameters.
  12503. //
  12504. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  12505. // for the invited account owner.
  12506. //
  12507. // - INVALID_ENUM: You specified an invalid value.
  12508. //
  12509. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  12510. //
  12511. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  12512. // characters.
  12513. //
  12514. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  12515. // at least one invalid value.
  12516. //
  12517. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  12518. // from the response to a previous call of the operation.
  12519. //
  12520. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  12521. // organization, or email) as a party.
  12522. //
  12523. // - INVALID_PATTERN: You provided a value that doesn't match the required
  12524. // pattern.
  12525. //
  12526. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  12527. // match the required pattern.
  12528. //
  12529. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  12530. // name can't begin with the reserved prefix AWSServiceRoleFor.
  12531. //
  12532. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  12533. // Name (ARN) for the organization.
  12534. //
  12535. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  12536. //
  12537. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  12538. // tag. You can’t add, edit, or delete system tag keys because they're
  12539. // reserved for Amazon Web Services use. System tags don’t count against
  12540. // your tags per resource limit.
  12541. //
  12542. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  12543. // for the operation.
  12544. //
  12545. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  12546. // than allowed.
  12547. //
  12548. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  12549. // value than allowed.
  12550. //
  12551. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  12552. // than allowed.
  12553. //
  12554. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  12555. // value than allowed.
  12556. //
  12557. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  12558. // between entities in the same root.
  12559. //
  12560. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  12561. // target entity.
  12562. //
  12563. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  12564. // isn't recognized.
  12565. //
  12566. // - ServiceException
  12567. // Organizations can't complete your request because of an internal service
  12568. // error. Try again later.
  12569. //
  12570. // - TargetNotFoundException
  12571. // We can't find a root, OU, account, or policy with the TargetId that you specified.
  12572. //
  12573. // - TooManyRequestsException
  12574. // You have sent too many requests in too short a period of time. The quota
  12575. // helps protect against denial-of-service attacks. Try again later.
  12576. //
  12577. // For information about quotas that affect Organizations, see Quotas for Organizations
  12578. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  12579. // the Organizations User Guide.
  12580. //
  12581. // - UnsupportedAPIEndpointException
  12582. // This action isn't available in the current Amazon Web Services Region.
  12583. //
  12584. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListPoliciesForTarget
  12585. func (c *Organizations) ListPoliciesForTarget(input *ListPoliciesForTargetInput) (*ListPoliciesForTargetOutput, error) {
  12586. req, out := c.ListPoliciesForTargetRequest(input)
  12587. return out, req.Send()
  12588. }
  12589. // ListPoliciesForTargetWithContext is the same as ListPoliciesForTarget with the addition of
  12590. // the ability to pass a context and additional request options.
  12591. //
  12592. // See ListPoliciesForTarget for details on how to use this API operation.
  12593. //
  12594. // The context must be non-nil and will be used for request cancellation. If
  12595. // the context is nil a panic will occur. In the future the SDK may create
  12596. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  12597. // for more information on using Contexts.
  12598. func (c *Organizations) ListPoliciesForTargetWithContext(ctx aws.Context, input *ListPoliciesForTargetInput, opts ...request.Option) (*ListPoliciesForTargetOutput, error) {
  12599. req, out := c.ListPoliciesForTargetRequest(input)
  12600. req.SetContext(ctx)
  12601. req.ApplyOptions(opts...)
  12602. return out, req.Send()
  12603. }
  12604. // ListPoliciesForTargetPages iterates over the pages of a ListPoliciesForTarget operation,
  12605. // calling the "fn" function with the response data for each page. To stop
  12606. // iterating, return false from the fn function.
  12607. //
  12608. // See ListPoliciesForTarget method for more information on how to use this operation.
  12609. //
  12610. // Note: This operation can generate multiple requests to a service.
  12611. //
  12612. // // Example iterating over at most 3 pages of a ListPoliciesForTarget operation.
  12613. // pageNum := 0
  12614. // err := client.ListPoliciesForTargetPages(params,
  12615. // func(page *organizations.ListPoliciesForTargetOutput, lastPage bool) bool {
  12616. // pageNum++
  12617. // fmt.Println(page)
  12618. // return pageNum <= 3
  12619. // })
  12620. func (c *Organizations) ListPoliciesForTargetPages(input *ListPoliciesForTargetInput, fn func(*ListPoliciesForTargetOutput, bool) bool) error {
  12621. return c.ListPoliciesForTargetPagesWithContext(aws.BackgroundContext(), input, fn)
  12622. }
  12623. // ListPoliciesForTargetPagesWithContext same as ListPoliciesForTargetPages except
  12624. // it takes a Context and allows setting request options on the pages.
  12625. //
  12626. // The context must be non-nil and will be used for request cancellation. If
  12627. // the context is nil a panic will occur. In the future the SDK may create
  12628. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  12629. // for more information on using Contexts.
  12630. func (c *Organizations) ListPoliciesForTargetPagesWithContext(ctx aws.Context, input *ListPoliciesForTargetInput, fn func(*ListPoliciesForTargetOutput, bool) bool, opts ...request.Option) error {
  12631. p := request.Pagination{
  12632. NewRequest: func() (*request.Request, error) {
  12633. var inCpy *ListPoliciesForTargetInput
  12634. if input != nil {
  12635. tmp := *input
  12636. inCpy = &tmp
  12637. }
  12638. req, _ := c.ListPoliciesForTargetRequest(inCpy)
  12639. req.SetContext(ctx)
  12640. req.ApplyOptions(opts...)
  12641. return req, nil
  12642. },
  12643. }
  12644. for p.Next() {
  12645. if !fn(p.Page().(*ListPoliciesForTargetOutput), !p.HasNextPage()) {
  12646. break
  12647. }
  12648. }
  12649. return p.Err()
  12650. }
  12651. const opListRoots = "ListRoots"
  12652. // ListRootsRequest generates a "aws/request.Request" representing the
  12653. // client's request for the ListRoots operation. The "output" return
  12654. // value will be populated with the request's response once the request completes
  12655. // successfully.
  12656. //
  12657. // Use "Send" method on the returned Request to send the API call to the service.
  12658. // the "output" return value is not valid until after Send returns without error.
  12659. //
  12660. // See ListRoots for more information on using the ListRoots
  12661. // API call, and error handling.
  12662. //
  12663. // This method is useful when you want to inject custom logic or configuration
  12664. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  12665. //
  12666. // // Example sending a request using the ListRootsRequest method.
  12667. // req, resp := client.ListRootsRequest(params)
  12668. //
  12669. // err := req.Send()
  12670. // if err == nil { // resp is now filled
  12671. // fmt.Println(resp)
  12672. // }
  12673. //
  12674. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListRoots
  12675. func (c *Organizations) ListRootsRequest(input *ListRootsInput) (req *request.Request, output *ListRootsOutput) {
  12676. op := &request.Operation{
  12677. Name: opListRoots,
  12678. HTTPMethod: "POST",
  12679. HTTPPath: "/",
  12680. Paginator: &request.Paginator{
  12681. InputTokens: []string{"NextToken"},
  12682. OutputTokens: []string{"NextToken"},
  12683. LimitToken: "MaxResults",
  12684. TruncationToken: "",
  12685. },
  12686. }
  12687. if input == nil {
  12688. input = &ListRootsInput{}
  12689. }
  12690. output = &ListRootsOutput{}
  12691. req = c.newRequest(op, input, output)
  12692. return
  12693. }
  12694. // ListRoots API operation for AWS Organizations.
  12695. //
  12696. // Lists the roots that are defined in the current organization.
  12697. //
  12698. // Always check the NextToken response parameter for a null value when calling
  12699. // a List* operation. These operations can occasionally return an empty set
  12700. // of results even when there are more results available. The NextToken response
  12701. // parameter value is null only when there are no more results to display.
  12702. //
  12703. // This operation can be called only from the organization's management account
  12704. // or by a member account that is a delegated administrator for an Amazon Web
  12705. // Services service.
  12706. //
  12707. // Policy types can be enabled and disabled in roots. This is distinct from
  12708. // whether they're available in the organization. When you enable all features,
  12709. // you make policy types available for use in that organization. Individual
  12710. // policy types can then be enabled and disabled in a root. To see the availability
  12711. // of a policy type in an organization, use DescribeOrganization.
  12712. //
  12713. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  12714. // with awserr.Error's Code and Message methods to get detailed information about
  12715. // the error.
  12716. //
  12717. // See the AWS API reference guide for AWS Organizations's
  12718. // API operation ListRoots for usage and error information.
  12719. //
  12720. // Returned Error Types:
  12721. //
  12722. // - AccessDeniedException
  12723. // You don't have permissions to perform the requested operation. The user or
  12724. // role that is making the request must have at least one IAM permissions policy
  12725. // attached that grants the required permissions. For more information, see
  12726. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  12727. // in the IAM User Guide.
  12728. //
  12729. // - AWSOrganizationsNotInUseException
  12730. // Your account isn't a member of an organization. To make this request, you
  12731. // must use the credentials of an account that belongs to an organization.
  12732. //
  12733. // - InvalidInputException
  12734. // The requested operation failed because you provided invalid values for one
  12735. // or more of the request parameters. This exception includes a reason that
  12736. // contains additional information about the violated limit:
  12737. //
  12738. // Some of the reasons in the following list might not be applicable to this
  12739. // specific API or operation.
  12740. //
  12741. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  12742. // the same entity.
  12743. //
  12744. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  12745. // Services and can't be modified.
  12746. //
  12747. // - INPUT_REQUIRED: You must include a value for all required parameters.
  12748. //
  12749. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  12750. // for the invited account owner.
  12751. //
  12752. // - INVALID_ENUM: You specified an invalid value.
  12753. //
  12754. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  12755. //
  12756. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  12757. // characters.
  12758. //
  12759. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  12760. // at least one invalid value.
  12761. //
  12762. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  12763. // from the response to a previous call of the operation.
  12764. //
  12765. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  12766. // organization, or email) as a party.
  12767. //
  12768. // - INVALID_PATTERN: You provided a value that doesn't match the required
  12769. // pattern.
  12770. //
  12771. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  12772. // match the required pattern.
  12773. //
  12774. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  12775. // name can't begin with the reserved prefix AWSServiceRoleFor.
  12776. //
  12777. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  12778. // Name (ARN) for the organization.
  12779. //
  12780. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  12781. //
  12782. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  12783. // tag. You can’t add, edit, or delete system tag keys because they're
  12784. // reserved for Amazon Web Services use. System tags don’t count against
  12785. // your tags per resource limit.
  12786. //
  12787. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  12788. // for the operation.
  12789. //
  12790. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  12791. // than allowed.
  12792. //
  12793. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  12794. // value than allowed.
  12795. //
  12796. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  12797. // than allowed.
  12798. //
  12799. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  12800. // value than allowed.
  12801. //
  12802. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  12803. // between entities in the same root.
  12804. //
  12805. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  12806. // target entity.
  12807. //
  12808. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  12809. // isn't recognized.
  12810. //
  12811. // - ServiceException
  12812. // Organizations can't complete your request because of an internal service
  12813. // error. Try again later.
  12814. //
  12815. // - TooManyRequestsException
  12816. // You have sent too many requests in too short a period of time. The quota
  12817. // helps protect against denial-of-service attacks. Try again later.
  12818. //
  12819. // For information about quotas that affect Organizations, see Quotas for Organizations
  12820. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  12821. // the Organizations User Guide.
  12822. //
  12823. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListRoots
  12824. func (c *Organizations) ListRoots(input *ListRootsInput) (*ListRootsOutput, error) {
  12825. req, out := c.ListRootsRequest(input)
  12826. return out, req.Send()
  12827. }
  12828. // ListRootsWithContext is the same as ListRoots with the addition of
  12829. // the ability to pass a context and additional request options.
  12830. //
  12831. // See ListRoots for details on how to use this API operation.
  12832. //
  12833. // The context must be non-nil and will be used for request cancellation. If
  12834. // the context is nil a panic will occur. In the future the SDK may create
  12835. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  12836. // for more information on using Contexts.
  12837. func (c *Organizations) ListRootsWithContext(ctx aws.Context, input *ListRootsInput, opts ...request.Option) (*ListRootsOutput, error) {
  12838. req, out := c.ListRootsRequest(input)
  12839. req.SetContext(ctx)
  12840. req.ApplyOptions(opts...)
  12841. return out, req.Send()
  12842. }
  12843. // ListRootsPages iterates over the pages of a ListRoots operation,
  12844. // calling the "fn" function with the response data for each page. To stop
  12845. // iterating, return false from the fn function.
  12846. //
  12847. // See ListRoots method for more information on how to use this operation.
  12848. //
  12849. // Note: This operation can generate multiple requests to a service.
  12850. //
  12851. // // Example iterating over at most 3 pages of a ListRoots operation.
  12852. // pageNum := 0
  12853. // err := client.ListRootsPages(params,
  12854. // func(page *organizations.ListRootsOutput, lastPage bool) bool {
  12855. // pageNum++
  12856. // fmt.Println(page)
  12857. // return pageNum <= 3
  12858. // })
  12859. func (c *Organizations) ListRootsPages(input *ListRootsInput, fn func(*ListRootsOutput, bool) bool) error {
  12860. return c.ListRootsPagesWithContext(aws.BackgroundContext(), input, fn)
  12861. }
  12862. // ListRootsPagesWithContext same as ListRootsPages except
  12863. // it takes a Context and allows setting request options on the pages.
  12864. //
  12865. // The context must be non-nil and will be used for request cancellation. If
  12866. // the context is nil a panic will occur. In the future the SDK may create
  12867. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  12868. // for more information on using Contexts.
  12869. func (c *Organizations) ListRootsPagesWithContext(ctx aws.Context, input *ListRootsInput, fn func(*ListRootsOutput, bool) bool, opts ...request.Option) error {
  12870. p := request.Pagination{
  12871. NewRequest: func() (*request.Request, error) {
  12872. var inCpy *ListRootsInput
  12873. if input != nil {
  12874. tmp := *input
  12875. inCpy = &tmp
  12876. }
  12877. req, _ := c.ListRootsRequest(inCpy)
  12878. req.SetContext(ctx)
  12879. req.ApplyOptions(opts...)
  12880. return req, nil
  12881. },
  12882. }
  12883. for p.Next() {
  12884. if !fn(p.Page().(*ListRootsOutput), !p.HasNextPage()) {
  12885. break
  12886. }
  12887. }
  12888. return p.Err()
  12889. }
  12890. const opListTagsForResource = "ListTagsForResource"
  12891. // ListTagsForResourceRequest generates a "aws/request.Request" representing the
  12892. // client's request for the ListTagsForResource operation. The "output" return
  12893. // value will be populated with the request's response once the request completes
  12894. // successfully.
  12895. //
  12896. // Use "Send" method on the returned Request to send the API call to the service.
  12897. // the "output" return value is not valid until after Send returns without error.
  12898. //
  12899. // See ListTagsForResource for more information on using the ListTagsForResource
  12900. // API call, and error handling.
  12901. //
  12902. // This method is useful when you want to inject custom logic or configuration
  12903. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  12904. //
  12905. // // Example sending a request using the ListTagsForResourceRequest method.
  12906. // req, resp := client.ListTagsForResourceRequest(params)
  12907. //
  12908. // err := req.Send()
  12909. // if err == nil { // resp is now filled
  12910. // fmt.Println(resp)
  12911. // }
  12912. //
  12913. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListTagsForResource
  12914. func (c *Organizations) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
  12915. op := &request.Operation{
  12916. Name: opListTagsForResource,
  12917. HTTPMethod: "POST",
  12918. HTTPPath: "/",
  12919. Paginator: &request.Paginator{
  12920. InputTokens: []string{"NextToken"},
  12921. OutputTokens: []string{"NextToken"},
  12922. LimitToken: "",
  12923. TruncationToken: "",
  12924. },
  12925. }
  12926. if input == nil {
  12927. input = &ListTagsForResourceInput{}
  12928. }
  12929. output = &ListTagsForResourceOutput{}
  12930. req = c.newRequest(op, input, output)
  12931. return
  12932. }
  12933. // ListTagsForResource API operation for AWS Organizations.
  12934. //
  12935. // Lists tags that are attached to the specified resource.
  12936. //
  12937. // You can attach tags to the following resources in Organizations.
  12938. //
  12939. // - Amazon Web Services account
  12940. //
  12941. // - Organization root
  12942. //
  12943. // - Organizational unit (OU)
  12944. //
  12945. // - Policy (any type)
  12946. //
  12947. // This operation can be called only from the organization's management account
  12948. // or by a member account that is a delegated administrator for an Amazon Web
  12949. // Services service.
  12950. //
  12951. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  12952. // with awserr.Error's Code and Message methods to get detailed information about
  12953. // the error.
  12954. //
  12955. // See the AWS API reference guide for AWS Organizations's
  12956. // API operation ListTagsForResource for usage and error information.
  12957. //
  12958. // Returned Error Types:
  12959. //
  12960. // - AccessDeniedException
  12961. // You don't have permissions to perform the requested operation. The user or
  12962. // role that is making the request must have at least one IAM permissions policy
  12963. // attached that grants the required permissions. For more information, see
  12964. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  12965. // in the IAM User Guide.
  12966. //
  12967. // - AWSOrganizationsNotInUseException
  12968. // Your account isn't a member of an organization. To make this request, you
  12969. // must use the credentials of an account that belongs to an organization.
  12970. //
  12971. // - TargetNotFoundException
  12972. // We can't find a root, OU, account, or policy with the TargetId that you specified.
  12973. //
  12974. // - InvalidInputException
  12975. // The requested operation failed because you provided invalid values for one
  12976. // or more of the request parameters. This exception includes a reason that
  12977. // contains additional information about the violated limit:
  12978. //
  12979. // Some of the reasons in the following list might not be applicable to this
  12980. // specific API or operation.
  12981. //
  12982. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  12983. // the same entity.
  12984. //
  12985. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  12986. // Services and can't be modified.
  12987. //
  12988. // - INPUT_REQUIRED: You must include a value for all required parameters.
  12989. //
  12990. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  12991. // for the invited account owner.
  12992. //
  12993. // - INVALID_ENUM: You specified an invalid value.
  12994. //
  12995. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  12996. //
  12997. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  12998. // characters.
  12999. //
  13000. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  13001. // at least one invalid value.
  13002. //
  13003. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  13004. // from the response to a previous call of the operation.
  13005. //
  13006. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  13007. // organization, or email) as a party.
  13008. //
  13009. // - INVALID_PATTERN: You provided a value that doesn't match the required
  13010. // pattern.
  13011. //
  13012. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  13013. // match the required pattern.
  13014. //
  13015. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  13016. // name can't begin with the reserved prefix AWSServiceRoleFor.
  13017. //
  13018. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  13019. // Name (ARN) for the organization.
  13020. //
  13021. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  13022. //
  13023. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  13024. // tag. You can’t add, edit, or delete system tag keys because they're
  13025. // reserved for Amazon Web Services use. System tags don’t count against
  13026. // your tags per resource limit.
  13027. //
  13028. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  13029. // for the operation.
  13030. //
  13031. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  13032. // than allowed.
  13033. //
  13034. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  13035. // value than allowed.
  13036. //
  13037. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  13038. // than allowed.
  13039. //
  13040. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  13041. // value than allowed.
  13042. //
  13043. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  13044. // between entities in the same root.
  13045. //
  13046. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  13047. // target entity.
  13048. //
  13049. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  13050. // isn't recognized.
  13051. //
  13052. // - ServiceException
  13053. // Organizations can't complete your request because of an internal service
  13054. // error. Try again later.
  13055. //
  13056. // - TooManyRequestsException
  13057. // You have sent too many requests in too short a period of time. The quota
  13058. // helps protect against denial-of-service attacks. Try again later.
  13059. //
  13060. // For information about quotas that affect Organizations, see Quotas for Organizations
  13061. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  13062. // the Organizations User Guide.
  13063. //
  13064. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListTagsForResource
  13065. func (c *Organizations) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
  13066. req, out := c.ListTagsForResourceRequest(input)
  13067. return out, req.Send()
  13068. }
  13069. // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
  13070. // the ability to pass a context and additional request options.
  13071. //
  13072. // See ListTagsForResource for details on how to use this API operation.
  13073. //
  13074. // The context must be non-nil and will be used for request cancellation. If
  13075. // the context is nil a panic will occur. In the future the SDK may create
  13076. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  13077. // for more information on using Contexts.
  13078. func (c *Organizations) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
  13079. req, out := c.ListTagsForResourceRequest(input)
  13080. req.SetContext(ctx)
  13081. req.ApplyOptions(opts...)
  13082. return out, req.Send()
  13083. }
  13084. // ListTagsForResourcePages iterates over the pages of a ListTagsForResource operation,
  13085. // calling the "fn" function with the response data for each page. To stop
  13086. // iterating, return false from the fn function.
  13087. //
  13088. // See ListTagsForResource method for more information on how to use this operation.
  13089. //
  13090. // Note: This operation can generate multiple requests to a service.
  13091. //
  13092. // // Example iterating over at most 3 pages of a ListTagsForResource operation.
  13093. // pageNum := 0
  13094. // err := client.ListTagsForResourcePages(params,
  13095. // func(page *organizations.ListTagsForResourceOutput, lastPage bool) bool {
  13096. // pageNum++
  13097. // fmt.Println(page)
  13098. // return pageNum <= 3
  13099. // })
  13100. func (c *Organizations) ListTagsForResourcePages(input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool) error {
  13101. return c.ListTagsForResourcePagesWithContext(aws.BackgroundContext(), input, fn)
  13102. }
  13103. // ListTagsForResourcePagesWithContext same as ListTagsForResourcePages except
  13104. // it takes a Context and allows setting request options on the pages.
  13105. //
  13106. // The context must be non-nil and will be used for request cancellation. If
  13107. // the context is nil a panic will occur. In the future the SDK may create
  13108. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  13109. // for more information on using Contexts.
  13110. func (c *Organizations) ListTagsForResourcePagesWithContext(ctx aws.Context, input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool, opts ...request.Option) error {
  13111. p := request.Pagination{
  13112. NewRequest: func() (*request.Request, error) {
  13113. var inCpy *ListTagsForResourceInput
  13114. if input != nil {
  13115. tmp := *input
  13116. inCpy = &tmp
  13117. }
  13118. req, _ := c.ListTagsForResourceRequest(inCpy)
  13119. req.SetContext(ctx)
  13120. req.ApplyOptions(opts...)
  13121. return req, nil
  13122. },
  13123. }
  13124. for p.Next() {
  13125. if !fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) {
  13126. break
  13127. }
  13128. }
  13129. return p.Err()
  13130. }
  13131. const opListTargetsForPolicy = "ListTargetsForPolicy"
  13132. // ListTargetsForPolicyRequest generates a "aws/request.Request" representing the
  13133. // client's request for the ListTargetsForPolicy operation. The "output" return
  13134. // value will be populated with the request's response once the request completes
  13135. // successfully.
  13136. //
  13137. // Use "Send" method on the returned Request to send the API call to the service.
  13138. // the "output" return value is not valid until after Send returns without error.
  13139. //
  13140. // See ListTargetsForPolicy for more information on using the ListTargetsForPolicy
  13141. // API call, and error handling.
  13142. //
  13143. // This method is useful when you want to inject custom logic or configuration
  13144. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  13145. //
  13146. // // Example sending a request using the ListTargetsForPolicyRequest method.
  13147. // req, resp := client.ListTargetsForPolicyRequest(params)
  13148. //
  13149. // err := req.Send()
  13150. // if err == nil { // resp is now filled
  13151. // fmt.Println(resp)
  13152. // }
  13153. //
  13154. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListTargetsForPolicy
  13155. func (c *Organizations) ListTargetsForPolicyRequest(input *ListTargetsForPolicyInput) (req *request.Request, output *ListTargetsForPolicyOutput) {
  13156. op := &request.Operation{
  13157. Name: opListTargetsForPolicy,
  13158. HTTPMethod: "POST",
  13159. HTTPPath: "/",
  13160. Paginator: &request.Paginator{
  13161. InputTokens: []string{"NextToken"},
  13162. OutputTokens: []string{"NextToken"},
  13163. LimitToken: "MaxResults",
  13164. TruncationToken: "",
  13165. },
  13166. }
  13167. if input == nil {
  13168. input = &ListTargetsForPolicyInput{}
  13169. }
  13170. output = &ListTargetsForPolicyOutput{}
  13171. req = c.newRequest(op, input, output)
  13172. return
  13173. }
  13174. // ListTargetsForPolicy API operation for AWS Organizations.
  13175. //
  13176. // Lists all the roots, organizational units (OUs), and accounts that the specified
  13177. // policy is attached to.
  13178. //
  13179. // Always check the NextToken response parameter for a null value when calling
  13180. // a List* operation. These operations can occasionally return an empty set
  13181. // of results even when there are more results available. The NextToken response
  13182. // parameter value is null only when there are no more results to display.
  13183. //
  13184. // This operation can be called only from the organization's management account
  13185. // or by a member account that is a delegated administrator for an Amazon Web
  13186. // Services service.
  13187. //
  13188. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  13189. // with awserr.Error's Code and Message methods to get detailed information about
  13190. // the error.
  13191. //
  13192. // See the AWS API reference guide for AWS Organizations's
  13193. // API operation ListTargetsForPolicy for usage and error information.
  13194. //
  13195. // Returned Error Types:
  13196. //
  13197. // - AccessDeniedException
  13198. // You don't have permissions to perform the requested operation. The user or
  13199. // role that is making the request must have at least one IAM permissions policy
  13200. // attached that grants the required permissions. For more information, see
  13201. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  13202. // in the IAM User Guide.
  13203. //
  13204. // - AWSOrganizationsNotInUseException
  13205. // Your account isn't a member of an organization. To make this request, you
  13206. // must use the credentials of an account that belongs to an organization.
  13207. //
  13208. // - InvalidInputException
  13209. // The requested operation failed because you provided invalid values for one
  13210. // or more of the request parameters. This exception includes a reason that
  13211. // contains additional information about the violated limit:
  13212. //
  13213. // Some of the reasons in the following list might not be applicable to this
  13214. // specific API or operation.
  13215. //
  13216. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  13217. // the same entity.
  13218. //
  13219. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  13220. // Services and can't be modified.
  13221. //
  13222. // - INPUT_REQUIRED: You must include a value for all required parameters.
  13223. //
  13224. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  13225. // for the invited account owner.
  13226. //
  13227. // - INVALID_ENUM: You specified an invalid value.
  13228. //
  13229. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  13230. //
  13231. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  13232. // characters.
  13233. //
  13234. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  13235. // at least one invalid value.
  13236. //
  13237. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  13238. // from the response to a previous call of the operation.
  13239. //
  13240. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  13241. // organization, or email) as a party.
  13242. //
  13243. // - INVALID_PATTERN: You provided a value that doesn't match the required
  13244. // pattern.
  13245. //
  13246. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  13247. // match the required pattern.
  13248. //
  13249. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  13250. // name can't begin with the reserved prefix AWSServiceRoleFor.
  13251. //
  13252. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  13253. // Name (ARN) for the organization.
  13254. //
  13255. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  13256. //
  13257. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  13258. // tag. You can’t add, edit, or delete system tag keys because they're
  13259. // reserved for Amazon Web Services use. System tags don’t count against
  13260. // your tags per resource limit.
  13261. //
  13262. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  13263. // for the operation.
  13264. //
  13265. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  13266. // than allowed.
  13267. //
  13268. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  13269. // value than allowed.
  13270. //
  13271. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  13272. // than allowed.
  13273. //
  13274. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  13275. // value than allowed.
  13276. //
  13277. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  13278. // between entities in the same root.
  13279. //
  13280. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  13281. // target entity.
  13282. //
  13283. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  13284. // isn't recognized.
  13285. //
  13286. // - PolicyNotFoundException
  13287. // We can't find a policy with the PolicyId that you specified.
  13288. //
  13289. // - ServiceException
  13290. // Organizations can't complete your request because of an internal service
  13291. // error. Try again later.
  13292. //
  13293. // - TooManyRequestsException
  13294. // You have sent too many requests in too short a period of time. The quota
  13295. // helps protect against denial-of-service attacks. Try again later.
  13296. //
  13297. // For information about quotas that affect Organizations, see Quotas for Organizations
  13298. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  13299. // the Organizations User Guide.
  13300. //
  13301. // - UnsupportedAPIEndpointException
  13302. // This action isn't available in the current Amazon Web Services Region.
  13303. //
  13304. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListTargetsForPolicy
  13305. func (c *Organizations) ListTargetsForPolicy(input *ListTargetsForPolicyInput) (*ListTargetsForPolicyOutput, error) {
  13306. req, out := c.ListTargetsForPolicyRequest(input)
  13307. return out, req.Send()
  13308. }
  13309. // ListTargetsForPolicyWithContext is the same as ListTargetsForPolicy with the addition of
  13310. // the ability to pass a context and additional request options.
  13311. //
  13312. // See ListTargetsForPolicy for details on how to use this API operation.
  13313. //
  13314. // The context must be non-nil and will be used for request cancellation. If
  13315. // the context is nil a panic will occur. In the future the SDK may create
  13316. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  13317. // for more information on using Contexts.
  13318. func (c *Organizations) ListTargetsForPolicyWithContext(ctx aws.Context, input *ListTargetsForPolicyInput, opts ...request.Option) (*ListTargetsForPolicyOutput, error) {
  13319. req, out := c.ListTargetsForPolicyRequest(input)
  13320. req.SetContext(ctx)
  13321. req.ApplyOptions(opts...)
  13322. return out, req.Send()
  13323. }
  13324. // ListTargetsForPolicyPages iterates over the pages of a ListTargetsForPolicy operation,
  13325. // calling the "fn" function with the response data for each page. To stop
  13326. // iterating, return false from the fn function.
  13327. //
  13328. // See ListTargetsForPolicy method for more information on how to use this operation.
  13329. //
  13330. // Note: This operation can generate multiple requests to a service.
  13331. //
  13332. // // Example iterating over at most 3 pages of a ListTargetsForPolicy operation.
  13333. // pageNum := 0
  13334. // err := client.ListTargetsForPolicyPages(params,
  13335. // func(page *organizations.ListTargetsForPolicyOutput, lastPage bool) bool {
  13336. // pageNum++
  13337. // fmt.Println(page)
  13338. // return pageNum <= 3
  13339. // })
  13340. func (c *Organizations) ListTargetsForPolicyPages(input *ListTargetsForPolicyInput, fn func(*ListTargetsForPolicyOutput, bool) bool) error {
  13341. return c.ListTargetsForPolicyPagesWithContext(aws.BackgroundContext(), input, fn)
  13342. }
  13343. // ListTargetsForPolicyPagesWithContext same as ListTargetsForPolicyPages except
  13344. // it takes a Context and allows setting request options on the pages.
  13345. //
  13346. // The context must be non-nil and will be used for request cancellation. If
  13347. // the context is nil a panic will occur. In the future the SDK may create
  13348. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  13349. // for more information on using Contexts.
  13350. func (c *Organizations) ListTargetsForPolicyPagesWithContext(ctx aws.Context, input *ListTargetsForPolicyInput, fn func(*ListTargetsForPolicyOutput, bool) bool, opts ...request.Option) error {
  13351. p := request.Pagination{
  13352. NewRequest: func() (*request.Request, error) {
  13353. var inCpy *ListTargetsForPolicyInput
  13354. if input != nil {
  13355. tmp := *input
  13356. inCpy = &tmp
  13357. }
  13358. req, _ := c.ListTargetsForPolicyRequest(inCpy)
  13359. req.SetContext(ctx)
  13360. req.ApplyOptions(opts...)
  13361. return req, nil
  13362. },
  13363. }
  13364. for p.Next() {
  13365. if !fn(p.Page().(*ListTargetsForPolicyOutput), !p.HasNextPage()) {
  13366. break
  13367. }
  13368. }
  13369. return p.Err()
  13370. }
  13371. const opMoveAccount = "MoveAccount"
  13372. // MoveAccountRequest generates a "aws/request.Request" representing the
  13373. // client's request for the MoveAccount operation. The "output" return
  13374. // value will be populated with the request's response once the request completes
  13375. // successfully.
  13376. //
  13377. // Use "Send" method on the returned Request to send the API call to the service.
  13378. // the "output" return value is not valid until after Send returns without error.
  13379. //
  13380. // See MoveAccount for more information on using the MoveAccount
  13381. // API call, and error handling.
  13382. //
  13383. // This method is useful when you want to inject custom logic or configuration
  13384. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  13385. //
  13386. // // Example sending a request using the MoveAccountRequest method.
  13387. // req, resp := client.MoveAccountRequest(params)
  13388. //
  13389. // err := req.Send()
  13390. // if err == nil { // resp is now filled
  13391. // fmt.Println(resp)
  13392. // }
  13393. //
  13394. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/MoveAccount
  13395. func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *request.Request, output *MoveAccountOutput) {
  13396. op := &request.Operation{
  13397. Name: opMoveAccount,
  13398. HTTPMethod: "POST",
  13399. HTTPPath: "/",
  13400. }
  13401. if input == nil {
  13402. input = &MoveAccountInput{}
  13403. }
  13404. output = &MoveAccountOutput{}
  13405. req = c.newRequest(op, input, output)
  13406. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  13407. return
  13408. }
  13409. // MoveAccount API operation for AWS Organizations.
  13410. //
  13411. // Moves an account from its current source parent root or organizational unit
  13412. // (OU) to the specified destination parent root or OU.
  13413. //
  13414. // This operation can be called only from the organization's management account.
  13415. //
  13416. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  13417. // with awserr.Error's Code and Message methods to get detailed information about
  13418. // the error.
  13419. //
  13420. // See the AWS API reference guide for AWS Organizations's
  13421. // API operation MoveAccount for usage and error information.
  13422. //
  13423. // Returned Error Types:
  13424. //
  13425. // - AccessDeniedException
  13426. // You don't have permissions to perform the requested operation. The user or
  13427. // role that is making the request must have at least one IAM permissions policy
  13428. // attached that grants the required permissions. For more information, see
  13429. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  13430. // in the IAM User Guide.
  13431. //
  13432. // - InvalidInputException
  13433. // The requested operation failed because you provided invalid values for one
  13434. // or more of the request parameters. This exception includes a reason that
  13435. // contains additional information about the violated limit:
  13436. //
  13437. // Some of the reasons in the following list might not be applicable to this
  13438. // specific API or operation.
  13439. //
  13440. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  13441. // the same entity.
  13442. //
  13443. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  13444. // Services and can't be modified.
  13445. //
  13446. // - INPUT_REQUIRED: You must include a value for all required parameters.
  13447. //
  13448. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  13449. // for the invited account owner.
  13450. //
  13451. // - INVALID_ENUM: You specified an invalid value.
  13452. //
  13453. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  13454. //
  13455. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  13456. // characters.
  13457. //
  13458. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  13459. // at least one invalid value.
  13460. //
  13461. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  13462. // from the response to a previous call of the operation.
  13463. //
  13464. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  13465. // organization, or email) as a party.
  13466. //
  13467. // - INVALID_PATTERN: You provided a value that doesn't match the required
  13468. // pattern.
  13469. //
  13470. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  13471. // match the required pattern.
  13472. //
  13473. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  13474. // name can't begin with the reserved prefix AWSServiceRoleFor.
  13475. //
  13476. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  13477. // Name (ARN) for the organization.
  13478. //
  13479. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  13480. //
  13481. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  13482. // tag. You can’t add, edit, or delete system tag keys because they're
  13483. // reserved for Amazon Web Services use. System tags don’t count against
  13484. // your tags per resource limit.
  13485. //
  13486. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  13487. // for the operation.
  13488. //
  13489. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  13490. // than allowed.
  13491. //
  13492. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  13493. // value than allowed.
  13494. //
  13495. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  13496. // than allowed.
  13497. //
  13498. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  13499. // value than allowed.
  13500. //
  13501. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  13502. // between entities in the same root.
  13503. //
  13504. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  13505. // target entity.
  13506. //
  13507. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  13508. // isn't recognized.
  13509. //
  13510. // - SourceParentNotFoundException
  13511. // We can't find a source root or OU with the ParentId that you specified.
  13512. //
  13513. // - DestinationParentNotFoundException
  13514. // We can't find the destination container (a root or OU) with the ParentId
  13515. // that you specified.
  13516. //
  13517. // - DuplicateAccountException
  13518. // That account is already present in the specified destination.
  13519. //
  13520. // - AccountNotFoundException
  13521. // We can't find an Amazon Web Services account with the AccountId that you
  13522. // specified, or the account whose credentials you used to make this request
  13523. // isn't a member of an organization.
  13524. //
  13525. // - TooManyRequestsException
  13526. // You have sent too many requests in too short a period of time. The quota
  13527. // helps protect against denial-of-service attacks. Try again later.
  13528. //
  13529. // For information about quotas that affect Organizations, see Quotas for Organizations
  13530. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  13531. // the Organizations User Guide.
  13532. //
  13533. // - ConcurrentModificationException
  13534. // The target of the operation is currently being modified by a different request.
  13535. // Try again later.
  13536. //
  13537. // - AWSOrganizationsNotInUseException
  13538. // Your account isn't a member of an organization. To make this request, you
  13539. // must use the credentials of an account that belongs to an organization.
  13540. //
  13541. // - ServiceException
  13542. // Organizations can't complete your request because of an internal service
  13543. // error. Try again later.
  13544. //
  13545. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/MoveAccount
  13546. func (c *Organizations) MoveAccount(input *MoveAccountInput) (*MoveAccountOutput, error) {
  13547. req, out := c.MoveAccountRequest(input)
  13548. return out, req.Send()
  13549. }
  13550. // MoveAccountWithContext is the same as MoveAccount with the addition of
  13551. // the ability to pass a context and additional request options.
  13552. //
  13553. // See MoveAccount for details on how to use this API operation.
  13554. //
  13555. // The context must be non-nil and will be used for request cancellation. If
  13556. // the context is nil a panic will occur. In the future the SDK may create
  13557. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  13558. // for more information on using Contexts.
  13559. func (c *Organizations) MoveAccountWithContext(ctx aws.Context, input *MoveAccountInput, opts ...request.Option) (*MoveAccountOutput, error) {
  13560. req, out := c.MoveAccountRequest(input)
  13561. req.SetContext(ctx)
  13562. req.ApplyOptions(opts...)
  13563. return out, req.Send()
  13564. }
  13565. const opPutResourcePolicy = "PutResourcePolicy"
  13566. // PutResourcePolicyRequest generates a "aws/request.Request" representing the
  13567. // client's request for the PutResourcePolicy operation. The "output" return
  13568. // value will be populated with the request's response once the request completes
  13569. // successfully.
  13570. //
  13571. // Use "Send" method on the returned Request to send the API call to the service.
  13572. // the "output" return value is not valid until after Send returns without error.
  13573. //
  13574. // See PutResourcePolicy for more information on using the PutResourcePolicy
  13575. // API call, and error handling.
  13576. //
  13577. // This method is useful when you want to inject custom logic or configuration
  13578. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  13579. //
  13580. // // Example sending a request using the PutResourcePolicyRequest method.
  13581. // req, resp := client.PutResourcePolicyRequest(params)
  13582. //
  13583. // err := req.Send()
  13584. // if err == nil { // resp is now filled
  13585. // fmt.Println(resp)
  13586. // }
  13587. //
  13588. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/PutResourcePolicy
  13589. func (c *Organizations) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) {
  13590. op := &request.Operation{
  13591. Name: opPutResourcePolicy,
  13592. HTTPMethod: "POST",
  13593. HTTPPath: "/",
  13594. }
  13595. if input == nil {
  13596. input = &PutResourcePolicyInput{}
  13597. }
  13598. output = &PutResourcePolicyOutput{}
  13599. req = c.newRequest(op, input, output)
  13600. return
  13601. }
  13602. // PutResourcePolicy API operation for AWS Organizations.
  13603. //
  13604. // Creates or updates a resource policy.
  13605. //
  13606. // You can only call this operation from the organization's management account.
  13607. //
  13608. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  13609. // with awserr.Error's Code and Message methods to get detailed information about
  13610. // the error.
  13611. //
  13612. // See the AWS API reference guide for AWS Organizations's
  13613. // API operation PutResourcePolicy for usage and error information.
  13614. //
  13615. // Returned Error Types:
  13616. //
  13617. // - AccessDeniedException
  13618. // You don't have permissions to perform the requested operation. The user or
  13619. // role that is making the request must have at least one IAM permissions policy
  13620. // attached that grants the required permissions. For more information, see
  13621. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  13622. // in the IAM User Guide.
  13623. //
  13624. // - ServiceException
  13625. // Organizations can't complete your request because of an internal service
  13626. // error. Try again later.
  13627. //
  13628. // - UnsupportedAPIEndpointException
  13629. // This action isn't available in the current Amazon Web Services Region.
  13630. //
  13631. // - TooManyRequestsException
  13632. // You have sent too many requests in too short a period of time. The quota
  13633. // helps protect against denial-of-service attacks. Try again later.
  13634. //
  13635. // For information about quotas that affect Organizations, see Quotas for Organizations
  13636. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  13637. // the Organizations User Guide.
  13638. //
  13639. // - ConcurrentModificationException
  13640. // The target of the operation is currently being modified by a different request.
  13641. // Try again later.
  13642. //
  13643. // - InvalidInputException
  13644. // The requested operation failed because you provided invalid values for one
  13645. // or more of the request parameters. This exception includes a reason that
  13646. // contains additional information about the violated limit:
  13647. //
  13648. // Some of the reasons in the following list might not be applicable to this
  13649. // specific API or operation.
  13650. //
  13651. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  13652. // the same entity.
  13653. //
  13654. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  13655. // Services and can't be modified.
  13656. //
  13657. // - INPUT_REQUIRED: You must include a value for all required parameters.
  13658. //
  13659. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  13660. // for the invited account owner.
  13661. //
  13662. // - INVALID_ENUM: You specified an invalid value.
  13663. //
  13664. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  13665. //
  13666. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  13667. // characters.
  13668. //
  13669. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  13670. // at least one invalid value.
  13671. //
  13672. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  13673. // from the response to a previous call of the operation.
  13674. //
  13675. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  13676. // organization, or email) as a party.
  13677. //
  13678. // - INVALID_PATTERN: You provided a value that doesn't match the required
  13679. // pattern.
  13680. //
  13681. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  13682. // match the required pattern.
  13683. //
  13684. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  13685. // name can't begin with the reserved prefix AWSServiceRoleFor.
  13686. //
  13687. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  13688. // Name (ARN) for the organization.
  13689. //
  13690. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  13691. //
  13692. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  13693. // tag. You can’t add, edit, or delete system tag keys because they're
  13694. // reserved for Amazon Web Services use. System tags don’t count against
  13695. // your tags per resource limit.
  13696. //
  13697. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  13698. // for the operation.
  13699. //
  13700. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  13701. // than allowed.
  13702. //
  13703. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  13704. // value than allowed.
  13705. //
  13706. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  13707. // than allowed.
  13708. //
  13709. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  13710. // value than allowed.
  13711. //
  13712. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  13713. // between entities in the same root.
  13714. //
  13715. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  13716. // target entity.
  13717. //
  13718. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  13719. // isn't recognized.
  13720. //
  13721. // - ConstraintViolationException
  13722. // Performing this operation violates a minimum or maximum value limit. For
  13723. // example, attempting to remove the last service control policy (SCP) from
  13724. // an OU or root, inviting or creating too many accounts to the organization,
  13725. // or attaching too many policies to an account, OU, or root. This exception
  13726. // includes a reason that contains additional information about the violated
  13727. // limit:
  13728. //
  13729. // Some of the reasons in the following list might not be applicable to this
  13730. // specific API or operation.
  13731. //
  13732. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  13733. // account from the organization. You can't remove the management account.
  13734. // Instead, after you remove all member accounts, delete the organization
  13735. // itself.
  13736. //
  13737. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  13738. // an account from the organization that doesn't yet have enough information
  13739. // to exist as a standalone account. This account requires you to first complete
  13740. // phone verification. Follow the steps at Removing a member account from
  13741. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  13742. // in the Organizations User Guide.
  13743. //
  13744. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  13745. // of accounts that you can create in one day.
  13746. //
  13747. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  13748. // the number of accounts in an organization. If you need more accounts,
  13749. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  13750. // to request an increase in your limit. Or the number of invitations that
  13751. // you tried to send would cause you to exceed the limit of accounts in your
  13752. // organization. Send fewer invitations or contact Amazon Web Services Support
  13753. // to request an increase in the number of accounts. Deleted and closed accounts
  13754. // still count toward your limit. If you get this exception when running
  13755. // a command immediately after creating the organization, wait one hour and
  13756. // try again. After an hour, if the command continues to fail with this error,
  13757. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  13758. //
  13759. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  13760. // register the management account of the organization as a delegated administrator
  13761. // for an Amazon Web Services service integrated with Organizations. You
  13762. // can designate only a member account as a delegated administrator.
  13763. //
  13764. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  13765. // account. To close the management account for the organization, you must
  13766. // first either remove or close all member accounts in the organization.
  13767. // Follow standard account closure process using root credentials.​
  13768. //
  13769. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  13770. // an account that is registered as a delegated administrator for a service
  13771. // integrated with your organization. To complete this operation, you must
  13772. // first deregister this account as a delegated administrator.
  13773. //
  13774. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  13775. // for the past 30 days.
  13776. //
  13777. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  13778. // of accounts that you can close at a time. ​
  13779. //
  13780. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  13781. // organization in the specified region, you must enable all features mode.
  13782. //
  13783. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  13784. // an Amazon Web Services account as a delegated administrator for an Amazon
  13785. // Web Services service that already has a delegated administrator. To complete
  13786. // this operation, you must first deregister any existing delegated administrators
  13787. // for this service.
  13788. //
  13789. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  13790. // valid for a limited period of time. You must resubmit the request and
  13791. // generate a new verfication code.
  13792. //
  13793. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  13794. // handshakes that you can send in one day.
  13795. //
  13796. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  13797. // supported payment method is associated with the account. Amazon Web Services
  13798. // does not support cards issued by financial institutions in Russia or Belarus.
  13799. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  13800. //
  13801. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  13802. // in this organization, you first must migrate the organization's management
  13803. // account to the marketplace that corresponds to the management account's
  13804. // address. For example, accounts with India addresses must be associated
  13805. // with the AISPL marketplace. All accounts in an organization must be associated
  13806. // with the same marketplace.
  13807. //
  13808. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  13809. // Web Services /> Regions in China. To create an organization, the master
  13810. // must have a valid business license. For more information, contact customer
  13811. // support.
  13812. //
  13813. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  13814. // must first provide a valid contact address and phone number for the management
  13815. // account. Then try the operation again.
  13816. //
  13817. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  13818. // management account must have an associated account in the Amazon Web Services
  13819. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  13820. // in the Amazon Web Services GovCloud User Guide.
  13821. //
  13822. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  13823. // with this management account, you first must associate a valid payment
  13824. // instrument, such as a credit card, with the account. Follow the steps
  13825. // at To leave an organization when all required account information has
  13826. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  13827. // in the Organizations User Guide.
  13828. //
  13829. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  13830. // to register more delegated administrators than allowed for the service
  13831. // principal.
  13832. //
  13833. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  13834. // number of policies of a certain type that can be attached to an entity
  13835. // at one time.
  13836. //
  13837. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  13838. // on this resource.
  13839. //
  13840. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  13841. // with this member account, you first must associate a valid payment instrument,
  13842. // such as a credit card, with the account. Follow the steps at To leave
  13843. // an organization when all required account information has not yet been
  13844. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  13845. // in the Organizations User Guide.
  13846. //
  13847. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  13848. // policy from an entity that would cause the entity to have fewer than the
  13849. // minimum number of policies of a certain type required.
  13850. //
  13851. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  13852. // that requires the organization to be configured to support all features.
  13853. // An organization that supports only consolidated billing features can't
  13854. // perform this operation.
  13855. //
  13856. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  13857. // too many levels deep.
  13858. //
  13859. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  13860. // that you can have in an organization.
  13861. //
  13862. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  13863. // is larger than the maximum size.
  13864. //
  13865. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  13866. // policies that you can have in an organization.
  13867. //
  13868. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  13869. // before you enabled service access. Call the EnableAWSServiceAccess API
  13870. // first.
  13871. //
  13872. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  13873. // tags that are not compliant with the tag policy requirements for this
  13874. // account.
  13875. //
  13876. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  13877. // there is a waiting period before you can remove it from the organization.
  13878. // If you get an error that indicates that a wait period is required, try
  13879. // again in a few days.
  13880. //
  13881. // - AWSOrganizationsNotInUseException
  13882. // Your account isn't a member of an organization. To make this request, you
  13883. // must use the credentials of an account that belongs to an organization.
  13884. //
  13885. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/PutResourcePolicy
  13886. func (c *Organizations) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) {
  13887. req, out := c.PutResourcePolicyRequest(input)
  13888. return out, req.Send()
  13889. }
  13890. // PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of
  13891. // the ability to pass a context and additional request options.
  13892. //
  13893. // See PutResourcePolicy for details on how to use this API operation.
  13894. //
  13895. // The context must be non-nil and will be used for request cancellation. If
  13896. // the context is nil a panic will occur. In the future the SDK may create
  13897. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  13898. // for more information on using Contexts.
  13899. func (c *Organizations) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) {
  13900. req, out := c.PutResourcePolicyRequest(input)
  13901. req.SetContext(ctx)
  13902. req.ApplyOptions(opts...)
  13903. return out, req.Send()
  13904. }
  13905. const opRegisterDelegatedAdministrator = "RegisterDelegatedAdministrator"
  13906. // RegisterDelegatedAdministratorRequest generates a "aws/request.Request" representing the
  13907. // client's request for the RegisterDelegatedAdministrator operation. The "output" return
  13908. // value will be populated with the request's response once the request completes
  13909. // successfully.
  13910. //
  13911. // Use "Send" method on the returned Request to send the API call to the service.
  13912. // the "output" return value is not valid until after Send returns without error.
  13913. //
  13914. // See RegisterDelegatedAdministrator for more information on using the RegisterDelegatedAdministrator
  13915. // API call, and error handling.
  13916. //
  13917. // This method is useful when you want to inject custom logic or configuration
  13918. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  13919. //
  13920. // // Example sending a request using the RegisterDelegatedAdministratorRequest method.
  13921. // req, resp := client.RegisterDelegatedAdministratorRequest(params)
  13922. //
  13923. // err := req.Send()
  13924. // if err == nil { // resp is now filled
  13925. // fmt.Println(resp)
  13926. // }
  13927. //
  13928. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/RegisterDelegatedAdministrator
  13929. func (c *Organizations) RegisterDelegatedAdministratorRequest(input *RegisterDelegatedAdministratorInput) (req *request.Request, output *RegisterDelegatedAdministratorOutput) {
  13930. op := &request.Operation{
  13931. Name: opRegisterDelegatedAdministrator,
  13932. HTTPMethod: "POST",
  13933. HTTPPath: "/",
  13934. }
  13935. if input == nil {
  13936. input = &RegisterDelegatedAdministratorInput{}
  13937. }
  13938. output = &RegisterDelegatedAdministratorOutput{}
  13939. req = c.newRequest(op, input, output)
  13940. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  13941. return
  13942. }
  13943. // RegisterDelegatedAdministrator API operation for AWS Organizations.
  13944. //
  13945. // Enables the specified member account to administer the Organizations features
  13946. // of the specified Amazon Web Services service. It grants read-only access
  13947. // to Organizations service data. The account still requires IAM permissions
  13948. // to access and administer the Amazon Web Services service.
  13949. //
  13950. // You can run this action only for Amazon Web Services services that support
  13951. // this feature. For a current list of services that support it, see the column
  13952. // Supports Delegated Administrator in the table at Amazon Web Services Services
  13953. // that you can use with Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html)
  13954. // in the Organizations User Guide.
  13955. //
  13956. // This operation can be called only from the organization's management account.
  13957. //
  13958. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  13959. // with awserr.Error's Code and Message methods to get detailed information about
  13960. // the error.
  13961. //
  13962. // See the AWS API reference guide for AWS Organizations's
  13963. // API operation RegisterDelegatedAdministrator for usage and error information.
  13964. //
  13965. // Returned Error Types:
  13966. //
  13967. // - AccessDeniedException
  13968. // You don't have permissions to perform the requested operation. The user or
  13969. // role that is making the request must have at least one IAM permissions policy
  13970. // attached that grants the required permissions. For more information, see
  13971. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  13972. // in the IAM User Guide.
  13973. //
  13974. // - AccountAlreadyRegisteredException
  13975. // The specified account is already a delegated administrator for this Amazon
  13976. // Web Services service.
  13977. //
  13978. // - AccountNotFoundException
  13979. // We can't find an Amazon Web Services account with the AccountId that you
  13980. // specified, or the account whose credentials you used to make this request
  13981. // isn't a member of an organization.
  13982. //
  13983. // - AWSOrganizationsNotInUseException
  13984. // Your account isn't a member of an organization. To make this request, you
  13985. // must use the credentials of an account that belongs to an organization.
  13986. //
  13987. // - ConcurrentModificationException
  13988. // The target of the operation is currently being modified by a different request.
  13989. // Try again later.
  13990. //
  13991. // - ConstraintViolationException
  13992. // Performing this operation violates a minimum or maximum value limit. For
  13993. // example, attempting to remove the last service control policy (SCP) from
  13994. // an OU or root, inviting or creating too many accounts to the organization,
  13995. // or attaching too many policies to an account, OU, or root. This exception
  13996. // includes a reason that contains additional information about the violated
  13997. // limit:
  13998. //
  13999. // Some of the reasons in the following list might not be applicable to this
  14000. // specific API or operation.
  14001. //
  14002. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  14003. // account from the organization. You can't remove the management account.
  14004. // Instead, after you remove all member accounts, delete the organization
  14005. // itself.
  14006. //
  14007. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  14008. // an account from the organization that doesn't yet have enough information
  14009. // to exist as a standalone account. This account requires you to first complete
  14010. // phone verification. Follow the steps at Removing a member account from
  14011. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  14012. // in the Organizations User Guide.
  14013. //
  14014. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  14015. // of accounts that you can create in one day.
  14016. //
  14017. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  14018. // the number of accounts in an organization. If you need more accounts,
  14019. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  14020. // to request an increase in your limit. Or the number of invitations that
  14021. // you tried to send would cause you to exceed the limit of accounts in your
  14022. // organization. Send fewer invitations or contact Amazon Web Services Support
  14023. // to request an increase in the number of accounts. Deleted and closed accounts
  14024. // still count toward your limit. If you get this exception when running
  14025. // a command immediately after creating the organization, wait one hour and
  14026. // try again. After an hour, if the command continues to fail with this error,
  14027. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  14028. //
  14029. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  14030. // register the management account of the organization as a delegated administrator
  14031. // for an Amazon Web Services service integrated with Organizations. You
  14032. // can designate only a member account as a delegated administrator.
  14033. //
  14034. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  14035. // account. To close the management account for the organization, you must
  14036. // first either remove or close all member accounts in the organization.
  14037. // Follow standard account closure process using root credentials.​
  14038. //
  14039. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  14040. // an account that is registered as a delegated administrator for a service
  14041. // integrated with your organization. To complete this operation, you must
  14042. // first deregister this account as a delegated administrator.
  14043. //
  14044. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  14045. // for the past 30 days.
  14046. //
  14047. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  14048. // of accounts that you can close at a time. ​
  14049. //
  14050. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  14051. // organization in the specified region, you must enable all features mode.
  14052. //
  14053. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  14054. // an Amazon Web Services account as a delegated administrator for an Amazon
  14055. // Web Services service that already has a delegated administrator. To complete
  14056. // this operation, you must first deregister any existing delegated administrators
  14057. // for this service.
  14058. //
  14059. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  14060. // valid for a limited period of time. You must resubmit the request and
  14061. // generate a new verfication code.
  14062. //
  14063. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  14064. // handshakes that you can send in one day.
  14065. //
  14066. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  14067. // supported payment method is associated with the account. Amazon Web Services
  14068. // does not support cards issued by financial institutions in Russia or Belarus.
  14069. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  14070. //
  14071. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  14072. // in this organization, you first must migrate the organization's management
  14073. // account to the marketplace that corresponds to the management account's
  14074. // address. For example, accounts with India addresses must be associated
  14075. // with the AISPL marketplace. All accounts in an organization must be associated
  14076. // with the same marketplace.
  14077. //
  14078. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  14079. // Web Services /> Regions in China. To create an organization, the master
  14080. // must have a valid business license. For more information, contact customer
  14081. // support.
  14082. //
  14083. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  14084. // must first provide a valid contact address and phone number for the management
  14085. // account. Then try the operation again.
  14086. //
  14087. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  14088. // management account must have an associated account in the Amazon Web Services
  14089. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  14090. // in the Amazon Web Services GovCloud User Guide.
  14091. //
  14092. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  14093. // with this management account, you first must associate a valid payment
  14094. // instrument, such as a credit card, with the account. Follow the steps
  14095. // at To leave an organization when all required account information has
  14096. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  14097. // in the Organizations User Guide.
  14098. //
  14099. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  14100. // to register more delegated administrators than allowed for the service
  14101. // principal.
  14102. //
  14103. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  14104. // number of policies of a certain type that can be attached to an entity
  14105. // at one time.
  14106. //
  14107. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  14108. // on this resource.
  14109. //
  14110. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  14111. // with this member account, you first must associate a valid payment instrument,
  14112. // such as a credit card, with the account. Follow the steps at To leave
  14113. // an organization when all required account information has not yet been
  14114. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  14115. // in the Organizations User Guide.
  14116. //
  14117. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  14118. // policy from an entity that would cause the entity to have fewer than the
  14119. // minimum number of policies of a certain type required.
  14120. //
  14121. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  14122. // that requires the organization to be configured to support all features.
  14123. // An organization that supports only consolidated billing features can't
  14124. // perform this operation.
  14125. //
  14126. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  14127. // too many levels deep.
  14128. //
  14129. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  14130. // that you can have in an organization.
  14131. //
  14132. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  14133. // is larger than the maximum size.
  14134. //
  14135. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  14136. // policies that you can have in an organization.
  14137. //
  14138. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  14139. // before you enabled service access. Call the EnableAWSServiceAccess API
  14140. // first.
  14141. //
  14142. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  14143. // tags that are not compliant with the tag policy requirements for this
  14144. // account.
  14145. //
  14146. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  14147. // there is a waiting period before you can remove it from the organization.
  14148. // If you get an error that indicates that a wait period is required, try
  14149. // again in a few days.
  14150. //
  14151. // - InvalidInputException
  14152. // The requested operation failed because you provided invalid values for one
  14153. // or more of the request parameters. This exception includes a reason that
  14154. // contains additional information about the violated limit:
  14155. //
  14156. // Some of the reasons in the following list might not be applicable to this
  14157. // specific API or operation.
  14158. //
  14159. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  14160. // the same entity.
  14161. //
  14162. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  14163. // Services and can't be modified.
  14164. //
  14165. // - INPUT_REQUIRED: You must include a value for all required parameters.
  14166. //
  14167. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  14168. // for the invited account owner.
  14169. //
  14170. // - INVALID_ENUM: You specified an invalid value.
  14171. //
  14172. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  14173. //
  14174. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  14175. // characters.
  14176. //
  14177. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  14178. // at least one invalid value.
  14179. //
  14180. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  14181. // from the response to a previous call of the operation.
  14182. //
  14183. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  14184. // organization, or email) as a party.
  14185. //
  14186. // - INVALID_PATTERN: You provided a value that doesn't match the required
  14187. // pattern.
  14188. //
  14189. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  14190. // match the required pattern.
  14191. //
  14192. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  14193. // name can't begin with the reserved prefix AWSServiceRoleFor.
  14194. //
  14195. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  14196. // Name (ARN) for the organization.
  14197. //
  14198. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  14199. //
  14200. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  14201. // tag. You can’t add, edit, or delete system tag keys because they're
  14202. // reserved for Amazon Web Services use. System tags don’t count against
  14203. // your tags per resource limit.
  14204. //
  14205. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  14206. // for the operation.
  14207. //
  14208. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  14209. // than allowed.
  14210. //
  14211. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  14212. // value than allowed.
  14213. //
  14214. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  14215. // than allowed.
  14216. //
  14217. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  14218. // value than allowed.
  14219. //
  14220. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  14221. // between entities in the same root.
  14222. //
  14223. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  14224. // target entity.
  14225. //
  14226. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  14227. // isn't recognized.
  14228. //
  14229. // - TooManyRequestsException
  14230. // You have sent too many requests in too short a period of time. The quota
  14231. // helps protect against denial-of-service attacks. Try again later.
  14232. //
  14233. // For information about quotas that affect Organizations, see Quotas for Organizations
  14234. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  14235. // the Organizations User Guide.
  14236. //
  14237. // - ServiceException
  14238. // Organizations can't complete your request because of an internal service
  14239. // error. Try again later.
  14240. //
  14241. // - UnsupportedAPIEndpointException
  14242. // This action isn't available in the current Amazon Web Services Region.
  14243. //
  14244. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/RegisterDelegatedAdministrator
  14245. func (c *Organizations) RegisterDelegatedAdministrator(input *RegisterDelegatedAdministratorInput) (*RegisterDelegatedAdministratorOutput, error) {
  14246. req, out := c.RegisterDelegatedAdministratorRequest(input)
  14247. return out, req.Send()
  14248. }
  14249. // RegisterDelegatedAdministratorWithContext is the same as RegisterDelegatedAdministrator with the addition of
  14250. // the ability to pass a context and additional request options.
  14251. //
  14252. // See RegisterDelegatedAdministrator for details on how to use this API operation.
  14253. //
  14254. // The context must be non-nil and will be used for request cancellation. If
  14255. // the context is nil a panic will occur. In the future the SDK may create
  14256. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  14257. // for more information on using Contexts.
  14258. func (c *Organizations) RegisterDelegatedAdministratorWithContext(ctx aws.Context, input *RegisterDelegatedAdministratorInput, opts ...request.Option) (*RegisterDelegatedAdministratorOutput, error) {
  14259. req, out := c.RegisterDelegatedAdministratorRequest(input)
  14260. req.SetContext(ctx)
  14261. req.ApplyOptions(opts...)
  14262. return out, req.Send()
  14263. }
  14264. const opRemoveAccountFromOrganization = "RemoveAccountFromOrganization"
  14265. // RemoveAccountFromOrganizationRequest generates a "aws/request.Request" representing the
  14266. // client's request for the RemoveAccountFromOrganization operation. The "output" return
  14267. // value will be populated with the request's response once the request completes
  14268. // successfully.
  14269. //
  14270. // Use "Send" method on the returned Request to send the API call to the service.
  14271. // the "output" return value is not valid until after Send returns without error.
  14272. //
  14273. // See RemoveAccountFromOrganization for more information on using the RemoveAccountFromOrganization
  14274. // API call, and error handling.
  14275. //
  14276. // This method is useful when you want to inject custom logic or configuration
  14277. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  14278. //
  14279. // // Example sending a request using the RemoveAccountFromOrganizationRequest method.
  14280. // req, resp := client.RemoveAccountFromOrganizationRequest(params)
  14281. //
  14282. // err := req.Send()
  14283. // if err == nil { // resp is now filled
  14284. // fmt.Println(resp)
  14285. // }
  14286. //
  14287. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/RemoveAccountFromOrganization
  14288. func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccountFromOrganizationInput) (req *request.Request, output *RemoveAccountFromOrganizationOutput) {
  14289. op := &request.Operation{
  14290. Name: opRemoveAccountFromOrganization,
  14291. HTTPMethod: "POST",
  14292. HTTPPath: "/",
  14293. }
  14294. if input == nil {
  14295. input = &RemoveAccountFromOrganizationInput{}
  14296. }
  14297. output = &RemoveAccountFromOrganizationOutput{}
  14298. req = c.newRequest(op, input, output)
  14299. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  14300. return
  14301. }
  14302. // RemoveAccountFromOrganization API operation for AWS Organizations.
  14303. //
  14304. // Removes the specified account from the organization.
  14305. //
  14306. // The removed account becomes a standalone account that isn't a member of any
  14307. // organization. It's no longer subject to any policies and is responsible for
  14308. // its own bill payments. The organization's management account is no longer
  14309. // charged for any expenses accrued by the member account after it's removed
  14310. // from the organization.
  14311. //
  14312. // This operation can be called only from the organization's management account.
  14313. // Member accounts can remove themselves with LeaveOrganization instead.
  14314. //
  14315. // - You can remove an account from your organization only if the account
  14316. // is configured with the information required to operate as a standalone
  14317. // account. When you create an account in an organization using the Organizations
  14318. // console, API, or CLI commands, the information required of standalone
  14319. // accounts is not automatically collected. For an account that you want
  14320. // to make standalone, you must choose a support plan, provide and verify
  14321. // the required contact information, and provide a current payment method.
  14322. // Amazon Web Services uses the payment method to charge for any billable
  14323. // (not free tier) Amazon Web Services activity that occurs while the account
  14324. // isn't attached to an organization. To remove an account that doesn't yet
  14325. // have this information, you must sign in as the member account and follow
  14326. // the steps at To leave an organization when all required account information
  14327. // has not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  14328. // in the Organizations User Guide.
  14329. //
  14330. // - The account that you want to leave must not be a delegated administrator
  14331. // account for any Amazon Web Services service enabled for your organization.
  14332. // If the account is a delegated administrator, you must first change the
  14333. // delegated administrator account to another account that is remaining in
  14334. // the organization.
  14335. //
  14336. // - After the account leaves the organization, all tags that were attached
  14337. // to the account object in the organization are deleted. Amazon Web Services
  14338. // accounts outside of an organization do not support tags.
  14339. //
  14340. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  14341. // with awserr.Error's Code and Message methods to get detailed information about
  14342. // the error.
  14343. //
  14344. // See the AWS API reference guide for AWS Organizations's
  14345. // API operation RemoveAccountFromOrganization for usage and error information.
  14346. //
  14347. // Returned Error Types:
  14348. //
  14349. // - AccessDeniedException
  14350. // You don't have permissions to perform the requested operation. The user or
  14351. // role that is making the request must have at least one IAM permissions policy
  14352. // attached that grants the required permissions. For more information, see
  14353. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  14354. // in the IAM User Guide.
  14355. //
  14356. // - AccountNotFoundException
  14357. // We can't find an Amazon Web Services account with the AccountId that you
  14358. // specified, or the account whose credentials you used to make this request
  14359. // isn't a member of an organization.
  14360. //
  14361. // - AWSOrganizationsNotInUseException
  14362. // Your account isn't a member of an organization. To make this request, you
  14363. // must use the credentials of an account that belongs to an organization.
  14364. //
  14365. // - ConcurrentModificationException
  14366. // The target of the operation is currently being modified by a different request.
  14367. // Try again later.
  14368. //
  14369. // - ConstraintViolationException
  14370. // Performing this operation violates a minimum or maximum value limit. For
  14371. // example, attempting to remove the last service control policy (SCP) from
  14372. // an OU or root, inviting or creating too many accounts to the organization,
  14373. // or attaching too many policies to an account, OU, or root. This exception
  14374. // includes a reason that contains additional information about the violated
  14375. // limit:
  14376. //
  14377. // Some of the reasons in the following list might not be applicable to this
  14378. // specific API or operation.
  14379. //
  14380. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  14381. // account from the organization. You can't remove the management account.
  14382. // Instead, after you remove all member accounts, delete the organization
  14383. // itself.
  14384. //
  14385. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  14386. // an account from the organization that doesn't yet have enough information
  14387. // to exist as a standalone account. This account requires you to first complete
  14388. // phone verification. Follow the steps at Removing a member account from
  14389. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  14390. // in the Organizations User Guide.
  14391. //
  14392. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  14393. // of accounts that you can create in one day.
  14394. //
  14395. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  14396. // the number of accounts in an organization. If you need more accounts,
  14397. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  14398. // to request an increase in your limit. Or the number of invitations that
  14399. // you tried to send would cause you to exceed the limit of accounts in your
  14400. // organization. Send fewer invitations or contact Amazon Web Services Support
  14401. // to request an increase in the number of accounts. Deleted and closed accounts
  14402. // still count toward your limit. If you get this exception when running
  14403. // a command immediately after creating the organization, wait one hour and
  14404. // try again. After an hour, if the command continues to fail with this error,
  14405. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  14406. //
  14407. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  14408. // register the management account of the organization as a delegated administrator
  14409. // for an Amazon Web Services service integrated with Organizations. You
  14410. // can designate only a member account as a delegated administrator.
  14411. //
  14412. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  14413. // account. To close the management account for the organization, you must
  14414. // first either remove or close all member accounts in the organization.
  14415. // Follow standard account closure process using root credentials.​
  14416. //
  14417. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  14418. // an account that is registered as a delegated administrator for a service
  14419. // integrated with your organization. To complete this operation, you must
  14420. // first deregister this account as a delegated administrator.
  14421. //
  14422. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  14423. // for the past 30 days.
  14424. //
  14425. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  14426. // of accounts that you can close at a time. ​
  14427. //
  14428. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  14429. // organization in the specified region, you must enable all features mode.
  14430. //
  14431. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  14432. // an Amazon Web Services account as a delegated administrator for an Amazon
  14433. // Web Services service that already has a delegated administrator. To complete
  14434. // this operation, you must first deregister any existing delegated administrators
  14435. // for this service.
  14436. //
  14437. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  14438. // valid for a limited period of time. You must resubmit the request and
  14439. // generate a new verfication code.
  14440. //
  14441. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  14442. // handshakes that you can send in one day.
  14443. //
  14444. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  14445. // supported payment method is associated with the account. Amazon Web Services
  14446. // does not support cards issued by financial institutions in Russia or Belarus.
  14447. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  14448. //
  14449. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  14450. // in this organization, you first must migrate the organization's management
  14451. // account to the marketplace that corresponds to the management account's
  14452. // address. For example, accounts with India addresses must be associated
  14453. // with the AISPL marketplace. All accounts in an organization must be associated
  14454. // with the same marketplace.
  14455. //
  14456. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  14457. // Web Services /> Regions in China. To create an organization, the master
  14458. // must have a valid business license. For more information, contact customer
  14459. // support.
  14460. //
  14461. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  14462. // must first provide a valid contact address and phone number for the management
  14463. // account. Then try the operation again.
  14464. //
  14465. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  14466. // management account must have an associated account in the Amazon Web Services
  14467. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  14468. // in the Amazon Web Services GovCloud User Guide.
  14469. //
  14470. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  14471. // with this management account, you first must associate a valid payment
  14472. // instrument, such as a credit card, with the account. Follow the steps
  14473. // at To leave an organization when all required account information has
  14474. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  14475. // in the Organizations User Guide.
  14476. //
  14477. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  14478. // to register more delegated administrators than allowed for the service
  14479. // principal.
  14480. //
  14481. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  14482. // number of policies of a certain type that can be attached to an entity
  14483. // at one time.
  14484. //
  14485. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  14486. // on this resource.
  14487. //
  14488. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  14489. // with this member account, you first must associate a valid payment instrument,
  14490. // such as a credit card, with the account. Follow the steps at To leave
  14491. // an organization when all required account information has not yet been
  14492. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  14493. // in the Organizations User Guide.
  14494. //
  14495. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  14496. // policy from an entity that would cause the entity to have fewer than the
  14497. // minimum number of policies of a certain type required.
  14498. //
  14499. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  14500. // that requires the organization to be configured to support all features.
  14501. // An organization that supports only consolidated billing features can't
  14502. // perform this operation.
  14503. //
  14504. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  14505. // too many levels deep.
  14506. //
  14507. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  14508. // that you can have in an organization.
  14509. //
  14510. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  14511. // is larger than the maximum size.
  14512. //
  14513. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  14514. // policies that you can have in an organization.
  14515. //
  14516. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  14517. // before you enabled service access. Call the EnableAWSServiceAccess API
  14518. // first.
  14519. //
  14520. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  14521. // tags that are not compliant with the tag policy requirements for this
  14522. // account.
  14523. //
  14524. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  14525. // there is a waiting period before you can remove it from the organization.
  14526. // If you get an error that indicates that a wait period is required, try
  14527. // again in a few days.
  14528. //
  14529. // - InvalidInputException
  14530. // The requested operation failed because you provided invalid values for one
  14531. // or more of the request parameters. This exception includes a reason that
  14532. // contains additional information about the violated limit:
  14533. //
  14534. // Some of the reasons in the following list might not be applicable to this
  14535. // specific API or operation.
  14536. //
  14537. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  14538. // the same entity.
  14539. //
  14540. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  14541. // Services and can't be modified.
  14542. //
  14543. // - INPUT_REQUIRED: You must include a value for all required parameters.
  14544. //
  14545. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  14546. // for the invited account owner.
  14547. //
  14548. // - INVALID_ENUM: You specified an invalid value.
  14549. //
  14550. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  14551. //
  14552. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  14553. // characters.
  14554. //
  14555. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  14556. // at least one invalid value.
  14557. //
  14558. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  14559. // from the response to a previous call of the operation.
  14560. //
  14561. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  14562. // organization, or email) as a party.
  14563. //
  14564. // - INVALID_PATTERN: You provided a value that doesn't match the required
  14565. // pattern.
  14566. //
  14567. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  14568. // match the required pattern.
  14569. //
  14570. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  14571. // name can't begin with the reserved prefix AWSServiceRoleFor.
  14572. //
  14573. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  14574. // Name (ARN) for the organization.
  14575. //
  14576. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  14577. //
  14578. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  14579. // tag. You can’t add, edit, or delete system tag keys because they're
  14580. // reserved for Amazon Web Services use. System tags don’t count against
  14581. // your tags per resource limit.
  14582. //
  14583. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  14584. // for the operation.
  14585. //
  14586. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  14587. // than allowed.
  14588. //
  14589. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  14590. // value than allowed.
  14591. //
  14592. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  14593. // than allowed.
  14594. //
  14595. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  14596. // value than allowed.
  14597. //
  14598. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  14599. // between entities in the same root.
  14600. //
  14601. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  14602. // target entity.
  14603. //
  14604. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  14605. // isn't recognized.
  14606. //
  14607. // - MasterCannotLeaveOrganizationException
  14608. // You can't remove a management account from an organization. If you want the
  14609. // management account to become a member account in another organization, you
  14610. // must first delete the current organization of the management account.
  14611. //
  14612. // - ServiceException
  14613. // Organizations can't complete your request because of an internal service
  14614. // error. Try again later.
  14615. //
  14616. // - TooManyRequestsException
  14617. // You have sent too many requests in too short a period of time. The quota
  14618. // helps protect against denial-of-service attacks. Try again later.
  14619. //
  14620. // For information about quotas that affect Organizations, see Quotas for Organizations
  14621. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  14622. // the Organizations User Guide.
  14623. //
  14624. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/RemoveAccountFromOrganization
  14625. func (c *Organizations) RemoveAccountFromOrganization(input *RemoveAccountFromOrganizationInput) (*RemoveAccountFromOrganizationOutput, error) {
  14626. req, out := c.RemoveAccountFromOrganizationRequest(input)
  14627. return out, req.Send()
  14628. }
  14629. // RemoveAccountFromOrganizationWithContext is the same as RemoveAccountFromOrganization with the addition of
  14630. // the ability to pass a context and additional request options.
  14631. //
  14632. // See RemoveAccountFromOrganization for details on how to use this API operation.
  14633. //
  14634. // The context must be non-nil and will be used for request cancellation. If
  14635. // the context is nil a panic will occur. In the future the SDK may create
  14636. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  14637. // for more information on using Contexts.
  14638. func (c *Organizations) RemoveAccountFromOrganizationWithContext(ctx aws.Context, input *RemoveAccountFromOrganizationInput, opts ...request.Option) (*RemoveAccountFromOrganizationOutput, error) {
  14639. req, out := c.RemoveAccountFromOrganizationRequest(input)
  14640. req.SetContext(ctx)
  14641. req.ApplyOptions(opts...)
  14642. return out, req.Send()
  14643. }
  14644. const opTagResource = "TagResource"
  14645. // TagResourceRequest generates a "aws/request.Request" representing the
  14646. // client's request for the TagResource operation. The "output" return
  14647. // value will be populated with the request's response once the request completes
  14648. // successfully.
  14649. //
  14650. // Use "Send" method on the returned Request to send the API call to the service.
  14651. // the "output" return value is not valid until after Send returns without error.
  14652. //
  14653. // See TagResource for more information on using the TagResource
  14654. // API call, and error handling.
  14655. //
  14656. // This method is useful when you want to inject custom logic or configuration
  14657. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  14658. //
  14659. // // Example sending a request using the TagResourceRequest method.
  14660. // req, resp := client.TagResourceRequest(params)
  14661. //
  14662. // err := req.Send()
  14663. // if err == nil { // resp is now filled
  14664. // fmt.Println(resp)
  14665. // }
  14666. //
  14667. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/TagResource
  14668. func (c *Organizations) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
  14669. op := &request.Operation{
  14670. Name: opTagResource,
  14671. HTTPMethod: "POST",
  14672. HTTPPath: "/",
  14673. }
  14674. if input == nil {
  14675. input = &TagResourceInput{}
  14676. }
  14677. output = &TagResourceOutput{}
  14678. req = c.newRequest(op, input, output)
  14679. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  14680. return
  14681. }
  14682. // TagResource API operation for AWS Organizations.
  14683. //
  14684. // Adds one or more tags to the specified resource.
  14685. //
  14686. // Currently, you can attach tags to the following resources in Organizations.
  14687. //
  14688. // - Amazon Web Services account
  14689. //
  14690. // - Organization root
  14691. //
  14692. // - Organizational unit (OU)
  14693. //
  14694. // - Policy (any type)
  14695. //
  14696. // This operation can be called only from the organization's management account.
  14697. //
  14698. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  14699. // with awserr.Error's Code and Message methods to get detailed information about
  14700. // the error.
  14701. //
  14702. // See the AWS API reference guide for AWS Organizations's
  14703. // API operation TagResource for usage and error information.
  14704. //
  14705. // Returned Error Types:
  14706. //
  14707. // - AccessDeniedException
  14708. // You don't have permissions to perform the requested operation. The user or
  14709. // role that is making the request must have at least one IAM permissions policy
  14710. // attached that grants the required permissions. For more information, see
  14711. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  14712. // in the IAM User Guide.
  14713. //
  14714. // - ConcurrentModificationException
  14715. // The target of the operation is currently being modified by a different request.
  14716. // Try again later.
  14717. //
  14718. // - AWSOrganizationsNotInUseException
  14719. // Your account isn't a member of an organization. To make this request, you
  14720. // must use the credentials of an account that belongs to an organization.
  14721. //
  14722. // - TargetNotFoundException
  14723. // We can't find a root, OU, account, or policy with the TargetId that you specified.
  14724. //
  14725. // - ConstraintViolationException
  14726. // Performing this operation violates a minimum or maximum value limit. For
  14727. // example, attempting to remove the last service control policy (SCP) from
  14728. // an OU or root, inviting or creating too many accounts to the organization,
  14729. // or attaching too many policies to an account, OU, or root. This exception
  14730. // includes a reason that contains additional information about the violated
  14731. // limit:
  14732. //
  14733. // Some of the reasons in the following list might not be applicable to this
  14734. // specific API or operation.
  14735. //
  14736. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  14737. // account from the organization. You can't remove the management account.
  14738. // Instead, after you remove all member accounts, delete the organization
  14739. // itself.
  14740. //
  14741. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  14742. // an account from the organization that doesn't yet have enough information
  14743. // to exist as a standalone account. This account requires you to first complete
  14744. // phone verification. Follow the steps at Removing a member account from
  14745. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  14746. // in the Organizations User Guide.
  14747. //
  14748. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  14749. // of accounts that you can create in one day.
  14750. //
  14751. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  14752. // the number of accounts in an organization. If you need more accounts,
  14753. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  14754. // to request an increase in your limit. Or the number of invitations that
  14755. // you tried to send would cause you to exceed the limit of accounts in your
  14756. // organization. Send fewer invitations or contact Amazon Web Services Support
  14757. // to request an increase in the number of accounts. Deleted and closed accounts
  14758. // still count toward your limit. If you get this exception when running
  14759. // a command immediately after creating the organization, wait one hour and
  14760. // try again. After an hour, if the command continues to fail with this error,
  14761. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  14762. //
  14763. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  14764. // register the management account of the organization as a delegated administrator
  14765. // for an Amazon Web Services service integrated with Organizations. You
  14766. // can designate only a member account as a delegated administrator.
  14767. //
  14768. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  14769. // account. To close the management account for the organization, you must
  14770. // first either remove or close all member accounts in the organization.
  14771. // Follow standard account closure process using root credentials.​
  14772. //
  14773. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  14774. // an account that is registered as a delegated administrator for a service
  14775. // integrated with your organization. To complete this operation, you must
  14776. // first deregister this account as a delegated administrator.
  14777. //
  14778. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  14779. // for the past 30 days.
  14780. //
  14781. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  14782. // of accounts that you can close at a time. ​
  14783. //
  14784. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  14785. // organization in the specified region, you must enable all features mode.
  14786. //
  14787. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  14788. // an Amazon Web Services account as a delegated administrator for an Amazon
  14789. // Web Services service that already has a delegated administrator. To complete
  14790. // this operation, you must first deregister any existing delegated administrators
  14791. // for this service.
  14792. //
  14793. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  14794. // valid for a limited period of time. You must resubmit the request and
  14795. // generate a new verfication code.
  14796. //
  14797. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  14798. // handshakes that you can send in one day.
  14799. //
  14800. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  14801. // supported payment method is associated with the account. Amazon Web Services
  14802. // does not support cards issued by financial institutions in Russia or Belarus.
  14803. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  14804. //
  14805. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  14806. // in this organization, you first must migrate the organization's management
  14807. // account to the marketplace that corresponds to the management account's
  14808. // address. For example, accounts with India addresses must be associated
  14809. // with the AISPL marketplace. All accounts in an organization must be associated
  14810. // with the same marketplace.
  14811. //
  14812. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  14813. // Web Services /> Regions in China. To create an organization, the master
  14814. // must have a valid business license. For more information, contact customer
  14815. // support.
  14816. //
  14817. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  14818. // must first provide a valid contact address and phone number for the management
  14819. // account. Then try the operation again.
  14820. //
  14821. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  14822. // management account must have an associated account in the Amazon Web Services
  14823. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  14824. // in the Amazon Web Services GovCloud User Guide.
  14825. //
  14826. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  14827. // with this management account, you first must associate a valid payment
  14828. // instrument, such as a credit card, with the account. Follow the steps
  14829. // at To leave an organization when all required account information has
  14830. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  14831. // in the Organizations User Guide.
  14832. //
  14833. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  14834. // to register more delegated administrators than allowed for the service
  14835. // principal.
  14836. //
  14837. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  14838. // number of policies of a certain type that can be attached to an entity
  14839. // at one time.
  14840. //
  14841. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  14842. // on this resource.
  14843. //
  14844. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  14845. // with this member account, you first must associate a valid payment instrument,
  14846. // such as a credit card, with the account. Follow the steps at To leave
  14847. // an organization when all required account information has not yet been
  14848. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  14849. // in the Organizations User Guide.
  14850. //
  14851. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  14852. // policy from an entity that would cause the entity to have fewer than the
  14853. // minimum number of policies of a certain type required.
  14854. //
  14855. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  14856. // that requires the organization to be configured to support all features.
  14857. // An organization that supports only consolidated billing features can't
  14858. // perform this operation.
  14859. //
  14860. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  14861. // too many levels deep.
  14862. //
  14863. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  14864. // that you can have in an organization.
  14865. //
  14866. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  14867. // is larger than the maximum size.
  14868. //
  14869. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  14870. // policies that you can have in an organization.
  14871. //
  14872. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  14873. // before you enabled service access. Call the EnableAWSServiceAccess API
  14874. // first.
  14875. //
  14876. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  14877. // tags that are not compliant with the tag policy requirements for this
  14878. // account.
  14879. //
  14880. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  14881. // there is a waiting period before you can remove it from the organization.
  14882. // If you get an error that indicates that a wait period is required, try
  14883. // again in a few days.
  14884. //
  14885. // - InvalidInputException
  14886. // The requested operation failed because you provided invalid values for one
  14887. // or more of the request parameters. This exception includes a reason that
  14888. // contains additional information about the violated limit:
  14889. //
  14890. // Some of the reasons in the following list might not be applicable to this
  14891. // specific API or operation.
  14892. //
  14893. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  14894. // the same entity.
  14895. //
  14896. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  14897. // Services and can't be modified.
  14898. //
  14899. // - INPUT_REQUIRED: You must include a value for all required parameters.
  14900. //
  14901. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  14902. // for the invited account owner.
  14903. //
  14904. // - INVALID_ENUM: You specified an invalid value.
  14905. //
  14906. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  14907. //
  14908. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  14909. // characters.
  14910. //
  14911. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  14912. // at least one invalid value.
  14913. //
  14914. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  14915. // from the response to a previous call of the operation.
  14916. //
  14917. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  14918. // organization, or email) as a party.
  14919. //
  14920. // - INVALID_PATTERN: You provided a value that doesn't match the required
  14921. // pattern.
  14922. //
  14923. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  14924. // match the required pattern.
  14925. //
  14926. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  14927. // name can't begin with the reserved prefix AWSServiceRoleFor.
  14928. //
  14929. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  14930. // Name (ARN) for the organization.
  14931. //
  14932. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  14933. //
  14934. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  14935. // tag. You can’t add, edit, or delete system tag keys because they're
  14936. // reserved for Amazon Web Services use. System tags don’t count against
  14937. // your tags per resource limit.
  14938. //
  14939. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  14940. // for the operation.
  14941. //
  14942. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  14943. // than allowed.
  14944. //
  14945. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  14946. // value than allowed.
  14947. //
  14948. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  14949. // than allowed.
  14950. //
  14951. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  14952. // value than allowed.
  14953. //
  14954. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  14955. // between entities in the same root.
  14956. //
  14957. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  14958. // target entity.
  14959. //
  14960. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  14961. // isn't recognized.
  14962. //
  14963. // - ServiceException
  14964. // Organizations can't complete your request because of an internal service
  14965. // error. Try again later.
  14966. //
  14967. // - TooManyRequestsException
  14968. // You have sent too many requests in too short a period of time. The quota
  14969. // helps protect against denial-of-service attacks. Try again later.
  14970. //
  14971. // For information about quotas that affect Organizations, see Quotas for Organizations
  14972. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  14973. // the Organizations User Guide.
  14974. //
  14975. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/TagResource
  14976. func (c *Organizations) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
  14977. req, out := c.TagResourceRequest(input)
  14978. return out, req.Send()
  14979. }
  14980. // TagResourceWithContext is the same as TagResource with the addition of
  14981. // the ability to pass a context and additional request options.
  14982. //
  14983. // See TagResource for details on how to use this API operation.
  14984. //
  14985. // The context must be non-nil and will be used for request cancellation. If
  14986. // the context is nil a panic will occur. In the future the SDK may create
  14987. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  14988. // for more information on using Contexts.
  14989. func (c *Organizations) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
  14990. req, out := c.TagResourceRequest(input)
  14991. req.SetContext(ctx)
  14992. req.ApplyOptions(opts...)
  14993. return out, req.Send()
  14994. }
  14995. const opUntagResource = "UntagResource"
  14996. // UntagResourceRequest generates a "aws/request.Request" representing the
  14997. // client's request for the UntagResource operation. The "output" return
  14998. // value will be populated with the request's response once the request completes
  14999. // successfully.
  15000. //
  15001. // Use "Send" method on the returned Request to send the API call to the service.
  15002. // the "output" return value is not valid until after Send returns without error.
  15003. //
  15004. // See UntagResource for more information on using the UntagResource
  15005. // API call, and error handling.
  15006. //
  15007. // This method is useful when you want to inject custom logic or configuration
  15008. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  15009. //
  15010. // // Example sending a request using the UntagResourceRequest method.
  15011. // req, resp := client.UntagResourceRequest(params)
  15012. //
  15013. // err := req.Send()
  15014. // if err == nil { // resp is now filled
  15015. // fmt.Println(resp)
  15016. // }
  15017. //
  15018. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UntagResource
  15019. func (c *Organizations) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
  15020. op := &request.Operation{
  15021. Name: opUntagResource,
  15022. HTTPMethod: "POST",
  15023. HTTPPath: "/",
  15024. }
  15025. if input == nil {
  15026. input = &UntagResourceInput{}
  15027. }
  15028. output = &UntagResourceOutput{}
  15029. req = c.newRequest(op, input, output)
  15030. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  15031. return
  15032. }
  15033. // UntagResource API operation for AWS Organizations.
  15034. //
  15035. // Removes any tags with the specified keys from the specified resource.
  15036. //
  15037. // You can attach tags to the following resources in Organizations.
  15038. //
  15039. // - Amazon Web Services account
  15040. //
  15041. // - Organization root
  15042. //
  15043. // - Organizational unit (OU)
  15044. //
  15045. // - Policy (any type)
  15046. //
  15047. // This operation can be called only from the organization's management account.
  15048. //
  15049. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  15050. // with awserr.Error's Code and Message methods to get detailed information about
  15051. // the error.
  15052. //
  15053. // See the AWS API reference guide for AWS Organizations's
  15054. // API operation UntagResource for usage and error information.
  15055. //
  15056. // Returned Error Types:
  15057. //
  15058. // - AccessDeniedException
  15059. // You don't have permissions to perform the requested operation. The user or
  15060. // role that is making the request must have at least one IAM permissions policy
  15061. // attached that grants the required permissions. For more information, see
  15062. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  15063. // in the IAM User Guide.
  15064. //
  15065. // - ConcurrentModificationException
  15066. // The target of the operation is currently being modified by a different request.
  15067. // Try again later.
  15068. //
  15069. // - AWSOrganizationsNotInUseException
  15070. // Your account isn't a member of an organization. To make this request, you
  15071. // must use the credentials of an account that belongs to an organization.
  15072. //
  15073. // - TargetNotFoundException
  15074. // We can't find a root, OU, account, or policy with the TargetId that you specified.
  15075. //
  15076. // - ConstraintViolationException
  15077. // Performing this operation violates a minimum or maximum value limit. For
  15078. // example, attempting to remove the last service control policy (SCP) from
  15079. // an OU or root, inviting or creating too many accounts to the organization,
  15080. // or attaching too many policies to an account, OU, or root. This exception
  15081. // includes a reason that contains additional information about the violated
  15082. // limit:
  15083. //
  15084. // Some of the reasons in the following list might not be applicable to this
  15085. // specific API or operation.
  15086. //
  15087. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  15088. // account from the organization. You can't remove the management account.
  15089. // Instead, after you remove all member accounts, delete the organization
  15090. // itself.
  15091. //
  15092. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  15093. // an account from the organization that doesn't yet have enough information
  15094. // to exist as a standalone account. This account requires you to first complete
  15095. // phone verification. Follow the steps at Removing a member account from
  15096. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  15097. // in the Organizations User Guide.
  15098. //
  15099. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  15100. // of accounts that you can create in one day.
  15101. //
  15102. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  15103. // the number of accounts in an organization. If you need more accounts,
  15104. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  15105. // to request an increase in your limit. Or the number of invitations that
  15106. // you tried to send would cause you to exceed the limit of accounts in your
  15107. // organization. Send fewer invitations or contact Amazon Web Services Support
  15108. // to request an increase in the number of accounts. Deleted and closed accounts
  15109. // still count toward your limit. If you get this exception when running
  15110. // a command immediately after creating the organization, wait one hour and
  15111. // try again. After an hour, if the command continues to fail with this error,
  15112. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  15113. //
  15114. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  15115. // register the management account of the organization as a delegated administrator
  15116. // for an Amazon Web Services service integrated with Organizations. You
  15117. // can designate only a member account as a delegated administrator.
  15118. //
  15119. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  15120. // account. To close the management account for the organization, you must
  15121. // first either remove or close all member accounts in the organization.
  15122. // Follow standard account closure process using root credentials.​
  15123. //
  15124. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  15125. // an account that is registered as a delegated administrator for a service
  15126. // integrated with your organization. To complete this operation, you must
  15127. // first deregister this account as a delegated administrator.
  15128. //
  15129. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  15130. // for the past 30 days.
  15131. //
  15132. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  15133. // of accounts that you can close at a time. ​
  15134. //
  15135. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  15136. // organization in the specified region, you must enable all features mode.
  15137. //
  15138. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  15139. // an Amazon Web Services account as a delegated administrator for an Amazon
  15140. // Web Services service that already has a delegated administrator. To complete
  15141. // this operation, you must first deregister any existing delegated administrators
  15142. // for this service.
  15143. //
  15144. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  15145. // valid for a limited period of time. You must resubmit the request and
  15146. // generate a new verfication code.
  15147. //
  15148. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  15149. // handshakes that you can send in one day.
  15150. //
  15151. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  15152. // supported payment method is associated with the account. Amazon Web Services
  15153. // does not support cards issued by financial institutions in Russia or Belarus.
  15154. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  15155. //
  15156. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  15157. // in this organization, you first must migrate the organization's management
  15158. // account to the marketplace that corresponds to the management account's
  15159. // address. For example, accounts with India addresses must be associated
  15160. // with the AISPL marketplace. All accounts in an organization must be associated
  15161. // with the same marketplace.
  15162. //
  15163. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  15164. // Web Services /> Regions in China. To create an organization, the master
  15165. // must have a valid business license. For more information, contact customer
  15166. // support.
  15167. //
  15168. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  15169. // must first provide a valid contact address and phone number for the management
  15170. // account. Then try the operation again.
  15171. //
  15172. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  15173. // management account must have an associated account in the Amazon Web Services
  15174. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  15175. // in the Amazon Web Services GovCloud User Guide.
  15176. //
  15177. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  15178. // with this management account, you first must associate a valid payment
  15179. // instrument, such as a credit card, with the account. Follow the steps
  15180. // at To leave an organization when all required account information has
  15181. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  15182. // in the Organizations User Guide.
  15183. //
  15184. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  15185. // to register more delegated administrators than allowed for the service
  15186. // principal.
  15187. //
  15188. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  15189. // number of policies of a certain type that can be attached to an entity
  15190. // at one time.
  15191. //
  15192. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  15193. // on this resource.
  15194. //
  15195. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  15196. // with this member account, you first must associate a valid payment instrument,
  15197. // such as a credit card, with the account. Follow the steps at To leave
  15198. // an organization when all required account information has not yet been
  15199. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  15200. // in the Organizations User Guide.
  15201. //
  15202. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  15203. // policy from an entity that would cause the entity to have fewer than the
  15204. // minimum number of policies of a certain type required.
  15205. //
  15206. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  15207. // that requires the organization to be configured to support all features.
  15208. // An organization that supports only consolidated billing features can't
  15209. // perform this operation.
  15210. //
  15211. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  15212. // too many levels deep.
  15213. //
  15214. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  15215. // that you can have in an organization.
  15216. //
  15217. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  15218. // is larger than the maximum size.
  15219. //
  15220. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  15221. // policies that you can have in an organization.
  15222. //
  15223. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  15224. // before you enabled service access. Call the EnableAWSServiceAccess API
  15225. // first.
  15226. //
  15227. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  15228. // tags that are not compliant with the tag policy requirements for this
  15229. // account.
  15230. //
  15231. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  15232. // there is a waiting period before you can remove it from the organization.
  15233. // If you get an error that indicates that a wait period is required, try
  15234. // again in a few days.
  15235. //
  15236. // - InvalidInputException
  15237. // The requested operation failed because you provided invalid values for one
  15238. // or more of the request parameters. This exception includes a reason that
  15239. // contains additional information about the violated limit:
  15240. //
  15241. // Some of the reasons in the following list might not be applicable to this
  15242. // specific API or operation.
  15243. //
  15244. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  15245. // the same entity.
  15246. //
  15247. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  15248. // Services and can't be modified.
  15249. //
  15250. // - INPUT_REQUIRED: You must include a value for all required parameters.
  15251. //
  15252. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  15253. // for the invited account owner.
  15254. //
  15255. // - INVALID_ENUM: You specified an invalid value.
  15256. //
  15257. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  15258. //
  15259. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  15260. // characters.
  15261. //
  15262. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  15263. // at least one invalid value.
  15264. //
  15265. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  15266. // from the response to a previous call of the operation.
  15267. //
  15268. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  15269. // organization, or email) as a party.
  15270. //
  15271. // - INVALID_PATTERN: You provided a value that doesn't match the required
  15272. // pattern.
  15273. //
  15274. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  15275. // match the required pattern.
  15276. //
  15277. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  15278. // name can't begin with the reserved prefix AWSServiceRoleFor.
  15279. //
  15280. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  15281. // Name (ARN) for the organization.
  15282. //
  15283. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  15284. //
  15285. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  15286. // tag. You can’t add, edit, or delete system tag keys because they're
  15287. // reserved for Amazon Web Services use. System tags don’t count against
  15288. // your tags per resource limit.
  15289. //
  15290. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  15291. // for the operation.
  15292. //
  15293. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  15294. // than allowed.
  15295. //
  15296. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  15297. // value than allowed.
  15298. //
  15299. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  15300. // than allowed.
  15301. //
  15302. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  15303. // value than allowed.
  15304. //
  15305. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  15306. // between entities in the same root.
  15307. //
  15308. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  15309. // target entity.
  15310. //
  15311. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  15312. // isn't recognized.
  15313. //
  15314. // - ServiceException
  15315. // Organizations can't complete your request because of an internal service
  15316. // error. Try again later.
  15317. //
  15318. // - TooManyRequestsException
  15319. // You have sent too many requests in too short a period of time. The quota
  15320. // helps protect against denial-of-service attacks. Try again later.
  15321. //
  15322. // For information about quotas that affect Organizations, see Quotas for Organizations
  15323. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  15324. // the Organizations User Guide.
  15325. //
  15326. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UntagResource
  15327. func (c *Organizations) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
  15328. req, out := c.UntagResourceRequest(input)
  15329. return out, req.Send()
  15330. }
  15331. // UntagResourceWithContext is the same as UntagResource with the addition of
  15332. // the ability to pass a context and additional request options.
  15333. //
  15334. // See UntagResource for details on how to use this API operation.
  15335. //
  15336. // The context must be non-nil and will be used for request cancellation. If
  15337. // the context is nil a panic will occur. In the future the SDK may create
  15338. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  15339. // for more information on using Contexts.
  15340. func (c *Organizations) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
  15341. req, out := c.UntagResourceRequest(input)
  15342. req.SetContext(ctx)
  15343. req.ApplyOptions(opts...)
  15344. return out, req.Send()
  15345. }
  15346. const opUpdateOrganizationalUnit = "UpdateOrganizationalUnit"
  15347. // UpdateOrganizationalUnitRequest generates a "aws/request.Request" representing the
  15348. // client's request for the UpdateOrganizationalUnit operation. The "output" return
  15349. // value will be populated with the request's response once the request completes
  15350. // successfully.
  15351. //
  15352. // Use "Send" method on the returned Request to send the API call to the service.
  15353. // the "output" return value is not valid until after Send returns without error.
  15354. //
  15355. // See UpdateOrganizationalUnit for more information on using the UpdateOrganizationalUnit
  15356. // API call, and error handling.
  15357. //
  15358. // This method is useful when you want to inject custom logic or configuration
  15359. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  15360. //
  15361. // // Example sending a request using the UpdateOrganizationalUnitRequest method.
  15362. // req, resp := client.UpdateOrganizationalUnitRequest(params)
  15363. //
  15364. // err := req.Send()
  15365. // if err == nil { // resp is now filled
  15366. // fmt.Println(resp)
  15367. // }
  15368. //
  15369. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UpdateOrganizationalUnit
  15370. func (c *Organizations) UpdateOrganizationalUnitRequest(input *UpdateOrganizationalUnitInput) (req *request.Request, output *UpdateOrganizationalUnitOutput) {
  15371. op := &request.Operation{
  15372. Name: opUpdateOrganizationalUnit,
  15373. HTTPMethod: "POST",
  15374. HTTPPath: "/",
  15375. }
  15376. if input == nil {
  15377. input = &UpdateOrganizationalUnitInput{}
  15378. }
  15379. output = &UpdateOrganizationalUnitOutput{}
  15380. req = c.newRequest(op, input, output)
  15381. return
  15382. }
  15383. // UpdateOrganizationalUnit API operation for AWS Organizations.
  15384. //
  15385. // Renames the specified organizational unit (OU). The ID and ARN don't change.
  15386. // The child OUs and accounts remain in place, and any attached policies of
  15387. // the OU remain attached.
  15388. //
  15389. // This operation can be called only from the organization's management account.
  15390. //
  15391. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  15392. // with awserr.Error's Code and Message methods to get detailed information about
  15393. // the error.
  15394. //
  15395. // See the AWS API reference guide for AWS Organizations's
  15396. // API operation UpdateOrganizationalUnit for usage and error information.
  15397. //
  15398. // Returned Error Types:
  15399. //
  15400. // - AccessDeniedException
  15401. // You don't have permissions to perform the requested operation. The user or
  15402. // role that is making the request must have at least one IAM permissions policy
  15403. // attached that grants the required permissions. For more information, see
  15404. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  15405. // in the IAM User Guide.
  15406. //
  15407. // - AWSOrganizationsNotInUseException
  15408. // Your account isn't a member of an organization. To make this request, you
  15409. // must use the credentials of an account that belongs to an organization.
  15410. //
  15411. // - ConcurrentModificationException
  15412. // The target of the operation is currently being modified by a different request.
  15413. // Try again later.
  15414. //
  15415. // - DuplicateOrganizationalUnitException
  15416. // An OU with the same name already exists.
  15417. //
  15418. // - InvalidInputException
  15419. // The requested operation failed because you provided invalid values for one
  15420. // or more of the request parameters. This exception includes a reason that
  15421. // contains additional information about the violated limit:
  15422. //
  15423. // Some of the reasons in the following list might not be applicable to this
  15424. // specific API or operation.
  15425. //
  15426. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  15427. // the same entity.
  15428. //
  15429. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  15430. // Services and can't be modified.
  15431. //
  15432. // - INPUT_REQUIRED: You must include a value for all required parameters.
  15433. //
  15434. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  15435. // for the invited account owner.
  15436. //
  15437. // - INVALID_ENUM: You specified an invalid value.
  15438. //
  15439. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  15440. //
  15441. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  15442. // characters.
  15443. //
  15444. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  15445. // at least one invalid value.
  15446. //
  15447. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  15448. // from the response to a previous call of the operation.
  15449. //
  15450. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  15451. // organization, or email) as a party.
  15452. //
  15453. // - INVALID_PATTERN: You provided a value that doesn't match the required
  15454. // pattern.
  15455. //
  15456. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  15457. // match the required pattern.
  15458. //
  15459. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  15460. // name can't begin with the reserved prefix AWSServiceRoleFor.
  15461. //
  15462. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  15463. // Name (ARN) for the organization.
  15464. //
  15465. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  15466. //
  15467. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  15468. // tag. You can’t add, edit, or delete system tag keys because they're
  15469. // reserved for Amazon Web Services use. System tags don’t count against
  15470. // your tags per resource limit.
  15471. //
  15472. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  15473. // for the operation.
  15474. //
  15475. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  15476. // than allowed.
  15477. //
  15478. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  15479. // value than allowed.
  15480. //
  15481. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  15482. // than allowed.
  15483. //
  15484. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  15485. // value than allowed.
  15486. //
  15487. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  15488. // between entities in the same root.
  15489. //
  15490. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  15491. // target entity.
  15492. //
  15493. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  15494. // isn't recognized.
  15495. //
  15496. // - OrganizationalUnitNotFoundException
  15497. // We can't find an OU with the OrganizationalUnitId that you specified.
  15498. //
  15499. // - ServiceException
  15500. // Organizations can't complete your request because of an internal service
  15501. // error. Try again later.
  15502. //
  15503. // - TooManyRequestsException
  15504. // You have sent too many requests in too short a period of time. The quota
  15505. // helps protect against denial-of-service attacks. Try again later.
  15506. //
  15507. // For information about quotas that affect Organizations, see Quotas for Organizations
  15508. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  15509. // the Organizations User Guide.
  15510. //
  15511. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UpdateOrganizationalUnit
  15512. func (c *Organizations) UpdateOrganizationalUnit(input *UpdateOrganizationalUnitInput) (*UpdateOrganizationalUnitOutput, error) {
  15513. req, out := c.UpdateOrganizationalUnitRequest(input)
  15514. return out, req.Send()
  15515. }
  15516. // UpdateOrganizationalUnitWithContext is the same as UpdateOrganizationalUnit with the addition of
  15517. // the ability to pass a context and additional request options.
  15518. //
  15519. // See UpdateOrganizationalUnit for details on how to use this API operation.
  15520. //
  15521. // The context must be non-nil and will be used for request cancellation. If
  15522. // the context is nil a panic will occur. In the future the SDK may create
  15523. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  15524. // for more information on using Contexts.
  15525. func (c *Organizations) UpdateOrganizationalUnitWithContext(ctx aws.Context, input *UpdateOrganizationalUnitInput, opts ...request.Option) (*UpdateOrganizationalUnitOutput, error) {
  15526. req, out := c.UpdateOrganizationalUnitRequest(input)
  15527. req.SetContext(ctx)
  15528. req.ApplyOptions(opts...)
  15529. return out, req.Send()
  15530. }
  15531. const opUpdatePolicy = "UpdatePolicy"
  15532. // UpdatePolicyRequest generates a "aws/request.Request" representing the
  15533. // client's request for the UpdatePolicy operation. The "output" return
  15534. // value will be populated with the request's response once the request completes
  15535. // successfully.
  15536. //
  15537. // Use "Send" method on the returned Request to send the API call to the service.
  15538. // the "output" return value is not valid until after Send returns without error.
  15539. //
  15540. // See UpdatePolicy for more information on using the UpdatePolicy
  15541. // API call, and error handling.
  15542. //
  15543. // This method is useful when you want to inject custom logic or configuration
  15544. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  15545. //
  15546. // // Example sending a request using the UpdatePolicyRequest method.
  15547. // req, resp := client.UpdatePolicyRequest(params)
  15548. //
  15549. // err := req.Send()
  15550. // if err == nil { // resp is now filled
  15551. // fmt.Println(resp)
  15552. // }
  15553. //
  15554. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UpdatePolicy
  15555. func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *request.Request, output *UpdatePolicyOutput) {
  15556. op := &request.Operation{
  15557. Name: opUpdatePolicy,
  15558. HTTPMethod: "POST",
  15559. HTTPPath: "/",
  15560. }
  15561. if input == nil {
  15562. input = &UpdatePolicyInput{}
  15563. }
  15564. output = &UpdatePolicyOutput{}
  15565. req = c.newRequest(op, input, output)
  15566. return
  15567. }
  15568. // UpdatePolicy API operation for AWS Organizations.
  15569. //
  15570. // Updates an existing policy with a new name, description, or content. If you
  15571. // don't supply any parameter, that value remains unchanged. You can't change
  15572. // a policy's type.
  15573. //
  15574. // This operation can be called only from the organization's management account.
  15575. //
  15576. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  15577. // with awserr.Error's Code and Message methods to get detailed information about
  15578. // the error.
  15579. //
  15580. // See the AWS API reference guide for AWS Organizations's
  15581. // API operation UpdatePolicy for usage and error information.
  15582. //
  15583. // Returned Error Types:
  15584. //
  15585. // - AccessDeniedException
  15586. // You don't have permissions to perform the requested operation. The user or
  15587. // role that is making the request must have at least one IAM permissions policy
  15588. // attached that grants the required permissions. For more information, see
  15589. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  15590. // in the IAM User Guide.
  15591. //
  15592. // - AWSOrganizationsNotInUseException
  15593. // Your account isn't a member of an organization. To make this request, you
  15594. // must use the credentials of an account that belongs to an organization.
  15595. //
  15596. // - ConcurrentModificationException
  15597. // The target of the operation is currently being modified by a different request.
  15598. // Try again later.
  15599. //
  15600. // - ConstraintViolationException
  15601. // Performing this operation violates a minimum or maximum value limit. For
  15602. // example, attempting to remove the last service control policy (SCP) from
  15603. // an OU or root, inviting or creating too many accounts to the organization,
  15604. // or attaching too many policies to an account, OU, or root. This exception
  15605. // includes a reason that contains additional information about the violated
  15606. // limit:
  15607. //
  15608. // Some of the reasons in the following list might not be applicable to this
  15609. // specific API or operation.
  15610. //
  15611. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  15612. // account from the organization. You can't remove the management account.
  15613. // Instead, after you remove all member accounts, delete the organization
  15614. // itself.
  15615. //
  15616. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  15617. // an account from the organization that doesn't yet have enough information
  15618. // to exist as a standalone account. This account requires you to first complete
  15619. // phone verification. Follow the steps at Removing a member account from
  15620. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  15621. // in the Organizations User Guide.
  15622. //
  15623. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  15624. // of accounts that you can create in one day.
  15625. //
  15626. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  15627. // the number of accounts in an organization. If you need more accounts,
  15628. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  15629. // to request an increase in your limit. Or the number of invitations that
  15630. // you tried to send would cause you to exceed the limit of accounts in your
  15631. // organization. Send fewer invitations or contact Amazon Web Services Support
  15632. // to request an increase in the number of accounts. Deleted and closed accounts
  15633. // still count toward your limit. If you get this exception when running
  15634. // a command immediately after creating the organization, wait one hour and
  15635. // try again. After an hour, if the command continues to fail with this error,
  15636. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  15637. //
  15638. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  15639. // register the management account of the organization as a delegated administrator
  15640. // for an Amazon Web Services service integrated with Organizations. You
  15641. // can designate only a member account as a delegated administrator.
  15642. //
  15643. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  15644. // account. To close the management account for the organization, you must
  15645. // first either remove or close all member accounts in the organization.
  15646. // Follow standard account closure process using root credentials.​
  15647. //
  15648. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  15649. // an account that is registered as a delegated administrator for a service
  15650. // integrated with your organization. To complete this operation, you must
  15651. // first deregister this account as a delegated administrator.
  15652. //
  15653. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  15654. // for the past 30 days.
  15655. //
  15656. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  15657. // of accounts that you can close at a time. ​
  15658. //
  15659. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  15660. // organization in the specified region, you must enable all features mode.
  15661. //
  15662. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  15663. // an Amazon Web Services account as a delegated administrator for an Amazon
  15664. // Web Services service that already has a delegated administrator. To complete
  15665. // this operation, you must first deregister any existing delegated administrators
  15666. // for this service.
  15667. //
  15668. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  15669. // valid for a limited period of time. You must resubmit the request and
  15670. // generate a new verfication code.
  15671. //
  15672. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  15673. // handshakes that you can send in one day.
  15674. //
  15675. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  15676. // supported payment method is associated with the account. Amazon Web Services
  15677. // does not support cards issued by financial institutions in Russia or Belarus.
  15678. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  15679. //
  15680. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  15681. // in this organization, you first must migrate the organization's management
  15682. // account to the marketplace that corresponds to the management account's
  15683. // address. For example, accounts with India addresses must be associated
  15684. // with the AISPL marketplace. All accounts in an organization must be associated
  15685. // with the same marketplace.
  15686. //
  15687. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  15688. // Web Services /> Regions in China. To create an organization, the master
  15689. // must have a valid business license. For more information, contact customer
  15690. // support.
  15691. //
  15692. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  15693. // must first provide a valid contact address and phone number for the management
  15694. // account. Then try the operation again.
  15695. //
  15696. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  15697. // management account must have an associated account in the Amazon Web Services
  15698. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  15699. // in the Amazon Web Services GovCloud User Guide.
  15700. //
  15701. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  15702. // with this management account, you first must associate a valid payment
  15703. // instrument, such as a credit card, with the account. Follow the steps
  15704. // at To leave an organization when all required account information has
  15705. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  15706. // in the Organizations User Guide.
  15707. //
  15708. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  15709. // to register more delegated administrators than allowed for the service
  15710. // principal.
  15711. //
  15712. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  15713. // number of policies of a certain type that can be attached to an entity
  15714. // at one time.
  15715. //
  15716. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  15717. // on this resource.
  15718. //
  15719. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  15720. // with this member account, you first must associate a valid payment instrument,
  15721. // such as a credit card, with the account. Follow the steps at To leave
  15722. // an organization when all required account information has not yet been
  15723. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  15724. // in the Organizations User Guide.
  15725. //
  15726. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  15727. // policy from an entity that would cause the entity to have fewer than the
  15728. // minimum number of policies of a certain type required.
  15729. //
  15730. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  15731. // that requires the organization to be configured to support all features.
  15732. // An organization that supports only consolidated billing features can't
  15733. // perform this operation.
  15734. //
  15735. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  15736. // too many levels deep.
  15737. //
  15738. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  15739. // that you can have in an organization.
  15740. //
  15741. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  15742. // is larger than the maximum size.
  15743. //
  15744. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  15745. // policies that you can have in an organization.
  15746. //
  15747. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  15748. // before you enabled service access. Call the EnableAWSServiceAccess API
  15749. // first.
  15750. //
  15751. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  15752. // tags that are not compliant with the tag policy requirements for this
  15753. // account.
  15754. //
  15755. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  15756. // there is a waiting period before you can remove it from the organization.
  15757. // If you get an error that indicates that a wait period is required, try
  15758. // again in a few days.
  15759. //
  15760. // - DuplicatePolicyException
  15761. // A policy with the same name already exists.
  15762. //
  15763. // - InvalidInputException
  15764. // The requested operation failed because you provided invalid values for one
  15765. // or more of the request parameters. This exception includes a reason that
  15766. // contains additional information about the violated limit:
  15767. //
  15768. // Some of the reasons in the following list might not be applicable to this
  15769. // specific API or operation.
  15770. //
  15771. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  15772. // the same entity.
  15773. //
  15774. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  15775. // Services and can't be modified.
  15776. //
  15777. // - INPUT_REQUIRED: You must include a value for all required parameters.
  15778. //
  15779. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  15780. // for the invited account owner.
  15781. //
  15782. // - INVALID_ENUM: You specified an invalid value.
  15783. //
  15784. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  15785. //
  15786. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  15787. // characters.
  15788. //
  15789. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  15790. // at least one invalid value.
  15791. //
  15792. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  15793. // from the response to a previous call of the operation.
  15794. //
  15795. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  15796. // organization, or email) as a party.
  15797. //
  15798. // - INVALID_PATTERN: You provided a value that doesn't match the required
  15799. // pattern.
  15800. //
  15801. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  15802. // match the required pattern.
  15803. //
  15804. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  15805. // name can't begin with the reserved prefix AWSServiceRoleFor.
  15806. //
  15807. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  15808. // Name (ARN) for the organization.
  15809. //
  15810. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  15811. //
  15812. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  15813. // tag. You can’t add, edit, or delete system tag keys because they're
  15814. // reserved for Amazon Web Services use. System tags don’t count against
  15815. // your tags per resource limit.
  15816. //
  15817. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  15818. // for the operation.
  15819. //
  15820. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  15821. // than allowed.
  15822. //
  15823. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  15824. // value than allowed.
  15825. //
  15826. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  15827. // than allowed.
  15828. //
  15829. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  15830. // value than allowed.
  15831. //
  15832. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  15833. // between entities in the same root.
  15834. //
  15835. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  15836. // target entity.
  15837. //
  15838. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  15839. // isn't recognized.
  15840. //
  15841. // - MalformedPolicyDocumentException
  15842. // The provided policy document doesn't meet the requirements of the specified
  15843. // policy type. For example, the syntax might be incorrect. For details about
  15844. // service control policy syntax, see Service Control Policy Syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html)
  15845. // in the Organizations User Guide.
  15846. //
  15847. // - PolicyNotFoundException
  15848. // We can't find a policy with the PolicyId that you specified.
  15849. //
  15850. // - ServiceException
  15851. // Organizations can't complete your request because of an internal service
  15852. // error. Try again later.
  15853. //
  15854. // - TooManyRequestsException
  15855. // You have sent too many requests in too short a period of time. The quota
  15856. // helps protect against denial-of-service attacks. Try again later.
  15857. //
  15858. // For information about quotas that affect Organizations, see Quotas for Organizations
  15859. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  15860. // the Organizations User Guide.
  15861. //
  15862. // - UnsupportedAPIEndpointException
  15863. // This action isn't available in the current Amazon Web Services Region.
  15864. //
  15865. // - PolicyChangesInProgressException
  15866. // Changes to the effective policy are in progress, and its contents can't be
  15867. // returned. Try the operation again later.
  15868. //
  15869. // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UpdatePolicy
  15870. func (c *Organizations) UpdatePolicy(input *UpdatePolicyInput) (*UpdatePolicyOutput, error) {
  15871. req, out := c.UpdatePolicyRequest(input)
  15872. return out, req.Send()
  15873. }
  15874. // UpdatePolicyWithContext is the same as UpdatePolicy with the addition of
  15875. // the ability to pass a context and additional request options.
  15876. //
  15877. // See UpdatePolicy for details on how to use this API operation.
  15878. //
  15879. // The context must be non-nil and will be used for request cancellation. If
  15880. // the context is nil a panic will occur. In the future the SDK may create
  15881. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  15882. // for more information on using Contexts.
  15883. func (c *Organizations) UpdatePolicyWithContext(ctx aws.Context, input *UpdatePolicyInput, opts ...request.Option) (*UpdatePolicyOutput, error) {
  15884. req, out := c.UpdatePolicyRequest(input)
  15885. req.SetContext(ctx)
  15886. req.ApplyOptions(opts...)
  15887. return out, req.Send()
  15888. }
  15889. // Your account isn't a member of an organization. To make this request, you
  15890. // must use the credentials of an account that belongs to an organization.
  15891. type AWSOrganizationsNotInUseException struct {
  15892. _ struct{} `type:"structure"`
  15893. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  15894. Message_ *string `locationName:"Message" type:"string"`
  15895. }
  15896. // String returns the string representation.
  15897. //
  15898. // API parameter values that are decorated as "sensitive" in the API will not
  15899. // be included in the string output. The member name will be present, but the
  15900. // value will be replaced with "sensitive".
  15901. func (s AWSOrganizationsNotInUseException) String() string {
  15902. return awsutil.Prettify(s)
  15903. }
  15904. // GoString returns the string representation.
  15905. //
  15906. // API parameter values that are decorated as "sensitive" in the API will not
  15907. // be included in the string output. The member name will be present, but the
  15908. // value will be replaced with "sensitive".
  15909. func (s AWSOrganizationsNotInUseException) GoString() string {
  15910. return s.String()
  15911. }
  15912. func newErrorAWSOrganizationsNotInUseException(v protocol.ResponseMetadata) error {
  15913. return &AWSOrganizationsNotInUseException{
  15914. RespMetadata: v,
  15915. }
  15916. }
  15917. // Code returns the exception type name.
  15918. func (s *AWSOrganizationsNotInUseException) Code() string {
  15919. return "AWSOrganizationsNotInUseException"
  15920. }
  15921. // Message returns the exception's message.
  15922. func (s *AWSOrganizationsNotInUseException) Message() string {
  15923. if s.Message_ != nil {
  15924. return *s.Message_
  15925. }
  15926. return ""
  15927. }
  15928. // OrigErr always returns nil, satisfies awserr.Error interface.
  15929. func (s *AWSOrganizationsNotInUseException) OrigErr() error {
  15930. return nil
  15931. }
  15932. func (s *AWSOrganizationsNotInUseException) Error() string {
  15933. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  15934. }
  15935. // Status code returns the HTTP status code for the request's response error.
  15936. func (s *AWSOrganizationsNotInUseException) StatusCode() int {
  15937. return s.RespMetadata.StatusCode
  15938. }
  15939. // RequestID returns the service's response RequestID for request.
  15940. func (s *AWSOrganizationsNotInUseException) RequestID() string {
  15941. return s.RespMetadata.RequestID
  15942. }
  15943. type AcceptHandshakeInput struct {
  15944. _ struct{} `type:"structure"`
  15945. // The unique identifier (ID) of the handshake that you want to accept.
  15946. //
  15947. // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string
  15948. // requires "h-" followed by from 8 to 32 lowercase letters or digits.
  15949. //
  15950. // HandshakeId is a required field
  15951. HandshakeId *string `type:"string" required:"true"`
  15952. }
  15953. // String returns the string representation.
  15954. //
  15955. // API parameter values that are decorated as "sensitive" in the API will not
  15956. // be included in the string output. The member name will be present, but the
  15957. // value will be replaced with "sensitive".
  15958. func (s AcceptHandshakeInput) String() string {
  15959. return awsutil.Prettify(s)
  15960. }
  15961. // GoString returns the string representation.
  15962. //
  15963. // API parameter values that are decorated as "sensitive" in the API will not
  15964. // be included in the string output. The member name will be present, but the
  15965. // value will be replaced with "sensitive".
  15966. func (s AcceptHandshakeInput) GoString() string {
  15967. return s.String()
  15968. }
  15969. // Validate inspects the fields of the type to determine if they are valid.
  15970. func (s *AcceptHandshakeInput) Validate() error {
  15971. invalidParams := request.ErrInvalidParams{Context: "AcceptHandshakeInput"}
  15972. if s.HandshakeId == nil {
  15973. invalidParams.Add(request.NewErrParamRequired("HandshakeId"))
  15974. }
  15975. if invalidParams.Len() > 0 {
  15976. return invalidParams
  15977. }
  15978. return nil
  15979. }
  15980. // SetHandshakeId sets the HandshakeId field's value.
  15981. func (s *AcceptHandshakeInput) SetHandshakeId(v string) *AcceptHandshakeInput {
  15982. s.HandshakeId = &v
  15983. return s
  15984. }
  15985. type AcceptHandshakeOutput struct {
  15986. _ struct{} `type:"structure"`
  15987. // A structure that contains details about the accepted handshake.
  15988. Handshake *Handshake `type:"structure"`
  15989. }
  15990. // String returns the string representation.
  15991. //
  15992. // API parameter values that are decorated as "sensitive" in the API will not
  15993. // be included in the string output. The member name will be present, but the
  15994. // value will be replaced with "sensitive".
  15995. func (s AcceptHandshakeOutput) String() string {
  15996. return awsutil.Prettify(s)
  15997. }
  15998. // GoString returns the string representation.
  15999. //
  16000. // API parameter values that are decorated as "sensitive" in the API will not
  16001. // be included in the string output. The member name will be present, but the
  16002. // value will be replaced with "sensitive".
  16003. func (s AcceptHandshakeOutput) GoString() string {
  16004. return s.String()
  16005. }
  16006. // SetHandshake sets the Handshake field's value.
  16007. func (s *AcceptHandshakeOutput) SetHandshake(v *Handshake) *AcceptHandshakeOutput {
  16008. s.Handshake = v
  16009. return s
  16010. }
  16011. // You don't have permissions to perform the requested operation. The user or
  16012. // role that is making the request must have at least one IAM permissions policy
  16013. // attached that grants the required permissions. For more information, see
  16014. // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
  16015. // in the IAM User Guide.
  16016. type AccessDeniedException struct {
  16017. _ struct{} `type:"structure"`
  16018. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  16019. Message_ *string `locationName:"Message" type:"string"`
  16020. }
  16021. // String returns the string representation.
  16022. //
  16023. // API parameter values that are decorated as "sensitive" in the API will not
  16024. // be included in the string output. The member name will be present, but the
  16025. // value will be replaced with "sensitive".
  16026. func (s AccessDeniedException) String() string {
  16027. return awsutil.Prettify(s)
  16028. }
  16029. // GoString returns the string representation.
  16030. //
  16031. // API parameter values that are decorated as "sensitive" in the API will not
  16032. // be included in the string output. The member name will be present, but the
  16033. // value will be replaced with "sensitive".
  16034. func (s AccessDeniedException) GoString() string {
  16035. return s.String()
  16036. }
  16037. func newErrorAccessDeniedException(v protocol.ResponseMetadata) error {
  16038. return &AccessDeniedException{
  16039. RespMetadata: v,
  16040. }
  16041. }
  16042. // Code returns the exception type name.
  16043. func (s *AccessDeniedException) Code() string {
  16044. return "AccessDeniedException"
  16045. }
  16046. // Message returns the exception's message.
  16047. func (s *AccessDeniedException) Message() string {
  16048. if s.Message_ != nil {
  16049. return *s.Message_
  16050. }
  16051. return ""
  16052. }
  16053. // OrigErr always returns nil, satisfies awserr.Error interface.
  16054. func (s *AccessDeniedException) OrigErr() error {
  16055. return nil
  16056. }
  16057. func (s *AccessDeniedException) Error() string {
  16058. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  16059. }
  16060. // Status code returns the HTTP status code for the request's response error.
  16061. func (s *AccessDeniedException) StatusCode() int {
  16062. return s.RespMetadata.StatusCode
  16063. }
  16064. // RequestID returns the service's response RequestID for request.
  16065. func (s *AccessDeniedException) RequestID() string {
  16066. return s.RespMetadata.RequestID
  16067. }
  16068. // The operation that you attempted requires you to have the iam:CreateServiceLinkedRole
  16069. // for organizations.amazonaws.com permission so that Organizations can create
  16070. // the required service-linked role. You don't have that permission.
  16071. type AccessDeniedForDependencyException struct {
  16072. _ struct{} `type:"structure"`
  16073. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  16074. Message_ *string `locationName:"Message" type:"string"`
  16075. Reason *string `type:"string" enum:"AccessDeniedForDependencyExceptionReason"`
  16076. }
  16077. // String returns the string representation.
  16078. //
  16079. // API parameter values that are decorated as "sensitive" in the API will not
  16080. // be included in the string output. The member name will be present, but the
  16081. // value will be replaced with "sensitive".
  16082. func (s AccessDeniedForDependencyException) String() string {
  16083. return awsutil.Prettify(s)
  16084. }
  16085. // GoString returns the string representation.
  16086. //
  16087. // API parameter values that are decorated as "sensitive" in the API will not
  16088. // be included in the string output. The member name will be present, but the
  16089. // value will be replaced with "sensitive".
  16090. func (s AccessDeniedForDependencyException) GoString() string {
  16091. return s.String()
  16092. }
  16093. func newErrorAccessDeniedForDependencyException(v protocol.ResponseMetadata) error {
  16094. return &AccessDeniedForDependencyException{
  16095. RespMetadata: v,
  16096. }
  16097. }
  16098. // Code returns the exception type name.
  16099. func (s *AccessDeniedForDependencyException) Code() string {
  16100. return "AccessDeniedForDependencyException"
  16101. }
  16102. // Message returns the exception's message.
  16103. func (s *AccessDeniedForDependencyException) Message() string {
  16104. if s.Message_ != nil {
  16105. return *s.Message_
  16106. }
  16107. return ""
  16108. }
  16109. // OrigErr always returns nil, satisfies awserr.Error interface.
  16110. func (s *AccessDeniedForDependencyException) OrigErr() error {
  16111. return nil
  16112. }
  16113. func (s *AccessDeniedForDependencyException) Error() string {
  16114. return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  16115. }
  16116. // Status code returns the HTTP status code for the request's response error.
  16117. func (s *AccessDeniedForDependencyException) StatusCode() int {
  16118. return s.RespMetadata.StatusCode
  16119. }
  16120. // RequestID returns the service's response RequestID for request.
  16121. func (s *AccessDeniedForDependencyException) RequestID() string {
  16122. return s.RespMetadata.RequestID
  16123. }
  16124. // Contains information about an Amazon Web Services account that is a member
  16125. // of an organization.
  16126. type Account struct {
  16127. _ struct{} `type:"structure"`
  16128. // The Amazon Resource Name (ARN) of the account.
  16129. //
  16130. // For more information about ARNs in Organizations, see ARN Formats Supported
  16131. // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
  16132. // in the Amazon Web Services Service Authorization Reference.
  16133. Arn *string `type:"string"`
  16134. // The email address associated with the Amazon Web Services account.
  16135. //
  16136. // The regex pattern (http://wikipedia.org/wiki/regex) for this parameter is
  16137. // a string of characters that represents a standard internet email address.
  16138. //
  16139. // Email is a sensitive parameter and its value will be
  16140. // replaced with "sensitive" in string returned by Account's
  16141. // String and GoString methods.
  16142. Email *string `min:"6" type:"string" sensitive:"true"`
  16143. // The unique identifier (ID) of the account.
  16144. //
  16145. // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string
  16146. // requires exactly 12 digits.
  16147. Id *string `type:"string"`
  16148. // The method by which the account joined the organization.
  16149. JoinedMethod *string `type:"string" enum:"AccountJoinedMethod"`
  16150. // The date the account became a part of the organization.
  16151. JoinedTimestamp *time.Time `type:"timestamp"`
  16152. // The friendly name of the account.
  16153. //
  16154. // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
  16155. // this parameter is a string of any of the characters in the ASCII character
  16156. // range.
  16157. //
  16158. // Name is a sensitive parameter and its value will be
  16159. // replaced with "sensitive" in string returned by Account's
  16160. // String and GoString methods.
  16161. Name *string `min:"1" type:"string" sensitive:"true"`
  16162. // The status of the account in the organization.
  16163. Status *string `type:"string" enum:"AccountStatus"`
  16164. }
  16165. // String returns the string representation.
  16166. //
  16167. // API parameter values that are decorated as "sensitive" in the API will not
  16168. // be included in the string output. The member name will be present, but the
  16169. // value will be replaced with "sensitive".
  16170. func (s Account) String() string {
  16171. return awsutil.Prettify(s)
  16172. }
  16173. // GoString returns the string representation.
  16174. //
  16175. // API parameter values that are decorated as "sensitive" in the API will not
  16176. // be included in the string output. The member name will be present, but the
  16177. // value will be replaced with "sensitive".
  16178. func (s Account) GoString() string {
  16179. return s.String()
  16180. }
  16181. // SetArn sets the Arn field's value.
  16182. func (s *Account) SetArn(v string) *Account {
  16183. s.Arn = &v
  16184. return s
  16185. }
  16186. // SetEmail sets the Email field's value.
  16187. func (s *Account) SetEmail(v string) *Account {
  16188. s.Email = &v
  16189. return s
  16190. }
  16191. // SetId sets the Id field's value.
  16192. func (s *Account) SetId(v string) *Account {
  16193. s.Id = &v
  16194. return s
  16195. }
  16196. // SetJoinedMethod sets the JoinedMethod field's value.
  16197. func (s *Account) SetJoinedMethod(v string) *Account {
  16198. s.JoinedMethod = &v
  16199. return s
  16200. }
  16201. // SetJoinedTimestamp sets the JoinedTimestamp field's value.
  16202. func (s *Account) SetJoinedTimestamp(v time.Time) *Account {
  16203. s.JoinedTimestamp = &v
  16204. return s
  16205. }
  16206. // SetName sets the Name field's value.
  16207. func (s *Account) SetName(v string) *Account {
  16208. s.Name = &v
  16209. return s
  16210. }
  16211. // SetStatus sets the Status field's value.
  16212. func (s *Account) SetStatus(v string) *Account {
  16213. s.Status = &v
  16214. return s
  16215. }
  16216. // You attempted to close an account that is already closed.
  16217. type AccountAlreadyClosedException struct {
  16218. _ struct{} `type:"structure"`
  16219. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  16220. Message_ *string `locationName:"Message" type:"string"`
  16221. }
  16222. // String returns the string representation.
  16223. //
  16224. // API parameter values that are decorated as "sensitive" in the API will not
  16225. // be included in the string output. The member name will be present, but the
  16226. // value will be replaced with "sensitive".
  16227. func (s AccountAlreadyClosedException) String() string {
  16228. return awsutil.Prettify(s)
  16229. }
  16230. // GoString returns the string representation.
  16231. //
  16232. // API parameter values that are decorated as "sensitive" in the API will not
  16233. // be included in the string output. The member name will be present, but the
  16234. // value will be replaced with "sensitive".
  16235. func (s AccountAlreadyClosedException) GoString() string {
  16236. return s.String()
  16237. }
  16238. func newErrorAccountAlreadyClosedException(v protocol.ResponseMetadata) error {
  16239. return &AccountAlreadyClosedException{
  16240. RespMetadata: v,
  16241. }
  16242. }
  16243. // Code returns the exception type name.
  16244. func (s *AccountAlreadyClosedException) Code() string {
  16245. return "AccountAlreadyClosedException"
  16246. }
  16247. // Message returns the exception's message.
  16248. func (s *AccountAlreadyClosedException) Message() string {
  16249. if s.Message_ != nil {
  16250. return *s.Message_
  16251. }
  16252. return ""
  16253. }
  16254. // OrigErr always returns nil, satisfies awserr.Error interface.
  16255. func (s *AccountAlreadyClosedException) OrigErr() error {
  16256. return nil
  16257. }
  16258. func (s *AccountAlreadyClosedException) Error() string {
  16259. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  16260. }
  16261. // Status code returns the HTTP status code for the request's response error.
  16262. func (s *AccountAlreadyClosedException) StatusCode() int {
  16263. return s.RespMetadata.StatusCode
  16264. }
  16265. // RequestID returns the service's response RequestID for request.
  16266. func (s *AccountAlreadyClosedException) RequestID() string {
  16267. return s.RespMetadata.RequestID
  16268. }
  16269. // The specified account is already a delegated administrator for this Amazon
  16270. // Web Services service.
  16271. type AccountAlreadyRegisteredException struct {
  16272. _ struct{} `type:"structure"`
  16273. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  16274. Message_ *string `locationName:"Message" type:"string"`
  16275. }
  16276. // String returns the string representation.
  16277. //
  16278. // API parameter values that are decorated as "sensitive" in the API will not
  16279. // be included in the string output. The member name will be present, but the
  16280. // value will be replaced with "sensitive".
  16281. func (s AccountAlreadyRegisteredException) String() string {
  16282. return awsutil.Prettify(s)
  16283. }
  16284. // GoString returns the string representation.
  16285. //
  16286. // API parameter values that are decorated as "sensitive" in the API will not
  16287. // be included in the string output. The member name will be present, but the
  16288. // value will be replaced with "sensitive".
  16289. func (s AccountAlreadyRegisteredException) GoString() string {
  16290. return s.String()
  16291. }
  16292. func newErrorAccountAlreadyRegisteredException(v protocol.ResponseMetadata) error {
  16293. return &AccountAlreadyRegisteredException{
  16294. RespMetadata: v,
  16295. }
  16296. }
  16297. // Code returns the exception type name.
  16298. func (s *AccountAlreadyRegisteredException) Code() string {
  16299. return "AccountAlreadyRegisteredException"
  16300. }
  16301. // Message returns the exception's message.
  16302. func (s *AccountAlreadyRegisteredException) Message() string {
  16303. if s.Message_ != nil {
  16304. return *s.Message_
  16305. }
  16306. return ""
  16307. }
  16308. // OrigErr always returns nil, satisfies awserr.Error interface.
  16309. func (s *AccountAlreadyRegisteredException) OrigErr() error {
  16310. return nil
  16311. }
  16312. func (s *AccountAlreadyRegisteredException) Error() string {
  16313. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  16314. }
  16315. // Status code returns the HTTP status code for the request's response error.
  16316. func (s *AccountAlreadyRegisteredException) StatusCode() int {
  16317. return s.RespMetadata.StatusCode
  16318. }
  16319. // RequestID returns the service's response RequestID for request.
  16320. func (s *AccountAlreadyRegisteredException) RequestID() string {
  16321. return s.RespMetadata.RequestID
  16322. }
  16323. // We can't find an Amazon Web Services account with the AccountId that you
  16324. // specified, or the account whose credentials you used to make this request
  16325. // isn't a member of an organization.
  16326. type AccountNotFoundException struct {
  16327. _ struct{} `type:"structure"`
  16328. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  16329. Message_ *string `locationName:"Message" type:"string"`
  16330. }
  16331. // String returns the string representation.
  16332. //
  16333. // API parameter values that are decorated as "sensitive" in the API will not
  16334. // be included in the string output. The member name will be present, but the
  16335. // value will be replaced with "sensitive".
  16336. func (s AccountNotFoundException) String() string {
  16337. return awsutil.Prettify(s)
  16338. }
  16339. // GoString returns the string representation.
  16340. //
  16341. // API parameter values that are decorated as "sensitive" in the API will not
  16342. // be included in the string output. The member name will be present, but the
  16343. // value will be replaced with "sensitive".
  16344. func (s AccountNotFoundException) GoString() string {
  16345. return s.String()
  16346. }
  16347. func newErrorAccountNotFoundException(v protocol.ResponseMetadata) error {
  16348. return &AccountNotFoundException{
  16349. RespMetadata: v,
  16350. }
  16351. }
  16352. // Code returns the exception type name.
  16353. func (s *AccountNotFoundException) Code() string {
  16354. return "AccountNotFoundException"
  16355. }
  16356. // Message returns the exception's message.
  16357. func (s *AccountNotFoundException) Message() string {
  16358. if s.Message_ != nil {
  16359. return *s.Message_
  16360. }
  16361. return ""
  16362. }
  16363. // OrigErr always returns nil, satisfies awserr.Error interface.
  16364. func (s *AccountNotFoundException) OrigErr() error {
  16365. return nil
  16366. }
  16367. func (s *AccountNotFoundException) Error() string {
  16368. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  16369. }
  16370. // Status code returns the HTTP status code for the request's response error.
  16371. func (s *AccountNotFoundException) StatusCode() int {
  16372. return s.RespMetadata.StatusCode
  16373. }
  16374. // RequestID returns the service's response RequestID for request.
  16375. func (s *AccountNotFoundException) RequestID() string {
  16376. return s.RespMetadata.RequestID
  16377. }
  16378. // The specified account is not a delegated administrator for this Amazon Web
  16379. // Services service.
  16380. type AccountNotRegisteredException struct {
  16381. _ struct{} `type:"structure"`
  16382. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  16383. Message_ *string `locationName:"Message" type:"string"`
  16384. }
  16385. // String returns the string representation.
  16386. //
  16387. // API parameter values that are decorated as "sensitive" in the API will not
  16388. // be included in the string output. The member name will be present, but the
  16389. // value will be replaced with "sensitive".
  16390. func (s AccountNotRegisteredException) String() string {
  16391. return awsutil.Prettify(s)
  16392. }
  16393. // GoString returns the string representation.
  16394. //
  16395. // API parameter values that are decorated as "sensitive" in the API will not
  16396. // be included in the string output. The member name will be present, but the
  16397. // value will be replaced with "sensitive".
  16398. func (s AccountNotRegisteredException) GoString() string {
  16399. return s.String()
  16400. }
  16401. func newErrorAccountNotRegisteredException(v protocol.ResponseMetadata) error {
  16402. return &AccountNotRegisteredException{
  16403. RespMetadata: v,
  16404. }
  16405. }
  16406. // Code returns the exception type name.
  16407. func (s *AccountNotRegisteredException) Code() string {
  16408. return "AccountNotRegisteredException"
  16409. }
  16410. // Message returns the exception's message.
  16411. func (s *AccountNotRegisteredException) Message() string {
  16412. if s.Message_ != nil {
  16413. return *s.Message_
  16414. }
  16415. return ""
  16416. }
  16417. // OrigErr always returns nil, satisfies awserr.Error interface.
  16418. func (s *AccountNotRegisteredException) OrigErr() error {
  16419. return nil
  16420. }
  16421. func (s *AccountNotRegisteredException) Error() string {
  16422. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  16423. }
  16424. // Status code returns the HTTP status code for the request's response error.
  16425. func (s *AccountNotRegisteredException) StatusCode() int {
  16426. return s.RespMetadata.StatusCode
  16427. }
  16428. // RequestID returns the service's response RequestID for request.
  16429. func (s *AccountNotRegisteredException) RequestID() string {
  16430. return s.RespMetadata.RequestID
  16431. }
  16432. // You can't invite an existing account to your organization until you verify
  16433. // that you own the email address associated with the management account. For
  16434. // more information, see Email Address Verification (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification)
  16435. // in the Organizations User Guide.
  16436. type AccountOwnerNotVerifiedException struct {
  16437. _ struct{} `type:"structure"`
  16438. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  16439. Message_ *string `locationName:"Message" type:"string"`
  16440. }
  16441. // String returns the string representation.
  16442. //
  16443. // API parameter values that are decorated as "sensitive" in the API will not
  16444. // be included in the string output. The member name will be present, but the
  16445. // value will be replaced with "sensitive".
  16446. func (s AccountOwnerNotVerifiedException) String() string {
  16447. return awsutil.Prettify(s)
  16448. }
  16449. // GoString returns the string representation.
  16450. //
  16451. // API parameter values that are decorated as "sensitive" in the API will not
  16452. // be included in the string output. The member name will be present, but the
  16453. // value will be replaced with "sensitive".
  16454. func (s AccountOwnerNotVerifiedException) GoString() string {
  16455. return s.String()
  16456. }
  16457. func newErrorAccountOwnerNotVerifiedException(v protocol.ResponseMetadata) error {
  16458. return &AccountOwnerNotVerifiedException{
  16459. RespMetadata: v,
  16460. }
  16461. }
  16462. // Code returns the exception type name.
  16463. func (s *AccountOwnerNotVerifiedException) Code() string {
  16464. return "AccountOwnerNotVerifiedException"
  16465. }
  16466. // Message returns the exception's message.
  16467. func (s *AccountOwnerNotVerifiedException) Message() string {
  16468. if s.Message_ != nil {
  16469. return *s.Message_
  16470. }
  16471. return ""
  16472. }
  16473. // OrigErr always returns nil, satisfies awserr.Error interface.
  16474. func (s *AccountOwnerNotVerifiedException) OrigErr() error {
  16475. return nil
  16476. }
  16477. func (s *AccountOwnerNotVerifiedException) Error() string {
  16478. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  16479. }
  16480. // Status code returns the HTTP status code for the request's response error.
  16481. func (s *AccountOwnerNotVerifiedException) StatusCode() int {
  16482. return s.RespMetadata.StatusCode
  16483. }
  16484. // RequestID returns the service's response RequestID for request.
  16485. func (s *AccountOwnerNotVerifiedException) RequestID() string {
  16486. return s.RespMetadata.RequestID
  16487. }
  16488. // This account is already a member of an organization. An account can belong
  16489. // to only one organization at a time.
  16490. type AlreadyInOrganizationException struct {
  16491. _ struct{} `type:"structure"`
  16492. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  16493. Message_ *string `locationName:"Message" type:"string"`
  16494. }
  16495. // String returns the string representation.
  16496. //
  16497. // API parameter values that are decorated as "sensitive" in the API will not
  16498. // be included in the string output. The member name will be present, but the
  16499. // value will be replaced with "sensitive".
  16500. func (s AlreadyInOrganizationException) String() string {
  16501. return awsutil.Prettify(s)
  16502. }
  16503. // GoString returns the string representation.
  16504. //
  16505. // API parameter values that are decorated as "sensitive" in the API will not
  16506. // be included in the string output. The member name will be present, but the
  16507. // value will be replaced with "sensitive".
  16508. func (s AlreadyInOrganizationException) GoString() string {
  16509. return s.String()
  16510. }
  16511. func newErrorAlreadyInOrganizationException(v protocol.ResponseMetadata) error {
  16512. return &AlreadyInOrganizationException{
  16513. RespMetadata: v,
  16514. }
  16515. }
  16516. // Code returns the exception type name.
  16517. func (s *AlreadyInOrganizationException) Code() string {
  16518. return "AlreadyInOrganizationException"
  16519. }
  16520. // Message returns the exception's message.
  16521. func (s *AlreadyInOrganizationException) Message() string {
  16522. if s.Message_ != nil {
  16523. return *s.Message_
  16524. }
  16525. return ""
  16526. }
  16527. // OrigErr always returns nil, satisfies awserr.Error interface.
  16528. func (s *AlreadyInOrganizationException) OrigErr() error {
  16529. return nil
  16530. }
  16531. func (s *AlreadyInOrganizationException) Error() string {
  16532. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  16533. }
  16534. // Status code returns the HTTP status code for the request's response error.
  16535. func (s *AlreadyInOrganizationException) StatusCode() int {
  16536. return s.RespMetadata.StatusCode
  16537. }
  16538. // RequestID returns the service's response RequestID for request.
  16539. func (s *AlreadyInOrganizationException) RequestID() string {
  16540. return s.RespMetadata.RequestID
  16541. }
  16542. type AttachPolicyInput struct {
  16543. _ struct{} `type:"structure"`
  16544. // The unique identifier (ID) of the policy that you want to attach to the target.
  16545. // You can get the ID for the policy by calling the ListPolicies operation.
  16546. //
  16547. // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string
  16548. // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits,
  16549. // or the underscore character (_).
  16550. //
  16551. // PolicyId is a required field
  16552. PolicyId *string `type:"string" required:"true"`
  16553. // The unique identifier (ID) of the root, OU, or account that you want to attach
  16554. // the policy to. You can get the ID by calling the ListRoots, ListOrganizationalUnitsForParent,
  16555. // or ListAccounts operations.
  16556. //
  16557. // The regex pattern (http://wikipedia.org/wiki/regex) for a target ID string
  16558. // requires one of the following:
  16559. //
  16560. // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
  16561. // letters or digits.
  16562. //
  16563. // * Account - A string that consists of exactly 12 digits.
  16564. //
  16565. // * Organizational unit (OU) - A string that begins with "ou-" followed
  16566. // by from 4 to 32 lowercase letters or digits (the ID of the root that the
  16567. // OU is in). This string is followed by a second "-" dash and from 8 to
  16568. // 32 additional lowercase letters or digits.
  16569. //
  16570. // TargetId is a required field
  16571. TargetId *string `type:"string" required:"true"`
  16572. }
  16573. // String returns the string representation.
  16574. //
  16575. // API parameter values that are decorated as "sensitive" in the API will not
  16576. // be included in the string output. The member name will be present, but the
  16577. // value will be replaced with "sensitive".
  16578. func (s AttachPolicyInput) String() string {
  16579. return awsutil.Prettify(s)
  16580. }
  16581. // GoString returns the string representation.
  16582. //
  16583. // API parameter values that are decorated as "sensitive" in the API will not
  16584. // be included in the string output. The member name will be present, but the
  16585. // value will be replaced with "sensitive".
  16586. func (s AttachPolicyInput) GoString() string {
  16587. return s.String()
  16588. }
  16589. // Validate inspects the fields of the type to determine if they are valid.
  16590. func (s *AttachPolicyInput) Validate() error {
  16591. invalidParams := request.ErrInvalidParams{Context: "AttachPolicyInput"}
  16592. if s.PolicyId == nil {
  16593. invalidParams.Add(request.NewErrParamRequired("PolicyId"))
  16594. }
  16595. if s.TargetId == nil {
  16596. invalidParams.Add(request.NewErrParamRequired("TargetId"))
  16597. }
  16598. if invalidParams.Len() > 0 {
  16599. return invalidParams
  16600. }
  16601. return nil
  16602. }
  16603. // SetPolicyId sets the PolicyId field's value.
  16604. func (s *AttachPolicyInput) SetPolicyId(v string) *AttachPolicyInput {
  16605. s.PolicyId = &v
  16606. return s
  16607. }
  16608. // SetTargetId sets the TargetId field's value.
  16609. func (s *AttachPolicyInput) SetTargetId(v string) *AttachPolicyInput {
  16610. s.TargetId = &v
  16611. return s
  16612. }
  16613. type AttachPolicyOutput struct {
  16614. _ struct{} `type:"structure"`
  16615. }
  16616. // String returns the string representation.
  16617. //
  16618. // API parameter values that are decorated as "sensitive" in the API will not
  16619. // be included in the string output. The member name will be present, but the
  16620. // value will be replaced with "sensitive".
  16621. func (s AttachPolicyOutput) String() string {
  16622. return awsutil.Prettify(s)
  16623. }
  16624. // GoString returns the string representation.
  16625. //
  16626. // API parameter values that are decorated as "sensitive" in the API will not
  16627. // be included in the string output. The member name will be present, but the
  16628. // value will be replaced with "sensitive".
  16629. func (s AttachPolicyOutput) GoString() string {
  16630. return s.String()
  16631. }
  16632. type CancelHandshakeInput struct {
  16633. _ struct{} `type:"structure"`
  16634. // The unique identifier (ID) of the handshake that you want to cancel. You
  16635. // can get the ID from the ListHandshakesForOrganization operation.
  16636. //
  16637. // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string
  16638. // requires "h-" followed by from 8 to 32 lowercase letters or digits.
  16639. //
  16640. // HandshakeId is a required field
  16641. HandshakeId *string `type:"string" required:"true"`
  16642. }
  16643. // String returns the string representation.
  16644. //
  16645. // API parameter values that are decorated as "sensitive" in the API will not
  16646. // be included in the string output. The member name will be present, but the
  16647. // value will be replaced with "sensitive".
  16648. func (s CancelHandshakeInput) String() string {
  16649. return awsutil.Prettify(s)
  16650. }
  16651. // GoString returns the string representation.
  16652. //
  16653. // API parameter values that are decorated as "sensitive" in the API will not
  16654. // be included in the string output. The member name will be present, but the
  16655. // value will be replaced with "sensitive".
  16656. func (s CancelHandshakeInput) GoString() string {
  16657. return s.String()
  16658. }
  16659. // Validate inspects the fields of the type to determine if they are valid.
  16660. func (s *CancelHandshakeInput) Validate() error {
  16661. invalidParams := request.ErrInvalidParams{Context: "CancelHandshakeInput"}
  16662. if s.HandshakeId == nil {
  16663. invalidParams.Add(request.NewErrParamRequired("HandshakeId"))
  16664. }
  16665. if invalidParams.Len() > 0 {
  16666. return invalidParams
  16667. }
  16668. return nil
  16669. }
  16670. // SetHandshakeId sets the HandshakeId field's value.
  16671. func (s *CancelHandshakeInput) SetHandshakeId(v string) *CancelHandshakeInput {
  16672. s.HandshakeId = &v
  16673. return s
  16674. }
  16675. type CancelHandshakeOutput struct {
  16676. _ struct{} `type:"structure"`
  16677. // A structure that contains details about the handshake that you canceled.
  16678. Handshake *Handshake `type:"structure"`
  16679. }
  16680. // String returns the string representation.
  16681. //
  16682. // API parameter values that are decorated as "sensitive" in the API will not
  16683. // be included in the string output. The member name will be present, but the
  16684. // value will be replaced with "sensitive".
  16685. func (s CancelHandshakeOutput) String() string {
  16686. return awsutil.Prettify(s)
  16687. }
  16688. // GoString returns the string representation.
  16689. //
  16690. // API parameter values that are decorated as "sensitive" in the API will not
  16691. // be included in the string output. The member name will be present, but the
  16692. // value will be replaced with "sensitive".
  16693. func (s CancelHandshakeOutput) GoString() string {
  16694. return s.String()
  16695. }
  16696. // SetHandshake sets the Handshake field's value.
  16697. func (s *CancelHandshakeOutput) SetHandshake(v *Handshake) *CancelHandshakeOutput {
  16698. s.Handshake = v
  16699. return s
  16700. }
  16701. // Contains a list of child entities, either OUs or accounts.
  16702. type Child struct {
  16703. _ struct{} `type:"structure"`
  16704. // The unique identifier (ID) of this child entity.
  16705. //
  16706. // The regex pattern (http://wikipedia.org/wiki/regex) for a child ID string
  16707. // requires one of the following:
  16708. //
  16709. // * Account - A string that consists of exactly 12 digits.
  16710. //
  16711. // * Organizational unit (OU) - A string that begins with "ou-" followed
  16712. // by from 4 to 32 lowercase letters or digits (the ID of the root that contains
  16713. // the OU). This string is followed by a second "-" dash and from 8 to 32
  16714. // additional lowercase letters or digits.
  16715. Id *string `type:"string"`
  16716. // The type of this child entity.
  16717. Type *string `type:"string" enum:"ChildType"`
  16718. }
  16719. // String returns the string representation.
  16720. //
  16721. // API parameter values that are decorated as "sensitive" in the API will not
  16722. // be included in the string output. The member name will be present, but the
  16723. // value will be replaced with "sensitive".
  16724. func (s Child) String() string {
  16725. return awsutil.Prettify(s)
  16726. }
  16727. // GoString returns the string representation.
  16728. //
  16729. // API parameter values that are decorated as "sensitive" in the API will not
  16730. // be included in the string output. The member name will be present, but the
  16731. // value will be replaced with "sensitive".
  16732. func (s Child) GoString() string {
  16733. return s.String()
  16734. }
  16735. // SetId sets the Id field's value.
  16736. func (s *Child) SetId(v string) *Child {
  16737. s.Id = &v
  16738. return s
  16739. }
  16740. // SetType sets the Type field's value.
  16741. func (s *Child) SetType(v string) *Child {
  16742. s.Type = &v
  16743. return s
  16744. }
  16745. // We can't find an organizational unit (OU) or Amazon Web Services account
  16746. // with the ChildId that you specified.
  16747. type ChildNotFoundException struct {
  16748. _ struct{} `type:"structure"`
  16749. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  16750. Message_ *string `locationName:"Message" type:"string"`
  16751. }
  16752. // String returns the string representation.
  16753. //
  16754. // API parameter values that are decorated as "sensitive" in the API will not
  16755. // be included in the string output. The member name will be present, but the
  16756. // value will be replaced with "sensitive".
  16757. func (s ChildNotFoundException) String() string {
  16758. return awsutil.Prettify(s)
  16759. }
  16760. // GoString returns the string representation.
  16761. //
  16762. // API parameter values that are decorated as "sensitive" in the API will not
  16763. // be included in the string output. The member name will be present, but the
  16764. // value will be replaced with "sensitive".
  16765. func (s ChildNotFoundException) GoString() string {
  16766. return s.String()
  16767. }
  16768. func newErrorChildNotFoundException(v protocol.ResponseMetadata) error {
  16769. return &ChildNotFoundException{
  16770. RespMetadata: v,
  16771. }
  16772. }
  16773. // Code returns the exception type name.
  16774. func (s *ChildNotFoundException) Code() string {
  16775. return "ChildNotFoundException"
  16776. }
  16777. // Message returns the exception's message.
  16778. func (s *ChildNotFoundException) Message() string {
  16779. if s.Message_ != nil {
  16780. return *s.Message_
  16781. }
  16782. return ""
  16783. }
  16784. // OrigErr always returns nil, satisfies awserr.Error interface.
  16785. func (s *ChildNotFoundException) OrigErr() error {
  16786. return nil
  16787. }
  16788. func (s *ChildNotFoundException) Error() string {
  16789. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  16790. }
  16791. // Status code returns the HTTP status code for the request's response error.
  16792. func (s *ChildNotFoundException) StatusCode() int {
  16793. return s.RespMetadata.StatusCode
  16794. }
  16795. // RequestID returns the service's response RequestID for request.
  16796. func (s *ChildNotFoundException) RequestID() string {
  16797. return s.RespMetadata.RequestID
  16798. }
  16799. type CloseAccountInput struct {
  16800. _ struct{} `type:"structure"`
  16801. // Retrieves the Amazon Web Services account Id for the current CloseAccount
  16802. // API request.
  16803. //
  16804. // AccountId is a required field
  16805. AccountId *string `type:"string" required:"true"`
  16806. }
  16807. // String returns the string representation.
  16808. //
  16809. // API parameter values that are decorated as "sensitive" in the API will not
  16810. // be included in the string output. The member name will be present, but the
  16811. // value will be replaced with "sensitive".
  16812. func (s CloseAccountInput) String() string {
  16813. return awsutil.Prettify(s)
  16814. }
  16815. // GoString returns the string representation.
  16816. //
  16817. // API parameter values that are decorated as "sensitive" in the API will not
  16818. // be included in the string output. The member name will be present, but the
  16819. // value will be replaced with "sensitive".
  16820. func (s CloseAccountInput) GoString() string {
  16821. return s.String()
  16822. }
  16823. // Validate inspects the fields of the type to determine if they are valid.
  16824. func (s *CloseAccountInput) Validate() error {
  16825. invalidParams := request.ErrInvalidParams{Context: "CloseAccountInput"}
  16826. if s.AccountId == nil {
  16827. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  16828. }
  16829. if invalidParams.Len() > 0 {
  16830. return invalidParams
  16831. }
  16832. return nil
  16833. }
  16834. // SetAccountId sets the AccountId field's value.
  16835. func (s *CloseAccountInput) SetAccountId(v string) *CloseAccountInput {
  16836. s.AccountId = &v
  16837. return s
  16838. }
  16839. type CloseAccountOutput struct {
  16840. _ struct{} `type:"structure"`
  16841. }
  16842. // String returns the string representation.
  16843. //
  16844. // API parameter values that are decorated as "sensitive" in the API will not
  16845. // be included in the string output. The member name will be present, but the
  16846. // value will be replaced with "sensitive".
  16847. func (s CloseAccountOutput) String() string {
  16848. return awsutil.Prettify(s)
  16849. }
  16850. // GoString returns the string representation.
  16851. //
  16852. // API parameter values that are decorated as "sensitive" in the API will not
  16853. // be included in the string output. The member name will be present, but the
  16854. // value will be replaced with "sensitive".
  16855. func (s CloseAccountOutput) GoString() string {
  16856. return s.String()
  16857. }
  16858. // The target of the operation is currently being modified by a different request.
  16859. // Try again later.
  16860. type ConcurrentModificationException struct {
  16861. _ struct{} `type:"structure"`
  16862. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  16863. Message_ *string `locationName:"Message" type:"string"`
  16864. }
  16865. // String returns the string representation.
  16866. //
  16867. // API parameter values that are decorated as "sensitive" in the API will not
  16868. // be included in the string output. The member name will be present, but the
  16869. // value will be replaced with "sensitive".
  16870. func (s ConcurrentModificationException) String() string {
  16871. return awsutil.Prettify(s)
  16872. }
  16873. // GoString returns the string representation.
  16874. //
  16875. // API parameter values that are decorated as "sensitive" in the API will not
  16876. // be included in the string output. The member name will be present, but the
  16877. // value will be replaced with "sensitive".
  16878. func (s ConcurrentModificationException) GoString() string {
  16879. return s.String()
  16880. }
  16881. func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error {
  16882. return &ConcurrentModificationException{
  16883. RespMetadata: v,
  16884. }
  16885. }
  16886. // Code returns the exception type name.
  16887. func (s *ConcurrentModificationException) Code() string {
  16888. return "ConcurrentModificationException"
  16889. }
  16890. // Message returns the exception's message.
  16891. func (s *ConcurrentModificationException) Message() string {
  16892. if s.Message_ != nil {
  16893. return *s.Message_
  16894. }
  16895. return ""
  16896. }
  16897. // OrigErr always returns nil, satisfies awserr.Error interface.
  16898. func (s *ConcurrentModificationException) OrigErr() error {
  16899. return nil
  16900. }
  16901. func (s *ConcurrentModificationException) Error() string {
  16902. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  16903. }
  16904. // Status code returns the HTTP status code for the request's response error.
  16905. func (s *ConcurrentModificationException) StatusCode() int {
  16906. return s.RespMetadata.StatusCode
  16907. }
  16908. // RequestID returns the service's response RequestID for request.
  16909. func (s *ConcurrentModificationException) RequestID() string {
  16910. return s.RespMetadata.RequestID
  16911. }
  16912. // The request failed because it conflicts with the current state of the specified
  16913. // resource.
  16914. type ConflictException struct {
  16915. _ struct{} `type:"structure"`
  16916. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  16917. Message_ *string `locationName:"Message" type:"string"`
  16918. }
  16919. // String returns the string representation.
  16920. //
  16921. // API parameter values that are decorated as "sensitive" in the API will not
  16922. // be included in the string output. The member name will be present, but the
  16923. // value will be replaced with "sensitive".
  16924. func (s ConflictException) String() string {
  16925. return awsutil.Prettify(s)
  16926. }
  16927. // GoString returns the string representation.
  16928. //
  16929. // API parameter values that are decorated as "sensitive" in the API will not
  16930. // be included in the string output. The member name will be present, but the
  16931. // value will be replaced with "sensitive".
  16932. func (s ConflictException) GoString() string {
  16933. return s.String()
  16934. }
  16935. func newErrorConflictException(v protocol.ResponseMetadata) error {
  16936. return &ConflictException{
  16937. RespMetadata: v,
  16938. }
  16939. }
  16940. // Code returns the exception type name.
  16941. func (s *ConflictException) Code() string {
  16942. return "ConflictException"
  16943. }
  16944. // Message returns the exception's message.
  16945. func (s *ConflictException) Message() string {
  16946. if s.Message_ != nil {
  16947. return *s.Message_
  16948. }
  16949. return ""
  16950. }
  16951. // OrigErr always returns nil, satisfies awserr.Error interface.
  16952. func (s *ConflictException) OrigErr() error {
  16953. return nil
  16954. }
  16955. func (s *ConflictException) Error() string {
  16956. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  16957. }
  16958. // Status code returns the HTTP status code for the request's response error.
  16959. func (s *ConflictException) StatusCode() int {
  16960. return s.RespMetadata.StatusCode
  16961. }
  16962. // RequestID returns the service's response RequestID for request.
  16963. func (s *ConflictException) RequestID() string {
  16964. return s.RespMetadata.RequestID
  16965. }
  16966. // Performing this operation violates a minimum or maximum value limit. For
  16967. // example, attempting to remove the last service control policy (SCP) from
  16968. // an OU or root, inviting or creating too many accounts to the organization,
  16969. // or attaching too many policies to an account, OU, or root. This exception
  16970. // includes a reason that contains additional information about the violated
  16971. // limit:
  16972. //
  16973. // Some of the reasons in the following list might not be applicable to this
  16974. // specific API or operation.
  16975. //
  16976. // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
  16977. // account from the organization. You can't remove the management account.
  16978. // Instead, after you remove all member accounts, delete the organization
  16979. // itself.
  16980. //
  16981. // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
  16982. // an account from the organization that doesn't yet have enough information
  16983. // to exist as a standalone account. This account requires you to first complete
  16984. // phone verification. Follow the steps at Removing a member account from
  16985. // your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
  16986. // in the Organizations User Guide.
  16987. //
  16988. // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
  16989. // of accounts that you can create in one day.
  16990. //
  16991. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  16992. // the number of accounts in an organization. If you need more accounts,
  16993. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/)
  16994. // to request an increase in your limit. Or the number of invitations that
  16995. // you tried to send would cause you to exceed the limit of accounts in your
  16996. // organization. Send fewer invitations or contact Amazon Web Services Support
  16997. // to request an increase in the number of accounts. Deleted and closed accounts
  16998. // still count toward your limit. If you get this exception when running
  16999. // a command immediately after creating the organization, wait one hour and
  17000. // try again. After an hour, if the command continues to fail with this error,
  17001. // contact Amazon Web Services Support (https://docs.aws.amazon.com/support/home#/).
  17002. //
  17003. // - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
  17004. // register the management account of the organization as a delegated administrator
  17005. // for an Amazon Web Services service integrated with Organizations. You
  17006. // can designate only a member account as a delegated administrator.
  17007. //
  17008. // - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
  17009. // account. To close the management account for the organization, you must
  17010. // first either remove or close all member accounts in the organization.
  17011. // Follow standard account closure process using root credentials.​
  17012. //
  17013. // - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
  17014. // an account that is registered as a delegated administrator for a service
  17015. // integrated with your organization. To complete this operation, you must
  17016. // first deregister this account as a delegated administrator.
  17017. //
  17018. // - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota
  17019. // for the past 30 days.
  17020. //
  17021. // - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
  17022. // of accounts that you can close at a time. ​
  17023. //
  17024. // - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
  17025. // organization in the specified region, you must enable all features mode.
  17026. //
  17027. // - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
  17028. // an Amazon Web Services account as a delegated administrator for an Amazon
  17029. // Web Services service that already has a delegated administrator. To complete
  17030. // this operation, you must first deregister any existing delegated administrators
  17031. // for this service.
  17032. //
  17033. // - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
  17034. // valid for a limited period of time. You must resubmit the request and
  17035. // generate a new verfication code.
  17036. //
  17037. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  17038. // handshakes that you can send in one day.
  17039. //
  17040. // - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
  17041. // supported payment method is associated with the account. Amazon Web Services
  17042. // does not support cards issued by financial institutions in Russia or Belarus.
  17043. // For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  17044. //
  17045. // - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
  17046. // in this organization, you first must migrate the organization's management
  17047. // account to the marketplace that corresponds to the management account's
  17048. // address. For example, accounts with India addresses must be associated
  17049. // with the AISPL marketplace. All accounts in an organization must be associated
  17050. // with the same marketplace.
  17051. //
  17052. // - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon
  17053. // Web Services /> Regions in China. To create an organization, the master
  17054. // must have a valid business license. For more information, contact customer
  17055. // support.
  17056. //
  17057. // - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
  17058. // must first provide a valid contact address and phone number for the management
  17059. // account. Then try the operation again.
  17060. //
  17061. // - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
  17062. // management account must have an associated account in the Amazon Web Services
  17063. // GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
  17064. // in the Amazon Web Services GovCloud User Guide.
  17065. //
  17066. // - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
  17067. // with this management account, you first must associate a valid payment
  17068. // instrument, such as a credit card, with the account. Follow the steps
  17069. // at To leave an organization when all required account information has
  17070. // not yet been provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  17071. // in the Organizations User Guide.
  17072. //
  17073. // - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
  17074. // to register more delegated administrators than allowed for the service
  17075. // principal.
  17076. //
  17077. // - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
  17078. // number of policies of a certain type that can be attached to an entity
  17079. // at one time.
  17080. //
  17081. // - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
  17082. // on this resource.
  17083. //
  17084. // - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
  17085. // with this member account, you first must associate a valid payment instrument,
  17086. // such as a credit card, with the account. Follow the steps at To leave
  17087. // an organization when all required account information has not yet been
  17088. // provided (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
  17089. // in the Organizations User Guide.
  17090. //
  17091. // - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
  17092. // policy from an entity that would cause the entity to have fewer than the
  17093. // minimum number of policies of a certain type required.
  17094. //
  17095. // - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
  17096. // that requires the organization to be configured to support all features.
  17097. // An organization that supports only consolidated billing features can't
  17098. // perform this operation.
  17099. //
  17100. // - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
  17101. // too many levels deep.
  17102. //
  17103. // - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
  17104. // that you can have in an organization.
  17105. //
  17106. // - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
  17107. // is larger than the maximum size.
  17108. //
  17109. // - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
  17110. // policies that you can have in an organization.
  17111. //
  17112. // - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator
  17113. // before you enabled service access. Call the EnableAWSServiceAccess API
  17114. // first.
  17115. //
  17116. // - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
  17117. // tags that are not compliant with the tag policy requirements for this
  17118. // account.
  17119. //
  17120. // - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account,
  17121. // there is a waiting period before you can remove it from the organization.
  17122. // If you get an error that indicates that a wait period is required, try
  17123. // again in a few days.
  17124. type ConstraintViolationException struct {
  17125. _ struct{} `type:"structure"`
  17126. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  17127. Message_ *string `locationName:"Message" type:"string"`
  17128. Reason *string `type:"string" enum:"ConstraintViolationExceptionReason"`
  17129. }
  17130. // String returns the string representation.
  17131. //
  17132. // API parameter values that are decorated as "sensitive" in the API will not
  17133. // be included in the string output. The member name will be present, but the
  17134. // value will be replaced with "sensitive".
  17135. func (s ConstraintViolationException) String() string {
  17136. return awsutil.Prettify(s)
  17137. }
  17138. // GoString returns the string representation.
  17139. //
  17140. // API parameter values that are decorated as "sensitive" in the API will not
  17141. // be included in the string output. The member name will be present, but the
  17142. // value will be replaced with "sensitive".
  17143. func (s ConstraintViolationException) GoString() string {
  17144. return s.String()
  17145. }
  17146. func newErrorConstraintViolationException(v protocol.ResponseMetadata) error {
  17147. return &ConstraintViolationException{
  17148. RespMetadata: v,
  17149. }
  17150. }
  17151. // Code returns the exception type name.
  17152. func (s *ConstraintViolationException) Code() string {
  17153. return "ConstraintViolationException"
  17154. }
  17155. // Message returns the exception's message.
  17156. func (s *ConstraintViolationException) Message() string {
  17157. if s.Message_ != nil {
  17158. return *s.Message_
  17159. }
  17160. return ""
  17161. }
  17162. // OrigErr always returns nil, satisfies awserr.Error interface.
  17163. func (s *ConstraintViolationException) OrigErr() error {
  17164. return nil
  17165. }
  17166. func (s *ConstraintViolationException) Error() string {
  17167. return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  17168. }
  17169. // Status code returns the HTTP status code for the request's response error.
  17170. func (s *ConstraintViolationException) StatusCode() int {
  17171. return s.RespMetadata.StatusCode
  17172. }
  17173. // RequestID returns the service's response RequestID for request.
  17174. func (s *ConstraintViolationException) RequestID() string {
  17175. return s.RespMetadata.RequestID
  17176. }
  17177. type CreateAccountInput struct {
  17178. _ struct{} `type:"structure"`
  17179. // The friendly name of the member account.
  17180. //
  17181. // AccountName is a sensitive parameter and its value will be
  17182. // replaced with "sensitive" in string returned by CreateAccountInput's
  17183. // String and GoString methods.
  17184. //
  17185. // AccountName is a required field
  17186. AccountName *string `min:"1" type:"string" required:"true" sensitive:"true"`
  17187. // The email address of the owner to assign to the new member account. This
  17188. // email address must not already be associated with another Amazon Web Services
  17189. // account. You must use a valid email address to complete account creation.
  17190. //
  17191. // The rules for a valid email address:
  17192. //
  17193. // * The address must be a minimum of 6 and a maximum of 64 characters long.
  17194. //
  17195. // * All characters must be 7-bit ASCII characters.
  17196. //
  17197. // * There must be one and only one @ symbol, which separates the local name
  17198. // from the domain name.
  17199. //
  17200. // * The local name can't contain any of the following characters: whitespace,
  17201. // " ' ( ) < > [ ] : ; , \ | % &
  17202. //
  17203. // * The local name can't begin with a dot (.)
  17204. //
  17205. // * The domain name can consist of only the characters [a-z],[A-Z],[0-9],
  17206. // hyphen (-), or dot (.)
  17207. //
  17208. // * The domain name can't begin or end with a hyphen (-) or dot (.)
  17209. //
  17210. // * The domain name must contain at least one dot
  17211. //
  17212. // You can't access the root user of the account or remove an account that was
  17213. // created with an invalid email address.
  17214. //
  17215. // Email is a sensitive parameter and its value will be
  17216. // replaced with "sensitive" in string returned by CreateAccountInput's
  17217. // String and GoString methods.
  17218. //
  17219. // Email is a required field
  17220. Email *string `min:"6" type:"string" required:"true" sensitive:"true"`
  17221. // If set to ALLOW, the new account enables IAM users to access account billing
  17222. // information if they have the required permissions. If set to DENY, only the
  17223. // root user of the new account can access account billing information. For
  17224. // more information, see Activating Access to the Billing and Cost Management
  17225. // Console (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate)
  17226. // in the Amazon Web Services Billing and Cost Management User Guide.
  17227. //
  17228. // If you don't specify this parameter, the value defaults to ALLOW, and IAM
  17229. // users and roles with the required permissions can access billing information
  17230. // for the new account.
  17231. IamUserAccessToBilling *string `type:"string" enum:"IAMUserAccessToBilling"`
  17232. // The name of an IAM role that Organizations automatically preconfigures in
  17233. // the new member account. This role trusts the management account, allowing
  17234. // users in the management account to assume the role, as permitted by the management
  17235. // account administrator. The role has administrator permissions in the new
  17236. // member account.
  17237. //
  17238. // If you don't specify this parameter, the role name defaults to OrganizationAccountAccessRole.
  17239. //
  17240. // For more information about how to use this role to access the member account,
  17241. // see the following links:
  17242. //
  17243. // * Accessing and Administering the Member Accounts in Your Organization
  17244. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role)
  17245. // in the Organizations User Guide
  17246. //
  17247. // * Steps 2 and 3 in Tutorial: Delegate Access Across Amazon Web Services
  17248. // accounts Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html)
  17249. // in the IAM User Guide
  17250. //
  17251. // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
  17252. // this parameter. The pattern can include uppercase letters, lowercase letters,
  17253. // digits with no spaces, and any of the following characters: =,.@-
  17254. RoleName *string `type:"string"`
  17255. // A list of tags that you want to attach to the newly created account. For
  17256. // each tag in the list, you must specify both a tag key and a value. You can
  17257. // set the value to an empty string, but you can't set it to null. For more
  17258. // information about tagging, see Tagging Organizations resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html)
  17259. // in the Organizations User Guide.
  17260. //
  17261. // If any one of the tags is invalid or if you exceed the maximum allowed number
  17262. // of tags for an account, then the entire request fails and the account is
  17263. // not created.
  17264. Tags []*Tag `type:"list"`
  17265. }
  17266. // String returns the string representation.
  17267. //
  17268. // API parameter values that are decorated as "sensitive" in the API will not
  17269. // be included in the string output. The member name will be present, but the
  17270. // value will be replaced with "sensitive".
  17271. func (s CreateAccountInput) String() string {
  17272. return awsutil.Prettify(s)
  17273. }
  17274. // GoString returns the string representation.
  17275. //
  17276. // API parameter values that are decorated as "sensitive" in the API will not
  17277. // be included in the string output. The member name will be present, but the
  17278. // value will be replaced with "sensitive".
  17279. func (s CreateAccountInput) GoString() string {
  17280. return s.String()
  17281. }
  17282. // Validate inspects the fields of the type to determine if they are valid.
  17283. func (s *CreateAccountInput) Validate() error {
  17284. invalidParams := request.ErrInvalidParams{Context: "CreateAccountInput"}
  17285. if s.AccountName == nil {
  17286. invalidParams.Add(request.NewErrParamRequired("AccountName"))
  17287. }
  17288. if s.AccountName != nil && len(*s.AccountName) < 1 {
  17289. invalidParams.Add(request.NewErrParamMinLen("AccountName", 1))
  17290. }
  17291. if s.Email == nil {
  17292. invalidParams.Add(request.NewErrParamRequired("Email"))
  17293. }
  17294. if s.Email != nil && len(*s.Email) < 6 {
  17295. invalidParams.Add(request.NewErrParamMinLen("Email", 6))
  17296. }
  17297. if s.Tags != nil {
  17298. for i, v := range s.Tags {
  17299. if v == nil {
  17300. continue
  17301. }
  17302. if err := v.Validate(); err != nil {
  17303. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  17304. }
  17305. }
  17306. }
  17307. if invalidParams.Len() > 0 {
  17308. return invalidParams
  17309. }
  17310. return nil
  17311. }
  17312. // SetAccountName sets the AccountName field's value.
  17313. func (s *CreateAccountInput) SetAccountName(v string) *CreateAccountInput {
  17314. s.AccountName = &v
  17315. return s
  17316. }
  17317. // SetEmail sets the Email field's value.
  17318. func (s *CreateAccountInput) SetEmail(v string) *CreateAccountInput {
  17319. s.Email = &v
  17320. return s
  17321. }
  17322. // SetIamUserAccessToBilling sets the IamUserAccessToBilling field's value.
  17323. func (s *CreateAccountInput) SetIamUserAccessToBilling(v string) *CreateAccountInput {
  17324. s.IamUserAccessToBilling = &v
  17325. return s
  17326. }
  17327. // SetRoleName sets the RoleName field's value.
  17328. func (s *CreateAccountInput) SetRoleName(v string) *CreateAccountInput {
  17329. s.RoleName = &v
  17330. return s
  17331. }
  17332. // SetTags sets the Tags field's value.
  17333. func (s *CreateAccountInput) SetTags(v []*Tag) *CreateAccountInput {
  17334. s.Tags = v
  17335. return s
  17336. }
  17337. type CreateAccountOutput struct {
  17338. _ struct{} `type:"structure"`
  17339. // A structure that contains details about the request to create an account.
  17340. // This response structure might not be fully populated when you first receive
  17341. // it because account creation is an asynchronous process. You can pass the
  17342. // returned CreateAccountStatus ID as a parameter to DescribeCreateAccountStatus
  17343. // to get status about the progress of the request at later times. You can also
  17344. // check the CloudTrail log for the CreateAccountResult event. For more information,
  17345. // see Monitoring the Activity in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_monitoring.html)
  17346. // in the Organizations User Guide.
  17347. CreateAccountStatus *CreateAccountStatus `type:"structure"`
  17348. }
  17349. // String returns the string representation.
  17350. //
  17351. // API parameter values that are decorated as "sensitive" in the API will not
  17352. // be included in the string output. The member name will be present, but the
  17353. // value will be replaced with "sensitive".
  17354. func (s CreateAccountOutput) String() string {
  17355. return awsutil.Prettify(s)
  17356. }
  17357. // GoString returns the string representation.
  17358. //
  17359. // API parameter values that are decorated as "sensitive" in the API will not
  17360. // be included in the string output. The member name will be present, but the
  17361. // value will be replaced with "sensitive".
  17362. func (s CreateAccountOutput) GoString() string {
  17363. return s.String()
  17364. }
  17365. // SetCreateAccountStatus sets the CreateAccountStatus field's value.
  17366. func (s *CreateAccountOutput) SetCreateAccountStatus(v *CreateAccountStatus) *CreateAccountOutput {
  17367. s.CreateAccountStatus = v
  17368. return s
  17369. }
  17370. // Contains the status about a CreateAccount or CreateGovCloudAccount request
  17371. // to create an Amazon Web Services account or an Amazon Web Services GovCloud
  17372. // (US) account in an organization.
  17373. type CreateAccountStatus struct {
  17374. _ struct{} `type:"structure"`
  17375. // If the account was created successfully, the unique identifier (ID) of the
  17376. // new account.
  17377. //
  17378. // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string
  17379. // requires exactly 12 digits.
  17380. AccountId *string `type:"string"`
  17381. // The account name given to the account when it was created.
  17382. //
  17383. // AccountName is a sensitive parameter and its value will be
  17384. // replaced with "sensitive" in string returned by CreateAccountStatus's
  17385. // String and GoString methods.
  17386. AccountName *string `min:"1" type:"string" sensitive:"true"`
  17387. // The date and time that the account was created and the request completed.
  17388. CompletedTimestamp *time.Time `type:"timestamp"`
  17389. // If the request failed, a description of the reason for the failure.
  17390. //
  17391. // * ACCOUNT_LIMIT_EXCEEDED: The account couldn't be created because you
  17392. // reached the limit on the number of accounts in your organization.
  17393. //
  17394. // * CONCURRENT_ACCOUNT_MODIFICATION: You already submitted a request with
  17395. // the same information.
  17396. //
  17397. // * EMAIL_ALREADY_EXISTS: The account could not be created because another
  17398. // Amazon Web Services account with that email address already exists.
  17399. //
  17400. // * FAILED_BUSINESS_VALIDATION: The Amazon Web Services account that owns
  17401. // your organization failed to receive business license validation.
  17402. //
  17403. // * GOVCLOUD_ACCOUNT_ALREADY_EXISTS: The account in the Amazon Web Services
  17404. // GovCloud (US) Region could not be created because this Region already
  17405. // includes an account with that email address.
  17406. //
  17407. // * IDENTITY_INVALID_BUSINESS_VALIDATION: The Amazon Web Services account
  17408. // that owns your organization can't complete business license validation
  17409. // because it doesn't have valid identity data.
  17410. //
  17411. // * INVALID_ADDRESS: The account could not be created because the address
  17412. // you provided is not valid.
  17413. //
  17414. // * INVALID_EMAIL: The account could not be created because the email address
  17415. // you provided is not valid.
  17416. //
  17417. // * INVALID_PAYMENT_INSTRUMENT: The Amazon Web Services account that owns
  17418. // your organization does not have a supported payment method associated
  17419. // with the account. Amazon Web Services does not support cards issued by
  17420. // financial institutions in Russia or Belarus. For more information, see
  17421. // Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
  17422. //
  17423. // * INTERNAL_FAILURE: The account could not be created because of an internal
  17424. // failure. Try again later. If the problem persists, contact Amazon Web
  17425. // Services Customer Support.
  17426. //
  17427. // * MISSING_BUSINESS_VALIDATION: The Amazon Web Services account that owns
  17428. // your organization has not received Business Validation.
  17429. //
  17430. // * MISSING_PAYMENT_INSTRUMENT: You must configure the management account
  17431. // with a valid payment method, such as a credit card.
  17432. //
  17433. // * PENDING_BUSINESS_VALIDATION: The Amazon Web Services account that owns
  17434. // your organization is still in the process of completing business license
  17435. // validation.
  17436. //
  17437. // * UNKNOWN_BUSINESS_VALIDATION: The Amazon Web Services account that owns
  17438. // your organization has an unknown issue with business license validation.
  17439. FailureReason *string `type:"string" enum:"CreateAccountFailureReason"`
  17440. // If the account was created successfully, the unique identifier (ID) of the
  17441. // new account in the Amazon Web Services GovCloud (US) Region.
  17442. GovCloudAccountId *string `type:"string"`
  17443. // The unique identifier (ID) that references this request. You get this value
  17444. // from the response of the initial CreateAccount request to create the account.
  17445. //
  17446. // The regex pattern (http://wikipedia.org/wiki/regex) for a create account
  17447. // request ID string requires "car-" followed by from 8 to 32 lowercase letters
  17448. // or digits.
  17449. Id *string `type:"string"`
  17450. // The date and time that the request was made for the account creation.
  17451. RequestedTimestamp *time.Time `type:"timestamp"`
  17452. // The status of the asynchronous request to create an Amazon Web Services account.
  17453. State *string `type:"string" enum:"CreateAccountState"`
  17454. }
  17455. // String returns the string representation.
  17456. //
  17457. // API parameter values that are decorated as "sensitive" in the API will not
  17458. // be included in the string output. The member name will be present, but the
  17459. // value will be replaced with "sensitive".
  17460. func (s CreateAccountStatus) String() string {
  17461. return awsutil.Prettify(s)
  17462. }
  17463. // GoString returns the string representation.
  17464. //
  17465. // API parameter values that are decorated as "sensitive" in the API will not
  17466. // be included in the string output. The member name will be present, but the
  17467. // value will be replaced with "sensitive".
  17468. func (s CreateAccountStatus) GoString() string {
  17469. return s.String()
  17470. }
  17471. // SetAccountId sets the AccountId field's value.
  17472. func (s *CreateAccountStatus) SetAccountId(v string) *CreateAccountStatus {
  17473. s.AccountId = &v
  17474. return s
  17475. }
  17476. // SetAccountName sets the AccountName field's value.
  17477. func (s *CreateAccountStatus) SetAccountName(v string) *CreateAccountStatus {
  17478. s.AccountName = &v
  17479. return s
  17480. }
  17481. // SetCompletedTimestamp sets the CompletedTimestamp field's value.
  17482. func (s *CreateAccountStatus) SetCompletedTimestamp(v time.Time) *CreateAccountStatus {
  17483. s.CompletedTimestamp = &v
  17484. return s
  17485. }
  17486. // SetFailureReason sets the FailureReason field's value.
  17487. func (s *CreateAccountStatus) SetFailureReason(v string) *CreateAccountStatus {
  17488. s.FailureReason = &v
  17489. return s
  17490. }
  17491. // SetGovCloudAccountId sets the GovCloudAccountId field's value.
  17492. func (s *CreateAccountStatus) SetGovCloudAccountId(v string) *CreateAccountStatus {
  17493. s.GovCloudAccountId = &v
  17494. return s
  17495. }
  17496. // SetId sets the Id field's value.
  17497. func (s *CreateAccountStatus) SetId(v string) *CreateAccountStatus {
  17498. s.Id = &v
  17499. return s
  17500. }
  17501. // SetRequestedTimestamp sets the RequestedTimestamp field's value.
  17502. func (s *CreateAccountStatus) SetRequestedTimestamp(v time.Time) *CreateAccountStatus {
  17503. s.RequestedTimestamp = &v
  17504. return s
  17505. }
  17506. // SetState sets the State field's value.
  17507. func (s *CreateAccountStatus) SetState(v string) *CreateAccountStatus {
  17508. s.State = &v
  17509. return s
  17510. }
  17511. // We can't find an create account request with the CreateAccountRequestId that
  17512. // you specified.
  17513. type CreateAccountStatusNotFoundException struct {
  17514. _ struct{} `type:"structure"`
  17515. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  17516. Message_ *string `locationName:"Message" type:"string"`
  17517. }
  17518. // String returns the string representation.
  17519. //
  17520. // API parameter values that are decorated as "sensitive" in the API will not
  17521. // be included in the string output. The member name will be present, but the
  17522. // value will be replaced with "sensitive".
  17523. func (s CreateAccountStatusNotFoundException) String() string {
  17524. return awsutil.Prettify(s)
  17525. }
  17526. // GoString returns the string representation.
  17527. //
  17528. // API parameter values that are decorated as "sensitive" in the API will not
  17529. // be included in the string output. The member name will be present, but the
  17530. // value will be replaced with "sensitive".
  17531. func (s CreateAccountStatusNotFoundException) GoString() string {
  17532. return s.String()
  17533. }
  17534. func newErrorCreateAccountStatusNotFoundException(v protocol.ResponseMetadata) error {
  17535. return &CreateAccountStatusNotFoundException{
  17536. RespMetadata: v,
  17537. }
  17538. }
  17539. // Code returns the exception type name.
  17540. func (s *CreateAccountStatusNotFoundException) Code() string {
  17541. return "CreateAccountStatusNotFoundException"
  17542. }
  17543. // Message returns the exception's message.
  17544. func (s *CreateAccountStatusNotFoundException) Message() string {
  17545. if s.Message_ != nil {
  17546. return *s.Message_
  17547. }
  17548. return ""
  17549. }
  17550. // OrigErr always returns nil, satisfies awserr.Error interface.
  17551. func (s *CreateAccountStatusNotFoundException) OrigErr() error {
  17552. return nil
  17553. }
  17554. func (s *CreateAccountStatusNotFoundException) Error() string {
  17555. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  17556. }
  17557. // Status code returns the HTTP status code for the request's response error.
  17558. func (s *CreateAccountStatusNotFoundException) StatusCode() int {
  17559. return s.RespMetadata.StatusCode
  17560. }
  17561. // RequestID returns the service's response RequestID for request.
  17562. func (s *CreateAccountStatusNotFoundException) RequestID() string {
  17563. return s.RespMetadata.RequestID
  17564. }
  17565. type CreateGovCloudAccountInput struct {
  17566. _ struct{} `type:"structure"`
  17567. // The friendly name of the member account.
  17568. //
  17569. // The account name can consist of only the characters [a-z],[A-Z],[0-9], hyphen
  17570. // (-), or dot (.) You can't separate characters with a dash (–).
  17571. //
  17572. // AccountName is a sensitive parameter and its value will be
  17573. // replaced with "sensitive" in string returned by CreateGovCloudAccountInput's
  17574. // String and GoString methods.
  17575. //
  17576. // AccountName is a required field
  17577. AccountName *string `min:"1" type:"string" required:"true" sensitive:"true"`
  17578. // Specifies the email address of the owner to assign to the new member account
  17579. // in the commercial Region. This email address must not already be associated
  17580. // with another Amazon Web Services account. You must use a valid email address
  17581. // to complete account creation.
  17582. //
  17583. // The rules for a valid email address:
  17584. //
  17585. // * The address must be a minimum of 6 and a maximum of 64 characters long.
  17586. //
  17587. // * All characters must be 7-bit ASCII characters.
  17588. //
  17589. // * There must be one and only one @ symbol, which separates the local name
  17590. // from the domain name.
  17591. //
  17592. // * The local name can't contain any of the following characters: whitespace,
  17593. // " ' ( ) < > [ ] : ; , \ | % &
  17594. //
  17595. // * The local name can't begin with a dot (.)
  17596. //
  17597. // * The domain name can consist of only the characters [a-z],[A-Z],[0-9],
  17598. // hyphen (-), or dot (.)
  17599. //
  17600. // * The domain name can't begin or end with a hyphen (-) or dot (.)
  17601. //
  17602. // * The domain name must contain at least one dot
  17603. //
  17604. // You can't access the root user of the account or remove an account that was
  17605. // created with an invalid email address. Like all request parameters for CreateGovCloudAccount,
  17606. // the request for the email address for the Amazon Web Services GovCloud (US)
  17607. // account originates from the commercial Region, not from the Amazon Web Services
  17608. // GovCloud (US) Region.
  17609. //
  17610. // Email is a sensitive parameter and its value will be
  17611. // replaced with "sensitive" in string returned by CreateGovCloudAccountInput's
  17612. // String and GoString methods.
  17613. //
  17614. // Email is a required field
  17615. Email *string `min:"6" type:"string" required:"true" sensitive:"true"`
  17616. // If set to ALLOW, the new linked account in the commercial Region enables
  17617. // IAM users to access account billing information if they have the required
  17618. // permissions. If set to DENY, only the root user of the new account can access
  17619. // account billing information. For more information, see Activating Access
  17620. // to the Billing and Cost Management Console (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate)
  17621. // in the Amazon Web Services Billing and Cost Management User Guide.
  17622. //
  17623. // If you don't specify this parameter, the value defaults to ALLOW, and IAM
  17624. // users and roles with the required permissions can access billing information
  17625. // for the new account.
  17626. IamUserAccessToBilling *string `type:"string" enum:"IAMUserAccessToBilling"`
  17627. // (Optional)
  17628. //
  17629. // The name of an IAM role that Organizations automatically preconfigures in
  17630. // the new member accounts in both the Amazon Web Services GovCloud (US) Region
  17631. // and in the commercial Region. This role trusts the management account, allowing
  17632. // users in the management account to assume the role, as permitted by the management
  17633. // account administrator. The role has administrator permissions in the new
  17634. // member account.
  17635. //
  17636. // If you don't specify this parameter, the role name defaults to OrganizationAccountAccessRole.
  17637. //
  17638. // For more information about how to use this role to access the member account,
  17639. // see Accessing and Administering the Member Accounts in Your Organization
  17640. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role)
  17641. // in the Organizations User Guide and steps 2 and 3 in Tutorial: Delegate Access
  17642. // Across Amazon Web Services accounts Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html)
  17643. // in the IAM User Guide.
  17644. //
  17645. // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
  17646. // this parameter. The pattern can include uppercase letters, lowercase letters,
  17647. // digits with no spaces, and any of the following characters: =,.@-
  17648. RoleName *string `type:"string"`
  17649. // A list of tags that you want to attach to the newly created account. These
  17650. // tags are attached to the commercial account associated with the GovCloud
  17651. // account, and not to the GovCloud account itself. To add tags to the actual
  17652. // GovCloud account, call the TagResource operation in the GovCloud region after
  17653. // the new GovCloud account exists.
  17654. //
  17655. // For each tag in the list, you must specify both a tag key and a value. You
  17656. // can set the value to an empty string, but you can't set it to null. For more
  17657. // information about tagging, see Tagging Organizations resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html)
  17658. // in the Organizations User Guide.
  17659. //
  17660. // If any one of the tags is invalid or if you exceed the maximum allowed number
  17661. // of tags for an account, then the entire request fails and the account is
  17662. // not created.
  17663. Tags []*Tag `type:"list"`
  17664. }
  17665. // String returns the string representation.
  17666. //
  17667. // API parameter values that are decorated as "sensitive" in the API will not
  17668. // be included in the string output. The member name will be present, but the
  17669. // value will be replaced with "sensitive".
  17670. func (s CreateGovCloudAccountInput) String() string {
  17671. return awsutil.Prettify(s)
  17672. }
  17673. // GoString returns the string representation.
  17674. //
  17675. // API parameter values that are decorated as "sensitive" in the API will not
  17676. // be included in the string output. The member name will be present, but the
  17677. // value will be replaced with "sensitive".
  17678. func (s CreateGovCloudAccountInput) GoString() string {
  17679. return s.String()
  17680. }
  17681. // Validate inspects the fields of the type to determine if they are valid.
  17682. func (s *CreateGovCloudAccountInput) Validate() error {
  17683. invalidParams := request.ErrInvalidParams{Context: "CreateGovCloudAccountInput"}
  17684. if s.AccountName == nil {
  17685. invalidParams.Add(request.NewErrParamRequired("AccountName"))
  17686. }
  17687. if s.AccountName != nil && len(*s.AccountName) < 1 {
  17688. invalidParams.Add(request.NewErrParamMinLen("AccountName", 1))
  17689. }
  17690. if s.Email == nil {
  17691. invalidParams.Add(request.NewErrParamRequired("Email"))
  17692. }
  17693. if s.Email != nil && len(*s.Email) < 6 {
  17694. invalidParams.Add(request.NewErrParamMinLen("Email", 6))
  17695. }
  17696. if s.Tags != nil {
  17697. for i, v := range s.Tags {
  17698. if v == nil {
  17699. continue
  17700. }
  17701. if err := v.Validate(); err != nil {
  17702. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  17703. }
  17704. }
  17705. }
  17706. if invalidParams.Len() > 0 {
  17707. return invalidParams
  17708. }
  17709. return nil
  17710. }
  17711. // SetAccountName sets the AccountName field's value.
  17712. func (s *CreateGovCloudAccountInput) SetAccountName(v string) *CreateGovCloudAccountInput {
  17713. s.AccountName = &v
  17714. return s
  17715. }
  17716. // SetEmail sets the Email field's value.
  17717. func (s *CreateGovCloudAccountInput) SetEmail(v string) *CreateGovCloudAccountInput {
  17718. s.Email = &v
  17719. return s
  17720. }
  17721. // SetIamUserAccessToBilling sets the IamUserAccessToBilling field's value.
  17722. func (s *CreateGovCloudAccountInput) SetIamUserAccessToBilling(v string) *CreateGovCloudAccountInput {
  17723. s.IamUserAccessToBilling = &v
  17724. return s
  17725. }
  17726. // SetRoleName sets the RoleName field's value.
  17727. func (s *CreateGovCloudAccountInput) SetRoleName(v string) *CreateGovCloudAccountInput {
  17728. s.RoleName = &v
  17729. return s
  17730. }
  17731. // SetTags sets the Tags field's value.
  17732. func (s *CreateGovCloudAccountInput) SetTags(v []*Tag) *CreateGovCloudAccountInput {
  17733. s.Tags = v
  17734. return s
  17735. }
  17736. type CreateGovCloudAccountOutput struct {
  17737. _ struct{} `type:"structure"`
  17738. // Contains the status about a CreateAccount or CreateGovCloudAccount request
  17739. // to create an Amazon Web Services account or an Amazon Web Services GovCloud
  17740. // (US) account in an organization.
  17741. CreateAccountStatus *CreateAccountStatus `type:"structure"`
  17742. }
  17743. // String returns the string representation.
  17744. //
  17745. // API parameter values that are decorated as "sensitive" in the API will not
  17746. // be included in the string output. The member name will be present, but the
  17747. // value will be replaced with "sensitive".
  17748. func (s CreateGovCloudAccountOutput) String() string {
  17749. return awsutil.Prettify(s)
  17750. }
  17751. // GoString returns the string representation.
  17752. //
  17753. // API parameter values that are decorated as "sensitive" in the API will not
  17754. // be included in the string output. The member name will be present, but the
  17755. // value will be replaced with "sensitive".
  17756. func (s CreateGovCloudAccountOutput) GoString() string {
  17757. return s.String()
  17758. }
  17759. // SetCreateAccountStatus sets the CreateAccountStatus field's value.
  17760. func (s *CreateGovCloudAccountOutput) SetCreateAccountStatus(v *CreateAccountStatus) *CreateGovCloudAccountOutput {
  17761. s.CreateAccountStatus = v
  17762. return s
  17763. }
  17764. type CreateOrganizationInput struct {
  17765. _ struct{} `type:"structure"`
  17766. // Specifies the feature set supported by the new organization. Each feature
  17767. // set supports different levels of functionality.
  17768. //
  17769. // * CONSOLIDATED_BILLING: All member accounts have their bills consolidated
  17770. // to and paid by the management account. For more information, see Consolidated
  17771. // billing (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-cb-only)
  17772. // in the Organizations User Guide. The consolidated billing feature subset
  17773. // isn't available for organizations in the Amazon Web Services GovCloud
  17774. // (US) Region.
  17775. //
  17776. // * ALL: In addition to all the features supported by the consolidated billing
  17777. // feature set, the management account can also apply any policy type to
  17778. // any member account in the organization. For more information, see All
  17779. // features (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-all)
  17780. // in the Organizations User Guide.
  17781. FeatureSet *string `type:"string" enum:"OrganizationFeatureSet"`
  17782. }
  17783. // String returns the string representation.
  17784. //
  17785. // API parameter values that are decorated as "sensitive" in the API will not
  17786. // be included in the string output. The member name will be present, but the
  17787. // value will be replaced with "sensitive".
  17788. func (s CreateOrganizationInput) String() string {
  17789. return awsutil.Prettify(s)
  17790. }
  17791. // GoString returns the string representation.
  17792. //
  17793. // API parameter values that are decorated as "sensitive" in the API will not
  17794. // be included in the string output. The member name will be present, but the
  17795. // value will be replaced with "sensitive".
  17796. func (s CreateOrganizationInput) GoString() string {
  17797. return s.String()
  17798. }
  17799. // SetFeatureSet sets the FeatureSet field's value.
  17800. func (s *CreateOrganizationInput) SetFeatureSet(v string) *CreateOrganizationInput {
  17801. s.FeatureSet = &v
  17802. return s
  17803. }
  17804. type CreateOrganizationOutput struct {
  17805. _ struct{} `type:"structure"`
  17806. // A structure that contains details about the newly created organization.
  17807. Organization *Organization `type:"structure"`
  17808. }
  17809. // String returns the string representation.
  17810. //
  17811. // API parameter values that are decorated as "sensitive" in the API will not
  17812. // be included in the string output. The member name will be present, but the
  17813. // value will be replaced with "sensitive".
  17814. func (s CreateOrganizationOutput) String() string {
  17815. return awsutil.Prettify(s)
  17816. }
  17817. // GoString returns the string representation.
  17818. //
  17819. // API parameter values that are decorated as "sensitive" in the API will not
  17820. // be included in the string output. The member name will be present, but the
  17821. // value will be replaced with "sensitive".
  17822. func (s CreateOrganizationOutput) GoString() string {
  17823. return s.String()
  17824. }
  17825. // SetOrganization sets the Organization field's value.
  17826. func (s *CreateOrganizationOutput) SetOrganization(v *Organization) *CreateOrganizationOutput {
  17827. s.Organization = v
  17828. return s
  17829. }
  17830. type CreateOrganizationalUnitInput struct {
  17831. _ struct{} `type:"structure"`
  17832. // The friendly name to assign to the new OU.
  17833. //
  17834. // Name is a required field
  17835. Name *string `min:"1" type:"string" required:"true"`
  17836. // The unique identifier (ID) of the parent root or OU that you want to create
  17837. // the new OU in.
  17838. //
  17839. // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string
  17840. // requires one of the following:
  17841. //
  17842. // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
  17843. // letters or digits.
  17844. //
  17845. // * Organizational unit (OU) - A string that begins with "ou-" followed
  17846. // by from 4 to 32 lowercase letters or digits (the ID of the root that the
  17847. // OU is in). This string is followed by a second "-" dash and from 8 to
  17848. // 32 additional lowercase letters or digits.
  17849. //
  17850. // ParentId is a required field
  17851. ParentId *string `type:"string" required:"true"`
  17852. // A list of tags that you want to attach to the newly created OU. For each
  17853. // tag in the list, you must specify both a tag key and a value. You can set
  17854. // the value to an empty string, but you can't set it to null. For more information
  17855. // about tagging, see Tagging Organizations resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html)
  17856. // in the Organizations User Guide.
  17857. //
  17858. // If any one of the tags is invalid or if you exceed the allowed number of
  17859. // tags for an OU, then the entire request fails and the OU is not created.
  17860. Tags []*Tag `type:"list"`
  17861. }
  17862. // String returns the string representation.
  17863. //
  17864. // API parameter values that are decorated as "sensitive" in the API will not
  17865. // be included in the string output. The member name will be present, but the
  17866. // value will be replaced with "sensitive".
  17867. func (s CreateOrganizationalUnitInput) String() string {
  17868. return awsutil.Prettify(s)
  17869. }
  17870. // GoString returns the string representation.
  17871. //
  17872. // API parameter values that are decorated as "sensitive" in the API will not
  17873. // be included in the string output. The member name will be present, but the
  17874. // value will be replaced with "sensitive".
  17875. func (s CreateOrganizationalUnitInput) GoString() string {
  17876. return s.String()
  17877. }
  17878. // Validate inspects the fields of the type to determine if they are valid.
  17879. func (s *CreateOrganizationalUnitInput) Validate() error {
  17880. invalidParams := request.ErrInvalidParams{Context: "CreateOrganizationalUnitInput"}
  17881. if s.Name == nil {
  17882. invalidParams.Add(request.NewErrParamRequired("Name"))
  17883. }
  17884. if s.Name != nil && len(*s.Name) < 1 {
  17885. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  17886. }
  17887. if s.ParentId == nil {
  17888. invalidParams.Add(request.NewErrParamRequired("ParentId"))
  17889. }
  17890. if s.Tags != nil {
  17891. for i, v := range s.Tags {
  17892. if v == nil {
  17893. continue
  17894. }
  17895. if err := v.Validate(); err != nil {
  17896. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  17897. }
  17898. }
  17899. }
  17900. if invalidParams.Len() > 0 {
  17901. return invalidParams
  17902. }
  17903. return nil
  17904. }
  17905. // SetName sets the Name field's value.
  17906. func (s *CreateOrganizationalUnitInput) SetName(v string) *CreateOrganizationalUnitInput {
  17907. s.Name = &v
  17908. return s
  17909. }
  17910. // SetParentId sets the ParentId field's value.
  17911. func (s *CreateOrganizationalUnitInput) SetParentId(v string) *CreateOrganizationalUnitInput {
  17912. s.ParentId = &v
  17913. return s
  17914. }
  17915. // SetTags sets the Tags field's value.
  17916. func (s *CreateOrganizationalUnitInput) SetTags(v []*Tag) *CreateOrganizationalUnitInput {
  17917. s.Tags = v
  17918. return s
  17919. }
  17920. type CreateOrganizationalUnitOutput struct {
  17921. _ struct{} `type:"structure"`
  17922. // A structure that contains details about the newly created OU.
  17923. OrganizationalUnit *OrganizationalUnit `type:"structure"`
  17924. }
  17925. // String returns the string representation.
  17926. //
  17927. // API parameter values that are decorated as "sensitive" in the API will not
  17928. // be included in the string output. The member name will be present, but the
  17929. // value will be replaced with "sensitive".
  17930. func (s CreateOrganizationalUnitOutput) String() string {
  17931. return awsutil.Prettify(s)
  17932. }
  17933. // GoString returns the string representation.
  17934. //
  17935. // API parameter values that are decorated as "sensitive" in the API will not
  17936. // be included in the string output. The member name will be present, but the
  17937. // value will be replaced with "sensitive".
  17938. func (s CreateOrganizationalUnitOutput) GoString() string {
  17939. return s.String()
  17940. }
  17941. // SetOrganizationalUnit sets the OrganizationalUnit field's value.
  17942. func (s *CreateOrganizationalUnitOutput) SetOrganizationalUnit(v *OrganizationalUnit) *CreateOrganizationalUnitOutput {
  17943. s.OrganizationalUnit = v
  17944. return s
  17945. }
  17946. type CreatePolicyInput struct {
  17947. _ struct{} `type:"structure"`
  17948. // The policy text content to add to the new policy. The text that you supply
  17949. // must adhere to the rules of the policy type you specify in the Type parameter.
  17950. //
  17951. // Content is a required field
  17952. Content *string `min:"1" type:"string" required:"true"`
  17953. // An optional description to assign to the policy.
  17954. //
  17955. // Description is a required field
  17956. Description *string `type:"string" required:"true"`
  17957. // The friendly name to assign to the policy.
  17958. //
  17959. // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
  17960. // this parameter is a string of any of the characters in the ASCII character
  17961. // range.
  17962. //
  17963. // Name is a required field
  17964. Name *string `min:"1" type:"string" required:"true"`
  17965. // A list of tags that you want to attach to the newly created policy. For each
  17966. // tag in the list, you must specify both a tag key and a value. You can set
  17967. // the value to an empty string, but you can't set it to null. For more information
  17968. // about tagging, see Tagging Organizations resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html)
  17969. // in the Organizations User Guide.
  17970. //
  17971. // If any one of the tags is invalid or if you exceed the allowed number of
  17972. // tags for a policy, then the entire request fails and the policy is not created.
  17973. Tags []*Tag `type:"list"`
  17974. // The type of policy to create. You can specify one of the following values:
  17975. //
  17976. // * AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
  17977. //
  17978. // * BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html)
  17979. //
  17980. // * SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html)
  17981. //
  17982. // * TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
  17983. //
  17984. // Type is a required field
  17985. Type *string `type:"string" required:"true" enum:"PolicyType"`
  17986. }
  17987. // String returns the string representation.
  17988. //
  17989. // API parameter values that are decorated as "sensitive" in the API will not
  17990. // be included in the string output. The member name will be present, but the
  17991. // value will be replaced with "sensitive".
  17992. func (s CreatePolicyInput) String() string {
  17993. return awsutil.Prettify(s)
  17994. }
  17995. // GoString returns the string representation.
  17996. //
  17997. // API parameter values that are decorated as "sensitive" in the API will not
  17998. // be included in the string output. The member name will be present, but the
  17999. // value will be replaced with "sensitive".
  18000. func (s CreatePolicyInput) GoString() string {
  18001. return s.String()
  18002. }
  18003. // Validate inspects the fields of the type to determine if they are valid.
  18004. func (s *CreatePolicyInput) Validate() error {
  18005. invalidParams := request.ErrInvalidParams{Context: "CreatePolicyInput"}
  18006. if s.Content == nil {
  18007. invalidParams.Add(request.NewErrParamRequired("Content"))
  18008. }
  18009. if s.Content != nil && len(*s.Content) < 1 {
  18010. invalidParams.Add(request.NewErrParamMinLen("Content", 1))
  18011. }
  18012. if s.Description == nil {
  18013. invalidParams.Add(request.NewErrParamRequired("Description"))
  18014. }
  18015. if s.Name == nil {
  18016. invalidParams.Add(request.NewErrParamRequired("Name"))
  18017. }
  18018. if s.Name != nil && len(*s.Name) < 1 {
  18019. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  18020. }
  18021. if s.Type == nil {
  18022. invalidParams.Add(request.NewErrParamRequired("Type"))
  18023. }
  18024. if s.Tags != nil {
  18025. for i, v := range s.Tags {
  18026. if v == nil {
  18027. continue
  18028. }
  18029. if err := v.Validate(); err != nil {
  18030. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  18031. }
  18032. }
  18033. }
  18034. if invalidParams.Len() > 0 {
  18035. return invalidParams
  18036. }
  18037. return nil
  18038. }
  18039. // SetContent sets the Content field's value.
  18040. func (s *CreatePolicyInput) SetContent(v string) *CreatePolicyInput {
  18041. s.Content = &v
  18042. return s
  18043. }
  18044. // SetDescription sets the Description field's value.
  18045. func (s *CreatePolicyInput) SetDescription(v string) *CreatePolicyInput {
  18046. s.Description = &v
  18047. return s
  18048. }
  18049. // SetName sets the Name field's value.
  18050. func (s *CreatePolicyInput) SetName(v string) *CreatePolicyInput {
  18051. s.Name = &v
  18052. return s
  18053. }
  18054. // SetTags sets the Tags field's value.
  18055. func (s *CreatePolicyInput) SetTags(v []*Tag) *CreatePolicyInput {
  18056. s.Tags = v
  18057. return s
  18058. }
  18059. // SetType sets the Type field's value.
  18060. func (s *CreatePolicyInput) SetType(v string) *CreatePolicyInput {
  18061. s.Type = &v
  18062. return s
  18063. }
  18064. type CreatePolicyOutput struct {
  18065. _ struct{} `type:"structure"`
  18066. // A structure that contains details about the newly created policy.
  18067. Policy *Policy `type:"structure"`
  18068. }
  18069. // String returns the string representation.
  18070. //
  18071. // API parameter values that are decorated as "sensitive" in the API will not
  18072. // be included in the string output. The member name will be present, but the
  18073. // value will be replaced with "sensitive".
  18074. func (s CreatePolicyOutput) String() string {
  18075. return awsutil.Prettify(s)
  18076. }
  18077. // GoString returns the string representation.
  18078. //
  18079. // API parameter values that are decorated as "sensitive" in the API will not
  18080. // be included in the string output. The member name will be present, but the
  18081. // value will be replaced with "sensitive".
  18082. func (s CreatePolicyOutput) GoString() string {
  18083. return s.String()
  18084. }
  18085. // SetPolicy sets the Policy field's value.
  18086. func (s *CreatePolicyOutput) SetPolicy(v *Policy) *CreatePolicyOutput {
  18087. s.Policy = v
  18088. return s
  18089. }
  18090. type DeclineHandshakeInput struct {
  18091. _ struct{} `type:"structure"`
  18092. // The unique identifier (ID) of the handshake that you want to decline. You
  18093. // can get the ID from the ListHandshakesForAccount operation.
  18094. //
  18095. // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string
  18096. // requires "h-" followed by from 8 to 32 lowercase letters or digits.
  18097. //
  18098. // HandshakeId is a required field
  18099. HandshakeId *string `type:"string" required:"true"`
  18100. }
  18101. // String returns the string representation.
  18102. //
  18103. // API parameter values that are decorated as "sensitive" in the API will not
  18104. // be included in the string output. The member name will be present, but the
  18105. // value will be replaced with "sensitive".
  18106. func (s DeclineHandshakeInput) String() string {
  18107. return awsutil.Prettify(s)
  18108. }
  18109. // GoString returns the string representation.
  18110. //
  18111. // API parameter values that are decorated as "sensitive" in the API will not
  18112. // be included in the string output. The member name will be present, but the
  18113. // value will be replaced with "sensitive".
  18114. func (s DeclineHandshakeInput) GoString() string {
  18115. return s.String()
  18116. }
  18117. // Validate inspects the fields of the type to determine if they are valid.
  18118. func (s *DeclineHandshakeInput) Validate() error {
  18119. invalidParams := request.ErrInvalidParams{Context: "DeclineHandshakeInput"}
  18120. if s.HandshakeId == nil {
  18121. invalidParams.Add(request.NewErrParamRequired("HandshakeId"))
  18122. }
  18123. if invalidParams.Len() > 0 {
  18124. return invalidParams
  18125. }
  18126. return nil
  18127. }
  18128. // SetHandshakeId sets the HandshakeId field's value.
  18129. func (s *DeclineHandshakeInput) SetHandshakeId(v string) *DeclineHandshakeInput {
  18130. s.HandshakeId = &v
  18131. return s
  18132. }
  18133. type DeclineHandshakeOutput struct {
  18134. _ struct{} `type:"structure"`
  18135. // A structure that contains details about the declined handshake. The state
  18136. // is updated to show the value DECLINED.
  18137. Handshake *Handshake `type:"structure"`
  18138. }
  18139. // String returns the string representation.
  18140. //
  18141. // API parameter values that are decorated as "sensitive" in the API will not
  18142. // be included in the string output. The member name will be present, but the
  18143. // value will be replaced with "sensitive".
  18144. func (s DeclineHandshakeOutput) String() string {
  18145. return awsutil.Prettify(s)
  18146. }
  18147. // GoString returns the string representation.
  18148. //
  18149. // API parameter values that are decorated as "sensitive" in the API will not
  18150. // be included in the string output. The member name will be present, but the
  18151. // value will be replaced with "sensitive".
  18152. func (s DeclineHandshakeOutput) GoString() string {
  18153. return s.String()
  18154. }
  18155. // SetHandshake sets the Handshake field's value.
  18156. func (s *DeclineHandshakeOutput) SetHandshake(v *Handshake) *DeclineHandshakeOutput {
  18157. s.Handshake = v
  18158. return s
  18159. }
  18160. // Contains information about the delegated administrator.
  18161. type DelegatedAdministrator struct {
  18162. _ struct{} `type:"structure"`
  18163. // The Amazon Resource Name (ARN) of the delegated administrator's account.
  18164. Arn *string `type:"string"`
  18165. // The date when the account was made a delegated administrator.
  18166. DelegationEnabledDate *time.Time `type:"timestamp"`
  18167. // The email address that is associated with the delegated administrator's Amazon
  18168. // Web Services account.
  18169. //
  18170. // Email is a sensitive parameter and its value will be
  18171. // replaced with "sensitive" in string returned by DelegatedAdministrator's
  18172. // String and GoString methods.
  18173. Email *string `min:"6" type:"string" sensitive:"true"`
  18174. // The unique identifier (ID) of the delegated administrator's account.
  18175. Id *string `type:"string"`
  18176. // The method by which the delegated administrator's account joined the organization.
  18177. JoinedMethod *string `type:"string" enum:"AccountJoinedMethod"`
  18178. // The date when the delegated administrator's account became a part of the
  18179. // organization.
  18180. JoinedTimestamp *time.Time `type:"timestamp"`
  18181. // The friendly name of the delegated administrator's account.
  18182. //
  18183. // Name is a sensitive parameter and its value will be
  18184. // replaced with "sensitive" in string returned by DelegatedAdministrator's
  18185. // String and GoString methods.
  18186. Name *string `min:"1" type:"string" sensitive:"true"`
  18187. // The status of the delegated administrator's account in the organization.
  18188. Status *string `type:"string" enum:"AccountStatus"`
  18189. }
  18190. // String returns the string representation.
  18191. //
  18192. // API parameter values that are decorated as "sensitive" in the API will not
  18193. // be included in the string output. The member name will be present, but the
  18194. // value will be replaced with "sensitive".
  18195. func (s DelegatedAdministrator) String() string {
  18196. return awsutil.Prettify(s)
  18197. }
  18198. // GoString returns the string representation.
  18199. //
  18200. // API parameter values that are decorated as "sensitive" in the API will not
  18201. // be included in the string output. The member name will be present, but the
  18202. // value will be replaced with "sensitive".
  18203. func (s DelegatedAdministrator) GoString() string {
  18204. return s.String()
  18205. }
  18206. // SetArn sets the Arn field's value.
  18207. func (s *DelegatedAdministrator) SetArn(v string) *DelegatedAdministrator {
  18208. s.Arn = &v
  18209. return s
  18210. }
  18211. // SetDelegationEnabledDate sets the DelegationEnabledDate field's value.
  18212. func (s *DelegatedAdministrator) SetDelegationEnabledDate(v time.Time) *DelegatedAdministrator {
  18213. s.DelegationEnabledDate = &v
  18214. return s
  18215. }
  18216. // SetEmail sets the Email field's value.
  18217. func (s *DelegatedAdministrator) SetEmail(v string) *DelegatedAdministrator {
  18218. s.Email = &v
  18219. return s
  18220. }
  18221. // SetId sets the Id field's value.
  18222. func (s *DelegatedAdministrator) SetId(v string) *DelegatedAdministrator {
  18223. s.Id = &v
  18224. return s
  18225. }
  18226. // SetJoinedMethod sets the JoinedMethod field's value.
  18227. func (s *DelegatedAdministrator) SetJoinedMethod(v string) *DelegatedAdministrator {
  18228. s.JoinedMethod = &v
  18229. return s
  18230. }
  18231. // SetJoinedTimestamp sets the JoinedTimestamp field's value.
  18232. func (s *DelegatedAdministrator) SetJoinedTimestamp(v time.Time) *DelegatedAdministrator {
  18233. s.JoinedTimestamp = &v
  18234. return s
  18235. }
  18236. // SetName sets the Name field's value.
  18237. func (s *DelegatedAdministrator) SetName(v string) *DelegatedAdministrator {
  18238. s.Name = &v
  18239. return s
  18240. }
  18241. // SetStatus sets the Status field's value.
  18242. func (s *DelegatedAdministrator) SetStatus(v string) *DelegatedAdministrator {
  18243. s.Status = &v
  18244. return s
  18245. }
  18246. // Contains information about the Amazon Web Services service for which the
  18247. // account is a delegated administrator.
  18248. type DelegatedService struct {
  18249. _ struct{} `type:"structure"`
  18250. // The date that the account became a delegated administrator for this service.
  18251. DelegationEnabledDate *time.Time `type:"timestamp"`
  18252. // The name of an Amazon Web Services service that can request an operation
  18253. // for the specified service. This is typically in the form of a URL, such as:
  18254. // servicename.amazonaws.com.
  18255. ServicePrincipal *string `min:"1" type:"string"`
  18256. }
  18257. // String returns the string representation.
  18258. //
  18259. // API parameter values that are decorated as "sensitive" in the API will not
  18260. // be included in the string output. The member name will be present, but the
  18261. // value will be replaced with "sensitive".
  18262. func (s DelegatedService) String() string {
  18263. return awsutil.Prettify(s)
  18264. }
  18265. // GoString returns the string representation.
  18266. //
  18267. // API parameter values that are decorated as "sensitive" in the API will not
  18268. // be included in the string output. The member name will be present, but the
  18269. // value will be replaced with "sensitive".
  18270. func (s DelegatedService) GoString() string {
  18271. return s.String()
  18272. }
  18273. // SetDelegationEnabledDate sets the DelegationEnabledDate field's value.
  18274. func (s *DelegatedService) SetDelegationEnabledDate(v time.Time) *DelegatedService {
  18275. s.DelegationEnabledDate = &v
  18276. return s
  18277. }
  18278. // SetServicePrincipal sets the ServicePrincipal field's value.
  18279. func (s *DelegatedService) SetServicePrincipal(v string) *DelegatedService {
  18280. s.ServicePrincipal = &v
  18281. return s
  18282. }
  18283. type DeleteOrganizationInput struct {
  18284. _ struct{} `type:"structure"`
  18285. }
  18286. // String returns the string representation.
  18287. //
  18288. // API parameter values that are decorated as "sensitive" in the API will not
  18289. // be included in the string output. The member name will be present, but the
  18290. // value will be replaced with "sensitive".
  18291. func (s DeleteOrganizationInput) String() string {
  18292. return awsutil.Prettify(s)
  18293. }
  18294. // GoString returns the string representation.
  18295. //
  18296. // API parameter values that are decorated as "sensitive" in the API will not
  18297. // be included in the string output. The member name will be present, but the
  18298. // value will be replaced with "sensitive".
  18299. func (s DeleteOrganizationInput) GoString() string {
  18300. return s.String()
  18301. }
  18302. type DeleteOrganizationOutput struct {
  18303. _ struct{} `type:"structure"`
  18304. }
  18305. // String returns the string representation.
  18306. //
  18307. // API parameter values that are decorated as "sensitive" in the API will not
  18308. // be included in the string output. The member name will be present, but the
  18309. // value will be replaced with "sensitive".
  18310. func (s DeleteOrganizationOutput) String() string {
  18311. return awsutil.Prettify(s)
  18312. }
  18313. // GoString returns the string representation.
  18314. //
  18315. // API parameter values that are decorated as "sensitive" in the API will not
  18316. // be included in the string output. The member name will be present, but the
  18317. // value will be replaced with "sensitive".
  18318. func (s DeleteOrganizationOutput) GoString() string {
  18319. return s.String()
  18320. }
  18321. type DeleteOrganizationalUnitInput struct {
  18322. _ struct{} `type:"structure"`
  18323. // The unique identifier (ID) of the organizational unit that you want to delete.
  18324. // You can get the ID from the ListOrganizationalUnitsForParent operation.
  18325. //
  18326. // The regex pattern (http://wikipedia.org/wiki/regex) for an organizational
  18327. // unit ID string requires "ou-" followed by from 4 to 32 lowercase letters
  18328. // or digits (the ID of the root that contains the OU). This string is followed
  18329. // by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
  18330. //
  18331. // OrganizationalUnitId is a required field
  18332. OrganizationalUnitId *string `type:"string" required:"true"`
  18333. }
  18334. // String returns the string representation.
  18335. //
  18336. // API parameter values that are decorated as "sensitive" in the API will not
  18337. // be included in the string output. The member name will be present, but the
  18338. // value will be replaced with "sensitive".
  18339. func (s DeleteOrganizationalUnitInput) String() string {
  18340. return awsutil.Prettify(s)
  18341. }
  18342. // GoString returns the string representation.
  18343. //
  18344. // API parameter values that are decorated as "sensitive" in the API will not
  18345. // be included in the string output. The member name will be present, but the
  18346. // value will be replaced with "sensitive".
  18347. func (s DeleteOrganizationalUnitInput) GoString() string {
  18348. return s.String()
  18349. }
  18350. // Validate inspects the fields of the type to determine if they are valid.
  18351. func (s *DeleteOrganizationalUnitInput) Validate() error {
  18352. invalidParams := request.ErrInvalidParams{Context: "DeleteOrganizationalUnitInput"}
  18353. if s.OrganizationalUnitId == nil {
  18354. invalidParams.Add(request.NewErrParamRequired("OrganizationalUnitId"))
  18355. }
  18356. if invalidParams.Len() > 0 {
  18357. return invalidParams
  18358. }
  18359. return nil
  18360. }
  18361. // SetOrganizationalUnitId sets the OrganizationalUnitId field's value.
  18362. func (s *DeleteOrganizationalUnitInput) SetOrganizationalUnitId(v string) *DeleteOrganizationalUnitInput {
  18363. s.OrganizationalUnitId = &v
  18364. return s
  18365. }
  18366. type DeleteOrganizationalUnitOutput struct {
  18367. _ struct{} `type:"structure"`
  18368. }
  18369. // String returns the string representation.
  18370. //
  18371. // API parameter values that are decorated as "sensitive" in the API will not
  18372. // be included in the string output. The member name will be present, but the
  18373. // value will be replaced with "sensitive".
  18374. func (s DeleteOrganizationalUnitOutput) String() string {
  18375. return awsutil.Prettify(s)
  18376. }
  18377. // GoString returns the string representation.
  18378. //
  18379. // API parameter values that are decorated as "sensitive" in the API will not
  18380. // be included in the string output. The member name will be present, but the
  18381. // value will be replaced with "sensitive".
  18382. func (s DeleteOrganizationalUnitOutput) GoString() string {
  18383. return s.String()
  18384. }
  18385. type DeletePolicyInput struct {
  18386. _ struct{} `type:"structure"`
  18387. // The unique identifier (ID) of the policy that you want to delete. You can
  18388. // get the ID from the ListPolicies or ListPoliciesForTarget operations.
  18389. //
  18390. // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string
  18391. // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits,
  18392. // or the underscore character (_).
  18393. //
  18394. // PolicyId is a required field
  18395. PolicyId *string `type:"string" required:"true"`
  18396. }
  18397. // String returns the string representation.
  18398. //
  18399. // API parameter values that are decorated as "sensitive" in the API will not
  18400. // be included in the string output. The member name will be present, but the
  18401. // value will be replaced with "sensitive".
  18402. func (s DeletePolicyInput) String() string {
  18403. return awsutil.Prettify(s)
  18404. }
  18405. // GoString returns the string representation.
  18406. //
  18407. // API parameter values that are decorated as "sensitive" in the API will not
  18408. // be included in the string output. The member name will be present, but the
  18409. // value will be replaced with "sensitive".
  18410. func (s DeletePolicyInput) GoString() string {
  18411. return s.String()
  18412. }
  18413. // Validate inspects the fields of the type to determine if they are valid.
  18414. func (s *DeletePolicyInput) Validate() error {
  18415. invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"}
  18416. if s.PolicyId == nil {
  18417. invalidParams.Add(request.NewErrParamRequired("PolicyId"))
  18418. }
  18419. if invalidParams.Len() > 0 {
  18420. return invalidParams
  18421. }
  18422. return nil
  18423. }
  18424. // SetPolicyId sets the PolicyId field's value.
  18425. func (s *DeletePolicyInput) SetPolicyId(v string) *DeletePolicyInput {
  18426. s.PolicyId = &v
  18427. return s
  18428. }
  18429. type DeletePolicyOutput struct {
  18430. _ struct{} `type:"structure"`
  18431. }
  18432. // String returns the string representation.
  18433. //
  18434. // API parameter values that are decorated as "sensitive" in the API will not
  18435. // be included in the string output. The member name will be present, but the
  18436. // value will be replaced with "sensitive".
  18437. func (s DeletePolicyOutput) String() string {
  18438. return awsutil.Prettify(s)
  18439. }
  18440. // GoString returns the string representation.
  18441. //
  18442. // API parameter values that are decorated as "sensitive" in the API will not
  18443. // be included in the string output. The member name will be present, but the
  18444. // value will be replaced with "sensitive".
  18445. func (s DeletePolicyOutput) GoString() string {
  18446. return s.String()
  18447. }
  18448. type DeleteResourcePolicyInput struct {
  18449. _ struct{} `type:"structure"`
  18450. }
  18451. // String returns the string representation.
  18452. //
  18453. // API parameter values that are decorated as "sensitive" in the API will not
  18454. // be included in the string output. The member name will be present, but the
  18455. // value will be replaced with "sensitive".
  18456. func (s DeleteResourcePolicyInput) String() string {
  18457. return awsutil.Prettify(s)
  18458. }
  18459. // GoString returns the string representation.
  18460. //
  18461. // API parameter values that are decorated as "sensitive" in the API will not
  18462. // be included in the string output. The member name will be present, but the
  18463. // value will be replaced with "sensitive".
  18464. func (s DeleteResourcePolicyInput) GoString() string {
  18465. return s.String()
  18466. }
  18467. type DeleteResourcePolicyOutput struct {
  18468. _ struct{} `type:"structure"`
  18469. }
  18470. // String returns the string representation.
  18471. //
  18472. // API parameter values that are decorated as "sensitive" in the API will not
  18473. // be included in the string output. The member name will be present, but the
  18474. // value will be replaced with "sensitive".
  18475. func (s DeleteResourcePolicyOutput) String() string {
  18476. return awsutil.Prettify(s)
  18477. }
  18478. // GoString returns the string representation.
  18479. //
  18480. // API parameter values that are decorated as "sensitive" in the API will not
  18481. // be included in the string output. The member name will be present, but the
  18482. // value will be replaced with "sensitive".
  18483. func (s DeleteResourcePolicyOutput) GoString() string {
  18484. return s.String()
  18485. }
  18486. type DeregisterDelegatedAdministratorInput struct {
  18487. _ struct{} `type:"structure"`
  18488. // The account ID number of the member account in the organization that you
  18489. // want to deregister as a delegated administrator.
  18490. //
  18491. // AccountId is a required field
  18492. AccountId *string `type:"string" required:"true"`
  18493. // The service principal name of an Amazon Web Services service for which the
  18494. // account is a delegated administrator.
  18495. //
  18496. // Delegated administrator privileges are revoked for only the specified Amazon
  18497. // Web Services service from the member account. If the specified service is
  18498. // the only service for which the member account is a delegated administrator,
  18499. // the operation also revokes Organizations read action permissions.
  18500. //
  18501. // ServicePrincipal is a required field
  18502. ServicePrincipal *string `min:"1" type:"string" required:"true"`
  18503. }
  18504. // String returns the string representation.
  18505. //
  18506. // API parameter values that are decorated as "sensitive" in the API will not
  18507. // be included in the string output. The member name will be present, but the
  18508. // value will be replaced with "sensitive".
  18509. func (s DeregisterDelegatedAdministratorInput) String() string {
  18510. return awsutil.Prettify(s)
  18511. }
  18512. // GoString returns the string representation.
  18513. //
  18514. // API parameter values that are decorated as "sensitive" in the API will not
  18515. // be included in the string output. The member name will be present, but the
  18516. // value will be replaced with "sensitive".
  18517. func (s DeregisterDelegatedAdministratorInput) GoString() string {
  18518. return s.String()
  18519. }
  18520. // Validate inspects the fields of the type to determine if they are valid.
  18521. func (s *DeregisterDelegatedAdministratorInput) Validate() error {
  18522. invalidParams := request.ErrInvalidParams{Context: "DeregisterDelegatedAdministratorInput"}
  18523. if s.AccountId == nil {
  18524. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  18525. }
  18526. if s.ServicePrincipal == nil {
  18527. invalidParams.Add(request.NewErrParamRequired("ServicePrincipal"))
  18528. }
  18529. if s.ServicePrincipal != nil && len(*s.ServicePrincipal) < 1 {
  18530. invalidParams.Add(request.NewErrParamMinLen("ServicePrincipal", 1))
  18531. }
  18532. if invalidParams.Len() > 0 {
  18533. return invalidParams
  18534. }
  18535. return nil
  18536. }
  18537. // SetAccountId sets the AccountId field's value.
  18538. func (s *DeregisterDelegatedAdministratorInput) SetAccountId(v string) *DeregisterDelegatedAdministratorInput {
  18539. s.AccountId = &v
  18540. return s
  18541. }
  18542. // SetServicePrincipal sets the ServicePrincipal field's value.
  18543. func (s *DeregisterDelegatedAdministratorInput) SetServicePrincipal(v string) *DeregisterDelegatedAdministratorInput {
  18544. s.ServicePrincipal = &v
  18545. return s
  18546. }
  18547. type DeregisterDelegatedAdministratorOutput struct {
  18548. _ struct{} `type:"structure"`
  18549. }
  18550. // String returns the string representation.
  18551. //
  18552. // API parameter values that are decorated as "sensitive" in the API will not
  18553. // be included in the string output. The member name will be present, but the
  18554. // value will be replaced with "sensitive".
  18555. func (s DeregisterDelegatedAdministratorOutput) String() string {
  18556. return awsutil.Prettify(s)
  18557. }
  18558. // GoString returns the string representation.
  18559. //
  18560. // API parameter values that are decorated as "sensitive" in the API will not
  18561. // be included in the string output. The member name will be present, but the
  18562. // value will be replaced with "sensitive".
  18563. func (s DeregisterDelegatedAdministratorOutput) GoString() string {
  18564. return s.String()
  18565. }
  18566. type DescribeAccountInput struct {
  18567. _ struct{} `type:"structure"`
  18568. // The unique identifier (ID) of the Amazon Web Services account that you want
  18569. // information about. You can get the ID from the ListAccounts or ListAccountsForParent
  18570. // operations.
  18571. //
  18572. // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string
  18573. // requires exactly 12 digits.
  18574. //
  18575. // AccountId is a required field
  18576. AccountId *string `type:"string" required:"true"`
  18577. }
  18578. // String returns the string representation.
  18579. //
  18580. // API parameter values that are decorated as "sensitive" in the API will not
  18581. // be included in the string output. The member name will be present, but the
  18582. // value will be replaced with "sensitive".
  18583. func (s DescribeAccountInput) String() string {
  18584. return awsutil.Prettify(s)
  18585. }
  18586. // GoString returns the string representation.
  18587. //
  18588. // API parameter values that are decorated as "sensitive" in the API will not
  18589. // be included in the string output. The member name will be present, but the
  18590. // value will be replaced with "sensitive".
  18591. func (s DescribeAccountInput) GoString() string {
  18592. return s.String()
  18593. }
  18594. // Validate inspects the fields of the type to determine if they are valid.
  18595. func (s *DescribeAccountInput) Validate() error {
  18596. invalidParams := request.ErrInvalidParams{Context: "DescribeAccountInput"}
  18597. if s.AccountId == nil {
  18598. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  18599. }
  18600. if invalidParams.Len() > 0 {
  18601. return invalidParams
  18602. }
  18603. return nil
  18604. }
  18605. // SetAccountId sets the AccountId field's value.
  18606. func (s *DescribeAccountInput) SetAccountId(v string) *DescribeAccountInput {
  18607. s.AccountId = &v
  18608. return s
  18609. }
  18610. type DescribeAccountOutput struct {
  18611. _ struct{} `type:"structure"`
  18612. // A structure that contains information about the requested account.
  18613. Account *Account `type:"structure"`
  18614. }
  18615. // String returns the string representation.
  18616. //
  18617. // API parameter values that are decorated as "sensitive" in the API will not
  18618. // be included in the string output. The member name will be present, but the
  18619. // value will be replaced with "sensitive".
  18620. func (s DescribeAccountOutput) String() string {
  18621. return awsutil.Prettify(s)
  18622. }
  18623. // GoString returns the string representation.
  18624. //
  18625. // API parameter values that are decorated as "sensitive" in the API will not
  18626. // be included in the string output. The member name will be present, but the
  18627. // value will be replaced with "sensitive".
  18628. func (s DescribeAccountOutput) GoString() string {
  18629. return s.String()
  18630. }
  18631. // SetAccount sets the Account field's value.
  18632. func (s *DescribeAccountOutput) SetAccount(v *Account) *DescribeAccountOutput {
  18633. s.Account = v
  18634. return s
  18635. }
  18636. type DescribeCreateAccountStatusInput struct {
  18637. _ struct{} `type:"structure"`
  18638. // Specifies the Id value that uniquely identifies the CreateAccount request.
  18639. // You can get the value from the CreateAccountStatus.Id response in an earlier
  18640. // CreateAccount request, or from the ListCreateAccountStatus operation.
  18641. //
  18642. // The regex pattern (http://wikipedia.org/wiki/regex) for a create account
  18643. // request ID string requires "car-" followed by from 8 to 32 lowercase letters
  18644. // or digits.
  18645. //
  18646. // CreateAccountRequestId is a required field
  18647. CreateAccountRequestId *string `type:"string" required:"true"`
  18648. }
  18649. // String returns the string representation.
  18650. //
  18651. // API parameter values that are decorated as "sensitive" in the API will not
  18652. // be included in the string output. The member name will be present, but the
  18653. // value will be replaced with "sensitive".
  18654. func (s DescribeCreateAccountStatusInput) String() string {
  18655. return awsutil.Prettify(s)
  18656. }
  18657. // GoString returns the string representation.
  18658. //
  18659. // API parameter values that are decorated as "sensitive" in the API will not
  18660. // be included in the string output. The member name will be present, but the
  18661. // value will be replaced with "sensitive".
  18662. func (s DescribeCreateAccountStatusInput) GoString() string {
  18663. return s.String()
  18664. }
  18665. // Validate inspects the fields of the type to determine if they are valid.
  18666. func (s *DescribeCreateAccountStatusInput) Validate() error {
  18667. invalidParams := request.ErrInvalidParams{Context: "DescribeCreateAccountStatusInput"}
  18668. if s.CreateAccountRequestId == nil {
  18669. invalidParams.Add(request.NewErrParamRequired("CreateAccountRequestId"))
  18670. }
  18671. if invalidParams.Len() > 0 {
  18672. return invalidParams
  18673. }
  18674. return nil
  18675. }
  18676. // SetCreateAccountRequestId sets the CreateAccountRequestId field's value.
  18677. func (s *DescribeCreateAccountStatusInput) SetCreateAccountRequestId(v string) *DescribeCreateAccountStatusInput {
  18678. s.CreateAccountRequestId = &v
  18679. return s
  18680. }
  18681. type DescribeCreateAccountStatusOutput struct {
  18682. _ struct{} `type:"structure"`
  18683. // A structure that contains the current status of an account creation request.
  18684. CreateAccountStatus *CreateAccountStatus `type:"structure"`
  18685. }
  18686. // String returns the string representation.
  18687. //
  18688. // API parameter values that are decorated as "sensitive" in the API will not
  18689. // be included in the string output. The member name will be present, but the
  18690. // value will be replaced with "sensitive".
  18691. func (s DescribeCreateAccountStatusOutput) String() string {
  18692. return awsutil.Prettify(s)
  18693. }
  18694. // GoString returns the string representation.
  18695. //
  18696. // API parameter values that are decorated as "sensitive" in the API will not
  18697. // be included in the string output. The member name will be present, but the
  18698. // value will be replaced with "sensitive".
  18699. func (s DescribeCreateAccountStatusOutput) GoString() string {
  18700. return s.String()
  18701. }
  18702. // SetCreateAccountStatus sets the CreateAccountStatus field's value.
  18703. func (s *DescribeCreateAccountStatusOutput) SetCreateAccountStatus(v *CreateAccountStatus) *DescribeCreateAccountStatusOutput {
  18704. s.CreateAccountStatus = v
  18705. return s
  18706. }
  18707. type DescribeEffectivePolicyInput struct {
  18708. _ struct{} `type:"structure"`
  18709. // The type of policy that you want information about. You can specify one of
  18710. // the following values:
  18711. //
  18712. // * AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
  18713. //
  18714. // * BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html)
  18715. //
  18716. // * TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
  18717. //
  18718. // PolicyType is a required field
  18719. PolicyType *string `type:"string" required:"true" enum:"EffectivePolicyType"`
  18720. // When you're signed in as the management account, specify the ID of the account
  18721. // that you want details about. Specifying an organization root or organizational
  18722. // unit (OU) as the target is not supported.
  18723. TargetId *string `type:"string"`
  18724. }
  18725. // String returns the string representation.
  18726. //
  18727. // API parameter values that are decorated as "sensitive" in the API will not
  18728. // be included in the string output. The member name will be present, but the
  18729. // value will be replaced with "sensitive".
  18730. func (s DescribeEffectivePolicyInput) String() string {
  18731. return awsutil.Prettify(s)
  18732. }
  18733. // GoString returns the string representation.
  18734. //
  18735. // API parameter values that are decorated as "sensitive" in the API will not
  18736. // be included in the string output. The member name will be present, but the
  18737. // value will be replaced with "sensitive".
  18738. func (s DescribeEffectivePolicyInput) GoString() string {
  18739. return s.String()
  18740. }
  18741. // Validate inspects the fields of the type to determine if they are valid.
  18742. func (s *DescribeEffectivePolicyInput) Validate() error {
  18743. invalidParams := request.ErrInvalidParams{Context: "DescribeEffectivePolicyInput"}
  18744. if s.PolicyType == nil {
  18745. invalidParams.Add(request.NewErrParamRequired("PolicyType"))
  18746. }
  18747. if invalidParams.Len() > 0 {
  18748. return invalidParams
  18749. }
  18750. return nil
  18751. }
  18752. // SetPolicyType sets the PolicyType field's value.
  18753. func (s *DescribeEffectivePolicyInput) SetPolicyType(v string) *DescribeEffectivePolicyInput {
  18754. s.PolicyType = &v
  18755. return s
  18756. }
  18757. // SetTargetId sets the TargetId field's value.
  18758. func (s *DescribeEffectivePolicyInput) SetTargetId(v string) *DescribeEffectivePolicyInput {
  18759. s.TargetId = &v
  18760. return s
  18761. }
  18762. type DescribeEffectivePolicyOutput struct {
  18763. _ struct{} `type:"structure"`
  18764. // The contents of the effective policy.
  18765. EffectivePolicy *EffectivePolicy `type:"structure"`
  18766. }
  18767. // String returns the string representation.
  18768. //
  18769. // API parameter values that are decorated as "sensitive" in the API will not
  18770. // be included in the string output. The member name will be present, but the
  18771. // value will be replaced with "sensitive".
  18772. func (s DescribeEffectivePolicyOutput) String() string {
  18773. return awsutil.Prettify(s)
  18774. }
  18775. // GoString returns the string representation.
  18776. //
  18777. // API parameter values that are decorated as "sensitive" in the API will not
  18778. // be included in the string output. The member name will be present, but the
  18779. // value will be replaced with "sensitive".
  18780. func (s DescribeEffectivePolicyOutput) GoString() string {
  18781. return s.String()
  18782. }
  18783. // SetEffectivePolicy sets the EffectivePolicy field's value.
  18784. func (s *DescribeEffectivePolicyOutput) SetEffectivePolicy(v *EffectivePolicy) *DescribeEffectivePolicyOutput {
  18785. s.EffectivePolicy = v
  18786. return s
  18787. }
  18788. type DescribeHandshakeInput struct {
  18789. _ struct{} `type:"structure"`
  18790. // The unique identifier (ID) of the handshake that you want information about.
  18791. // You can get the ID from the original call to InviteAccountToOrganization,
  18792. // or from a call to ListHandshakesForAccount or ListHandshakesForOrganization.
  18793. //
  18794. // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string
  18795. // requires "h-" followed by from 8 to 32 lowercase letters or digits.
  18796. //
  18797. // HandshakeId is a required field
  18798. HandshakeId *string `type:"string" required:"true"`
  18799. }
  18800. // String returns the string representation.
  18801. //
  18802. // API parameter values that are decorated as "sensitive" in the API will not
  18803. // be included in the string output. The member name will be present, but the
  18804. // value will be replaced with "sensitive".
  18805. func (s DescribeHandshakeInput) String() string {
  18806. return awsutil.Prettify(s)
  18807. }
  18808. // GoString returns the string representation.
  18809. //
  18810. // API parameter values that are decorated as "sensitive" in the API will not
  18811. // be included in the string output. The member name will be present, but the
  18812. // value will be replaced with "sensitive".
  18813. func (s DescribeHandshakeInput) GoString() string {
  18814. return s.String()
  18815. }
  18816. // Validate inspects the fields of the type to determine if they are valid.
  18817. func (s *DescribeHandshakeInput) Validate() error {
  18818. invalidParams := request.ErrInvalidParams{Context: "DescribeHandshakeInput"}
  18819. if s.HandshakeId == nil {
  18820. invalidParams.Add(request.NewErrParamRequired("HandshakeId"))
  18821. }
  18822. if invalidParams.Len() > 0 {
  18823. return invalidParams
  18824. }
  18825. return nil
  18826. }
  18827. // SetHandshakeId sets the HandshakeId field's value.
  18828. func (s *DescribeHandshakeInput) SetHandshakeId(v string) *DescribeHandshakeInput {
  18829. s.HandshakeId = &v
  18830. return s
  18831. }
  18832. type DescribeHandshakeOutput struct {
  18833. _ struct{} `type:"structure"`
  18834. // A structure that contains information about the specified handshake.
  18835. Handshake *Handshake `type:"structure"`
  18836. }
  18837. // String returns the string representation.
  18838. //
  18839. // API parameter values that are decorated as "sensitive" in the API will not
  18840. // be included in the string output. The member name will be present, but the
  18841. // value will be replaced with "sensitive".
  18842. func (s DescribeHandshakeOutput) String() string {
  18843. return awsutil.Prettify(s)
  18844. }
  18845. // GoString returns the string representation.
  18846. //
  18847. // API parameter values that are decorated as "sensitive" in the API will not
  18848. // be included in the string output. The member name will be present, but the
  18849. // value will be replaced with "sensitive".
  18850. func (s DescribeHandshakeOutput) GoString() string {
  18851. return s.String()
  18852. }
  18853. // SetHandshake sets the Handshake field's value.
  18854. func (s *DescribeHandshakeOutput) SetHandshake(v *Handshake) *DescribeHandshakeOutput {
  18855. s.Handshake = v
  18856. return s
  18857. }
  18858. type DescribeOrganizationInput struct {
  18859. _ struct{} `type:"structure"`
  18860. }
  18861. // String returns the string representation.
  18862. //
  18863. // API parameter values that are decorated as "sensitive" in the API will not
  18864. // be included in the string output. The member name will be present, but the
  18865. // value will be replaced with "sensitive".
  18866. func (s DescribeOrganizationInput) String() string {
  18867. return awsutil.Prettify(s)
  18868. }
  18869. // GoString returns the string representation.
  18870. //
  18871. // API parameter values that are decorated as "sensitive" in the API will not
  18872. // be included in the string output. The member name will be present, but the
  18873. // value will be replaced with "sensitive".
  18874. func (s DescribeOrganizationInput) GoString() string {
  18875. return s.String()
  18876. }
  18877. type DescribeOrganizationOutput struct {
  18878. _ struct{} `type:"structure"`
  18879. // A structure that contains information about the organization.
  18880. //
  18881. // The AvailablePolicyTypes part of the response is deprecated, and you shouldn't
  18882. // use it in your apps. It doesn't include any policy type supported by Organizations
  18883. // other than SCPs. To determine which policy types are enabled in your organization,
  18884. // use the ListRoots operation.
  18885. Organization *Organization `type:"structure"`
  18886. }
  18887. // String returns the string representation.
  18888. //
  18889. // API parameter values that are decorated as "sensitive" in the API will not
  18890. // be included in the string output. The member name will be present, but the
  18891. // value will be replaced with "sensitive".
  18892. func (s DescribeOrganizationOutput) String() string {
  18893. return awsutil.Prettify(s)
  18894. }
  18895. // GoString returns the string representation.
  18896. //
  18897. // API parameter values that are decorated as "sensitive" in the API will not
  18898. // be included in the string output. The member name will be present, but the
  18899. // value will be replaced with "sensitive".
  18900. func (s DescribeOrganizationOutput) GoString() string {
  18901. return s.String()
  18902. }
  18903. // SetOrganization sets the Organization field's value.
  18904. func (s *DescribeOrganizationOutput) SetOrganization(v *Organization) *DescribeOrganizationOutput {
  18905. s.Organization = v
  18906. return s
  18907. }
  18908. type DescribeOrganizationalUnitInput struct {
  18909. _ struct{} `type:"structure"`
  18910. // The unique identifier (ID) of the organizational unit that you want details
  18911. // about. You can get the ID from the ListOrganizationalUnitsForParent operation.
  18912. //
  18913. // The regex pattern (http://wikipedia.org/wiki/regex) for an organizational
  18914. // unit ID string requires "ou-" followed by from 4 to 32 lowercase letters
  18915. // or digits (the ID of the root that contains the OU). This string is followed
  18916. // by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
  18917. //
  18918. // OrganizationalUnitId is a required field
  18919. OrganizationalUnitId *string `type:"string" required:"true"`
  18920. }
  18921. // String returns the string representation.
  18922. //
  18923. // API parameter values that are decorated as "sensitive" in the API will not
  18924. // be included in the string output. The member name will be present, but the
  18925. // value will be replaced with "sensitive".
  18926. func (s DescribeOrganizationalUnitInput) String() string {
  18927. return awsutil.Prettify(s)
  18928. }
  18929. // GoString returns the string representation.
  18930. //
  18931. // API parameter values that are decorated as "sensitive" in the API will not
  18932. // be included in the string output. The member name will be present, but the
  18933. // value will be replaced with "sensitive".
  18934. func (s DescribeOrganizationalUnitInput) GoString() string {
  18935. return s.String()
  18936. }
  18937. // Validate inspects the fields of the type to determine if they are valid.
  18938. func (s *DescribeOrganizationalUnitInput) Validate() error {
  18939. invalidParams := request.ErrInvalidParams{Context: "DescribeOrganizationalUnitInput"}
  18940. if s.OrganizationalUnitId == nil {
  18941. invalidParams.Add(request.NewErrParamRequired("OrganizationalUnitId"))
  18942. }
  18943. if invalidParams.Len() > 0 {
  18944. return invalidParams
  18945. }
  18946. return nil
  18947. }
  18948. // SetOrganizationalUnitId sets the OrganizationalUnitId field's value.
  18949. func (s *DescribeOrganizationalUnitInput) SetOrganizationalUnitId(v string) *DescribeOrganizationalUnitInput {
  18950. s.OrganizationalUnitId = &v
  18951. return s
  18952. }
  18953. type DescribeOrganizationalUnitOutput struct {
  18954. _ struct{} `type:"structure"`
  18955. // A structure that contains details about the specified OU.
  18956. OrganizationalUnit *OrganizationalUnit `type:"structure"`
  18957. }
  18958. // String returns the string representation.
  18959. //
  18960. // API parameter values that are decorated as "sensitive" in the API will not
  18961. // be included in the string output. The member name will be present, but the
  18962. // value will be replaced with "sensitive".
  18963. func (s DescribeOrganizationalUnitOutput) String() string {
  18964. return awsutil.Prettify(s)
  18965. }
  18966. // GoString returns the string representation.
  18967. //
  18968. // API parameter values that are decorated as "sensitive" in the API will not
  18969. // be included in the string output. The member name will be present, but the
  18970. // value will be replaced with "sensitive".
  18971. func (s DescribeOrganizationalUnitOutput) GoString() string {
  18972. return s.String()
  18973. }
  18974. // SetOrganizationalUnit sets the OrganizationalUnit field's value.
  18975. func (s *DescribeOrganizationalUnitOutput) SetOrganizationalUnit(v *OrganizationalUnit) *DescribeOrganizationalUnitOutput {
  18976. s.OrganizationalUnit = v
  18977. return s
  18978. }
  18979. type DescribePolicyInput struct {
  18980. _ struct{} `type:"structure"`
  18981. // The unique identifier (ID) of the policy that you want details about. You
  18982. // can get the ID from the ListPolicies or ListPoliciesForTarget operations.
  18983. //
  18984. // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string
  18985. // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits,
  18986. // or the underscore character (_).
  18987. //
  18988. // PolicyId is a required field
  18989. PolicyId *string `type:"string" required:"true"`
  18990. }
  18991. // String returns the string representation.
  18992. //
  18993. // API parameter values that are decorated as "sensitive" in the API will not
  18994. // be included in the string output. The member name will be present, but the
  18995. // value will be replaced with "sensitive".
  18996. func (s DescribePolicyInput) String() string {
  18997. return awsutil.Prettify(s)
  18998. }
  18999. // GoString returns the string representation.
  19000. //
  19001. // API parameter values that are decorated as "sensitive" in the API will not
  19002. // be included in the string output. The member name will be present, but the
  19003. // value will be replaced with "sensitive".
  19004. func (s DescribePolicyInput) GoString() string {
  19005. return s.String()
  19006. }
  19007. // Validate inspects the fields of the type to determine if they are valid.
  19008. func (s *DescribePolicyInput) Validate() error {
  19009. invalidParams := request.ErrInvalidParams{Context: "DescribePolicyInput"}
  19010. if s.PolicyId == nil {
  19011. invalidParams.Add(request.NewErrParamRequired("PolicyId"))
  19012. }
  19013. if invalidParams.Len() > 0 {
  19014. return invalidParams
  19015. }
  19016. return nil
  19017. }
  19018. // SetPolicyId sets the PolicyId field's value.
  19019. func (s *DescribePolicyInput) SetPolicyId(v string) *DescribePolicyInput {
  19020. s.PolicyId = &v
  19021. return s
  19022. }
  19023. type DescribePolicyOutput struct {
  19024. _ struct{} `type:"structure"`
  19025. // A structure that contains details about the specified policy.
  19026. Policy *Policy `type:"structure"`
  19027. }
  19028. // String returns the string representation.
  19029. //
  19030. // API parameter values that are decorated as "sensitive" in the API will not
  19031. // be included in the string output. The member name will be present, but the
  19032. // value will be replaced with "sensitive".
  19033. func (s DescribePolicyOutput) String() string {
  19034. return awsutil.Prettify(s)
  19035. }
  19036. // GoString returns the string representation.
  19037. //
  19038. // API parameter values that are decorated as "sensitive" in the API will not
  19039. // be included in the string output. The member name will be present, but the
  19040. // value will be replaced with "sensitive".
  19041. func (s DescribePolicyOutput) GoString() string {
  19042. return s.String()
  19043. }
  19044. // SetPolicy sets the Policy field's value.
  19045. func (s *DescribePolicyOutput) SetPolicy(v *Policy) *DescribePolicyOutput {
  19046. s.Policy = v
  19047. return s
  19048. }
  19049. type DescribeResourcePolicyInput struct {
  19050. _ struct{} `type:"structure"`
  19051. }
  19052. // String returns the string representation.
  19053. //
  19054. // API parameter values that are decorated as "sensitive" in the API will not
  19055. // be included in the string output. The member name will be present, but the
  19056. // value will be replaced with "sensitive".
  19057. func (s DescribeResourcePolicyInput) String() string {
  19058. return awsutil.Prettify(s)
  19059. }
  19060. // GoString returns the string representation.
  19061. //
  19062. // API parameter values that are decorated as "sensitive" in the API will not
  19063. // be included in the string output. The member name will be present, but the
  19064. // value will be replaced with "sensitive".
  19065. func (s DescribeResourcePolicyInput) GoString() string {
  19066. return s.String()
  19067. }
  19068. type DescribeResourcePolicyOutput struct {
  19069. _ struct{} `type:"structure"`
  19070. // A structure that contains details about the resource policy.
  19071. ResourcePolicy *ResourcePolicy `type:"structure"`
  19072. }
  19073. // String returns the string representation.
  19074. //
  19075. // API parameter values that are decorated as "sensitive" in the API will not
  19076. // be included in the string output. The member name will be present, but the
  19077. // value will be replaced with "sensitive".
  19078. func (s DescribeResourcePolicyOutput) String() string {
  19079. return awsutil.Prettify(s)
  19080. }
  19081. // GoString returns the string representation.
  19082. //
  19083. // API parameter values that are decorated as "sensitive" in the API will not
  19084. // be included in the string output. The member name will be present, but the
  19085. // value will be replaced with "sensitive".
  19086. func (s DescribeResourcePolicyOutput) GoString() string {
  19087. return s.String()
  19088. }
  19089. // SetResourcePolicy sets the ResourcePolicy field's value.
  19090. func (s *DescribeResourcePolicyOutput) SetResourcePolicy(v *ResourcePolicy) *DescribeResourcePolicyOutput {
  19091. s.ResourcePolicy = v
  19092. return s
  19093. }
  19094. // We can't find the destination container (a root or OU) with the ParentId
  19095. // that you specified.
  19096. type DestinationParentNotFoundException struct {
  19097. _ struct{} `type:"structure"`
  19098. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  19099. Message_ *string `locationName:"Message" type:"string"`
  19100. }
  19101. // String returns the string representation.
  19102. //
  19103. // API parameter values that are decorated as "sensitive" in the API will not
  19104. // be included in the string output. The member name will be present, but the
  19105. // value will be replaced with "sensitive".
  19106. func (s DestinationParentNotFoundException) String() string {
  19107. return awsutil.Prettify(s)
  19108. }
  19109. // GoString returns the string representation.
  19110. //
  19111. // API parameter values that are decorated as "sensitive" in the API will not
  19112. // be included in the string output. The member name will be present, but the
  19113. // value will be replaced with "sensitive".
  19114. func (s DestinationParentNotFoundException) GoString() string {
  19115. return s.String()
  19116. }
  19117. func newErrorDestinationParentNotFoundException(v protocol.ResponseMetadata) error {
  19118. return &DestinationParentNotFoundException{
  19119. RespMetadata: v,
  19120. }
  19121. }
  19122. // Code returns the exception type name.
  19123. func (s *DestinationParentNotFoundException) Code() string {
  19124. return "DestinationParentNotFoundException"
  19125. }
  19126. // Message returns the exception's message.
  19127. func (s *DestinationParentNotFoundException) Message() string {
  19128. if s.Message_ != nil {
  19129. return *s.Message_
  19130. }
  19131. return ""
  19132. }
  19133. // OrigErr always returns nil, satisfies awserr.Error interface.
  19134. func (s *DestinationParentNotFoundException) OrigErr() error {
  19135. return nil
  19136. }
  19137. func (s *DestinationParentNotFoundException) Error() string {
  19138. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19139. }
  19140. // Status code returns the HTTP status code for the request's response error.
  19141. func (s *DestinationParentNotFoundException) StatusCode() int {
  19142. return s.RespMetadata.StatusCode
  19143. }
  19144. // RequestID returns the service's response RequestID for request.
  19145. func (s *DestinationParentNotFoundException) RequestID() string {
  19146. return s.RespMetadata.RequestID
  19147. }
  19148. type DetachPolicyInput struct {
  19149. _ struct{} `type:"structure"`
  19150. // The unique identifier (ID) of the policy you want to detach. You can get
  19151. // the ID from the ListPolicies or ListPoliciesForTarget operations.
  19152. //
  19153. // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string
  19154. // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits,
  19155. // or the underscore character (_).
  19156. //
  19157. // PolicyId is a required field
  19158. PolicyId *string `type:"string" required:"true"`
  19159. // The unique identifier (ID) of the root, OU, or account that you want to detach
  19160. // the policy from. You can get the ID from the ListRoots, ListOrganizationalUnitsForParent,
  19161. // or ListAccounts operations.
  19162. //
  19163. // The regex pattern (http://wikipedia.org/wiki/regex) for a target ID string
  19164. // requires one of the following:
  19165. //
  19166. // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
  19167. // letters or digits.
  19168. //
  19169. // * Account - A string that consists of exactly 12 digits.
  19170. //
  19171. // * Organizational unit (OU) - A string that begins with "ou-" followed
  19172. // by from 4 to 32 lowercase letters or digits (the ID of the root that the
  19173. // OU is in). This string is followed by a second "-" dash and from 8 to
  19174. // 32 additional lowercase letters or digits.
  19175. //
  19176. // TargetId is a required field
  19177. TargetId *string `type:"string" required:"true"`
  19178. }
  19179. // String returns the string representation.
  19180. //
  19181. // API parameter values that are decorated as "sensitive" in the API will not
  19182. // be included in the string output. The member name will be present, but the
  19183. // value will be replaced with "sensitive".
  19184. func (s DetachPolicyInput) String() string {
  19185. return awsutil.Prettify(s)
  19186. }
  19187. // GoString returns the string representation.
  19188. //
  19189. // API parameter values that are decorated as "sensitive" in the API will not
  19190. // be included in the string output. The member name will be present, but the
  19191. // value will be replaced with "sensitive".
  19192. func (s DetachPolicyInput) GoString() string {
  19193. return s.String()
  19194. }
  19195. // Validate inspects the fields of the type to determine if they are valid.
  19196. func (s *DetachPolicyInput) Validate() error {
  19197. invalidParams := request.ErrInvalidParams{Context: "DetachPolicyInput"}
  19198. if s.PolicyId == nil {
  19199. invalidParams.Add(request.NewErrParamRequired("PolicyId"))
  19200. }
  19201. if s.TargetId == nil {
  19202. invalidParams.Add(request.NewErrParamRequired("TargetId"))
  19203. }
  19204. if invalidParams.Len() > 0 {
  19205. return invalidParams
  19206. }
  19207. return nil
  19208. }
  19209. // SetPolicyId sets the PolicyId field's value.
  19210. func (s *DetachPolicyInput) SetPolicyId(v string) *DetachPolicyInput {
  19211. s.PolicyId = &v
  19212. return s
  19213. }
  19214. // SetTargetId sets the TargetId field's value.
  19215. func (s *DetachPolicyInput) SetTargetId(v string) *DetachPolicyInput {
  19216. s.TargetId = &v
  19217. return s
  19218. }
  19219. type DetachPolicyOutput struct {
  19220. _ struct{} `type:"structure"`
  19221. }
  19222. // String returns the string representation.
  19223. //
  19224. // API parameter values that are decorated as "sensitive" in the API will not
  19225. // be included in the string output. The member name will be present, but the
  19226. // value will be replaced with "sensitive".
  19227. func (s DetachPolicyOutput) String() string {
  19228. return awsutil.Prettify(s)
  19229. }
  19230. // GoString returns the string representation.
  19231. //
  19232. // API parameter values that are decorated as "sensitive" in the API will not
  19233. // be included in the string output. The member name will be present, but the
  19234. // value will be replaced with "sensitive".
  19235. func (s DetachPolicyOutput) GoString() string {
  19236. return s.String()
  19237. }
  19238. type DisableAWSServiceAccessInput struct {
  19239. _ struct{} `type:"structure"`
  19240. // The service principal name of the Amazon Web Services service for which you
  19241. // want to disable integration with your organization. This is typically in
  19242. // the form of a URL, such as service-abbreviation.amazonaws.com.
  19243. //
  19244. // ServicePrincipal is a required field
  19245. ServicePrincipal *string `min:"1" type:"string" required:"true"`
  19246. }
  19247. // String returns the string representation.
  19248. //
  19249. // API parameter values that are decorated as "sensitive" in the API will not
  19250. // be included in the string output. The member name will be present, but the
  19251. // value will be replaced with "sensitive".
  19252. func (s DisableAWSServiceAccessInput) String() string {
  19253. return awsutil.Prettify(s)
  19254. }
  19255. // GoString returns the string representation.
  19256. //
  19257. // API parameter values that are decorated as "sensitive" in the API will not
  19258. // be included in the string output. The member name will be present, but the
  19259. // value will be replaced with "sensitive".
  19260. func (s DisableAWSServiceAccessInput) GoString() string {
  19261. return s.String()
  19262. }
  19263. // Validate inspects the fields of the type to determine if they are valid.
  19264. func (s *DisableAWSServiceAccessInput) Validate() error {
  19265. invalidParams := request.ErrInvalidParams{Context: "DisableAWSServiceAccessInput"}
  19266. if s.ServicePrincipal == nil {
  19267. invalidParams.Add(request.NewErrParamRequired("ServicePrincipal"))
  19268. }
  19269. if s.ServicePrincipal != nil && len(*s.ServicePrincipal) < 1 {
  19270. invalidParams.Add(request.NewErrParamMinLen("ServicePrincipal", 1))
  19271. }
  19272. if invalidParams.Len() > 0 {
  19273. return invalidParams
  19274. }
  19275. return nil
  19276. }
  19277. // SetServicePrincipal sets the ServicePrincipal field's value.
  19278. func (s *DisableAWSServiceAccessInput) SetServicePrincipal(v string) *DisableAWSServiceAccessInput {
  19279. s.ServicePrincipal = &v
  19280. return s
  19281. }
  19282. type DisableAWSServiceAccessOutput struct {
  19283. _ struct{} `type:"structure"`
  19284. }
  19285. // String returns the string representation.
  19286. //
  19287. // API parameter values that are decorated as "sensitive" in the API will not
  19288. // be included in the string output. The member name will be present, but the
  19289. // value will be replaced with "sensitive".
  19290. func (s DisableAWSServiceAccessOutput) String() string {
  19291. return awsutil.Prettify(s)
  19292. }
  19293. // GoString returns the string representation.
  19294. //
  19295. // API parameter values that are decorated as "sensitive" in the API will not
  19296. // be included in the string output. The member name will be present, but the
  19297. // value will be replaced with "sensitive".
  19298. func (s DisableAWSServiceAccessOutput) GoString() string {
  19299. return s.String()
  19300. }
  19301. type DisablePolicyTypeInput struct {
  19302. _ struct{} `type:"structure"`
  19303. // The policy type that you want to disable in this root. You can specify one
  19304. // of the following values:
  19305. //
  19306. // * AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
  19307. //
  19308. // * BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html)
  19309. //
  19310. // * SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html)
  19311. //
  19312. // * TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
  19313. //
  19314. // PolicyType is a required field
  19315. PolicyType *string `type:"string" required:"true" enum:"PolicyType"`
  19316. // The unique identifier (ID) of the root in which you want to disable a policy
  19317. // type. You can get the ID from the ListRoots operation.
  19318. //
  19319. // The regex pattern (http://wikipedia.org/wiki/regex) for a root ID string
  19320. // requires "r-" followed by from 4 to 32 lowercase letters or digits.
  19321. //
  19322. // RootId is a required field
  19323. RootId *string `type:"string" required:"true"`
  19324. }
  19325. // String returns the string representation.
  19326. //
  19327. // API parameter values that are decorated as "sensitive" in the API will not
  19328. // be included in the string output. The member name will be present, but the
  19329. // value will be replaced with "sensitive".
  19330. func (s DisablePolicyTypeInput) String() string {
  19331. return awsutil.Prettify(s)
  19332. }
  19333. // GoString returns the string representation.
  19334. //
  19335. // API parameter values that are decorated as "sensitive" in the API will not
  19336. // be included in the string output. The member name will be present, but the
  19337. // value will be replaced with "sensitive".
  19338. func (s DisablePolicyTypeInput) GoString() string {
  19339. return s.String()
  19340. }
  19341. // Validate inspects the fields of the type to determine if they are valid.
  19342. func (s *DisablePolicyTypeInput) Validate() error {
  19343. invalidParams := request.ErrInvalidParams{Context: "DisablePolicyTypeInput"}
  19344. if s.PolicyType == nil {
  19345. invalidParams.Add(request.NewErrParamRequired("PolicyType"))
  19346. }
  19347. if s.RootId == nil {
  19348. invalidParams.Add(request.NewErrParamRequired("RootId"))
  19349. }
  19350. if invalidParams.Len() > 0 {
  19351. return invalidParams
  19352. }
  19353. return nil
  19354. }
  19355. // SetPolicyType sets the PolicyType field's value.
  19356. func (s *DisablePolicyTypeInput) SetPolicyType(v string) *DisablePolicyTypeInput {
  19357. s.PolicyType = &v
  19358. return s
  19359. }
  19360. // SetRootId sets the RootId field's value.
  19361. func (s *DisablePolicyTypeInput) SetRootId(v string) *DisablePolicyTypeInput {
  19362. s.RootId = &v
  19363. return s
  19364. }
  19365. type DisablePolicyTypeOutput struct {
  19366. _ struct{} `type:"structure"`
  19367. // A structure that shows the root with the updated list of enabled policy types.
  19368. Root *Root `type:"structure"`
  19369. }
  19370. // String returns the string representation.
  19371. //
  19372. // API parameter values that are decorated as "sensitive" in the API will not
  19373. // be included in the string output. The member name will be present, but the
  19374. // value will be replaced with "sensitive".
  19375. func (s DisablePolicyTypeOutput) String() string {
  19376. return awsutil.Prettify(s)
  19377. }
  19378. // GoString returns the string representation.
  19379. //
  19380. // API parameter values that are decorated as "sensitive" in the API will not
  19381. // be included in the string output. The member name will be present, but the
  19382. // value will be replaced with "sensitive".
  19383. func (s DisablePolicyTypeOutput) GoString() string {
  19384. return s.String()
  19385. }
  19386. // SetRoot sets the Root field's value.
  19387. func (s *DisablePolicyTypeOutput) SetRoot(v *Root) *DisablePolicyTypeOutput {
  19388. s.Root = v
  19389. return s
  19390. }
  19391. // That account is already present in the specified destination.
  19392. type DuplicateAccountException struct {
  19393. _ struct{} `type:"structure"`
  19394. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  19395. Message_ *string `locationName:"Message" type:"string"`
  19396. }
  19397. // String returns the string representation.
  19398. //
  19399. // API parameter values that are decorated as "sensitive" in the API will not
  19400. // be included in the string output. The member name will be present, but the
  19401. // value will be replaced with "sensitive".
  19402. func (s DuplicateAccountException) String() string {
  19403. return awsutil.Prettify(s)
  19404. }
  19405. // GoString returns the string representation.
  19406. //
  19407. // API parameter values that are decorated as "sensitive" in the API will not
  19408. // be included in the string output. The member name will be present, but the
  19409. // value will be replaced with "sensitive".
  19410. func (s DuplicateAccountException) GoString() string {
  19411. return s.String()
  19412. }
  19413. func newErrorDuplicateAccountException(v protocol.ResponseMetadata) error {
  19414. return &DuplicateAccountException{
  19415. RespMetadata: v,
  19416. }
  19417. }
  19418. // Code returns the exception type name.
  19419. func (s *DuplicateAccountException) Code() string {
  19420. return "DuplicateAccountException"
  19421. }
  19422. // Message returns the exception's message.
  19423. func (s *DuplicateAccountException) Message() string {
  19424. if s.Message_ != nil {
  19425. return *s.Message_
  19426. }
  19427. return ""
  19428. }
  19429. // OrigErr always returns nil, satisfies awserr.Error interface.
  19430. func (s *DuplicateAccountException) OrigErr() error {
  19431. return nil
  19432. }
  19433. func (s *DuplicateAccountException) Error() string {
  19434. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19435. }
  19436. // Status code returns the HTTP status code for the request's response error.
  19437. func (s *DuplicateAccountException) StatusCode() int {
  19438. return s.RespMetadata.StatusCode
  19439. }
  19440. // RequestID returns the service's response RequestID for request.
  19441. func (s *DuplicateAccountException) RequestID() string {
  19442. return s.RespMetadata.RequestID
  19443. }
  19444. // A handshake with the same action and target already exists. For example,
  19445. // if you invited an account to join your organization, the invited account
  19446. // might already have a pending invitation from this organization. If you intend
  19447. // to resend an invitation to an account, ensure that existing handshakes that
  19448. // might be considered duplicates are canceled or declined.
  19449. type DuplicateHandshakeException struct {
  19450. _ struct{} `type:"structure"`
  19451. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  19452. Message_ *string `locationName:"Message" type:"string"`
  19453. }
  19454. // String returns the string representation.
  19455. //
  19456. // API parameter values that are decorated as "sensitive" in the API will not
  19457. // be included in the string output. The member name will be present, but the
  19458. // value will be replaced with "sensitive".
  19459. func (s DuplicateHandshakeException) String() string {
  19460. return awsutil.Prettify(s)
  19461. }
  19462. // GoString returns the string representation.
  19463. //
  19464. // API parameter values that are decorated as "sensitive" in the API will not
  19465. // be included in the string output. The member name will be present, but the
  19466. // value will be replaced with "sensitive".
  19467. func (s DuplicateHandshakeException) GoString() string {
  19468. return s.String()
  19469. }
  19470. func newErrorDuplicateHandshakeException(v protocol.ResponseMetadata) error {
  19471. return &DuplicateHandshakeException{
  19472. RespMetadata: v,
  19473. }
  19474. }
  19475. // Code returns the exception type name.
  19476. func (s *DuplicateHandshakeException) Code() string {
  19477. return "DuplicateHandshakeException"
  19478. }
  19479. // Message returns the exception's message.
  19480. func (s *DuplicateHandshakeException) Message() string {
  19481. if s.Message_ != nil {
  19482. return *s.Message_
  19483. }
  19484. return ""
  19485. }
  19486. // OrigErr always returns nil, satisfies awserr.Error interface.
  19487. func (s *DuplicateHandshakeException) OrigErr() error {
  19488. return nil
  19489. }
  19490. func (s *DuplicateHandshakeException) Error() string {
  19491. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19492. }
  19493. // Status code returns the HTTP status code for the request's response error.
  19494. func (s *DuplicateHandshakeException) StatusCode() int {
  19495. return s.RespMetadata.StatusCode
  19496. }
  19497. // RequestID returns the service's response RequestID for request.
  19498. func (s *DuplicateHandshakeException) RequestID() string {
  19499. return s.RespMetadata.RequestID
  19500. }
  19501. // An OU with the same name already exists.
  19502. type DuplicateOrganizationalUnitException struct {
  19503. _ struct{} `type:"structure"`
  19504. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  19505. Message_ *string `locationName:"Message" type:"string"`
  19506. }
  19507. // String returns the string representation.
  19508. //
  19509. // API parameter values that are decorated as "sensitive" in the API will not
  19510. // be included in the string output. The member name will be present, but the
  19511. // value will be replaced with "sensitive".
  19512. func (s DuplicateOrganizationalUnitException) String() string {
  19513. return awsutil.Prettify(s)
  19514. }
  19515. // GoString returns the string representation.
  19516. //
  19517. // API parameter values that are decorated as "sensitive" in the API will not
  19518. // be included in the string output. The member name will be present, but the
  19519. // value will be replaced with "sensitive".
  19520. func (s DuplicateOrganizationalUnitException) GoString() string {
  19521. return s.String()
  19522. }
  19523. func newErrorDuplicateOrganizationalUnitException(v protocol.ResponseMetadata) error {
  19524. return &DuplicateOrganizationalUnitException{
  19525. RespMetadata: v,
  19526. }
  19527. }
  19528. // Code returns the exception type name.
  19529. func (s *DuplicateOrganizationalUnitException) Code() string {
  19530. return "DuplicateOrganizationalUnitException"
  19531. }
  19532. // Message returns the exception's message.
  19533. func (s *DuplicateOrganizationalUnitException) Message() string {
  19534. if s.Message_ != nil {
  19535. return *s.Message_
  19536. }
  19537. return ""
  19538. }
  19539. // OrigErr always returns nil, satisfies awserr.Error interface.
  19540. func (s *DuplicateOrganizationalUnitException) OrigErr() error {
  19541. return nil
  19542. }
  19543. func (s *DuplicateOrganizationalUnitException) Error() string {
  19544. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19545. }
  19546. // Status code returns the HTTP status code for the request's response error.
  19547. func (s *DuplicateOrganizationalUnitException) StatusCode() int {
  19548. return s.RespMetadata.StatusCode
  19549. }
  19550. // RequestID returns the service's response RequestID for request.
  19551. func (s *DuplicateOrganizationalUnitException) RequestID() string {
  19552. return s.RespMetadata.RequestID
  19553. }
  19554. // The selected policy is already attached to the specified target.
  19555. type DuplicatePolicyAttachmentException struct {
  19556. _ struct{} `type:"structure"`
  19557. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  19558. Message_ *string `locationName:"Message" type:"string"`
  19559. }
  19560. // String returns the string representation.
  19561. //
  19562. // API parameter values that are decorated as "sensitive" in the API will not
  19563. // be included in the string output. The member name will be present, but the
  19564. // value will be replaced with "sensitive".
  19565. func (s DuplicatePolicyAttachmentException) String() string {
  19566. return awsutil.Prettify(s)
  19567. }
  19568. // GoString returns the string representation.
  19569. //
  19570. // API parameter values that are decorated as "sensitive" in the API will not
  19571. // be included in the string output. The member name will be present, but the
  19572. // value will be replaced with "sensitive".
  19573. func (s DuplicatePolicyAttachmentException) GoString() string {
  19574. return s.String()
  19575. }
  19576. func newErrorDuplicatePolicyAttachmentException(v protocol.ResponseMetadata) error {
  19577. return &DuplicatePolicyAttachmentException{
  19578. RespMetadata: v,
  19579. }
  19580. }
  19581. // Code returns the exception type name.
  19582. func (s *DuplicatePolicyAttachmentException) Code() string {
  19583. return "DuplicatePolicyAttachmentException"
  19584. }
  19585. // Message returns the exception's message.
  19586. func (s *DuplicatePolicyAttachmentException) Message() string {
  19587. if s.Message_ != nil {
  19588. return *s.Message_
  19589. }
  19590. return ""
  19591. }
  19592. // OrigErr always returns nil, satisfies awserr.Error interface.
  19593. func (s *DuplicatePolicyAttachmentException) OrigErr() error {
  19594. return nil
  19595. }
  19596. func (s *DuplicatePolicyAttachmentException) Error() string {
  19597. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19598. }
  19599. // Status code returns the HTTP status code for the request's response error.
  19600. func (s *DuplicatePolicyAttachmentException) StatusCode() int {
  19601. return s.RespMetadata.StatusCode
  19602. }
  19603. // RequestID returns the service's response RequestID for request.
  19604. func (s *DuplicatePolicyAttachmentException) RequestID() string {
  19605. return s.RespMetadata.RequestID
  19606. }
  19607. // A policy with the same name already exists.
  19608. type DuplicatePolicyException struct {
  19609. _ struct{} `type:"structure"`
  19610. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  19611. Message_ *string `locationName:"Message" type:"string"`
  19612. }
  19613. // String returns the string representation.
  19614. //
  19615. // API parameter values that are decorated as "sensitive" in the API will not
  19616. // be included in the string output. The member name will be present, but the
  19617. // value will be replaced with "sensitive".
  19618. func (s DuplicatePolicyException) String() string {
  19619. return awsutil.Prettify(s)
  19620. }
  19621. // GoString returns the string representation.
  19622. //
  19623. // API parameter values that are decorated as "sensitive" in the API will not
  19624. // be included in the string output. The member name will be present, but the
  19625. // value will be replaced with "sensitive".
  19626. func (s DuplicatePolicyException) GoString() string {
  19627. return s.String()
  19628. }
  19629. func newErrorDuplicatePolicyException(v protocol.ResponseMetadata) error {
  19630. return &DuplicatePolicyException{
  19631. RespMetadata: v,
  19632. }
  19633. }
  19634. // Code returns the exception type name.
  19635. func (s *DuplicatePolicyException) Code() string {
  19636. return "DuplicatePolicyException"
  19637. }
  19638. // Message returns the exception's message.
  19639. func (s *DuplicatePolicyException) Message() string {
  19640. if s.Message_ != nil {
  19641. return *s.Message_
  19642. }
  19643. return ""
  19644. }
  19645. // OrigErr always returns nil, satisfies awserr.Error interface.
  19646. func (s *DuplicatePolicyException) OrigErr() error {
  19647. return nil
  19648. }
  19649. func (s *DuplicatePolicyException) Error() string {
  19650. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19651. }
  19652. // Status code returns the HTTP status code for the request's response error.
  19653. func (s *DuplicatePolicyException) StatusCode() int {
  19654. return s.RespMetadata.StatusCode
  19655. }
  19656. // RequestID returns the service's response RequestID for request.
  19657. func (s *DuplicatePolicyException) RequestID() string {
  19658. return s.RespMetadata.RequestID
  19659. }
  19660. // Contains rules to be applied to the affected accounts. The effective policy
  19661. // is the aggregation of any policies the account inherits, plus any policy
  19662. // directly attached to the account.
  19663. type EffectivePolicy struct {
  19664. _ struct{} `type:"structure"`
  19665. // The time of the last update to this policy.
  19666. LastUpdatedTimestamp *time.Time `type:"timestamp"`
  19667. // The text content of the policy.
  19668. PolicyContent *string `min:"1" type:"string"`
  19669. // The policy type.
  19670. PolicyType *string `type:"string" enum:"EffectivePolicyType"`
  19671. // The account ID of the policy target.
  19672. TargetId *string `type:"string"`
  19673. }
  19674. // String returns the string representation.
  19675. //
  19676. // API parameter values that are decorated as "sensitive" in the API will not
  19677. // be included in the string output. The member name will be present, but the
  19678. // value will be replaced with "sensitive".
  19679. func (s EffectivePolicy) String() string {
  19680. return awsutil.Prettify(s)
  19681. }
  19682. // GoString returns the string representation.
  19683. //
  19684. // API parameter values that are decorated as "sensitive" in the API will not
  19685. // be included in the string output. The member name will be present, but the
  19686. // value will be replaced with "sensitive".
  19687. func (s EffectivePolicy) GoString() string {
  19688. return s.String()
  19689. }
  19690. // SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value.
  19691. func (s *EffectivePolicy) SetLastUpdatedTimestamp(v time.Time) *EffectivePolicy {
  19692. s.LastUpdatedTimestamp = &v
  19693. return s
  19694. }
  19695. // SetPolicyContent sets the PolicyContent field's value.
  19696. func (s *EffectivePolicy) SetPolicyContent(v string) *EffectivePolicy {
  19697. s.PolicyContent = &v
  19698. return s
  19699. }
  19700. // SetPolicyType sets the PolicyType field's value.
  19701. func (s *EffectivePolicy) SetPolicyType(v string) *EffectivePolicy {
  19702. s.PolicyType = &v
  19703. return s
  19704. }
  19705. // SetTargetId sets the TargetId field's value.
  19706. func (s *EffectivePolicy) SetTargetId(v string) *EffectivePolicy {
  19707. s.TargetId = &v
  19708. return s
  19709. }
  19710. // If you ran this action on the management account, this policy type is not
  19711. // enabled. If you ran the action on a member account, the account doesn't have
  19712. // an effective policy of this type. Contact the administrator of your organization
  19713. // about attaching a policy of this type to the account.
  19714. type EffectivePolicyNotFoundException struct {
  19715. _ struct{} `type:"structure"`
  19716. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  19717. Message_ *string `locationName:"Message" type:"string"`
  19718. }
  19719. // String returns the string representation.
  19720. //
  19721. // API parameter values that are decorated as "sensitive" in the API will not
  19722. // be included in the string output. The member name will be present, but the
  19723. // value will be replaced with "sensitive".
  19724. func (s EffectivePolicyNotFoundException) String() string {
  19725. return awsutil.Prettify(s)
  19726. }
  19727. // GoString returns the string representation.
  19728. //
  19729. // API parameter values that are decorated as "sensitive" in the API will not
  19730. // be included in the string output. The member name will be present, but the
  19731. // value will be replaced with "sensitive".
  19732. func (s EffectivePolicyNotFoundException) GoString() string {
  19733. return s.String()
  19734. }
  19735. func newErrorEffectivePolicyNotFoundException(v protocol.ResponseMetadata) error {
  19736. return &EffectivePolicyNotFoundException{
  19737. RespMetadata: v,
  19738. }
  19739. }
  19740. // Code returns the exception type name.
  19741. func (s *EffectivePolicyNotFoundException) Code() string {
  19742. return "EffectivePolicyNotFoundException"
  19743. }
  19744. // Message returns the exception's message.
  19745. func (s *EffectivePolicyNotFoundException) Message() string {
  19746. if s.Message_ != nil {
  19747. return *s.Message_
  19748. }
  19749. return ""
  19750. }
  19751. // OrigErr always returns nil, satisfies awserr.Error interface.
  19752. func (s *EffectivePolicyNotFoundException) OrigErr() error {
  19753. return nil
  19754. }
  19755. func (s *EffectivePolicyNotFoundException) Error() string {
  19756. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  19757. }
  19758. // Status code returns the HTTP status code for the request's response error.
  19759. func (s *EffectivePolicyNotFoundException) StatusCode() int {
  19760. return s.RespMetadata.StatusCode
  19761. }
  19762. // RequestID returns the service's response RequestID for request.
  19763. func (s *EffectivePolicyNotFoundException) RequestID() string {
  19764. return s.RespMetadata.RequestID
  19765. }
  19766. type EnableAWSServiceAccessInput struct {
  19767. _ struct{} `type:"structure"`
  19768. // The service principal name of the Amazon Web Services service for which you
  19769. // want to enable integration with your organization. This is typically in the
  19770. // form of a URL, such as service-abbreviation.amazonaws.com.
  19771. //
  19772. // ServicePrincipal is a required field
  19773. ServicePrincipal *string `min:"1" type:"string" required:"true"`
  19774. }
  19775. // String returns the string representation.
  19776. //
  19777. // API parameter values that are decorated as "sensitive" in the API will not
  19778. // be included in the string output. The member name will be present, but the
  19779. // value will be replaced with "sensitive".
  19780. func (s EnableAWSServiceAccessInput) String() string {
  19781. return awsutil.Prettify(s)
  19782. }
  19783. // GoString returns the string representation.
  19784. //
  19785. // API parameter values that are decorated as "sensitive" in the API will not
  19786. // be included in the string output. The member name will be present, but the
  19787. // value will be replaced with "sensitive".
  19788. func (s EnableAWSServiceAccessInput) GoString() string {
  19789. return s.String()
  19790. }
  19791. // Validate inspects the fields of the type to determine if they are valid.
  19792. func (s *EnableAWSServiceAccessInput) Validate() error {
  19793. invalidParams := request.ErrInvalidParams{Context: "EnableAWSServiceAccessInput"}
  19794. if s.ServicePrincipal == nil {
  19795. invalidParams.Add(request.NewErrParamRequired("ServicePrincipal"))
  19796. }
  19797. if s.ServicePrincipal != nil && len(*s.ServicePrincipal) < 1 {
  19798. invalidParams.Add(request.NewErrParamMinLen("ServicePrincipal", 1))
  19799. }
  19800. if invalidParams.Len() > 0 {
  19801. return invalidParams
  19802. }
  19803. return nil
  19804. }
  19805. // SetServicePrincipal sets the ServicePrincipal field's value.
  19806. func (s *EnableAWSServiceAccessInput) SetServicePrincipal(v string) *EnableAWSServiceAccessInput {
  19807. s.ServicePrincipal = &v
  19808. return s
  19809. }
  19810. type EnableAWSServiceAccessOutput struct {
  19811. _ struct{} `type:"structure"`
  19812. }
  19813. // String returns the string representation.
  19814. //
  19815. // API parameter values that are decorated as "sensitive" in the API will not
  19816. // be included in the string output. The member name will be present, but the
  19817. // value will be replaced with "sensitive".
  19818. func (s EnableAWSServiceAccessOutput) String() string {
  19819. return awsutil.Prettify(s)
  19820. }
  19821. // GoString returns the string representation.
  19822. //
  19823. // API parameter values that are decorated as "sensitive" in the API will not
  19824. // be included in the string output. The member name will be present, but the
  19825. // value will be replaced with "sensitive".
  19826. func (s EnableAWSServiceAccessOutput) GoString() string {
  19827. return s.String()
  19828. }
  19829. type EnableAllFeaturesInput struct {
  19830. _ struct{} `type:"structure"`
  19831. }
  19832. // String returns the string representation.
  19833. //
  19834. // API parameter values that are decorated as "sensitive" in the API will not
  19835. // be included in the string output. The member name will be present, but the
  19836. // value will be replaced with "sensitive".
  19837. func (s EnableAllFeaturesInput) String() string {
  19838. return awsutil.Prettify(s)
  19839. }
  19840. // GoString returns the string representation.
  19841. //
  19842. // API parameter values that are decorated as "sensitive" in the API will not
  19843. // be included in the string output. The member name will be present, but the
  19844. // value will be replaced with "sensitive".
  19845. func (s EnableAllFeaturesInput) GoString() string {
  19846. return s.String()
  19847. }
  19848. type EnableAllFeaturesOutput struct {
  19849. _ struct{} `type:"structure"`
  19850. // A structure that contains details about the handshake created to support
  19851. // this request to enable all features in the organization.
  19852. Handshake *Handshake `type:"structure"`
  19853. }
  19854. // String returns the string representation.
  19855. //
  19856. // API parameter values that are decorated as "sensitive" in the API will not
  19857. // be included in the string output. The member name will be present, but the
  19858. // value will be replaced with "sensitive".
  19859. func (s EnableAllFeaturesOutput) String() string {
  19860. return awsutil.Prettify(s)
  19861. }
  19862. // GoString returns the string representation.
  19863. //
  19864. // API parameter values that are decorated as "sensitive" in the API will not
  19865. // be included in the string output. The member name will be present, but the
  19866. // value will be replaced with "sensitive".
  19867. func (s EnableAllFeaturesOutput) GoString() string {
  19868. return s.String()
  19869. }
  19870. // SetHandshake sets the Handshake field's value.
  19871. func (s *EnableAllFeaturesOutput) SetHandshake(v *Handshake) *EnableAllFeaturesOutput {
  19872. s.Handshake = v
  19873. return s
  19874. }
  19875. type EnablePolicyTypeInput struct {
  19876. _ struct{} `type:"structure"`
  19877. // The policy type that you want to enable. You can specify one of the following
  19878. // values:
  19879. //
  19880. // * AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
  19881. //
  19882. // * BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html)
  19883. //
  19884. // * SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html)
  19885. //
  19886. // * TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
  19887. //
  19888. // PolicyType is a required field
  19889. PolicyType *string `type:"string" required:"true" enum:"PolicyType"`
  19890. // The unique identifier (ID) of the root in which you want to enable a policy
  19891. // type. You can get the ID from the ListRoots operation.
  19892. //
  19893. // The regex pattern (http://wikipedia.org/wiki/regex) for a root ID string
  19894. // requires "r-" followed by from 4 to 32 lowercase letters or digits.
  19895. //
  19896. // RootId is a required field
  19897. RootId *string `type:"string" required:"true"`
  19898. }
  19899. // String returns the string representation.
  19900. //
  19901. // API parameter values that are decorated as "sensitive" in the API will not
  19902. // be included in the string output. The member name will be present, but the
  19903. // value will be replaced with "sensitive".
  19904. func (s EnablePolicyTypeInput) String() string {
  19905. return awsutil.Prettify(s)
  19906. }
  19907. // GoString returns the string representation.
  19908. //
  19909. // API parameter values that are decorated as "sensitive" in the API will not
  19910. // be included in the string output. The member name will be present, but the
  19911. // value will be replaced with "sensitive".
  19912. func (s EnablePolicyTypeInput) GoString() string {
  19913. return s.String()
  19914. }
  19915. // Validate inspects the fields of the type to determine if they are valid.
  19916. func (s *EnablePolicyTypeInput) Validate() error {
  19917. invalidParams := request.ErrInvalidParams{Context: "EnablePolicyTypeInput"}
  19918. if s.PolicyType == nil {
  19919. invalidParams.Add(request.NewErrParamRequired("PolicyType"))
  19920. }
  19921. if s.RootId == nil {
  19922. invalidParams.Add(request.NewErrParamRequired("RootId"))
  19923. }
  19924. if invalidParams.Len() > 0 {
  19925. return invalidParams
  19926. }
  19927. return nil
  19928. }
  19929. // SetPolicyType sets the PolicyType field's value.
  19930. func (s *EnablePolicyTypeInput) SetPolicyType(v string) *EnablePolicyTypeInput {
  19931. s.PolicyType = &v
  19932. return s
  19933. }
  19934. // SetRootId sets the RootId field's value.
  19935. func (s *EnablePolicyTypeInput) SetRootId(v string) *EnablePolicyTypeInput {
  19936. s.RootId = &v
  19937. return s
  19938. }
  19939. type EnablePolicyTypeOutput struct {
  19940. _ struct{} `type:"structure"`
  19941. // A structure that shows the root with the updated list of enabled policy types.
  19942. Root *Root `type:"structure"`
  19943. }
  19944. // String returns the string representation.
  19945. //
  19946. // API parameter values that are decorated as "sensitive" in the API will not
  19947. // be included in the string output. The member name will be present, but the
  19948. // value will be replaced with "sensitive".
  19949. func (s EnablePolicyTypeOutput) String() string {
  19950. return awsutil.Prettify(s)
  19951. }
  19952. // GoString returns the string representation.
  19953. //
  19954. // API parameter values that are decorated as "sensitive" in the API will not
  19955. // be included in the string output. The member name will be present, but the
  19956. // value will be replaced with "sensitive".
  19957. func (s EnablePolicyTypeOutput) GoString() string {
  19958. return s.String()
  19959. }
  19960. // SetRoot sets the Root field's value.
  19961. func (s *EnablePolicyTypeOutput) SetRoot(v *Root) *EnablePolicyTypeOutput {
  19962. s.Root = v
  19963. return s
  19964. }
  19965. // A structure that contains details of a service principal that represents
  19966. // an Amazon Web Services service that is enabled to integrate with Organizations.
  19967. type EnabledServicePrincipal struct {
  19968. _ struct{} `type:"structure"`
  19969. // The date that the service principal was enabled for integration with Organizations.
  19970. DateEnabled *time.Time `type:"timestamp"`
  19971. // The name of the service principal. This is typically in the form of a URL,
  19972. // such as: servicename.amazonaws.com.
  19973. ServicePrincipal *string `min:"1" type:"string"`
  19974. }
  19975. // String returns the string representation.
  19976. //
  19977. // API parameter values that are decorated as "sensitive" in the API will not
  19978. // be included in the string output. The member name will be present, but the
  19979. // value will be replaced with "sensitive".
  19980. func (s EnabledServicePrincipal) String() string {
  19981. return awsutil.Prettify(s)
  19982. }
  19983. // GoString returns the string representation.
  19984. //
  19985. // API parameter values that are decorated as "sensitive" in the API will not
  19986. // be included in the string output. The member name will be present, but the
  19987. // value will be replaced with "sensitive".
  19988. func (s EnabledServicePrincipal) GoString() string {
  19989. return s.String()
  19990. }
  19991. // SetDateEnabled sets the DateEnabled field's value.
  19992. func (s *EnabledServicePrincipal) SetDateEnabled(v time.Time) *EnabledServicePrincipal {
  19993. s.DateEnabled = &v
  19994. return s
  19995. }
  19996. // SetServicePrincipal sets the ServicePrincipal field's value.
  19997. func (s *EnabledServicePrincipal) SetServicePrincipal(v string) *EnabledServicePrincipal {
  19998. s.ServicePrincipal = &v
  19999. return s
  20000. }
  20001. // Organizations couldn't perform the operation because your organization hasn't
  20002. // finished initializing. This can take up to an hour. Try again later. If after
  20003. // one hour you continue to receive this error, contact Amazon Web Services
  20004. // Support (https://console.aws.amazon.com/support/home#/).
  20005. type FinalizingOrganizationException struct {
  20006. _ struct{} `type:"structure"`
  20007. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  20008. Message_ *string `locationName:"Message" type:"string"`
  20009. }
  20010. // String returns the string representation.
  20011. //
  20012. // API parameter values that are decorated as "sensitive" in the API will not
  20013. // be included in the string output. The member name will be present, but the
  20014. // value will be replaced with "sensitive".
  20015. func (s FinalizingOrganizationException) String() string {
  20016. return awsutil.Prettify(s)
  20017. }
  20018. // GoString returns the string representation.
  20019. //
  20020. // API parameter values that are decorated as "sensitive" in the API will not
  20021. // be included in the string output. The member name will be present, but the
  20022. // value will be replaced with "sensitive".
  20023. func (s FinalizingOrganizationException) GoString() string {
  20024. return s.String()
  20025. }
  20026. func newErrorFinalizingOrganizationException(v protocol.ResponseMetadata) error {
  20027. return &FinalizingOrganizationException{
  20028. RespMetadata: v,
  20029. }
  20030. }
  20031. // Code returns the exception type name.
  20032. func (s *FinalizingOrganizationException) Code() string {
  20033. return "FinalizingOrganizationException"
  20034. }
  20035. // Message returns the exception's message.
  20036. func (s *FinalizingOrganizationException) Message() string {
  20037. if s.Message_ != nil {
  20038. return *s.Message_
  20039. }
  20040. return ""
  20041. }
  20042. // OrigErr always returns nil, satisfies awserr.Error interface.
  20043. func (s *FinalizingOrganizationException) OrigErr() error {
  20044. return nil
  20045. }
  20046. func (s *FinalizingOrganizationException) Error() string {
  20047. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  20048. }
  20049. // Status code returns the HTTP status code for the request's response error.
  20050. func (s *FinalizingOrganizationException) StatusCode() int {
  20051. return s.RespMetadata.StatusCode
  20052. }
  20053. // RequestID returns the service's response RequestID for request.
  20054. func (s *FinalizingOrganizationException) RequestID() string {
  20055. return s.RespMetadata.RequestID
  20056. }
  20057. // Contains information that must be exchanged to securely establish a relationship
  20058. // between two accounts (an originator and a recipient). For example, when a
  20059. // management account (the originator) invites another account (the recipient)
  20060. // to join its organization, the two accounts exchange information as a series
  20061. // of handshake requests and responses.
  20062. //
  20063. // Note: Handshakes that are CANCELED, ACCEPTED, DECLINED, or EXPIRED show up
  20064. // in lists for only 30 days after entering that state After that they are deleted.
  20065. type Handshake struct {
  20066. _ struct{} `type:"structure"`
  20067. // The type of handshake, indicating what action occurs when the recipient accepts
  20068. // the handshake. The following handshake types are supported:
  20069. //
  20070. // * INVITE: This type of handshake represents a request to join an organization.
  20071. // It is always sent from the management account to only non-member accounts.
  20072. //
  20073. // * ENABLE_ALL_FEATURES: This type of handshake represents a request to
  20074. // enable all features in an organization. It is always sent from the management
  20075. // account to only invited member accounts. Created accounts do not receive
  20076. // this because those accounts were created by the organization's management
  20077. // account and approval is inferred.
  20078. //
  20079. // * APPROVE_ALL_FEATURES: This type of handshake is sent from the Organizations
  20080. // service when all member accounts have approved the ENABLE_ALL_FEATURES
  20081. // invitation. It is sent only to the management account and signals the
  20082. // master that it can finalize the process to enable all features.
  20083. Action *string `type:"string" enum:"ActionType"`
  20084. // The Amazon Resource Name (ARN) of a handshake.
  20085. //
  20086. // For more information about ARNs in Organizations, see ARN Formats Supported
  20087. // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
  20088. // in the Amazon Web Services Service Authorization Reference.
  20089. Arn *string `type:"string"`
  20090. // The date and time that the handshake expires. If the recipient of the handshake
  20091. // request fails to respond before the specified date and time, the handshake
  20092. // becomes inactive and is no longer valid.
  20093. ExpirationTimestamp *time.Time `type:"timestamp"`
  20094. // The unique identifier (ID) of a handshake. The originating account creates
  20095. // the ID when it initiates the handshake.
  20096. //
  20097. // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string
  20098. // requires "h-" followed by from 8 to 32 lowercase letters or digits.
  20099. Id *string `type:"string"`
  20100. // Information about the two accounts that are participating in the handshake.
  20101. Parties []*HandshakeParty `type:"list"`
  20102. // The date and time that the handshake request was made.
  20103. RequestedTimestamp *time.Time `type:"timestamp"`
  20104. // Additional information that is needed to process the handshake.
  20105. Resources []*HandshakeResource `type:"list"`
  20106. // The current state of the handshake. Use the state to trace the flow of the
  20107. // handshake through the process from its creation to its acceptance. The meaning
  20108. // of each of the valid values is as follows:
  20109. //
  20110. // * REQUESTED: This handshake was sent to multiple recipients (applicable
  20111. // to only some handshake types) and not all recipients have responded yet.
  20112. // The request stays in this state until all recipients respond.
  20113. //
  20114. // * OPEN: This handshake was sent to multiple recipients (applicable to
  20115. // only some policy types) and all recipients have responded, allowing the
  20116. // originator to complete the handshake action.
  20117. //
  20118. // * CANCELED: This handshake is no longer active because it was canceled
  20119. // by the originating account.
  20120. //
  20121. // * ACCEPTED: This handshake is complete because it has been accepted by
  20122. // the recipient.
  20123. //
  20124. // * DECLINED: This handshake is no longer active because it was declined
  20125. // by the recipient account.
  20126. //
  20127. // * EXPIRED: This handshake is no longer active because the originator did
  20128. // not receive a response of any kind from the recipient before the expiration
  20129. // time (15 days).
  20130. State *string `type:"string" enum:"HandshakeState"`
  20131. }
  20132. // String returns the string representation.
  20133. //
  20134. // API parameter values that are decorated as "sensitive" in the API will not
  20135. // be included in the string output. The member name will be present, but the
  20136. // value will be replaced with "sensitive".
  20137. func (s Handshake) String() string {
  20138. return awsutil.Prettify(s)
  20139. }
  20140. // GoString returns the string representation.
  20141. //
  20142. // API parameter values that are decorated as "sensitive" in the API will not
  20143. // be included in the string output. The member name will be present, but the
  20144. // value will be replaced with "sensitive".
  20145. func (s Handshake) GoString() string {
  20146. return s.String()
  20147. }
  20148. // SetAction sets the Action field's value.
  20149. func (s *Handshake) SetAction(v string) *Handshake {
  20150. s.Action = &v
  20151. return s
  20152. }
  20153. // SetArn sets the Arn field's value.
  20154. func (s *Handshake) SetArn(v string) *Handshake {
  20155. s.Arn = &v
  20156. return s
  20157. }
  20158. // SetExpirationTimestamp sets the ExpirationTimestamp field's value.
  20159. func (s *Handshake) SetExpirationTimestamp(v time.Time) *Handshake {
  20160. s.ExpirationTimestamp = &v
  20161. return s
  20162. }
  20163. // SetId sets the Id field's value.
  20164. func (s *Handshake) SetId(v string) *Handshake {
  20165. s.Id = &v
  20166. return s
  20167. }
  20168. // SetParties sets the Parties field's value.
  20169. func (s *Handshake) SetParties(v []*HandshakeParty) *Handshake {
  20170. s.Parties = v
  20171. return s
  20172. }
  20173. // SetRequestedTimestamp sets the RequestedTimestamp field's value.
  20174. func (s *Handshake) SetRequestedTimestamp(v time.Time) *Handshake {
  20175. s.RequestedTimestamp = &v
  20176. return s
  20177. }
  20178. // SetResources sets the Resources field's value.
  20179. func (s *Handshake) SetResources(v []*HandshakeResource) *Handshake {
  20180. s.Resources = v
  20181. return s
  20182. }
  20183. // SetState sets the State field's value.
  20184. func (s *Handshake) SetState(v string) *Handshake {
  20185. s.State = &v
  20186. return s
  20187. }
  20188. // The specified handshake is already in the requested state. For example, you
  20189. // can't accept a handshake that was already accepted.
  20190. type HandshakeAlreadyInStateException struct {
  20191. _ struct{} `type:"structure"`
  20192. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  20193. Message_ *string `locationName:"Message" type:"string"`
  20194. }
  20195. // String returns the string representation.
  20196. //
  20197. // API parameter values that are decorated as "sensitive" in the API will not
  20198. // be included in the string output. The member name will be present, but the
  20199. // value will be replaced with "sensitive".
  20200. func (s HandshakeAlreadyInStateException) String() string {
  20201. return awsutil.Prettify(s)
  20202. }
  20203. // GoString returns the string representation.
  20204. //
  20205. // API parameter values that are decorated as "sensitive" in the API will not
  20206. // be included in the string output. The member name will be present, but the
  20207. // value will be replaced with "sensitive".
  20208. func (s HandshakeAlreadyInStateException) GoString() string {
  20209. return s.String()
  20210. }
  20211. func newErrorHandshakeAlreadyInStateException(v protocol.ResponseMetadata) error {
  20212. return &HandshakeAlreadyInStateException{
  20213. RespMetadata: v,
  20214. }
  20215. }
  20216. // Code returns the exception type name.
  20217. func (s *HandshakeAlreadyInStateException) Code() string {
  20218. return "HandshakeAlreadyInStateException"
  20219. }
  20220. // Message returns the exception's message.
  20221. func (s *HandshakeAlreadyInStateException) Message() string {
  20222. if s.Message_ != nil {
  20223. return *s.Message_
  20224. }
  20225. return ""
  20226. }
  20227. // OrigErr always returns nil, satisfies awserr.Error interface.
  20228. func (s *HandshakeAlreadyInStateException) OrigErr() error {
  20229. return nil
  20230. }
  20231. func (s *HandshakeAlreadyInStateException) Error() string {
  20232. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  20233. }
  20234. // Status code returns the HTTP status code for the request's response error.
  20235. func (s *HandshakeAlreadyInStateException) StatusCode() int {
  20236. return s.RespMetadata.StatusCode
  20237. }
  20238. // RequestID returns the service's response RequestID for request.
  20239. func (s *HandshakeAlreadyInStateException) RequestID() string {
  20240. return s.RespMetadata.RequestID
  20241. }
  20242. // The requested operation would violate the constraint identified in the reason
  20243. // code.
  20244. //
  20245. // Some of the reasons in the following list might not be applicable to this
  20246. // specific API or operation:
  20247. //
  20248. // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
  20249. // the number of accounts in an organization. Note that deleted and closed
  20250. // accounts still count toward your limit. If you get this exception immediately
  20251. // after creating the organization, wait one hour and try again. If after
  20252. // an hour it continues to fail with this error, contact Amazon Web Services
  20253. // Support (https://docs.aws.amazon.com/support/home#/).
  20254. //
  20255. // - ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because
  20256. // the invited account is already a member of an organization.
  20257. //
  20258. // - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
  20259. // handshakes that you can send in one day.
  20260. //
  20261. // - INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations
  20262. // to join an organization while it's in the process of enabling all features.
  20263. // You can resume inviting accounts after you finalize the process when all
  20264. // accounts have agreed to the change.
  20265. //
  20266. // - ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid
  20267. // because the organization has already enabled all features.
  20268. //
  20269. // - ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION: The handshake
  20270. // request is invalid because the organization has already started the process
  20271. // to enable all features.
  20272. //
  20273. // - ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because
  20274. // the account is from a different marketplace than the accounts in the organization.
  20275. // For example, accounts with India addresses must be associated with the
  20276. // AISPL marketplace. All accounts in an organization must be from the same
  20277. // marketplace.
  20278. //
  20279. // - ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to
  20280. // change the membership of an account too quickly after its previous change.
  20281. //
  20282. // - PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an
  20283. // account that doesn't have a payment instrument, such as a credit card,
  20284. // associated with it.
  20285. type HandshakeConstraintViolationException struct {
  20286. _ struct{} `type:"structure"`
  20287. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  20288. Message_ *string `locationName:"Message" type:"string"`
  20289. Reason *string `type:"string" enum:"HandshakeConstraintViolationExceptionReason"`
  20290. }
  20291. // String returns the string representation.
  20292. //
  20293. // API parameter values that are decorated as "sensitive" in the API will not
  20294. // be included in the string output. The member name will be present, but the
  20295. // value will be replaced with "sensitive".
  20296. func (s HandshakeConstraintViolationException) String() string {
  20297. return awsutil.Prettify(s)
  20298. }
  20299. // GoString returns the string representation.
  20300. //
  20301. // API parameter values that are decorated as "sensitive" in the API will not
  20302. // be included in the string output. The member name will be present, but the
  20303. // value will be replaced with "sensitive".
  20304. func (s HandshakeConstraintViolationException) GoString() string {
  20305. return s.String()
  20306. }
  20307. func newErrorHandshakeConstraintViolationException(v protocol.ResponseMetadata) error {
  20308. return &HandshakeConstraintViolationException{
  20309. RespMetadata: v,
  20310. }
  20311. }
  20312. // Code returns the exception type name.
  20313. func (s *HandshakeConstraintViolationException) Code() string {
  20314. return "HandshakeConstraintViolationException"
  20315. }
  20316. // Message returns the exception's message.
  20317. func (s *HandshakeConstraintViolationException) Message() string {
  20318. if s.Message_ != nil {
  20319. return *s.Message_
  20320. }
  20321. return ""
  20322. }
  20323. // OrigErr always returns nil, satisfies awserr.Error interface.
  20324. func (s *HandshakeConstraintViolationException) OrigErr() error {
  20325. return nil
  20326. }
  20327. func (s *HandshakeConstraintViolationException) Error() string {
  20328. return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  20329. }
  20330. // Status code returns the HTTP status code for the request's response error.
  20331. func (s *HandshakeConstraintViolationException) StatusCode() int {
  20332. return s.RespMetadata.StatusCode
  20333. }
  20334. // RequestID returns the service's response RequestID for request.
  20335. func (s *HandshakeConstraintViolationException) RequestID() string {
  20336. return s.RespMetadata.RequestID
  20337. }
  20338. // Specifies the criteria that are used to select the handshakes for the operation.
  20339. type HandshakeFilter struct {
  20340. _ struct{} `type:"structure"`
  20341. // Specifies the type of handshake action.
  20342. //
  20343. // If you specify ActionType, you cannot also specify ParentHandshakeId.
  20344. ActionType *string `type:"string" enum:"ActionType"`
  20345. // Specifies the parent handshake. Only used for handshake types that are a
  20346. // child of another type.
  20347. //
  20348. // If you specify ParentHandshakeId, you cannot also specify ActionType.
  20349. //
  20350. // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string
  20351. // requires "h-" followed by from 8 to 32 lowercase letters or digits.
  20352. ParentHandshakeId *string `type:"string"`
  20353. }
  20354. // String returns the string representation.
  20355. //
  20356. // API parameter values that are decorated as "sensitive" in the API will not
  20357. // be included in the string output. The member name will be present, but the
  20358. // value will be replaced with "sensitive".
  20359. func (s HandshakeFilter) String() string {
  20360. return awsutil.Prettify(s)
  20361. }
  20362. // GoString returns the string representation.
  20363. //
  20364. // API parameter values that are decorated as "sensitive" in the API will not
  20365. // be included in the string output. The member name will be present, but the
  20366. // value will be replaced with "sensitive".
  20367. func (s HandshakeFilter) GoString() string {
  20368. return s.String()
  20369. }
  20370. // SetActionType sets the ActionType field's value.
  20371. func (s *HandshakeFilter) SetActionType(v string) *HandshakeFilter {
  20372. s.ActionType = &v
  20373. return s
  20374. }
  20375. // SetParentHandshakeId sets the ParentHandshakeId field's value.
  20376. func (s *HandshakeFilter) SetParentHandshakeId(v string) *HandshakeFilter {
  20377. s.ParentHandshakeId = &v
  20378. return s
  20379. }
  20380. // We can't find a handshake with the HandshakeId that you specified.
  20381. type HandshakeNotFoundException struct {
  20382. _ struct{} `type:"structure"`
  20383. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  20384. Message_ *string `locationName:"Message" type:"string"`
  20385. }
  20386. // String returns the string representation.
  20387. //
  20388. // API parameter values that are decorated as "sensitive" in the API will not
  20389. // be included in the string output. The member name will be present, but the
  20390. // value will be replaced with "sensitive".
  20391. func (s HandshakeNotFoundException) String() string {
  20392. return awsutil.Prettify(s)
  20393. }
  20394. // GoString returns the string representation.
  20395. //
  20396. // API parameter values that are decorated as "sensitive" in the API will not
  20397. // be included in the string output. The member name will be present, but the
  20398. // value will be replaced with "sensitive".
  20399. func (s HandshakeNotFoundException) GoString() string {
  20400. return s.String()
  20401. }
  20402. func newErrorHandshakeNotFoundException(v protocol.ResponseMetadata) error {
  20403. return &HandshakeNotFoundException{
  20404. RespMetadata: v,
  20405. }
  20406. }
  20407. // Code returns the exception type name.
  20408. func (s *HandshakeNotFoundException) Code() string {
  20409. return "HandshakeNotFoundException"
  20410. }
  20411. // Message returns the exception's message.
  20412. func (s *HandshakeNotFoundException) Message() string {
  20413. if s.Message_ != nil {
  20414. return *s.Message_
  20415. }
  20416. return ""
  20417. }
  20418. // OrigErr always returns nil, satisfies awserr.Error interface.
  20419. func (s *HandshakeNotFoundException) OrigErr() error {
  20420. return nil
  20421. }
  20422. func (s *HandshakeNotFoundException) Error() string {
  20423. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  20424. }
  20425. // Status code returns the HTTP status code for the request's response error.
  20426. func (s *HandshakeNotFoundException) StatusCode() int {
  20427. return s.RespMetadata.StatusCode
  20428. }
  20429. // RequestID returns the service's response RequestID for request.
  20430. func (s *HandshakeNotFoundException) RequestID() string {
  20431. return s.RespMetadata.RequestID
  20432. }
  20433. // Identifies a participant in a handshake.
  20434. type HandshakeParty struct {
  20435. _ struct{} `type:"structure"`
  20436. // The unique identifier (ID) for the party.
  20437. //
  20438. // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string
  20439. // requires "h-" followed by from 8 to 32 lowercase letters or digits.
  20440. //
  20441. // Id is a sensitive parameter and its value will be
  20442. // replaced with "sensitive" in string returned by HandshakeParty's
  20443. // String and GoString methods.
  20444. //
  20445. // Id is a required field
  20446. Id *string `min:"1" type:"string" required:"true" sensitive:"true"`
  20447. // The type of party.
  20448. //
  20449. // Type is a required field
  20450. Type *string `type:"string" required:"true" enum:"HandshakePartyType"`
  20451. }
  20452. // String returns the string representation.
  20453. //
  20454. // API parameter values that are decorated as "sensitive" in the API will not
  20455. // be included in the string output. The member name will be present, but the
  20456. // value will be replaced with "sensitive".
  20457. func (s HandshakeParty) String() string {
  20458. return awsutil.Prettify(s)
  20459. }
  20460. // GoString returns the string representation.
  20461. //
  20462. // API parameter values that are decorated as "sensitive" in the API will not
  20463. // be included in the string output. The member name will be present, but the
  20464. // value will be replaced with "sensitive".
  20465. func (s HandshakeParty) GoString() string {
  20466. return s.String()
  20467. }
  20468. // Validate inspects the fields of the type to determine if they are valid.
  20469. func (s *HandshakeParty) Validate() error {
  20470. invalidParams := request.ErrInvalidParams{Context: "HandshakeParty"}
  20471. if s.Id == nil {
  20472. invalidParams.Add(request.NewErrParamRequired("Id"))
  20473. }
  20474. if s.Id != nil && len(*s.Id) < 1 {
  20475. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  20476. }
  20477. if s.Type == nil {
  20478. invalidParams.Add(request.NewErrParamRequired("Type"))
  20479. }
  20480. if invalidParams.Len() > 0 {
  20481. return invalidParams
  20482. }
  20483. return nil
  20484. }
  20485. // SetId sets the Id field's value.
  20486. func (s *HandshakeParty) SetId(v string) *HandshakeParty {
  20487. s.Id = &v
  20488. return s
  20489. }
  20490. // SetType sets the Type field's value.
  20491. func (s *HandshakeParty) SetType(v string) *HandshakeParty {
  20492. s.Type = &v
  20493. return s
  20494. }
  20495. // Contains additional data that is needed to process a handshake.
  20496. type HandshakeResource struct {
  20497. _ struct{} `type:"structure"`
  20498. // When needed, contains an additional array of HandshakeResource objects.
  20499. Resources []*HandshakeResource `type:"list"`
  20500. // The type of information being passed, specifying how the value is to be interpreted
  20501. // by the other party:
  20502. //
  20503. // * ACCOUNT - Specifies an Amazon Web Services account ID number.
  20504. //
  20505. // * ORGANIZATION - Specifies an organization ID number.
  20506. //
  20507. // * EMAIL - Specifies the email address that is associated with the account
  20508. // that receives the handshake.
  20509. //
  20510. // * OWNER_EMAIL - Specifies the email address associated with the management
  20511. // account. Included as information about an organization.
  20512. //
  20513. // * OWNER_NAME - Specifies the name associated with the management account.
  20514. // Included as information about an organization.
  20515. //
  20516. // * NOTES - Additional text provided by the handshake initiator and intended
  20517. // for the recipient to read.
  20518. Type *string `type:"string" enum:"HandshakeResourceType"`
  20519. // The information that is passed to the other party in the handshake. The format
  20520. // of the value string must match the requirements of the specified type.
  20521. //
  20522. // Value is a sensitive parameter and its value will be
  20523. // replaced with "sensitive" in string returned by HandshakeResource's
  20524. // String and GoString methods.
  20525. Value *string `type:"string" sensitive:"true"`
  20526. }
  20527. // String returns the string representation.
  20528. //
  20529. // API parameter values that are decorated as "sensitive" in the API will not
  20530. // be included in the string output. The member name will be present, but the
  20531. // value will be replaced with "sensitive".
  20532. func (s HandshakeResource) String() string {
  20533. return awsutil.Prettify(s)
  20534. }
  20535. // GoString returns the string representation.
  20536. //
  20537. // API parameter values that are decorated as "sensitive" in the API will not
  20538. // be included in the string output. The member name will be present, but the
  20539. // value will be replaced with "sensitive".
  20540. func (s HandshakeResource) GoString() string {
  20541. return s.String()
  20542. }
  20543. // SetResources sets the Resources field's value.
  20544. func (s *HandshakeResource) SetResources(v []*HandshakeResource) *HandshakeResource {
  20545. s.Resources = v
  20546. return s
  20547. }
  20548. // SetType sets the Type field's value.
  20549. func (s *HandshakeResource) SetType(v string) *HandshakeResource {
  20550. s.Type = &v
  20551. return s
  20552. }
  20553. // SetValue sets the Value field's value.
  20554. func (s *HandshakeResource) SetValue(v string) *HandshakeResource {
  20555. s.Value = &v
  20556. return s
  20557. }
  20558. // You can't perform the operation on the handshake in its current state. For
  20559. // example, you can't cancel a handshake that was already accepted or accept
  20560. // a handshake that was already declined.
  20561. type InvalidHandshakeTransitionException struct {
  20562. _ struct{} `type:"structure"`
  20563. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  20564. Message_ *string `locationName:"Message" type:"string"`
  20565. }
  20566. // String returns the string representation.
  20567. //
  20568. // API parameter values that are decorated as "sensitive" in the API will not
  20569. // be included in the string output. The member name will be present, but the
  20570. // value will be replaced with "sensitive".
  20571. func (s InvalidHandshakeTransitionException) String() string {
  20572. return awsutil.Prettify(s)
  20573. }
  20574. // GoString returns the string representation.
  20575. //
  20576. // API parameter values that are decorated as "sensitive" in the API will not
  20577. // be included in the string output. The member name will be present, but the
  20578. // value will be replaced with "sensitive".
  20579. func (s InvalidHandshakeTransitionException) GoString() string {
  20580. return s.String()
  20581. }
  20582. func newErrorInvalidHandshakeTransitionException(v protocol.ResponseMetadata) error {
  20583. return &InvalidHandshakeTransitionException{
  20584. RespMetadata: v,
  20585. }
  20586. }
  20587. // Code returns the exception type name.
  20588. func (s *InvalidHandshakeTransitionException) Code() string {
  20589. return "InvalidHandshakeTransitionException"
  20590. }
  20591. // Message returns the exception's message.
  20592. func (s *InvalidHandshakeTransitionException) Message() string {
  20593. if s.Message_ != nil {
  20594. return *s.Message_
  20595. }
  20596. return ""
  20597. }
  20598. // OrigErr always returns nil, satisfies awserr.Error interface.
  20599. func (s *InvalidHandshakeTransitionException) OrigErr() error {
  20600. return nil
  20601. }
  20602. func (s *InvalidHandshakeTransitionException) Error() string {
  20603. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  20604. }
  20605. // Status code returns the HTTP status code for the request's response error.
  20606. func (s *InvalidHandshakeTransitionException) StatusCode() int {
  20607. return s.RespMetadata.StatusCode
  20608. }
  20609. // RequestID returns the service's response RequestID for request.
  20610. func (s *InvalidHandshakeTransitionException) RequestID() string {
  20611. return s.RespMetadata.RequestID
  20612. }
  20613. // The requested operation failed because you provided invalid values for one
  20614. // or more of the request parameters. This exception includes a reason that
  20615. // contains additional information about the violated limit:
  20616. //
  20617. // Some of the reasons in the following list might not be applicable to this
  20618. // specific API or operation.
  20619. //
  20620. // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
  20621. // the same entity.
  20622. //
  20623. // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
  20624. // Services and can't be modified.
  20625. //
  20626. // - INPUT_REQUIRED: You must include a value for all required parameters.
  20627. //
  20628. // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
  20629. // for the invited account owner.
  20630. //
  20631. // - INVALID_ENUM: You specified an invalid value.
  20632. //
  20633. // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
  20634. //
  20635. // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
  20636. // characters.
  20637. //
  20638. // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains
  20639. // at least one invalid value.
  20640. //
  20641. // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
  20642. // from the response to a previous call of the operation.
  20643. //
  20644. // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
  20645. // organization, or email) as a party.
  20646. //
  20647. // - INVALID_PATTERN: You provided a value that doesn't match the required
  20648. // pattern.
  20649. //
  20650. // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
  20651. // match the required pattern.
  20652. //
  20653. // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
  20654. // name can't begin with the reserved prefix AWSServiceRoleFor.
  20655. //
  20656. // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
  20657. // Name (ARN) for the organization.
  20658. //
  20659. // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
  20660. //
  20661. // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
  20662. // tag. You can’t add, edit, or delete system tag keys because they're
  20663. // reserved for Amazon Web Services use. System tags don’t count against
  20664. // your tags per resource limit.
  20665. //
  20666. // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
  20667. // for the operation.
  20668. //
  20669. // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
  20670. // than allowed.
  20671. //
  20672. // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
  20673. // value than allowed.
  20674. //
  20675. // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
  20676. // than allowed.
  20677. //
  20678. // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
  20679. // value than allowed.
  20680. //
  20681. // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
  20682. // between entities in the same root.
  20683. //
  20684. // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
  20685. // target entity.
  20686. //
  20687. // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
  20688. // isn't recognized.
  20689. type InvalidInputException struct {
  20690. _ struct{} `type:"structure"`
  20691. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  20692. Message_ *string `locationName:"Message" type:"string"`
  20693. Reason *string `type:"string" enum:"InvalidInputExceptionReason"`
  20694. }
  20695. // String returns the string representation.
  20696. //
  20697. // API parameter values that are decorated as "sensitive" in the API will not
  20698. // be included in the string output. The member name will be present, but the
  20699. // value will be replaced with "sensitive".
  20700. func (s InvalidInputException) String() string {
  20701. return awsutil.Prettify(s)
  20702. }
  20703. // GoString returns the string representation.
  20704. //
  20705. // API parameter values that are decorated as "sensitive" in the API will not
  20706. // be included in the string output. The member name will be present, but the
  20707. // value will be replaced with "sensitive".
  20708. func (s InvalidInputException) GoString() string {
  20709. return s.String()
  20710. }
  20711. func newErrorInvalidInputException(v protocol.ResponseMetadata) error {
  20712. return &InvalidInputException{
  20713. RespMetadata: v,
  20714. }
  20715. }
  20716. // Code returns the exception type name.
  20717. func (s *InvalidInputException) Code() string {
  20718. return "InvalidInputException"
  20719. }
  20720. // Message returns the exception's message.
  20721. func (s *InvalidInputException) Message() string {
  20722. if s.Message_ != nil {
  20723. return *s.Message_
  20724. }
  20725. return ""
  20726. }
  20727. // OrigErr always returns nil, satisfies awserr.Error interface.
  20728. func (s *InvalidInputException) OrigErr() error {
  20729. return nil
  20730. }
  20731. func (s *InvalidInputException) Error() string {
  20732. return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  20733. }
  20734. // Status code returns the HTTP status code for the request's response error.
  20735. func (s *InvalidInputException) StatusCode() int {
  20736. return s.RespMetadata.StatusCode
  20737. }
  20738. // RequestID returns the service's response RequestID for request.
  20739. func (s *InvalidInputException) RequestID() string {
  20740. return s.RespMetadata.RequestID
  20741. }
  20742. type InviteAccountToOrganizationInput struct {
  20743. _ struct{} `type:"structure"`
  20744. // Additional information that you want to include in the generated email to
  20745. // the recipient account owner.
  20746. //
  20747. // Notes is a sensitive parameter and its value will be
  20748. // replaced with "sensitive" in string returned by InviteAccountToOrganizationInput's
  20749. // String and GoString methods.
  20750. Notes *string `type:"string" sensitive:"true"`
  20751. // A list of tags that you want to attach to the account when it becomes a member
  20752. // of the organization. For each tag in the list, you must specify both a tag
  20753. // key and a value. You can set the value to an empty string, but you can't
  20754. // set it to null. For more information about tagging, see Tagging Organizations
  20755. // resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html)
  20756. // in the Organizations User Guide.
  20757. //
  20758. // Any tags in the request are checked for compliance with any applicable tag
  20759. // policies when the request is made. The request is rejected if the tags in
  20760. // the request don't match the requirements of the policy at that time. Tag
  20761. // policy compliance is not checked again when the invitation is accepted and
  20762. // the tags are actually attached to the account. That means that if the tag
  20763. // policy changes between the invitation and the acceptance, then that tags
  20764. // could potentially be non-compliant.
  20765. //
  20766. // If any one of the tags is invalid or if you exceed the allowed number of
  20767. // tags for an account, then the entire request fails and invitations are not
  20768. // sent.
  20769. Tags []*Tag `type:"list"`
  20770. // The identifier (ID) of the Amazon Web Services account that you want to invite
  20771. // to join your organization. This is a JSON object that contains the following
  20772. // elements:
  20773. //
  20774. // { "Type": "ACCOUNT", "Id": "< account id number >" }
  20775. //
  20776. // If you use the CLI, you can submit this as a single string, similar to the
  20777. // following example:
  20778. //
  20779. // --target Id=123456789012,Type=ACCOUNT
  20780. //
  20781. // If you specify "Type": "ACCOUNT", you must provide the Amazon Web Services
  20782. // account ID number as the Id. If you specify "Type": "EMAIL", you must specify
  20783. // the email address that is associated with the account.
  20784. //
  20785. // --target Id=diego@example.com,Type=EMAIL
  20786. //
  20787. // Target is a required field
  20788. Target *HandshakeParty `type:"structure" required:"true"`
  20789. }
  20790. // String returns the string representation.
  20791. //
  20792. // API parameter values that are decorated as "sensitive" in the API will not
  20793. // be included in the string output. The member name will be present, but the
  20794. // value will be replaced with "sensitive".
  20795. func (s InviteAccountToOrganizationInput) String() string {
  20796. return awsutil.Prettify(s)
  20797. }
  20798. // GoString returns the string representation.
  20799. //
  20800. // API parameter values that are decorated as "sensitive" in the API will not
  20801. // be included in the string output. The member name will be present, but the
  20802. // value will be replaced with "sensitive".
  20803. func (s InviteAccountToOrganizationInput) GoString() string {
  20804. return s.String()
  20805. }
  20806. // Validate inspects the fields of the type to determine if they are valid.
  20807. func (s *InviteAccountToOrganizationInput) Validate() error {
  20808. invalidParams := request.ErrInvalidParams{Context: "InviteAccountToOrganizationInput"}
  20809. if s.Target == nil {
  20810. invalidParams.Add(request.NewErrParamRequired("Target"))
  20811. }
  20812. if s.Tags != nil {
  20813. for i, v := range s.Tags {
  20814. if v == nil {
  20815. continue
  20816. }
  20817. if err := v.Validate(); err != nil {
  20818. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  20819. }
  20820. }
  20821. }
  20822. if s.Target != nil {
  20823. if err := s.Target.Validate(); err != nil {
  20824. invalidParams.AddNested("Target", err.(request.ErrInvalidParams))
  20825. }
  20826. }
  20827. if invalidParams.Len() > 0 {
  20828. return invalidParams
  20829. }
  20830. return nil
  20831. }
  20832. // SetNotes sets the Notes field's value.
  20833. func (s *InviteAccountToOrganizationInput) SetNotes(v string) *InviteAccountToOrganizationInput {
  20834. s.Notes = &v
  20835. return s
  20836. }
  20837. // SetTags sets the Tags field's value.
  20838. func (s *InviteAccountToOrganizationInput) SetTags(v []*Tag) *InviteAccountToOrganizationInput {
  20839. s.Tags = v
  20840. return s
  20841. }
  20842. // SetTarget sets the Target field's value.
  20843. func (s *InviteAccountToOrganizationInput) SetTarget(v *HandshakeParty) *InviteAccountToOrganizationInput {
  20844. s.Target = v
  20845. return s
  20846. }
  20847. type InviteAccountToOrganizationOutput struct {
  20848. _ struct{} `type:"structure"`
  20849. // A structure that contains details about the handshake that is created to
  20850. // support this invitation request.
  20851. Handshake *Handshake `type:"structure"`
  20852. }
  20853. // String returns the string representation.
  20854. //
  20855. // API parameter values that are decorated as "sensitive" in the API will not
  20856. // be included in the string output. The member name will be present, but the
  20857. // value will be replaced with "sensitive".
  20858. func (s InviteAccountToOrganizationOutput) String() string {
  20859. return awsutil.Prettify(s)
  20860. }
  20861. // GoString returns the string representation.
  20862. //
  20863. // API parameter values that are decorated as "sensitive" in the API will not
  20864. // be included in the string output. The member name will be present, but the
  20865. // value will be replaced with "sensitive".
  20866. func (s InviteAccountToOrganizationOutput) GoString() string {
  20867. return s.String()
  20868. }
  20869. // SetHandshake sets the Handshake field's value.
  20870. func (s *InviteAccountToOrganizationOutput) SetHandshake(v *Handshake) *InviteAccountToOrganizationOutput {
  20871. s.Handshake = v
  20872. return s
  20873. }
  20874. type LeaveOrganizationInput struct {
  20875. _ struct{} `type:"structure"`
  20876. }
  20877. // String returns the string representation.
  20878. //
  20879. // API parameter values that are decorated as "sensitive" in the API will not
  20880. // be included in the string output. The member name will be present, but the
  20881. // value will be replaced with "sensitive".
  20882. func (s LeaveOrganizationInput) String() string {
  20883. return awsutil.Prettify(s)
  20884. }
  20885. // GoString returns the string representation.
  20886. //
  20887. // API parameter values that are decorated as "sensitive" in the API will not
  20888. // be included in the string output. The member name will be present, but the
  20889. // value will be replaced with "sensitive".
  20890. func (s LeaveOrganizationInput) GoString() string {
  20891. return s.String()
  20892. }
  20893. type LeaveOrganizationOutput struct {
  20894. _ struct{} `type:"structure"`
  20895. }
  20896. // String returns the string representation.
  20897. //
  20898. // API parameter values that are decorated as "sensitive" in the API will not
  20899. // be included in the string output. The member name will be present, but the
  20900. // value will be replaced with "sensitive".
  20901. func (s LeaveOrganizationOutput) String() string {
  20902. return awsutil.Prettify(s)
  20903. }
  20904. // GoString returns the string representation.
  20905. //
  20906. // API parameter values that are decorated as "sensitive" in the API will not
  20907. // be included in the string output. The member name will be present, but the
  20908. // value will be replaced with "sensitive".
  20909. func (s LeaveOrganizationOutput) GoString() string {
  20910. return s.String()
  20911. }
  20912. type ListAWSServiceAccessForOrganizationInput struct {
  20913. _ struct{} `type:"structure"`
  20914. // The total number of results that you want included on each page of the response.
  20915. // If you do not include this parameter, it defaults to a value that is specific
  20916. // to the operation. If additional items exist beyond the maximum you specify,
  20917. // the NextToken response element is present and has a value (is not null).
  20918. // Include that value as the NextToken request parameter in the next call to
  20919. // the operation to get the next part of the results. Note that Organizations
  20920. // might return fewer results than the maximum even when there are more results
  20921. // available. You should check NextToken after every operation to ensure that
  20922. // you receive all of the results.
  20923. MaxResults *int64 `min:"1" type:"integer"`
  20924. // The parameter for receiving additional results if you receive a NextToken
  20925. // response in a previous request. A NextToken response indicates that more
  20926. // output is available. Set this parameter to the value of the previous call's
  20927. // NextToken response to indicate where the output should continue from.
  20928. NextToken *string `type:"string"`
  20929. }
  20930. // String returns the string representation.
  20931. //
  20932. // API parameter values that are decorated as "sensitive" in the API will not
  20933. // be included in the string output. The member name will be present, but the
  20934. // value will be replaced with "sensitive".
  20935. func (s ListAWSServiceAccessForOrganizationInput) String() string {
  20936. return awsutil.Prettify(s)
  20937. }
  20938. // GoString returns the string representation.
  20939. //
  20940. // API parameter values that are decorated as "sensitive" in the API will not
  20941. // be included in the string output. The member name will be present, but the
  20942. // value will be replaced with "sensitive".
  20943. func (s ListAWSServiceAccessForOrganizationInput) GoString() string {
  20944. return s.String()
  20945. }
  20946. // Validate inspects the fields of the type to determine if they are valid.
  20947. func (s *ListAWSServiceAccessForOrganizationInput) Validate() error {
  20948. invalidParams := request.ErrInvalidParams{Context: "ListAWSServiceAccessForOrganizationInput"}
  20949. if s.MaxResults != nil && *s.MaxResults < 1 {
  20950. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  20951. }
  20952. if invalidParams.Len() > 0 {
  20953. return invalidParams
  20954. }
  20955. return nil
  20956. }
  20957. // SetMaxResults sets the MaxResults field's value.
  20958. func (s *ListAWSServiceAccessForOrganizationInput) SetMaxResults(v int64) *ListAWSServiceAccessForOrganizationInput {
  20959. s.MaxResults = &v
  20960. return s
  20961. }
  20962. // SetNextToken sets the NextToken field's value.
  20963. func (s *ListAWSServiceAccessForOrganizationInput) SetNextToken(v string) *ListAWSServiceAccessForOrganizationInput {
  20964. s.NextToken = &v
  20965. return s
  20966. }
  20967. type ListAWSServiceAccessForOrganizationOutput struct {
  20968. _ struct{} `type:"structure"`
  20969. // A list of the service principals for the services that are enabled to integrate
  20970. // with your organization. Each principal is a structure that includes the name
  20971. // and the date that it was enabled for integration with Organizations.
  20972. EnabledServicePrincipals []*EnabledServicePrincipal `type:"list"`
  20973. // If present, indicates that more output is available than is included in the
  20974. // current response. Use this value in the NextToken request parameter in a
  20975. // subsequent call to the operation to get the next part of the output. You
  20976. // should repeat this until the NextToken response element comes back as null.
  20977. NextToken *string `type:"string"`
  20978. }
  20979. // String returns the string representation.
  20980. //
  20981. // API parameter values that are decorated as "sensitive" in the API will not
  20982. // be included in the string output. The member name will be present, but the
  20983. // value will be replaced with "sensitive".
  20984. func (s ListAWSServiceAccessForOrganizationOutput) String() string {
  20985. return awsutil.Prettify(s)
  20986. }
  20987. // GoString returns the string representation.
  20988. //
  20989. // API parameter values that are decorated as "sensitive" in the API will not
  20990. // be included in the string output. The member name will be present, but the
  20991. // value will be replaced with "sensitive".
  20992. func (s ListAWSServiceAccessForOrganizationOutput) GoString() string {
  20993. return s.String()
  20994. }
  20995. // SetEnabledServicePrincipals sets the EnabledServicePrincipals field's value.
  20996. func (s *ListAWSServiceAccessForOrganizationOutput) SetEnabledServicePrincipals(v []*EnabledServicePrincipal) *ListAWSServiceAccessForOrganizationOutput {
  20997. s.EnabledServicePrincipals = v
  20998. return s
  20999. }
  21000. // SetNextToken sets the NextToken field's value.
  21001. func (s *ListAWSServiceAccessForOrganizationOutput) SetNextToken(v string) *ListAWSServiceAccessForOrganizationOutput {
  21002. s.NextToken = &v
  21003. return s
  21004. }
  21005. type ListAccountsForParentInput struct {
  21006. _ struct{} `type:"structure"`
  21007. // The total number of results that you want included on each page of the response.
  21008. // If you do not include this parameter, it defaults to a value that is specific
  21009. // to the operation. If additional items exist beyond the maximum you specify,
  21010. // the NextToken response element is present and has a value (is not null).
  21011. // Include that value as the NextToken request parameter in the next call to
  21012. // the operation to get the next part of the results. Note that Organizations
  21013. // might return fewer results than the maximum even when there are more results
  21014. // available. You should check NextToken after every operation to ensure that
  21015. // you receive all of the results.
  21016. MaxResults *int64 `min:"1" type:"integer"`
  21017. // The parameter for receiving additional results if you receive a NextToken
  21018. // response in a previous request. A NextToken response indicates that more
  21019. // output is available. Set this parameter to the value of the previous call's
  21020. // NextToken response to indicate where the output should continue from.
  21021. NextToken *string `type:"string"`
  21022. // The unique identifier (ID) for the parent root or organization unit (OU)
  21023. // whose accounts you want to list.
  21024. //
  21025. // ParentId is a required field
  21026. ParentId *string `type:"string" required:"true"`
  21027. }
  21028. // String returns the string representation.
  21029. //
  21030. // API parameter values that are decorated as "sensitive" in the API will not
  21031. // be included in the string output. The member name will be present, but the
  21032. // value will be replaced with "sensitive".
  21033. func (s ListAccountsForParentInput) String() string {
  21034. return awsutil.Prettify(s)
  21035. }
  21036. // GoString returns the string representation.
  21037. //
  21038. // API parameter values that are decorated as "sensitive" in the API will not
  21039. // be included in the string output. The member name will be present, but the
  21040. // value will be replaced with "sensitive".
  21041. func (s ListAccountsForParentInput) GoString() string {
  21042. return s.String()
  21043. }
  21044. // Validate inspects the fields of the type to determine if they are valid.
  21045. func (s *ListAccountsForParentInput) Validate() error {
  21046. invalidParams := request.ErrInvalidParams{Context: "ListAccountsForParentInput"}
  21047. if s.MaxResults != nil && *s.MaxResults < 1 {
  21048. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  21049. }
  21050. if s.ParentId == nil {
  21051. invalidParams.Add(request.NewErrParamRequired("ParentId"))
  21052. }
  21053. if invalidParams.Len() > 0 {
  21054. return invalidParams
  21055. }
  21056. return nil
  21057. }
  21058. // SetMaxResults sets the MaxResults field's value.
  21059. func (s *ListAccountsForParentInput) SetMaxResults(v int64) *ListAccountsForParentInput {
  21060. s.MaxResults = &v
  21061. return s
  21062. }
  21063. // SetNextToken sets the NextToken field's value.
  21064. func (s *ListAccountsForParentInput) SetNextToken(v string) *ListAccountsForParentInput {
  21065. s.NextToken = &v
  21066. return s
  21067. }
  21068. // SetParentId sets the ParentId field's value.
  21069. func (s *ListAccountsForParentInput) SetParentId(v string) *ListAccountsForParentInput {
  21070. s.ParentId = &v
  21071. return s
  21072. }
  21073. type ListAccountsForParentOutput struct {
  21074. _ struct{} `type:"structure"`
  21075. // A list of the accounts in the specified root or OU.
  21076. Accounts []*Account `type:"list"`
  21077. // If present, indicates that more output is available than is included in the
  21078. // current response. Use this value in the NextToken request parameter in a
  21079. // subsequent call to the operation to get the next part of the output. You
  21080. // should repeat this until the NextToken response element comes back as null.
  21081. NextToken *string `type:"string"`
  21082. }
  21083. // String returns the string representation.
  21084. //
  21085. // API parameter values that are decorated as "sensitive" in the API will not
  21086. // be included in the string output. The member name will be present, but the
  21087. // value will be replaced with "sensitive".
  21088. func (s ListAccountsForParentOutput) String() string {
  21089. return awsutil.Prettify(s)
  21090. }
  21091. // GoString returns the string representation.
  21092. //
  21093. // API parameter values that are decorated as "sensitive" in the API will not
  21094. // be included in the string output. The member name will be present, but the
  21095. // value will be replaced with "sensitive".
  21096. func (s ListAccountsForParentOutput) GoString() string {
  21097. return s.String()
  21098. }
  21099. // SetAccounts sets the Accounts field's value.
  21100. func (s *ListAccountsForParentOutput) SetAccounts(v []*Account) *ListAccountsForParentOutput {
  21101. s.Accounts = v
  21102. return s
  21103. }
  21104. // SetNextToken sets the NextToken field's value.
  21105. func (s *ListAccountsForParentOutput) SetNextToken(v string) *ListAccountsForParentOutput {
  21106. s.NextToken = &v
  21107. return s
  21108. }
  21109. type ListAccountsInput struct {
  21110. _ struct{} `type:"structure"`
  21111. // The total number of results that you want included on each page of the response.
  21112. // If you do not include this parameter, it defaults to a value that is specific
  21113. // to the operation. If additional items exist beyond the maximum you specify,
  21114. // the NextToken response element is present and has a value (is not null).
  21115. // Include that value as the NextToken request parameter in the next call to
  21116. // the operation to get the next part of the results. Note that Organizations
  21117. // might return fewer results than the maximum even when there are more results
  21118. // available. You should check NextToken after every operation to ensure that
  21119. // you receive all of the results.
  21120. MaxResults *int64 `min:"1" type:"integer"`
  21121. // The parameter for receiving additional results if you receive a NextToken
  21122. // response in a previous request. A NextToken response indicates that more
  21123. // output is available. Set this parameter to the value of the previous call's
  21124. // NextToken response to indicate where the output should continue from.
  21125. NextToken *string `type:"string"`
  21126. }
  21127. // String returns the string representation.
  21128. //
  21129. // API parameter values that are decorated as "sensitive" in the API will not
  21130. // be included in the string output. The member name will be present, but the
  21131. // value will be replaced with "sensitive".
  21132. func (s ListAccountsInput) String() string {
  21133. return awsutil.Prettify(s)
  21134. }
  21135. // GoString returns the string representation.
  21136. //
  21137. // API parameter values that are decorated as "sensitive" in the API will not
  21138. // be included in the string output. The member name will be present, but the
  21139. // value will be replaced with "sensitive".
  21140. func (s ListAccountsInput) GoString() string {
  21141. return s.String()
  21142. }
  21143. // Validate inspects the fields of the type to determine if they are valid.
  21144. func (s *ListAccountsInput) Validate() error {
  21145. invalidParams := request.ErrInvalidParams{Context: "ListAccountsInput"}
  21146. if s.MaxResults != nil && *s.MaxResults < 1 {
  21147. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  21148. }
  21149. if invalidParams.Len() > 0 {
  21150. return invalidParams
  21151. }
  21152. return nil
  21153. }
  21154. // SetMaxResults sets the MaxResults field's value.
  21155. func (s *ListAccountsInput) SetMaxResults(v int64) *ListAccountsInput {
  21156. s.MaxResults = &v
  21157. return s
  21158. }
  21159. // SetNextToken sets the NextToken field's value.
  21160. func (s *ListAccountsInput) SetNextToken(v string) *ListAccountsInput {
  21161. s.NextToken = &v
  21162. return s
  21163. }
  21164. type ListAccountsOutput struct {
  21165. _ struct{} `type:"structure"`
  21166. // A list of objects in the organization.
  21167. Accounts []*Account `type:"list"`
  21168. // If present, indicates that more output is available than is included in the
  21169. // current response. Use this value in the NextToken request parameter in a
  21170. // subsequent call to the operation to get the next part of the output. You
  21171. // should repeat this until the NextToken response element comes back as null.
  21172. NextToken *string `type:"string"`
  21173. }
  21174. // String returns the string representation.
  21175. //
  21176. // API parameter values that are decorated as "sensitive" in the API will not
  21177. // be included in the string output. The member name will be present, but the
  21178. // value will be replaced with "sensitive".
  21179. func (s ListAccountsOutput) String() string {
  21180. return awsutil.Prettify(s)
  21181. }
  21182. // GoString returns the string representation.
  21183. //
  21184. // API parameter values that are decorated as "sensitive" in the API will not
  21185. // be included in the string output. The member name will be present, but the
  21186. // value will be replaced with "sensitive".
  21187. func (s ListAccountsOutput) GoString() string {
  21188. return s.String()
  21189. }
  21190. // SetAccounts sets the Accounts field's value.
  21191. func (s *ListAccountsOutput) SetAccounts(v []*Account) *ListAccountsOutput {
  21192. s.Accounts = v
  21193. return s
  21194. }
  21195. // SetNextToken sets the NextToken field's value.
  21196. func (s *ListAccountsOutput) SetNextToken(v string) *ListAccountsOutput {
  21197. s.NextToken = &v
  21198. return s
  21199. }
  21200. type ListChildrenInput struct {
  21201. _ struct{} `type:"structure"`
  21202. // Filters the output to include only the specified child type.
  21203. //
  21204. // ChildType is a required field
  21205. ChildType *string `type:"string" required:"true" enum:"ChildType"`
  21206. // The total number of results that you want included on each page of the response.
  21207. // If you do not include this parameter, it defaults to a value that is specific
  21208. // to the operation. If additional items exist beyond the maximum you specify,
  21209. // the NextToken response element is present and has a value (is not null).
  21210. // Include that value as the NextToken request parameter in the next call to
  21211. // the operation to get the next part of the results. Note that Organizations
  21212. // might return fewer results than the maximum even when there are more results
  21213. // available. You should check NextToken after every operation to ensure that
  21214. // you receive all of the results.
  21215. MaxResults *int64 `min:"1" type:"integer"`
  21216. // The parameter for receiving additional results if you receive a NextToken
  21217. // response in a previous request. A NextToken response indicates that more
  21218. // output is available. Set this parameter to the value of the previous call's
  21219. // NextToken response to indicate where the output should continue from.
  21220. NextToken *string `type:"string"`
  21221. // The unique identifier (ID) for the parent root or OU whose children you want
  21222. // to list.
  21223. //
  21224. // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string
  21225. // requires one of the following:
  21226. //
  21227. // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
  21228. // letters or digits.
  21229. //
  21230. // * Organizational unit (OU) - A string that begins with "ou-" followed
  21231. // by from 4 to 32 lowercase letters or digits (the ID of the root that the
  21232. // OU is in). This string is followed by a second "-" dash and from 8 to
  21233. // 32 additional lowercase letters or digits.
  21234. //
  21235. // ParentId is a required field
  21236. ParentId *string `type:"string" required:"true"`
  21237. }
  21238. // String returns the string representation.
  21239. //
  21240. // API parameter values that are decorated as "sensitive" in the API will not
  21241. // be included in the string output. The member name will be present, but the
  21242. // value will be replaced with "sensitive".
  21243. func (s ListChildrenInput) String() string {
  21244. return awsutil.Prettify(s)
  21245. }
  21246. // GoString returns the string representation.
  21247. //
  21248. // API parameter values that are decorated as "sensitive" in the API will not
  21249. // be included in the string output. The member name will be present, but the
  21250. // value will be replaced with "sensitive".
  21251. func (s ListChildrenInput) GoString() string {
  21252. return s.String()
  21253. }
  21254. // Validate inspects the fields of the type to determine if they are valid.
  21255. func (s *ListChildrenInput) Validate() error {
  21256. invalidParams := request.ErrInvalidParams{Context: "ListChildrenInput"}
  21257. if s.ChildType == nil {
  21258. invalidParams.Add(request.NewErrParamRequired("ChildType"))
  21259. }
  21260. if s.MaxResults != nil && *s.MaxResults < 1 {
  21261. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  21262. }
  21263. if s.ParentId == nil {
  21264. invalidParams.Add(request.NewErrParamRequired("ParentId"))
  21265. }
  21266. if invalidParams.Len() > 0 {
  21267. return invalidParams
  21268. }
  21269. return nil
  21270. }
  21271. // SetChildType sets the ChildType field's value.
  21272. func (s *ListChildrenInput) SetChildType(v string) *ListChildrenInput {
  21273. s.ChildType = &v
  21274. return s
  21275. }
  21276. // SetMaxResults sets the MaxResults field's value.
  21277. func (s *ListChildrenInput) SetMaxResults(v int64) *ListChildrenInput {
  21278. s.MaxResults = &v
  21279. return s
  21280. }
  21281. // SetNextToken sets the NextToken field's value.
  21282. func (s *ListChildrenInput) SetNextToken(v string) *ListChildrenInput {
  21283. s.NextToken = &v
  21284. return s
  21285. }
  21286. // SetParentId sets the ParentId field's value.
  21287. func (s *ListChildrenInput) SetParentId(v string) *ListChildrenInput {
  21288. s.ParentId = &v
  21289. return s
  21290. }
  21291. type ListChildrenOutput struct {
  21292. _ struct{} `type:"structure"`
  21293. // The list of children of the specified parent container.
  21294. Children []*Child `type:"list"`
  21295. // If present, indicates that more output is available than is included in the
  21296. // current response. Use this value in the NextToken request parameter in a
  21297. // subsequent call to the operation to get the next part of the output. You
  21298. // should repeat this until the NextToken response element comes back as null.
  21299. NextToken *string `type:"string"`
  21300. }
  21301. // String returns the string representation.
  21302. //
  21303. // API parameter values that are decorated as "sensitive" in the API will not
  21304. // be included in the string output. The member name will be present, but the
  21305. // value will be replaced with "sensitive".
  21306. func (s ListChildrenOutput) String() string {
  21307. return awsutil.Prettify(s)
  21308. }
  21309. // GoString returns the string representation.
  21310. //
  21311. // API parameter values that are decorated as "sensitive" in the API will not
  21312. // be included in the string output. The member name will be present, but the
  21313. // value will be replaced with "sensitive".
  21314. func (s ListChildrenOutput) GoString() string {
  21315. return s.String()
  21316. }
  21317. // SetChildren sets the Children field's value.
  21318. func (s *ListChildrenOutput) SetChildren(v []*Child) *ListChildrenOutput {
  21319. s.Children = v
  21320. return s
  21321. }
  21322. // SetNextToken sets the NextToken field's value.
  21323. func (s *ListChildrenOutput) SetNextToken(v string) *ListChildrenOutput {
  21324. s.NextToken = &v
  21325. return s
  21326. }
  21327. type ListCreateAccountStatusInput struct {
  21328. _ struct{} `type:"structure"`
  21329. // The total number of results that you want included on each page of the response.
  21330. // If you do not include this parameter, it defaults to a value that is specific
  21331. // to the operation. If additional items exist beyond the maximum you specify,
  21332. // the NextToken response element is present and has a value (is not null).
  21333. // Include that value as the NextToken request parameter in the next call to
  21334. // the operation to get the next part of the results. Note that Organizations
  21335. // might return fewer results than the maximum even when there are more results
  21336. // available. You should check NextToken after every operation to ensure that
  21337. // you receive all of the results.
  21338. MaxResults *int64 `min:"1" type:"integer"`
  21339. // The parameter for receiving additional results if you receive a NextToken
  21340. // response in a previous request. A NextToken response indicates that more
  21341. // output is available. Set this parameter to the value of the previous call's
  21342. // NextToken response to indicate where the output should continue from.
  21343. NextToken *string `type:"string"`
  21344. // A list of one or more states that you want included in the response. If this
  21345. // parameter isn't present, all requests are included in the response.
  21346. States []*string `type:"list" enum:"CreateAccountState"`
  21347. }
  21348. // String returns the string representation.
  21349. //
  21350. // API parameter values that are decorated as "sensitive" in the API will not
  21351. // be included in the string output. The member name will be present, but the
  21352. // value will be replaced with "sensitive".
  21353. func (s ListCreateAccountStatusInput) String() string {
  21354. return awsutil.Prettify(s)
  21355. }
  21356. // GoString returns the string representation.
  21357. //
  21358. // API parameter values that are decorated as "sensitive" in the API will not
  21359. // be included in the string output. The member name will be present, but the
  21360. // value will be replaced with "sensitive".
  21361. func (s ListCreateAccountStatusInput) GoString() string {
  21362. return s.String()
  21363. }
  21364. // Validate inspects the fields of the type to determine if they are valid.
  21365. func (s *ListCreateAccountStatusInput) Validate() error {
  21366. invalidParams := request.ErrInvalidParams{Context: "ListCreateAccountStatusInput"}
  21367. if s.MaxResults != nil && *s.MaxResults < 1 {
  21368. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  21369. }
  21370. if invalidParams.Len() > 0 {
  21371. return invalidParams
  21372. }
  21373. return nil
  21374. }
  21375. // SetMaxResults sets the MaxResults field's value.
  21376. func (s *ListCreateAccountStatusInput) SetMaxResults(v int64) *ListCreateAccountStatusInput {
  21377. s.MaxResults = &v
  21378. return s
  21379. }
  21380. // SetNextToken sets the NextToken field's value.
  21381. func (s *ListCreateAccountStatusInput) SetNextToken(v string) *ListCreateAccountStatusInput {
  21382. s.NextToken = &v
  21383. return s
  21384. }
  21385. // SetStates sets the States field's value.
  21386. func (s *ListCreateAccountStatusInput) SetStates(v []*string) *ListCreateAccountStatusInput {
  21387. s.States = v
  21388. return s
  21389. }
  21390. type ListCreateAccountStatusOutput struct {
  21391. _ struct{} `type:"structure"`
  21392. // A list of objects with details about the requests. Certain elements, such
  21393. // as the accountId number, are present in the output only after the account
  21394. // has been successfully created.
  21395. CreateAccountStatuses []*CreateAccountStatus `type:"list"`
  21396. // If present, indicates that more output is available than is included in the
  21397. // current response. Use this value in the NextToken request parameter in a
  21398. // subsequent call to the operation to get the next part of the output. You
  21399. // should repeat this until the NextToken response element comes back as null.
  21400. NextToken *string `type:"string"`
  21401. }
  21402. // String returns the string representation.
  21403. //
  21404. // API parameter values that are decorated as "sensitive" in the API will not
  21405. // be included in the string output. The member name will be present, but the
  21406. // value will be replaced with "sensitive".
  21407. func (s ListCreateAccountStatusOutput) String() string {
  21408. return awsutil.Prettify(s)
  21409. }
  21410. // GoString returns the string representation.
  21411. //
  21412. // API parameter values that are decorated as "sensitive" in the API will not
  21413. // be included in the string output. The member name will be present, but the
  21414. // value will be replaced with "sensitive".
  21415. func (s ListCreateAccountStatusOutput) GoString() string {
  21416. return s.String()
  21417. }
  21418. // SetCreateAccountStatuses sets the CreateAccountStatuses field's value.
  21419. func (s *ListCreateAccountStatusOutput) SetCreateAccountStatuses(v []*CreateAccountStatus) *ListCreateAccountStatusOutput {
  21420. s.CreateAccountStatuses = v
  21421. return s
  21422. }
  21423. // SetNextToken sets the NextToken field's value.
  21424. func (s *ListCreateAccountStatusOutput) SetNextToken(v string) *ListCreateAccountStatusOutput {
  21425. s.NextToken = &v
  21426. return s
  21427. }
  21428. type ListDelegatedAdministratorsInput struct {
  21429. _ struct{} `type:"structure"`
  21430. // The total number of results that you want included on each page of the response.
  21431. // If you do not include this parameter, it defaults to a value that is specific
  21432. // to the operation. If additional items exist beyond the maximum you specify,
  21433. // the NextToken response element is present and has a value (is not null).
  21434. // Include that value as the NextToken request parameter in the next call to
  21435. // the operation to get the next part of the results. Note that Organizations
  21436. // might return fewer results than the maximum even when there are more results
  21437. // available. You should check NextToken after every operation to ensure that
  21438. // you receive all of the results.
  21439. MaxResults *int64 `min:"1" type:"integer"`
  21440. // The parameter for receiving additional results if you receive a NextToken
  21441. // response in a previous request. A NextToken response indicates that more
  21442. // output is available. Set this parameter to the value of the previous call's
  21443. // NextToken response to indicate where the output should continue from.
  21444. NextToken *string `type:"string"`
  21445. // Specifies a service principal name. If specified, then the operation lists
  21446. // the delegated administrators only for the specified service.
  21447. //
  21448. // If you don't specify a service principal, the operation lists all delegated
  21449. // administrators for all services in your organization.
  21450. ServicePrincipal *string `min:"1" type:"string"`
  21451. }
  21452. // String returns the string representation.
  21453. //
  21454. // API parameter values that are decorated as "sensitive" in the API will not
  21455. // be included in the string output. The member name will be present, but the
  21456. // value will be replaced with "sensitive".
  21457. func (s ListDelegatedAdministratorsInput) String() string {
  21458. return awsutil.Prettify(s)
  21459. }
  21460. // GoString returns the string representation.
  21461. //
  21462. // API parameter values that are decorated as "sensitive" in the API will not
  21463. // be included in the string output. The member name will be present, but the
  21464. // value will be replaced with "sensitive".
  21465. func (s ListDelegatedAdministratorsInput) GoString() string {
  21466. return s.String()
  21467. }
  21468. // Validate inspects the fields of the type to determine if they are valid.
  21469. func (s *ListDelegatedAdministratorsInput) Validate() error {
  21470. invalidParams := request.ErrInvalidParams{Context: "ListDelegatedAdministratorsInput"}
  21471. if s.MaxResults != nil && *s.MaxResults < 1 {
  21472. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  21473. }
  21474. if s.ServicePrincipal != nil && len(*s.ServicePrincipal) < 1 {
  21475. invalidParams.Add(request.NewErrParamMinLen("ServicePrincipal", 1))
  21476. }
  21477. if invalidParams.Len() > 0 {
  21478. return invalidParams
  21479. }
  21480. return nil
  21481. }
  21482. // SetMaxResults sets the MaxResults field's value.
  21483. func (s *ListDelegatedAdministratorsInput) SetMaxResults(v int64) *ListDelegatedAdministratorsInput {
  21484. s.MaxResults = &v
  21485. return s
  21486. }
  21487. // SetNextToken sets the NextToken field's value.
  21488. func (s *ListDelegatedAdministratorsInput) SetNextToken(v string) *ListDelegatedAdministratorsInput {
  21489. s.NextToken = &v
  21490. return s
  21491. }
  21492. // SetServicePrincipal sets the ServicePrincipal field's value.
  21493. func (s *ListDelegatedAdministratorsInput) SetServicePrincipal(v string) *ListDelegatedAdministratorsInput {
  21494. s.ServicePrincipal = &v
  21495. return s
  21496. }
  21497. type ListDelegatedAdministratorsOutput struct {
  21498. _ struct{} `type:"structure"`
  21499. // The list of delegated administrators in your organization.
  21500. DelegatedAdministrators []*DelegatedAdministrator `type:"list"`
  21501. // If present, indicates that more output is available than is included in the
  21502. // current response. Use this value in the NextToken request parameter in a
  21503. // subsequent call to the operation to get the next part of the output. You
  21504. // should repeat this until the NextToken response element comes back as null.
  21505. NextToken *string `type:"string"`
  21506. }
  21507. // String returns the string representation.
  21508. //
  21509. // API parameter values that are decorated as "sensitive" in the API will not
  21510. // be included in the string output. The member name will be present, but the
  21511. // value will be replaced with "sensitive".
  21512. func (s ListDelegatedAdministratorsOutput) String() string {
  21513. return awsutil.Prettify(s)
  21514. }
  21515. // GoString returns the string representation.
  21516. //
  21517. // API parameter values that are decorated as "sensitive" in the API will not
  21518. // be included in the string output. The member name will be present, but the
  21519. // value will be replaced with "sensitive".
  21520. func (s ListDelegatedAdministratorsOutput) GoString() string {
  21521. return s.String()
  21522. }
  21523. // SetDelegatedAdministrators sets the DelegatedAdministrators field's value.
  21524. func (s *ListDelegatedAdministratorsOutput) SetDelegatedAdministrators(v []*DelegatedAdministrator) *ListDelegatedAdministratorsOutput {
  21525. s.DelegatedAdministrators = v
  21526. return s
  21527. }
  21528. // SetNextToken sets the NextToken field's value.
  21529. func (s *ListDelegatedAdministratorsOutput) SetNextToken(v string) *ListDelegatedAdministratorsOutput {
  21530. s.NextToken = &v
  21531. return s
  21532. }
  21533. type ListDelegatedServicesForAccountInput struct {
  21534. _ struct{} `type:"structure"`
  21535. // The account ID number of a delegated administrator account in the organization.
  21536. //
  21537. // AccountId is a required field
  21538. AccountId *string `type:"string" required:"true"`
  21539. // The total number of results that you want included on each page of the response.
  21540. // If you do not include this parameter, it defaults to a value that is specific
  21541. // to the operation. If additional items exist beyond the maximum you specify,
  21542. // the NextToken response element is present and has a value (is not null).
  21543. // Include that value as the NextToken request parameter in the next call to
  21544. // the operation to get the next part of the results. Note that Organizations
  21545. // might return fewer results than the maximum even when there are more results
  21546. // available. You should check NextToken after every operation to ensure that
  21547. // you receive all of the results.
  21548. MaxResults *int64 `min:"1" type:"integer"`
  21549. // The parameter for receiving additional results if you receive a NextToken
  21550. // response in a previous request. A NextToken response indicates that more
  21551. // output is available. Set this parameter to the value of the previous call's
  21552. // NextToken response to indicate where the output should continue from.
  21553. NextToken *string `type:"string"`
  21554. }
  21555. // String returns the string representation.
  21556. //
  21557. // API parameter values that are decorated as "sensitive" in the API will not
  21558. // be included in the string output. The member name will be present, but the
  21559. // value will be replaced with "sensitive".
  21560. func (s ListDelegatedServicesForAccountInput) String() string {
  21561. return awsutil.Prettify(s)
  21562. }
  21563. // GoString returns the string representation.
  21564. //
  21565. // API parameter values that are decorated as "sensitive" in the API will not
  21566. // be included in the string output. The member name will be present, but the
  21567. // value will be replaced with "sensitive".
  21568. func (s ListDelegatedServicesForAccountInput) GoString() string {
  21569. return s.String()
  21570. }
  21571. // Validate inspects the fields of the type to determine if they are valid.
  21572. func (s *ListDelegatedServicesForAccountInput) Validate() error {
  21573. invalidParams := request.ErrInvalidParams{Context: "ListDelegatedServicesForAccountInput"}
  21574. if s.AccountId == nil {
  21575. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  21576. }
  21577. if s.MaxResults != nil && *s.MaxResults < 1 {
  21578. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  21579. }
  21580. if invalidParams.Len() > 0 {
  21581. return invalidParams
  21582. }
  21583. return nil
  21584. }
  21585. // SetAccountId sets the AccountId field's value.
  21586. func (s *ListDelegatedServicesForAccountInput) SetAccountId(v string) *ListDelegatedServicesForAccountInput {
  21587. s.AccountId = &v
  21588. return s
  21589. }
  21590. // SetMaxResults sets the MaxResults field's value.
  21591. func (s *ListDelegatedServicesForAccountInput) SetMaxResults(v int64) *ListDelegatedServicesForAccountInput {
  21592. s.MaxResults = &v
  21593. return s
  21594. }
  21595. // SetNextToken sets the NextToken field's value.
  21596. func (s *ListDelegatedServicesForAccountInput) SetNextToken(v string) *ListDelegatedServicesForAccountInput {
  21597. s.NextToken = &v
  21598. return s
  21599. }
  21600. type ListDelegatedServicesForAccountOutput struct {
  21601. _ struct{} `type:"structure"`
  21602. // The services for which the account is a delegated administrator.
  21603. DelegatedServices []*DelegatedService `type:"list"`
  21604. // If present, indicates that more output is available than is included in the
  21605. // current response. Use this value in the NextToken request parameter in a
  21606. // subsequent call to the operation to get the next part of the output. You
  21607. // should repeat this until the NextToken response element comes back as null.
  21608. NextToken *string `type:"string"`
  21609. }
  21610. // String returns the string representation.
  21611. //
  21612. // API parameter values that are decorated as "sensitive" in the API will not
  21613. // be included in the string output. The member name will be present, but the
  21614. // value will be replaced with "sensitive".
  21615. func (s ListDelegatedServicesForAccountOutput) String() string {
  21616. return awsutil.Prettify(s)
  21617. }
  21618. // GoString returns the string representation.
  21619. //
  21620. // API parameter values that are decorated as "sensitive" in the API will not
  21621. // be included in the string output. The member name will be present, but the
  21622. // value will be replaced with "sensitive".
  21623. func (s ListDelegatedServicesForAccountOutput) GoString() string {
  21624. return s.String()
  21625. }
  21626. // SetDelegatedServices sets the DelegatedServices field's value.
  21627. func (s *ListDelegatedServicesForAccountOutput) SetDelegatedServices(v []*DelegatedService) *ListDelegatedServicesForAccountOutput {
  21628. s.DelegatedServices = v
  21629. return s
  21630. }
  21631. // SetNextToken sets the NextToken field's value.
  21632. func (s *ListDelegatedServicesForAccountOutput) SetNextToken(v string) *ListDelegatedServicesForAccountOutput {
  21633. s.NextToken = &v
  21634. return s
  21635. }
  21636. type ListHandshakesForAccountInput struct {
  21637. _ struct{} `type:"structure"`
  21638. // Filters the handshakes that you want included in the response. The default
  21639. // is all types. Use the ActionType element to limit the output to only a specified
  21640. // type, such as INVITE, ENABLE_ALL_FEATURES, or APPROVE_ALL_FEATURES. Alternatively,
  21641. // for the ENABLE_ALL_FEATURES handshake that generates a separate child handshake
  21642. // for each member account, you can specify ParentHandshakeId to see only the
  21643. // handshakes that were generated by that parent request.
  21644. Filter *HandshakeFilter `type:"structure"`
  21645. // The total number of results that you want included on each page of the response.
  21646. // If you do not include this parameter, it defaults to a value that is specific
  21647. // to the operation. If additional items exist beyond the maximum you specify,
  21648. // the NextToken response element is present and has a value (is not null).
  21649. // Include that value as the NextToken request parameter in the next call to
  21650. // the operation to get the next part of the results. Note that Organizations
  21651. // might return fewer results than the maximum even when there are more results
  21652. // available. You should check NextToken after every operation to ensure that
  21653. // you receive all of the results.
  21654. MaxResults *int64 `min:"1" type:"integer"`
  21655. // The parameter for receiving additional results if you receive a NextToken
  21656. // response in a previous request. A NextToken response indicates that more
  21657. // output is available. Set this parameter to the value of the previous call's
  21658. // NextToken response to indicate where the output should continue from.
  21659. NextToken *string `type:"string"`
  21660. }
  21661. // String returns the string representation.
  21662. //
  21663. // API parameter values that are decorated as "sensitive" in the API will not
  21664. // be included in the string output. The member name will be present, but the
  21665. // value will be replaced with "sensitive".
  21666. func (s ListHandshakesForAccountInput) String() string {
  21667. return awsutil.Prettify(s)
  21668. }
  21669. // GoString returns the string representation.
  21670. //
  21671. // API parameter values that are decorated as "sensitive" in the API will not
  21672. // be included in the string output. The member name will be present, but the
  21673. // value will be replaced with "sensitive".
  21674. func (s ListHandshakesForAccountInput) GoString() string {
  21675. return s.String()
  21676. }
  21677. // Validate inspects the fields of the type to determine if they are valid.
  21678. func (s *ListHandshakesForAccountInput) Validate() error {
  21679. invalidParams := request.ErrInvalidParams{Context: "ListHandshakesForAccountInput"}
  21680. if s.MaxResults != nil && *s.MaxResults < 1 {
  21681. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  21682. }
  21683. if invalidParams.Len() > 0 {
  21684. return invalidParams
  21685. }
  21686. return nil
  21687. }
  21688. // SetFilter sets the Filter field's value.
  21689. func (s *ListHandshakesForAccountInput) SetFilter(v *HandshakeFilter) *ListHandshakesForAccountInput {
  21690. s.Filter = v
  21691. return s
  21692. }
  21693. // SetMaxResults sets the MaxResults field's value.
  21694. func (s *ListHandshakesForAccountInput) SetMaxResults(v int64) *ListHandshakesForAccountInput {
  21695. s.MaxResults = &v
  21696. return s
  21697. }
  21698. // SetNextToken sets the NextToken field's value.
  21699. func (s *ListHandshakesForAccountInput) SetNextToken(v string) *ListHandshakesForAccountInput {
  21700. s.NextToken = &v
  21701. return s
  21702. }
  21703. type ListHandshakesForAccountOutput struct {
  21704. _ struct{} `type:"structure"`
  21705. // A list of Handshake objects with details about each of the handshakes that
  21706. // is associated with the specified account.
  21707. Handshakes []*Handshake `type:"list"`
  21708. // If present, indicates that more output is available than is included in the
  21709. // current response. Use this value in the NextToken request parameter in a
  21710. // subsequent call to the operation to get the next part of the output. You
  21711. // should repeat this until the NextToken response element comes back as null.
  21712. NextToken *string `type:"string"`
  21713. }
  21714. // String returns the string representation.
  21715. //
  21716. // API parameter values that are decorated as "sensitive" in the API will not
  21717. // be included in the string output. The member name will be present, but the
  21718. // value will be replaced with "sensitive".
  21719. func (s ListHandshakesForAccountOutput) String() string {
  21720. return awsutil.Prettify(s)
  21721. }
  21722. // GoString returns the string representation.
  21723. //
  21724. // API parameter values that are decorated as "sensitive" in the API will not
  21725. // be included in the string output. The member name will be present, but the
  21726. // value will be replaced with "sensitive".
  21727. func (s ListHandshakesForAccountOutput) GoString() string {
  21728. return s.String()
  21729. }
  21730. // SetHandshakes sets the Handshakes field's value.
  21731. func (s *ListHandshakesForAccountOutput) SetHandshakes(v []*Handshake) *ListHandshakesForAccountOutput {
  21732. s.Handshakes = v
  21733. return s
  21734. }
  21735. // SetNextToken sets the NextToken field's value.
  21736. func (s *ListHandshakesForAccountOutput) SetNextToken(v string) *ListHandshakesForAccountOutput {
  21737. s.NextToken = &v
  21738. return s
  21739. }
  21740. type ListHandshakesForOrganizationInput struct {
  21741. _ struct{} `type:"structure"`
  21742. // A filter of the handshakes that you want included in the response. The default
  21743. // is all types. Use the ActionType element to limit the output to only a specified
  21744. // type, such as INVITE, ENABLE-ALL-FEATURES, or APPROVE-ALL-FEATURES. Alternatively,
  21745. // for the ENABLE-ALL-FEATURES handshake that generates a separate child handshake
  21746. // for each member account, you can specify the ParentHandshakeId to see only
  21747. // the handshakes that were generated by that parent request.
  21748. Filter *HandshakeFilter `type:"structure"`
  21749. // The total number of results that you want included on each page of the response.
  21750. // If you do not include this parameter, it defaults to a value that is specific
  21751. // to the operation. If additional items exist beyond the maximum you specify,
  21752. // the NextToken response element is present and has a value (is not null).
  21753. // Include that value as the NextToken request parameter in the next call to
  21754. // the operation to get the next part of the results. Note that Organizations
  21755. // might return fewer results than the maximum even when there are more results
  21756. // available. You should check NextToken after every operation to ensure that
  21757. // you receive all of the results.
  21758. MaxResults *int64 `min:"1" type:"integer"`
  21759. // The parameter for receiving additional results if you receive a NextToken
  21760. // response in a previous request. A NextToken response indicates that more
  21761. // output is available. Set this parameter to the value of the previous call's
  21762. // NextToken response to indicate where the output should continue from.
  21763. NextToken *string `type:"string"`
  21764. }
  21765. // String returns the string representation.
  21766. //
  21767. // API parameter values that are decorated as "sensitive" in the API will not
  21768. // be included in the string output. The member name will be present, but the
  21769. // value will be replaced with "sensitive".
  21770. func (s ListHandshakesForOrganizationInput) String() string {
  21771. return awsutil.Prettify(s)
  21772. }
  21773. // GoString returns the string representation.
  21774. //
  21775. // API parameter values that are decorated as "sensitive" in the API will not
  21776. // be included in the string output. The member name will be present, but the
  21777. // value will be replaced with "sensitive".
  21778. func (s ListHandshakesForOrganizationInput) GoString() string {
  21779. return s.String()
  21780. }
  21781. // Validate inspects the fields of the type to determine if they are valid.
  21782. func (s *ListHandshakesForOrganizationInput) Validate() error {
  21783. invalidParams := request.ErrInvalidParams{Context: "ListHandshakesForOrganizationInput"}
  21784. if s.MaxResults != nil && *s.MaxResults < 1 {
  21785. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  21786. }
  21787. if invalidParams.Len() > 0 {
  21788. return invalidParams
  21789. }
  21790. return nil
  21791. }
  21792. // SetFilter sets the Filter field's value.
  21793. func (s *ListHandshakesForOrganizationInput) SetFilter(v *HandshakeFilter) *ListHandshakesForOrganizationInput {
  21794. s.Filter = v
  21795. return s
  21796. }
  21797. // SetMaxResults sets the MaxResults field's value.
  21798. func (s *ListHandshakesForOrganizationInput) SetMaxResults(v int64) *ListHandshakesForOrganizationInput {
  21799. s.MaxResults = &v
  21800. return s
  21801. }
  21802. // SetNextToken sets the NextToken field's value.
  21803. func (s *ListHandshakesForOrganizationInput) SetNextToken(v string) *ListHandshakesForOrganizationInput {
  21804. s.NextToken = &v
  21805. return s
  21806. }
  21807. type ListHandshakesForOrganizationOutput struct {
  21808. _ struct{} `type:"structure"`
  21809. // A list of Handshake objects with details about each of the handshakes that
  21810. // are associated with an organization.
  21811. Handshakes []*Handshake `type:"list"`
  21812. // If present, indicates that more output is available than is included in the
  21813. // current response. Use this value in the NextToken request parameter in a
  21814. // subsequent call to the operation to get the next part of the output. You
  21815. // should repeat this until the NextToken response element comes back as null.
  21816. NextToken *string `type:"string"`
  21817. }
  21818. // String returns the string representation.
  21819. //
  21820. // API parameter values that are decorated as "sensitive" in the API will not
  21821. // be included in the string output. The member name will be present, but the
  21822. // value will be replaced with "sensitive".
  21823. func (s ListHandshakesForOrganizationOutput) String() string {
  21824. return awsutil.Prettify(s)
  21825. }
  21826. // GoString returns the string representation.
  21827. //
  21828. // API parameter values that are decorated as "sensitive" in the API will not
  21829. // be included in the string output. The member name will be present, but the
  21830. // value will be replaced with "sensitive".
  21831. func (s ListHandshakesForOrganizationOutput) GoString() string {
  21832. return s.String()
  21833. }
  21834. // SetHandshakes sets the Handshakes field's value.
  21835. func (s *ListHandshakesForOrganizationOutput) SetHandshakes(v []*Handshake) *ListHandshakesForOrganizationOutput {
  21836. s.Handshakes = v
  21837. return s
  21838. }
  21839. // SetNextToken sets the NextToken field's value.
  21840. func (s *ListHandshakesForOrganizationOutput) SetNextToken(v string) *ListHandshakesForOrganizationOutput {
  21841. s.NextToken = &v
  21842. return s
  21843. }
  21844. type ListOrganizationalUnitsForParentInput struct {
  21845. _ struct{} `type:"structure"`
  21846. // The total number of results that you want included on each page of the response.
  21847. // If you do not include this parameter, it defaults to a value that is specific
  21848. // to the operation. If additional items exist beyond the maximum you specify,
  21849. // the NextToken response element is present and has a value (is not null).
  21850. // Include that value as the NextToken request parameter in the next call to
  21851. // the operation to get the next part of the results. Note that Organizations
  21852. // might return fewer results than the maximum even when there are more results
  21853. // available. You should check NextToken after every operation to ensure that
  21854. // you receive all of the results.
  21855. MaxResults *int64 `min:"1" type:"integer"`
  21856. // The parameter for receiving additional results if you receive a NextToken
  21857. // response in a previous request. A NextToken response indicates that more
  21858. // output is available. Set this parameter to the value of the previous call's
  21859. // NextToken response to indicate where the output should continue from.
  21860. NextToken *string `type:"string"`
  21861. // The unique identifier (ID) of the root or OU whose child OUs you want to
  21862. // list.
  21863. //
  21864. // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string
  21865. // requires one of the following:
  21866. //
  21867. // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
  21868. // letters or digits.
  21869. //
  21870. // * Organizational unit (OU) - A string that begins with "ou-" followed
  21871. // by from 4 to 32 lowercase letters or digits (the ID of the root that the
  21872. // OU is in). This string is followed by a second "-" dash and from 8 to
  21873. // 32 additional lowercase letters or digits.
  21874. //
  21875. // ParentId is a required field
  21876. ParentId *string `type:"string" required:"true"`
  21877. }
  21878. // String returns the string representation.
  21879. //
  21880. // API parameter values that are decorated as "sensitive" in the API will not
  21881. // be included in the string output. The member name will be present, but the
  21882. // value will be replaced with "sensitive".
  21883. func (s ListOrganizationalUnitsForParentInput) String() string {
  21884. return awsutil.Prettify(s)
  21885. }
  21886. // GoString returns the string representation.
  21887. //
  21888. // API parameter values that are decorated as "sensitive" in the API will not
  21889. // be included in the string output. The member name will be present, but the
  21890. // value will be replaced with "sensitive".
  21891. func (s ListOrganizationalUnitsForParentInput) GoString() string {
  21892. return s.String()
  21893. }
  21894. // Validate inspects the fields of the type to determine if they are valid.
  21895. func (s *ListOrganizationalUnitsForParentInput) Validate() error {
  21896. invalidParams := request.ErrInvalidParams{Context: "ListOrganizationalUnitsForParentInput"}
  21897. if s.MaxResults != nil && *s.MaxResults < 1 {
  21898. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  21899. }
  21900. if s.ParentId == nil {
  21901. invalidParams.Add(request.NewErrParamRequired("ParentId"))
  21902. }
  21903. if invalidParams.Len() > 0 {
  21904. return invalidParams
  21905. }
  21906. return nil
  21907. }
  21908. // SetMaxResults sets the MaxResults field's value.
  21909. func (s *ListOrganizationalUnitsForParentInput) SetMaxResults(v int64) *ListOrganizationalUnitsForParentInput {
  21910. s.MaxResults = &v
  21911. return s
  21912. }
  21913. // SetNextToken sets the NextToken field's value.
  21914. func (s *ListOrganizationalUnitsForParentInput) SetNextToken(v string) *ListOrganizationalUnitsForParentInput {
  21915. s.NextToken = &v
  21916. return s
  21917. }
  21918. // SetParentId sets the ParentId field's value.
  21919. func (s *ListOrganizationalUnitsForParentInput) SetParentId(v string) *ListOrganizationalUnitsForParentInput {
  21920. s.ParentId = &v
  21921. return s
  21922. }
  21923. type ListOrganizationalUnitsForParentOutput struct {
  21924. _ struct{} `type:"structure"`
  21925. // If present, indicates that more output is available than is included in the
  21926. // current response. Use this value in the NextToken request parameter in a
  21927. // subsequent call to the operation to get the next part of the output. You
  21928. // should repeat this until the NextToken response element comes back as null.
  21929. NextToken *string `type:"string"`
  21930. // A list of the OUs in the specified root or parent OU.
  21931. OrganizationalUnits []*OrganizationalUnit `type:"list"`
  21932. }
  21933. // String returns the string representation.
  21934. //
  21935. // API parameter values that are decorated as "sensitive" in the API will not
  21936. // be included in the string output. The member name will be present, but the
  21937. // value will be replaced with "sensitive".
  21938. func (s ListOrganizationalUnitsForParentOutput) String() string {
  21939. return awsutil.Prettify(s)
  21940. }
  21941. // GoString returns the string representation.
  21942. //
  21943. // API parameter values that are decorated as "sensitive" in the API will not
  21944. // be included in the string output. The member name will be present, but the
  21945. // value will be replaced with "sensitive".
  21946. func (s ListOrganizationalUnitsForParentOutput) GoString() string {
  21947. return s.String()
  21948. }
  21949. // SetNextToken sets the NextToken field's value.
  21950. func (s *ListOrganizationalUnitsForParentOutput) SetNextToken(v string) *ListOrganizationalUnitsForParentOutput {
  21951. s.NextToken = &v
  21952. return s
  21953. }
  21954. // SetOrganizationalUnits sets the OrganizationalUnits field's value.
  21955. func (s *ListOrganizationalUnitsForParentOutput) SetOrganizationalUnits(v []*OrganizationalUnit) *ListOrganizationalUnitsForParentOutput {
  21956. s.OrganizationalUnits = v
  21957. return s
  21958. }
  21959. type ListParentsInput struct {
  21960. _ struct{} `type:"structure"`
  21961. // The unique identifier (ID) of the OU or account whose parent containers you
  21962. // want to list. Don't specify a root.
  21963. //
  21964. // The regex pattern (http://wikipedia.org/wiki/regex) for a child ID string
  21965. // requires one of the following:
  21966. //
  21967. // * Account - A string that consists of exactly 12 digits.
  21968. //
  21969. // * Organizational unit (OU) - A string that begins with "ou-" followed
  21970. // by from 4 to 32 lowercase letters or digits (the ID of the root that contains
  21971. // the OU). This string is followed by a second "-" dash and from 8 to 32
  21972. // additional lowercase letters or digits.
  21973. //
  21974. // ChildId is a required field
  21975. ChildId *string `type:"string" required:"true"`
  21976. // The total number of results that you want included on each page of the response.
  21977. // If you do not include this parameter, it defaults to a value that is specific
  21978. // to the operation. If additional items exist beyond the maximum you specify,
  21979. // the NextToken response element is present and has a value (is not null).
  21980. // Include that value as the NextToken request parameter in the next call to
  21981. // the operation to get the next part of the results. Note that Organizations
  21982. // might return fewer results than the maximum even when there are more results
  21983. // available. You should check NextToken after every operation to ensure that
  21984. // you receive all of the results.
  21985. MaxResults *int64 `min:"1" type:"integer"`
  21986. // The parameter for receiving additional results if you receive a NextToken
  21987. // response in a previous request. A NextToken response indicates that more
  21988. // output is available. Set this parameter to the value of the previous call's
  21989. // NextToken response to indicate where the output should continue from.
  21990. NextToken *string `type:"string"`
  21991. }
  21992. // String returns the string representation.
  21993. //
  21994. // API parameter values that are decorated as "sensitive" in the API will not
  21995. // be included in the string output. The member name will be present, but the
  21996. // value will be replaced with "sensitive".
  21997. func (s ListParentsInput) String() string {
  21998. return awsutil.Prettify(s)
  21999. }
  22000. // GoString returns the string representation.
  22001. //
  22002. // API parameter values that are decorated as "sensitive" in the API will not
  22003. // be included in the string output. The member name will be present, but the
  22004. // value will be replaced with "sensitive".
  22005. func (s ListParentsInput) GoString() string {
  22006. return s.String()
  22007. }
  22008. // Validate inspects the fields of the type to determine if they are valid.
  22009. func (s *ListParentsInput) Validate() error {
  22010. invalidParams := request.ErrInvalidParams{Context: "ListParentsInput"}
  22011. if s.ChildId == nil {
  22012. invalidParams.Add(request.NewErrParamRequired("ChildId"))
  22013. }
  22014. if s.MaxResults != nil && *s.MaxResults < 1 {
  22015. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  22016. }
  22017. if invalidParams.Len() > 0 {
  22018. return invalidParams
  22019. }
  22020. return nil
  22021. }
  22022. // SetChildId sets the ChildId field's value.
  22023. func (s *ListParentsInput) SetChildId(v string) *ListParentsInput {
  22024. s.ChildId = &v
  22025. return s
  22026. }
  22027. // SetMaxResults sets the MaxResults field's value.
  22028. func (s *ListParentsInput) SetMaxResults(v int64) *ListParentsInput {
  22029. s.MaxResults = &v
  22030. return s
  22031. }
  22032. // SetNextToken sets the NextToken field's value.
  22033. func (s *ListParentsInput) SetNextToken(v string) *ListParentsInput {
  22034. s.NextToken = &v
  22035. return s
  22036. }
  22037. type ListParentsOutput struct {
  22038. _ struct{} `type:"structure"`
  22039. // If present, indicates that more output is available than is included in the
  22040. // current response. Use this value in the NextToken request parameter in a
  22041. // subsequent call to the operation to get the next part of the output. You
  22042. // should repeat this until the NextToken response element comes back as null.
  22043. NextToken *string `type:"string"`
  22044. // A list of parents for the specified child account or OU.
  22045. Parents []*Parent `type:"list"`
  22046. }
  22047. // String returns the string representation.
  22048. //
  22049. // API parameter values that are decorated as "sensitive" in the API will not
  22050. // be included in the string output. The member name will be present, but the
  22051. // value will be replaced with "sensitive".
  22052. func (s ListParentsOutput) String() string {
  22053. return awsutil.Prettify(s)
  22054. }
  22055. // GoString returns the string representation.
  22056. //
  22057. // API parameter values that are decorated as "sensitive" in the API will not
  22058. // be included in the string output. The member name will be present, but the
  22059. // value will be replaced with "sensitive".
  22060. func (s ListParentsOutput) GoString() string {
  22061. return s.String()
  22062. }
  22063. // SetNextToken sets the NextToken field's value.
  22064. func (s *ListParentsOutput) SetNextToken(v string) *ListParentsOutput {
  22065. s.NextToken = &v
  22066. return s
  22067. }
  22068. // SetParents sets the Parents field's value.
  22069. func (s *ListParentsOutput) SetParents(v []*Parent) *ListParentsOutput {
  22070. s.Parents = v
  22071. return s
  22072. }
  22073. type ListPoliciesForTargetInput struct {
  22074. _ struct{} `type:"structure"`
  22075. // The type of policy that you want to include in the returned list. You must
  22076. // specify one of the following values:
  22077. //
  22078. // * AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
  22079. //
  22080. // * BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html)
  22081. //
  22082. // * SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html)
  22083. //
  22084. // * TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
  22085. //
  22086. // Filter is a required field
  22087. Filter *string `type:"string" required:"true" enum:"PolicyType"`
  22088. // The total number of results that you want included on each page of the response.
  22089. // If you do not include this parameter, it defaults to a value that is specific
  22090. // to the operation. If additional items exist beyond the maximum you specify,
  22091. // the NextToken response element is present and has a value (is not null).
  22092. // Include that value as the NextToken request parameter in the next call to
  22093. // the operation to get the next part of the results. Note that Organizations
  22094. // might return fewer results than the maximum even when there are more results
  22095. // available. You should check NextToken after every operation to ensure that
  22096. // you receive all of the results.
  22097. MaxResults *int64 `min:"1" type:"integer"`
  22098. // The parameter for receiving additional results if you receive a NextToken
  22099. // response in a previous request. A NextToken response indicates that more
  22100. // output is available. Set this parameter to the value of the previous call's
  22101. // NextToken response to indicate where the output should continue from.
  22102. NextToken *string `type:"string"`
  22103. // The unique identifier (ID) of the root, organizational unit, or account whose
  22104. // policies you want to list.
  22105. //
  22106. // The regex pattern (http://wikipedia.org/wiki/regex) for a target ID string
  22107. // requires one of the following:
  22108. //
  22109. // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
  22110. // letters or digits.
  22111. //
  22112. // * Account - A string that consists of exactly 12 digits.
  22113. //
  22114. // * Organizational unit (OU) - A string that begins with "ou-" followed
  22115. // by from 4 to 32 lowercase letters or digits (the ID of the root that the
  22116. // OU is in). This string is followed by a second "-" dash and from 8 to
  22117. // 32 additional lowercase letters or digits.
  22118. //
  22119. // TargetId is a required field
  22120. TargetId *string `type:"string" required:"true"`
  22121. }
  22122. // String returns the string representation.
  22123. //
  22124. // API parameter values that are decorated as "sensitive" in the API will not
  22125. // be included in the string output. The member name will be present, but the
  22126. // value will be replaced with "sensitive".
  22127. func (s ListPoliciesForTargetInput) String() string {
  22128. return awsutil.Prettify(s)
  22129. }
  22130. // GoString returns the string representation.
  22131. //
  22132. // API parameter values that are decorated as "sensitive" in the API will not
  22133. // be included in the string output. The member name will be present, but the
  22134. // value will be replaced with "sensitive".
  22135. func (s ListPoliciesForTargetInput) GoString() string {
  22136. return s.String()
  22137. }
  22138. // Validate inspects the fields of the type to determine if they are valid.
  22139. func (s *ListPoliciesForTargetInput) Validate() error {
  22140. invalidParams := request.ErrInvalidParams{Context: "ListPoliciesForTargetInput"}
  22141. if s.Filter == nil {
  22142. invalidParams.Add(request.NewErrParamRequired("Filter"))
  22143. }
  22144. if s.MaxResults != nil && *s.MaxResults < 1 {
  22145. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  22146. }
  22147. if s.TargetId == nil {
  22148. invalidParams.Add(request.NewErrParamRequired("TargetId"))
  22149. }
  22150. if invalidParams.Len() > 0 {
  22151. return invalidParams
  22152. }
  22153. return nil
  22154. }
  22155. // SetFilter sets the Filter field's value.
  22156. func (s *ListPoliciesForTargetInput) SetFilter(v string) *ListPoliciesForTargetInput {
  22157. s.Filter = &v
  22158. return s
  22159. }
  22160. // SetMaxResults sets the MaxResults field's value.
  22161. func (s *ListPoliciesForTargetInput) SetMaxResults(v int64) *ListPoliciesForTargetInput {
  22162. s.MaxResults = &v
  22163. return s
  22164. }
  22165. // SetNextToken sets the NextToken field's value.
  22166. func (s *ListPoliciesForTargetInput) SetNextToken(v string) *ListPoliciesForTargetInput {
  22167. s.NextToken = &v
  22168. return s
  22169. }
  22170. // SetTargetId sets the TargetId field's value.
  22171. func (s *ListPoliciesForTargetInput) SetTargetId(v string) *ListPoliciesForTargetInput {
  22172. s.TargetId = &v
  22173. return s
  22174. }
  22175. type ListPoliciesForTargetOutput struct {
  22176. _ struct{} `type:"structure"`
  22177. // If present, indicates that more output is available than is included in the
  22178. // current response. Use this value in the NextToken request parameter in a
  22179. // subsequent call to the operation to get the next part of the output. You
  22180. // should repeat this until the NextToken response element comes back as null.
  22181. NextToken *string `type:"string"`
  22182. // The list of policies that match the criteria in the request.
  22183. Policies []*PolicySummary `type:"list"`
  22184. }
  22185. // String returns the string representation.
  22186. //
  22187. // API parameter values that are decorated as "sensitive" in the API will not
  22188. // be included in the string output. The member name will be present, but the
  22189. // value will be replaced with "sensitive".
  22190. func (s ListPoliciesForTargetOutput) String() string {
  22191. return awsutil.Prettify(s)
  22192. }
  22193. // GoString returns the string representation.
  22194. //
  22195. // API parameter values that are decorated as "sensitive" in the API will not
  22196. // be included in the string output. The member name will be present, but the
  22197. // value will be replaced with "sensitive".
  22198. func (s ListPoliciesForTargetOutput) GoString() string {
  22199. return s.String()
  22200. }
  22201. // SetNextToken sets the NextToken field's value.
  22202. func (s *ListPoliciesForTargetOutput) SetNextToken(v string) *ListPoliciesForTargetOutput {
  22203. s.NextToken = &v
  22204. return s
  22205. }
  22206. // SetPolicies sets the Policies field's value.
  22207. func (s *ListPoliciesForTargetOutput) SetPolicies(v []*PolicySummary) *ListPoliciesForTargetOutput {
  22208. s.Policies = v
  22209. return s
  22210. }
  22211. type ListPoliciesInput struct {
  22212. _ struct{} `type:"structure"`
  22213. // Specifies the type of policy that you want to include in the response. You
  22214. // must specify one of the following values:
  22215. //
  22216. // * AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
  22217. //
  22218. // * BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html)
  22219. //
  22220. // * SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html)
  22221. //
  22222. // * TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
  22223. //
  22224. // Filter is a required field
  22225. Filter *string `type:"string" required:"true" enum:"PolicyType"`
  22226. // The total number of results that you want included on each page of the response.
  22227. // If you do not include this parameter, it defaults to a value that is specific
  22228. // to the operation. If additional items exist beyond the maximum you specify,
  22229. // the NextToken response element is present and has a value (is not null).
  22230. // Include that value as the NextToken request parameter in the next call to
  22231. // the operation to get the next part of the results. Note that Organizations
  22232. // might return fewer results than the maximum even when there are more results
  22233. // available. You should check NextToken after every operation to ensure that
  22234. // you receive all of the results.
  22235. MaxResults *int64 `min:"1" type:"integer"`
  22236. // The parameter for receiving additional results if you receive a NextToken
  22237. // response in a previous request. A NextToken response indicates that more
  22238. // output is available. Set this parameter to the value of the previous call's
  22239. // NextToken response to indicate where the output should continue from.
  22240. NextToken *string `type:"string"`
  22241. }
  22242. // String returns the string representation.
  22243. //
  22244. // API parameter values that are decorated as "sensitive" in the API will not
  22245. // be included in the string output. The member name will be present, but the
  22246. // value will be replaced with "sensitive".
  22247. func (s ListPoliciesInput) String() string {
  22248. return awsutil.Prettify(s)
  22249. }
  22250. // GoString returns the string representation.
  22251. //
  22252. // API parameter values that are decorated as "sensitive" in the API will not
  22253. // be included in the string output. The member name will be present, but the
  22254. // value will be replaced with "sensitive".
  22255. func (s ListPoliciesInput) GoString() string {
  22256. return s.String()
  22257. }
  22258. // Validate inspects the fields of the type to determine if they are valid.
  22259. func (s *ListPoliciesInput) Validate() error {
  22260. invalidParams := request.ErrInvalidParams{Context: "ListPoliciesInput"}
  22261. if s.Filter == nil {
  22262. invalidParams.Add(request.NewErrParamRequired("Filter"))
  22263. }
  22264. if s.MaxResults != nil && *s.MaxResults < 1 {
  22265. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  22266. }
  22267. if invalidParams.Len() > 0 {
  22268. return invalidParams
  22269. }
  22270. return nil
  22271. }
  22272. // SetFilter sets the Filter field's value.
  22273. func (s *ListPoliciesInput) SetFilter(v string) *ListPoliciesInput {
  22274. s.Filter = &v
  22275. return s
  22276. }
  22277. // SetMaxResults sets the MaxResults field's value.
  22278. func (s *ListPoliciesInput) SetMaxResults(v int64) *ListPoliciesInput {
  22279. s.MaxResults = &v
  22280. return s
  22281. }
  22282. // SetNextToken sets the NextToken field's value.
  22283. func (s *ListPoliciesInput) SetNextToken(v string) *ListPoliciesInput {
  22284. s.NextToken = &v
  22285. return s
  22286. }
  22287. type ListPoliciesOutput struct {
  22288. _ struct{} `type:"structure"`
  22289. // If present, indicates that more output is available than is included in the
  22290. // current response. Use this value in the NextToken request parameter in a
  22291. // subsequent call to the operation to get the next part of the output. You
  22292. // should repeat this until the NextToken response element comes back as null.
  22293. NextToken *string `type:"string"`
  22294. // A list of policies that match the filter criteria in the request. The output
  22295. // list doesn't include the policy contents. To see the content for a policy,
  22296. // see DescribePolicy.
  22297. Policies []*PolicySummary `type:"list"`
  22298. }
  22299. // String returns the string representation.
  22300. //
  22301. // API parameter values that are decorated as "sensitive" in the API will not
  22302. // be included in the string output. The member name will be present, but the
  22303. // value will be replaced with "sensitive".
  22304. func (s ListPoliciesOutput) String() string {
  22305. return awsutil.Prettify(s)
  22306. }
  22307. // GoString returns the string representation.
  22308. //
  22309. // API parameter values that are decorated as "sensitive" in the API will not
  22310. // be included in the string output. The member name will be present, but the
  22311. // value will be replaced with "sensitive".
  22312. func (s ListPoliciesOutput) GoString() string {
  22313. return s.String()
  22314. }
  22315. // SetNextToken sets the NextToken field's value.
  22316. func (s *ListPoliciesOutput) SetNextToken(v string) *ListPoliciesOutput {
  22317. s.NextToken = &v
  22318. return s
  22319. }
  22320. // SetPolicies sets the Policies field's value.
  22321. func (s *ListPoliciesOutput) SetPolicies(v []*PolicySummary) *ListPoliciesOutput {
  22322. s.Policies = v
  22323. return s
  22324. }
  22325. type ListRootsInput struct {
  22326. _ struct{} `type:"structure"`
  22327. // The total number of results that you want included on each page of the response.
  22328. // If you do not include this parameter, it defaults to a value that is specific
  22329. // to the operation. If additional items exist beyond the maximum you specify,
  22330. // the NextToken response element is present and has a value (is not null).
  22331. // Include that value as the NextToken request parameter in the next call to
  22332. // the operation to get the next part of the results. Note that Organizations
  22333. // might return fewer results than the maximum even when there are more results
  22334. // available. You should check NextToken after every operation to ensure that
  22335. // you receive all of the results.
  22336. MaxResults *int64 `min:"1" type:"integer"`
  22337. // The parameter for receiving additional results if you receive a NextToken
  22338. // response in a previous request. A NextToken response indicates that more
  22339. // output is available. Set this parameter to the value of the previous call's
  22340. // NextToken response to indicate where the output should continue from.
  22341. NextToken *string `type:"string"`
  22342. }
  22343. // String returns the string representation.
  22344. //
  22345. // API parameter values that are decorated as "sensitive" in the API will not
  22346. // be included in the string output. The member name will be present, but the
  22347. // value will be replaced with "sensitive".
  22348. func (s ListRootsInput) String() string {
  22349. return awsutil.Prettify(s)
  22350. }
  22351. // GoString returns the string representation.
  22352. //
  22353. // API parameter values that are decorated as "sensitive" in the API will not
  22354. // be included in the string output. The member name will be present, but the
  22355. // value will be replaced with "sensitive".
  22356. func (s ListRootsInput) GoString() string {
  22357. return s.String()
  22358. }
  22359. // Validate inspects the fields of the type to determine if they are valid.
  22360. func (s *ListRootsInput) Validate() error {
  22361. invalidParams := request.ErrInvalidParams{Context: "ListRootsInput"}
  22362. if s.MaxResults != nil && *s.MaxResults < 1 {
  22363. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  22364. }
  22365. if invalidParams.Len() > 0 {
  22366. return invalidParams
  22367. }
  22368. return nil
  22369. }
  22370. // SetMaxResults sets the MaxResults field's value.
  22371. func (s *ListRootsInput) SetMaxResults(v int64) *ListRootsInput {
  22372. s.MaxResults = &v
  22373. return s
  22374. }
  22375. // SetNextToken sets the NextToken field's value.
  22376. func (s *ListRootsInput) SetNextToken(v string) *ListRootsInput {
  22377. s.NextToken = &v
  22378. return s
  22379. }
  22380. type ListRootsOutput struct {
  22381. _ struct{} `type:"structure"`
  22382. // If present, indicates that more output is available than is included in the
  22383. // current response. Use this value in the NextToken request parameter in a
  22384. // subsequent call to the operation to get the next part of the output. You
  22385. // should repeat this until the NextToken response element comes back as null.
  22386. NextToken *string `type:"string"`
  22387. // A list of roots that are defined in an organization.
  22388. Roots []*Root `type:"list"`
  22389. }
  22390. // String returns the string representation.
  22391. //
  22392. // API parameter values that are decorated as "sensitive" in the API will not
  22393. // be included in the string output. The member name will be present, but the
  22394. // value will be replaced with "sensitive".
  22395. func (s ListRootsOutput) String() string {
  22396. return awsutil.Prettify(s)
  22397. }
  22398. // GoString returns the string representation.
  22399. //
  22400. // API parameter values that are decorated as "sensitive" in the API will not
  22401. // be included in the string output. The member name will be present, but the
  22402. // value will be replaced with "sensitive".
  22403. func (s ListRootsOutput) GoString() string {
  22404. return s.String()
  22405. }
  22406. // SetNextToken sets the NextToken field's value.
  22407. func (s *ListRootsOutput) SetNextToken(v string) *ListRootsOutput {
  22408. s.NextToken = &v
  22409. return s
  22410. }
  22411. // SetRoots sets the Roots field's value.
  22412. func (s *ListRootsOutput) SetRoots(v []*Root) *ListRootsOutput {
  22413. s.Roots = v
  22414. return s
  22415. }
  22416. type ListTagsForResourceInput struct {
  22417. _ struct{} `type:"structure"`
  22418. // The parameter for receiving additional results if you receive a NextToken
  22419. // response in a previous request. A NextToken response indicates that more
  22420. // output is available. Set this parameter to the value of the previous call's
  22421. // NextToken response to indicate where the output should continue from.
  22422. NextToken *string `type:"string"`
  22423. // The ID of the resource with the tags to list.
  22424. //
  22425. // You can specify any of the following taggable resources.
  22426. //
  22427. // * Amazon Web Services account – specify the account ID number.
  22428. //
  22429. // * Organizational unit – specify the OU ID that begins with ou- and looks
  22430. // similar to: ou-1a2b-34uvwxyz
  22431. //
  22432. // * Root – specify the root ID that begins with r- and looks similar to:
  22433. // r-1a2b
  22434. //
  22435. // * Policy – specify the policy ID that begins with p- andlooks similar
  22436. // to: p-12abcdefg3
  22437. //
  22438. // ResourceId is a required field
  22439. ResourceId *string `type:"string" required:"true"`
  22440. }
  22441. // String returns the string representation.
  22442. //
  22443. // API parameter values that are decorated as "sensitive" in the API will not
  22444. // be included in the string output. The member name will be present, but the
  22445. // value will be replaced with "sensitive".
  22446. func (s ListTagsForResourceInput) String() string {
  22447. return awsutil.Prettify(s)
  22448. }
  22449. // GoString returns the string representation.
  22450. //
  22451. // API parameter values that are decorated as "sensitive" in the API will not
  22452. // be included in the string output. The member name will be present, but the
  22453. // value will be replaced with "sensitive".
  22454. func (s ListTagsForResourceInput) GoString() string {
  22455. return s.String()
  22456. }
  22457. // Validate inspects the fields of the type to determine if they are valid.
  22458. func (s *ListTagsForResourceInput) Validate() error {
  22459. invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
  22460. if s.ResourceId == nil {
  22461. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  22462. }
  22463. if invalidParams.Len() > 0 {
  22464. return invalidParams
  22465. }
  22466. return nil
  22467. }
  22468. // SetNextToken sets the NextToken field's value.
  22469. func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput {
  22470. s.NextToken = &v
  22471. return s
  22472. }
  22473. // SetResourceId sets the ResourceId field's value.
  22474. func (s *ListTagsForResourceInput) SetResourceId(v string) *ListTagsForResourceInput {
  22475. s.ResourceId = &v
  22476. return s
  22477. }
  22478. type ListTagsForResourceOutput struct {
  22479. _ struct{} `type:"structure"`
  22480. // If present, indicates that more output is available than is included in the
  22481. // current response. Use this value in the NextToken request parameter in a
  22482. // subsequent call to the operation to get the next part of the output. You
  22483. // should repeat this until the NextToken response element comes back as null.
  22484. NextToken *string `type:"string"`
  22485. // The tags that are assigned to the resource.
  22486. Tags []*Tag `type:"list"`
  22487. }
  22488. // String returns the string representation.
  22489. //
  22490. // API parameter values that are decorated as "sensitive" in the API will not
  22491. // be included in the string output. The member name will be present, but the
  22492. // value will be replaced with "sensitive".
  22493. func (s ListTagsForResourceOutput) String() string {
  22494. return awsutil.Prettify(s)
  22495. }
  22496. // GoString returns the string representation.
  22497. //
  22498. // API parameter values that are decorated as "sensitive" in the API will not
  22499. // be included in the string output. The member name will be present, but the
  22500. // value will be replaced with "sensitive".
  22501. func (s ListTagsForResourceOutput) GoString() string {
  22502. return s.String()
  22503. }
  22504. // SetNextToken sets the NextToken field's value.
  22505. func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput {
  22506. s.NextToken = &v
  22507. return s
  22508. }
  22509. // SetTags sets the Tags field's value.
  22510. func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput {
  22511. s.Tags = v
  22512. return s
  22513. }
  22514. type ListTargetsForPolicyInput struct {
  22515. _ struct{} `type:"structure"`
  22516. // The total number of results that you want included on each page of the response.
  22517. // If you do not include this parameter, it defaults to a value that is specific
  22518. // to the operation. If additional items exist beyond the maximum you specify,
  22519. // the NextToken response element is present and has a value (is not null).
  22520. // Include that value as the NextToken request parameter in the next call to
  22521. // the operation to get the next part of the results. Note that Organizations
  22522. // might return fewer results than the maximum even when there are more results
  22523. // available. You should check NextToken after every operation to ensure that
  22524. // you receive all of the results.
  22525. MaxResults *int64 `min:"1" type:"integer"`
  22526. // The parameter for receiving additional results if you receive a NextToken
  22527. // response in a previous request. A NextToken response indicates that more
  22528. // output is available. Set this parameter to the value of the previous call's
  22529. // NextToken response to indicate where the output should continue from.
  22530. NextToken *string `type:"string"`
  22531. // The unique identifier (ID) of the policy whose attachments you want to know.
  22532. //
  22533. // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string
  22534. // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits,
  22535. // or the underscore character (_).
  22536. //
  22537. // PolicyId is a required field
  22538. PolicyId *string `type:"string" required:"true"`
  22539. }
  22540. // String returns the string representation.
  22541. //
  22542. // API parameter values that are decorated as "sensitive" in the API will not
  22543. // be included in the string output. The member name will be present, but the
  22544. // value will be replaced with "sensitive".
  22545. func (s ListTargetsForPolicyInput) String() string {
  22546. return awsutil.Prettify(s)
  22547. }
  22548. // GoString returns the string representation.
  22549. //
  22550. // API parameter values that are decorated as "sensitive" in the API will not
  22551. // be included in the string output. The member name will be present, but the
  22552. // value will be replaced with "sensitive".
  22553. func (s ListTargetsForPolicyInput) GoString() string {
  22554. return s.String()
  22555. }
  22556. // Validate inspects the fields of the type to determine if they are valid.
  22557. func (s *ListTargetsForPolicyInput) Validate() error {
  22558. invalidParams := request.ErrInvalidParams{Context: "ListTargetsForPolicyInput"}
  22559. if s.MaxResults != nil && *s.MaxResults < 1 {
  22560. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  22561. }
  22562. if s.PolicyId == nil {
  22563. invalidParams.Add(request.NewErrParamRequired("PolicyId"))
  22564. }
  22565. if invalidParams.Len() > 0 {
  22566. return invalidParams
  22567. }
  22568. return nil
  22569. }
  22570. // SetMaxResults sets the MaxResults field's value.
  22571. func (s *ListTargetsForPolicyInput) SetMaxResults(v int64) *ListTargetsForPolicyInput {
  22572. s.MaxResults = &v
  22573. return s
  22574. }
  22575. // SetNextToken sets the NextToken field's value.
  22576. func (s *ListTargetsForPolicyInput) SetNextToken(v string) *ListTargetsForPolicyInput {
  22577. s.NextToken = &v
  22578. return s
  22579. }
  22580. // SetPolicyId sets the PolicyId field's value.
  22581. func (s *ListTargetsForPolicyInput) SetPolicyId(v string) *ListTargetsForPolicyInput {
  22582. s.PolicyId = &v
  22583. return s
  22584. }
  22585. type ListTargetsForPolicyOutput struct {
  22586. _ struct{} `type:"structure"`
  22587. // If present, indicates that more output is available than is included in the
  22588. // current response. Use this value in the NextToken request parameter in a
  22589. // subsequent call to the operation to get the next part of the output. You
  22590. // should repeat this until the NextToken response element comes back as null.
  22591. NextToken *string `type:"string"`
  22592. // A list of structures, each of which contains details about one of the entities
  22593. // to which the specified policy is attached.
  22594. Targets []*PolicyTargetSummary `type:"list"`
  22595. }
  22596. // String returns the string representation.
  22597. //
  22598. // API parameter values that are decorated as "sensitive" in the API will not
  22599. // be included in the string output. The member name will be present, but the
  22600. // value will be replaced with "sensitive".
  22601. func (s ListTargetsForPolicyOutput) String() string {
  22602. return awsutil.Prettify(s)
  22603. }
  22604. // GoString returns the string representation.
  22605. //
  22606. // API parameter values that are decorated as "sensitive" in the API will not
  22607. // be included in the string output. The member name will be present, but the
  22608. // value will be replaced with "sensitive".
  22609. func (s ListTargetsForPolicyOutput) GoString() string {
  22610. return s.String()
  22611. }
  22612. // SetNextToken sets the NextToken field's value.
  22613. func (s *ListTargetsForPolicyOutput) SetNextToken(v string) *ListTargetsForPolicyOutput {
  22614. s.NextToken = &v
  22615. return s
  22616. }
  22617. // SetTargets sets the Targets field's value.
  22618. func (s *ListTargetsForPolicyOutput) SetTargets(v []*PolicyTargetSummary) *ListTargetsForPolicyOutput {
  22619. s.Targets = v
  22620. return s
  22621. }
  22622. // The provided policy document doesn't meet the requirements of the specified
  22623. // policy type. For example, the syntax might be incorrect. For details about
  22624. // service control policy syntax, see Service Control Policy Syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html)
  22625. // in the Organizations User Guide.
  22626. type MalformedPolicyDocumentException struct {
  22627. _ struct{} `type:"structure"`
  22628. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  22629. Message_ *string `locationName:"Message" type:"string"`
  22630. }
  22631. // String returns the string representation.
  22632. //
  22633. // API parameter values that are decorated as "sensitive" in the API will not
  22634. // be included in the string output. The member name will be present, but the
  22635. // value will be replaced with "sensitive".
  22636. func (s MalformedPolicyDocumentException) String() string {
  22637. return awsutil.Prettify(s)
  22638. }
  22639. // GoString returns the string representation.
  22640. //
  22641. // API parameter values that are decorated as "sensitive" in the API will not
  22642. // be included in the string output. The member name will be present, but the
  22643. // value will be replaced with "sensitive".
  22644. func (s MalformedPolicyDocumentException) GoString() string {
  22645. return s.String()
  22646. }
  22647. func newErrorMalformedPolicyDocumentException(v protocol.ResponseMetadata) error {
  22648. return &MalformedPolicyDocumentException{
  22649. RespMetadata: v,
  22650. }
  22651. }
  22652. // Code returns the exception type name.
  22653. func (s *MalformedPolicyDocumentException) Code() string {
  22654. return "MalformedPolicyDocumentException"
  22655. }
  22656. // Message returns the exception's message.
  22657. func (s *MalformedPolicyDocumentException) Message() string {
  22658. if s.Message_ != nil {
  22659. return *s.Message_
  22660. }
  22661. return ""
  22662. }
  22663. // OrigErr always returns nil, satisfies awserr.Error interface.
  22664. func (s *MalformedPolicyDocumentException) OrigErr() error {
  22665. return nil
  22666. }
  22667. func (s *MalformedPolicyDocumentException) Error() string {
  22668. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  22669. }
  22670. // Status code returns the HTTP status code for the request's response error.
  22671. func (s *MalformedPolicyDocumentException) StatusCode() int {
  22672. return s.RespMetadata.StatusCode
  22673. }
  22674. // RequestID returns the service's response RequestID for request.
  22675. func (s *MalformedPolicyDocumentException) RequestID() string {
  22676. return s.RespMetadata.RequestID
  22677. }
  22678. // You can't remove a management account from an organization. If you want the
  22679. // management account to become a member account in another organization, you
  22680. // must first delete the current organization of the management account.
  22681. type MasterCannotLeaveOrganizationException struct {
  22682. _ struct{} `type:"structure"`
  22683. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  22684. Message_ *string `locationName:"Message" type:"string"`
  22685. }
  22686. // String returns the string representation.
  22687. //
  22688. // API parameter values that are decorated as "sensitive" in the API will not
  22689. // be included in the string output. The member name will be present, but the
  22690. // value will be replaced with "sensitive".
  22691. func (s MasterCannotLeaveOrganizationException) String() string {
  22692. return awsutil.Prettify(s)
  22693. }
  22694. // GoString returns the string representation.
  22695. //
  22696. // API parameter values that are decorated as "sensitive" in the API will not
  22697. // be included in the string output. The member name will be present, but the
  22698. // value will be replaced with "sensitive".
  22699. func (s MasterCannotLeaveOrganizationException) GoString() string {
  22700. return s.String()
  22701. }
  22702. func newErrorMasterCannotLeaveOrganizationException(v protocol.ResponseMetadata) error {
  22703. return &MasterCannotLeaveOrganizationException{
  22704. RespMetadata: v,
  22705. }
  22706. }
  22707. // Code returns the exception type name.
  22708. func (s *MasterCannotLeaveOrganizationException) Code() string {
  22709. return "MasterCannotLeaveOrganizationException"
  22710. }
  22711. // Message returns the exception's message.
  22712. func (s *MasterCannotLeaveOrganizationException) Message() string {
  22713. if s.Message_ != nil {
  22714. return *s.Message_
  22715. }
  22716. return ""
  22717. }
  22718. // OrigErr always returns nil, satisfies awserr.Error interface.
  22719. func (s *MasterCannotLeaveOrganizationException) OrigErr() error {
  22720. return nil
  22721. }
  22722. func (s *MasterCannotLeaveOrganizationException) Error() string {
  22723. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  22724. }
  22725. // Status code returns the HTTP status code for the request's response error.
  22726. func (s *MasterCannotLeaveOrganizationException) StatusCode() int {
  22727. return s.RespMetadata.StatusCode
  22728. }
  22729. // RequestID returns the service's response RequestID for request.
  22730. func (s *MasterCannotLeaveOrganizationException) RequestID() string {
  22731. return s.RespMetadata.RequestID
  22732. }
  22733. type MoveAccountInput struct {
  22734. _ struct{} `type:"structure"`
  22735. // The unique identifier (ID) of the account that you want to move.
  22736. //
  22737. // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string
  22738. // requires exactly 12 digits.
  22739. //
  22740. // AccountId is a required field
  22741. AccountId *string `type:"string" required:"true"`
  22742. // The unique identifier (ID) of the root or organizational unit that you want
  22743. // to move the account to.
  22744. //
  22745. // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string
  22746. // requires one of the following:
  22747. //
  22748. // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
  22749. // letters or digits.
  22750. //
  22751. // * Organizational unit (OU) - A string that begins with "ou-" followed
  22752. // by from 4 to 32 lowercase letters or digits (the ID of the root that the
  22753. // OU is in). This string is followed by a second "-" dash and from 8 to
  22754. // 32 additional lowercase letters or digits.
  22755. //
  22756. // DestinationParentId is a required field
  22757. DestinationParentId *string `type:"string" required:"true"`
  22758. // The unique identifier (ID) of the root or organizational unit that you want
  22759. // to move the account from.
  22760. //
  22761. // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string
  22762. // requires one of the following:
  22763. //
  22764. // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
  22765. // letters or digits.
  22766. //
  22767. // * Organizational unit (OU) - A string that begins with "ou-" followed
  22768. // by from 4 to 32 lowercase letters or digits (the ID of the root that the
  22769. // OU is in). This string is followed by a second "-" dash and from 8 to
  22770. // 32 additional lowercase letters or digits.
  22771. //
  22772. // SourceParentId is a required field
  22773. SourceParentId *string `type:"string" required:"true"`
  22774. }
  22775. // String returns the string representation.
  22776. //
  22777. // API parameter values that are decorated as "sensitive" in the API will not
  22778. // be included in the string output. The member name will be present, but the
  22779. // value will be replaced with "sensitive".
  22780. func (s MoveAccountInput) String() string {
  22781. return awsutil.Prettify(s)
  22782. }
  22783. // GoString returns the string representation.
  22784. //
  22785. // API parameter values that are decorated as "sensitive" in the API will not
  22786. // be included in the string output. The member name will be present, but the
  22787. // value will be replaced with "sensitive".
  22788. func (s MoveAccountInput) GoString() string {
  22789. return s.String()
  22790. }
  22791. // Validate inspects the fields of the type to determine if they are valid.
  22792. func (s *MoveAccountInput) Validate() error {
  22793. invalidParams := request.ErrInvalidParams{Context: "MoveAccountInput"}
  22794. if s.AccountId == nil {
  22795. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  22796. }
  22797. if s.DestinationParentId == nil {
  22798. invalidParams.Add(request.NewErrParamRequired("DestinationParentId"))
  22799. }
  22800. if s.SourceParentId == nil {
  22801. invalidParams.Add(request.NewErrParamRequired("SourceParentId"))
  22802. }
  22803. if invalidParams.Len() > 0 {
  22804. return invalidParams
  22805. }
  22806. return nil
  22807. }
  22808. // SetAccountId sets the AccountId field's value.
  22809. func (s *MoveAccountInput) SetAccountId(v string) *MoveAccountInput {
  22810. s.AccountId = &v
  22811. return s
  22812. }
  22813. // SetDestinationParentId sets the DestinationParentId field's value.
  22814. func (s *MoveAccountInput) SetDestinationParentId(v string) *MoveAccountInput {
  22815. s.DestinationParentId = &v
  22816. return s
  22817. }
  22818. // SetSourceParentId sets the SourceParentId field's value.
  22819. func (s *MoveAccountInput) SetSourceParentId(v string) *MoveAccountInput {
  22820. s.SourceParentId = &v
  22821. return s
  22822. }
  22823. type MoveAccountOutput struct {
  22824. _ struct{} `type:"structure"`
  22825. }
  22826. // String returns the string representation.
  22827. //
  22828. // API parameter values that are decorated as "sensitive" in the API will not
  22829. // be included in the string output. The member name will be present, but the
  22830. // value will be replaced with "sensitive".
  22831. func (s MoveAccountOutput) String() string {
  22832. return awsutil.Prettify(s)
  22833. }
  22834. // GoString returns the string representation.
  22835. //
  22836. // API parameter values that are decorated as "sensitive" in the API will not
  22837. // be included in the string output. The member name will be present, but the
  22838. // value will be replaced with "sensitive".
  22839. func (s MoveAccountOutput) GoString() string {
  22840. return s.String()
  22841. }
  22842. // Contains details about an organization. An organization is a collection of
  22843. // accounts that are centrally managed together using consolidated billing,
  22844. // organized hierarchically with organizational units (OUs), and controlled
  22845. // with policies .
  22846. type Organization struct {
  22847. _ struct{} `type:"structure"`
  22848. // The Amazon Resource Name (ARN) of an organization.
  22849. //
  22850. // For more information about ARNs in Organizations, see ARN Formats Supported
  22851. // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
  22852. // in the Amazon Web Services Service Authorization Reference.
  22853. Arn *string `type:"string"`
  22854. //
  22855. // Do not use. This field is deprecated and doesn't provide complete information
  22856. // about the policies in your organization.
  22857. //
  22858. // To determine the policies that are enabled and available for use in your
  22859. // organization, use the ListRoots operation instead.
  22860. AvailablePolicyTypes []*PolicyTypeSummary `type:"list"`
  22861. // Specifies the functionality that currently is available to the organization.
  22862. // If set to "ALL", then all features are enabled and policies can be applied
  22863. // to accounts in the organization. If set to "CONSOLIDATED_BILLING", then only
  22864. // consolidated billing functionality is available. For more information, see
  22865. // Enabling All Features in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
  22866. // in the Organizations User Guide.
  22867. FeatureSet *string `type:"string" enum:"OrganizationFeatureSet"`
  22868. // The unique identifier (ID) of an organization.
  22869. //
  22870. // The regex pattern (http://wikipedia.org/wiki/regex) for an organization ID
  22871. // string requires "o-" followed by from 10 to 32 lowercase letters or digits.
  22872. Id *string `type:"string"`
  22873. // The Amazon Resource Name (ARN) of the account that is designated as the management
  22874. // account for the organization.
  22875. //
  22876. // For more information about ARNs in Organizations, see ARN Formats Supported
  22877. // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
  22878. // in the Amazon Web Services Service Authorization Reference.
  22879. MasterAccountArn *string `type:"string"`
  22880. // The email address that is associated with the Amazon Web Services account
  22881. // that is designated as the management account for the organization.
  22882. //
  22883. // MasterAccountEmail is a sensitive parameter and its value will be
  22884. // replaced with "sensitive" in string returned by Organization's
  22885. // String and GoString methods.
  22886. MasterAccountEmail *string `min:"6" type:"string" sensitive:"true"`
  22887. // The unique identifier (ID) of the management account of an organization.
  22888. //
  22889. // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string
  22890. // requires exactly 12 digits.
  22891. MasterAccountId *string `type:"string"`
  22892. }
  22893. // String returns the string representation.
  22894. //
  22895. // API parameter values that are decorated as "sensitive" in the API will not
  22896. // be included in the string output. The member name will be present, but the
  22897. // value will be replaced with "sensitive".
  22898. func (s Organization) String() string {
  22899. return awsutil.Prettify(s)
  22900. }
  22901. // GoString returns the string representation.
  22902. //
  22903. // API parameter values that are decorated as "sensitive" in the API will not
  22904. // be included in the string output. The member name will be present, but the
  22905. // value will be replaced with "sensitive".
  22906. func (s Organization) GoString() string {
  22907. return s.String()
  22908. }
  22909. // SetArn sets the Arn field's value.
  22910. func (s *Organization) SetArn(v string) *Organization {
  22911. s.Arn = &v
  22912. return s
  22913. }
  22914. // SetAvailablePolicyTypes sets the AvailablePolicyTypes field's value.
  22915. func (s *Organization) SetAvailablePolicyTypes(v []*PolicyTypeSummary) *Organization {
  22916. s.AvailablePolicyTypes = v
  22917. return s
  22918. }
  22919. // SetFeatureSet sets the FeatureSet field's value.
  22920. func (s *Organization) SetFeatureSet(v string) *Organization {
  22921. s.FeatureSet = &v
  22922. return s
  22923. }
  22924. // SetId sets the Id field's value.
  22925. func (s *Organization) SetId(v string) *Organization {
  22926. s.Id = &v
  22927. return s
  22928. }
  22929. // SetMasterAccountArn sets the MasterAccountArn field's value.
  22930. func (s *Organization) SetMasterAccountArn(v string) *Organization {
  22931. s.MasterAccountArn = &v
  22932. return s
  22933. }
  22934. // SetMasterAccountEmail sets the MasterAccountEmail field's value.
  22935. func (s *Organization) SetMasterAccountEmail(v string) *Organization {
  22936. s.MasterAccountEmail = &v
  22937. return s
  22938. }
  22939. // SetMasterAccountId sets the MasterAccountId field's value.
  22940. func (s *Organization) SetMasterAccountId(v string) *Organization {
  22941. s.MasterAccountId = &v
  22942. return s
  22943. }
  22944. // The organization isn't empty. To delete an organization, you must first remove
  22945. // all accounts except the management account, delete all OUs, and delete all
  22946. // policies.
  22947. type OrganizationNotEmptyException struct {
  22948. _ struct{} `type:"structure"`
  22949. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  22950. Message_ *string `locationName:"Message" type:"string"`
  22951. }
  22952. // String returns the string representation.
  22953. //
  22954. // API parameter values that are decorated as "sensitive" in the API will not
  22955. // be included in the string output. The member name will be present, but the
  22956. // value will be replaced with "sensitive".
  22957. func (s OrganizationNotEmptyException) String() string {
  22958. return awsutil.Prettify(s)
  22959. }
  22960. // GoString returns the string representation.
  22961. //
  22962. // API parameter values that are decorated as "sensitive" in the API will not
  22963. // be included in the string output. The member name will be present, but the
  22964. // value will be replaced with "sensitive".
  22965. func (s OrganizationNotEmptyException) GoString() string {
  22966. return s.String()
  22967. }
  22968. func newErrorOrganizationNotEmptyException(v protocol.ResponseMetadata) error {
  22969. return &OrganizationNotEmptyException{
  22970. RespMetadata: v,
  22971. }
  22972. }
  22973. // Code returns the exception type name.
  22974. func (s *OrganizationNotEmptyException) Code() string {
  22975. return "OrganizationNotEmptyException"
  22976. }
  22977. // Message returns the exception's message.
  22978. func (s *OrganizationNotEmptyException) Message() string {
  22979. if s.Message_ != nil {
  22980. return *s.Message_
  22981. }
  22982. return ""
  22983. }
  22984. // OrigErr always returns nil, satisfies awserr.Error interface.
  22985. func (s *OrganizationNotEmptyException) OrigErr() error {
  22986. return nil
  22987. }
  22988. func (s *OrganizationNotEmptyException) Error() string {
  22989. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  22990. }
  22991. // Status code returns the HTTP status code for the request's response error.
  22992. func (s *OrganizationNotEmptyException) StatusCode() int {
  22993. return s.RespMetadata.StatusCode
  22994. }
  22995. // RequestID returns the service's response RequestID for request.
  22996. func (s *OrganizationNotEmptyException) RequestID() string {
  22997. return s.RespMetadata.RequestID
  22998. }
  22999. // Contains details about an organizational unit (OU). An OU is a container
  23000. // of Amazon Web Services accounts within a root of an organization. Policies
  23001. // that are attached to an OU apply to all accounts contained in that OU and
  23002. // in any child OUs.
  23003. type OrganizationalUnit struct {
  23004. _ struct{} `type:"structure"`
  23005. // The Amazon Resource Name (ARN) of this OU.
  23006. //
  23007. // For more information about ARNs in Organizations, see ARN Formats Supported
  23008. // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
  23009. // in the Amazon Web Services Service Authorization Reference.
  23010. Arn *string `type:"string"`
  23011. // The unique identifier (ID) associated with this OU.
  23012. //
  23013. // The regex pattern (http://wikipedia.org/wiki/regex) for an organizational
  23014. // unit ID string requires "ou-" followed by from 4 to 32 lowercase letters
  23015. // or digits (the ID of the root that contains the OU). This string is followed
  23016. // by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
  23017. Id *string `type:"string"`
  23018. // The friendly name of this OU.
  23019. //
  23020. // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
  23021. // this parameter is a string of any of the characters in the ASCII character
  23022. // range.
  23023. Name *string `min:"1" type:"string"`
  23024. }
  23025. // String returns the string representation.
  23026. //
  23027. // API parameter values that are decorated as "sensitive" in the API will not
  23028. // be included in the string output. The member name will be present, but the
  23029. // value will be replaced with "sensitive".
  23030. func (s OrganizationalUnit) String() string {
  23031. return awsutil.Prettify(s)
  23032. }
  23033. // GoString returns the string representation.
  23034. //
  23035. // API parameter values that are decorated as "sensitive" in the API will not
  23036. // be included in the string output. The member name will be present, but the
  23037. // value will be replaced with "sensitive".
  23038. func (s OrganizationalUnit) GoString() string {
  23039. return s.String()
  23040. }
  23041. // SetArn sets the Arn field's value.
  23042. func (s *OrganizationalUnit) SetArn(v string) *OrganizationalUnit {
  23043. s.Arn = &v
  23044. return s
  23045. }
  23046. // SetId sets the Id field's value.
  23047. func (s *OrganizationalUnit) SetId(v string) *OrganizationalUnit {
  23048. s.Id = &v
  23049. return s
  23050. }
  23051. // SetName sets the Name field's value.
  23052. func (s *OrganizationalUnit) SetName(v string) *OrganizationalUnit {
  23053. s.Name = &v
  23054. return s
  23055. }
  23056. // The specified OU is not empty. Move all accounts to another root or to other
  23057. // OUs, remove all child OUs, and try the operation again.
  23058. type OrganizationalUnitNotEmptyException struct {
  23059. _ struct{} `type:"structure"`
  23060. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  23061. Message_ *string `locationName:"Message" type:"string"`
  23062. }
  23063. // String returns the string representation.
  23064. //
  23065. // API parameter values that are decorated as "sensitive" in the API will not
  23066. // be included in the string output. The member name will be present, but the
  23067. // value will be replaced with "sensitive".
  23068. func (s OrganizationalUnitNotEmptyException) String() string {
  23069. return awsutil.Prettify(s)
  23070. }
  23071. // GoString returns the string representation.
  23072. //
  23073. // API parameter values that are decorated as "sensitive" in the API will not
  23074. // be included in the string output. The member name will be present, but the
  23075. // value will be replaced with "sensitive".
  23076. func (s OrganizationalUnitNotEmptyException) GoString() string {
  23077. return s.String()
  23078. }
  23079. func newErrorOrganizationalUnitNotEmptyException(v protocol.ResponseMetadata) error {
  23080. return &OrganizationalUnitNotEmptyException{
  23081. RespMetadata: v,
  23082. }
  23083. }
  23084. // Code returns the exception type name.
  23085. func (s *OrganizationalUnitNotEmptyException) Code() string {
  23086. return "OrganizationalUnitNotEmptyException"
  23087. }
  23088. // Message returns the exception's message.
  23089. func (s *OrganizationalUnitNotEmptyException) Message() string {
  23090. if s.Message_ != nil {
  23091. return *s.Message_
  23092. }
  23093. return ""
  23094. }
  23095. // OrigErr always returns nil, satisfies awserr.Error interface.
  23096. func (s *OrganizationalUnitNotEmptyException) OrigErr() error {
  23097. return nil
  23098. }
  23099. func (s *OrganizationalUnitNotEmptyException) Error() string {
  23100. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  23101. }
  23102. // Status code returns the HTTP status code for the request's response error.
  23103. func (s *OrganizationalUnitNotEmptyException) StatusCode() int {
  23104. return s.RespMetadata.StatusCode
  23105. }
  23106. // RequestID returns the service's response RequestID for request.
  23107. func (s *OrganizationalUnitNotEmptyException) RequestID() string {
  23108. return s.RespMetadata.RequestID
  23109. }
  23110. // We can't find an OU with the OrganizationalUnitId that you specified.
  23111. type OrganizationalUnitNotFoundException struct {
  23112. _ struct{} `type:"structure"`
  23113. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  23114. Message_ *string `locationName:"Message" type:"string"`
  23115. }
  23116. // String returns the string representation.
  23117. //
  23118. // API parameter values that are decorated as "sensitive" in the API will not
  23119. // be included in the string output. The member name will be present, but the
  23120. // value will be replaced with "sensitive".
  23121. func (s OrganizationalUnitNotFoundException) String() string {
  23122. return awsutil.Prettify(s)
  23123. }
  23124. // GoString returns the string representation.
  23125. //
  23126. // API parameter values that are decorated as "sensitive" in the API will not
  23127. // be included in the string output. The member name will be present, but the
  23128. // value will be replaced with "sensitive".
  23129. func (s OrganizationalUnitNotFoundException) GoString() string {
  23130. return s.String()
  23131. }
  23132. func newErrorOrganizationalUnitNotFoundException(v protocol.ResponseMetadata) error {
  23133. return &OrganizationalUnitNotFoundException{
  23134. RespMetadata: v,
  23135. }
  23136. }
  23137. // Code returns the exception type name.
  23138. func (s *OrganizationalUnitNotFoundException) Code() string {
  23139. return "OrganizationalUnitNotFoundException"
  23140. }
  23141. // Message returns the exception's message.
  23142. func (s *OrganizationalUnitNotFoundException) Message() string {
  23143. if s.Message_ != nil {
  23144. return *s.Message_
  23145. }
  23146. return ""
  23147. }
  23148. // OrigErr always returns nil, satisfies awserr.Error interface.
  23149. func (s *OrganizationalUnitNotFoundException) OrigErr() error {
  23150. return nil
  23151. }
  23152. func (s *OrganizationalUnitNotFoundException) Error() string {
  23153. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  23154. }
  23155. // Status code returns the HTTP status code for the request's response error.
  23156. func (s *OrganizationalUnitNotFoundException) StatusCode() int {
  23157. return s.RespMetadata.StatusCode
  23158. }
  23159. // RequestID returns the service's response RequestID for request.
  23160. func (s *OrganizationalUnitNotFoundException) RequestID() string {
  23161. return s.RespMetadata.RequestID
  23162. }
  23163. // Contains information about either a root or an organizational unit (OU) that
  23164. // can contain OUs or accounts in an organization.
  23165. type Parent struct {
  23166. _ struct{} `type:"structure"`
  23167. // The unique identifier (ID) of the parent entity.
  23168. //
  23169. // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string
  23170. // requires one of the following:
  23171. //
  23172. // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
  23173. // letters or digits.
  23174. //
  23175. // * Organizational unit (OU) - A string that begins with "ou-" followed
  23176. // by from 4 to 32 lowercase letters or digits (the ID of the root that the
  23177. // OU is in). This string is followed by a second "-" dash and from 8 to
  23178. // 32 additional lowercase letters or digits.
  23179. Id *string `type:"string"`
  23180. // The type of the parent entity.
  23181. Type *string `type:"string" enum:"ParentType"`
  23182. }
  23183. // String returns the string representation.
  23184. //
  23185. // API parameter values that are decorated as "sensitive" in the API will not
  23186. // be included in the string output. The member name will be present, but the
  23187. // value will be replaced with "sensitive".
  23188. func (s Parent) String() string {
  23189. return awsutil.Prettify(s)
  23190. }
  23191. // GoString returns the string representation.
  23192. //
  23193. // API parameter values that are decorated as "sensitive" in the API will not
  23194. // be included in the string output. The member name will be present, but the
  23195. // value will be replaced with "sensitive".
  23196. func (s Parent) GoString() string {
  23197. return s.String()
  23198. }
  23199. // SetId sets the Id field's value.
  23200. func (s *Parent) SetId(v string) *Parent {
  23201. s.Id = &v
  23202. return s
  23203. }
  23204. // SetType sets the Type field's value.
  23205. func (s *Parent) SetType(v string) *Parent {
  23206. s.Type = &v
  23207. return s
  23208. }
  23209. // We can't find a root or OU with the ParentId that you specified.
  23210. type ParentNotFoundException struct {
  23211. _ struct{} `type:"structure"`
  23212. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  23213. Message_ *string `locationName:"Message" type:"string"`
  23214. }
  23215. // String returns the string representation.
  23216. //
  23217. // API parameter values that are decorated as "sensitive" in the API will not
  23218. // be included in the string output. The member name will be present, but the
  23219. // value will be replaced with "sensitive".
  23220. func (s ParentNotFoundException) String() string {
  23221. return awsutil.Prettify(s)
  23222. }
  23223. // GoString returns the string representation.
  23224. //
  23225. // API parameter values that are decorated as "sensitive" in the API will not
  23226. // be included in the string output. The member name will be present, but the
  23227. // value will be replaced with "sensitive".
  23228. func (s ParentNotFoundException) GoString() string {
  23229. return s.String()
  23230. }
  23231. func newErrorParentNotFoundException(v protocol.ResponseMetadata) error {
  23232. return &ParentNotFoundException{
  23233. RespMetadata: v,
  23234. }
  23235. }
  23236. // Code returns the exception type name.
  23237. func (s *ParentNotFoundException) Code() string {
  23238. return "ParentNotFoundException"
  23239. }
  23240. // Message returns the exception's message.
  23241. func (s *ParentNotFoundException) Message() string {
  23242. if s.Message_ != nil {
  23243. return *s.Message_
  23244. }
  23245. return ""
  23246. }
  23247. // OrigErr always returns nil, satisfies awserr.Error interface.
  23248. func (s *ParentNotFoundException) OrigErr() error {
  23249. return nil
  23250. }
  23251. func (s *ParentNotFoundException) Error() string {
  23252. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  23253. }
  23254. // Status code returns the HTTP status code for the request's response error.
  23255. func (s *ParentNotFoundException) StatusCode() int {
  23256. return s.RespMetadata.StatusCode
  23257. }
  23258. // RequestID returns the service's response RequestID for request.
  23259. func (s *ParentNotFoundException) RequestID() string {
  23260. return s.RespMetadata.RequestID
  23261. }
  23262. // Contains rules to be applied to the affected accounts. Policies can be attached
  23263. // directly to accounts, or to roots and OUs to affect all accounts in those
  23264. // hierarchies.
  23265. type Policy struct {
  23266. _ struct{} `type:"structure"`
  23267. // The text content of the policy.
  23268. Content *string `min:"1" type:"string"`
  23269. // A structure that contains additional details about the policy.
  23270. PolicySummary *PolicySummary `type:"structure"`
  23271. }
  23272. // String returns the string representation.
  23273. //
  23274. // API parameter values that are decorated as "sensitive" in the API will not
  23275. // be included in the string output. The member name will be present, but the
  23276. // value will be replaced with "sensitive".
  23277. func (s Policy) String() string {
  23278. return awsutil.Prettify(s)
  23279. }
  23280. // GoString returns the string representation.
  23281. //
  23282. // API parameter values that are decorated as "sensitive" in the API will not
  23283. // be included in the string output. The member name will be present, but the
  23284. // value will be replaced with "sensitive".
  23285. func (s Policy) GoString() string {
  23286. return s.String()
  23287. }
  23288. // SetContent sets the Content field's value.
  23289. func (s *Policy) SetContent(v string) *Policy {
  23290. s.Content = &v
  23291. return s
  23292. }
  23293. // SetPolicySummary sets the PolicySummary field's value.
  23294. func (s *Policy) SetPolicySummary(v *PolicySummary) *Policy {
  23295. s.PolicySummary = v
  23296. return s
  23297. }
  23298. // Changes to the effective policy are in progress, and its contents can't be
  23299. // returned. Try the operation again later.
  23300. type PolicyChangesInProgressException struct {
  23301. _ struct{} `type:"structure"`
  23302. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  23303. Message_ *string `locationName:"Message" type:"string"`
  23304. }
  23305. // String returns the string representation.
  23306. //
  23307. // API parameter values that are decorated as "sensitive" in the API will not
  23308. // be included in the string output. The member name will be present, but the
  23309. // value will be replaced with "sensitive".
  23310. func (s PolicyChangesInProgressException) String() string {
  23311. return awsutil.Prettify(s)
  23312. }
  23313. // GoString returns the string representation.
  23314. //
  23315. // API parameter values that are decorated as "sensitive" in the API will not
  23316. // be included in the string output. The member name will be present, but the
  23317. // value will be replaced with "sensitive".
  23318. func (s PolicyChangesInProgressException) GoString() string {
  23319. return s.String()
  23320. }
  23321. func newErrorPolicyChangesInProgressException(v protocol.ResponseMetadata) error {
  23322. return &PolicyChangesInProgressException{
  23323. RespMetadata: v,
  23324. }
  23325. }
  23326. // Code returns the exception type name.
  23327. func (s *PolicyChangesInProgressException) Code() string {
  23328. return "PolicyChangesInProgressException"
  23329. }
  23330. // Message returns the exception's message.
  23331. func (s *PolicyChangesInProgressException) Message() string {
  23332. if s.Message_ != nil {
  23333. return *s.Message_
  23334. }
  23335. return ""
  23336. }
  23337. // OrigErr always returns nil, satisfies awserr.Error interface.
  23338. func (s *PolicyChangesInProgressException) OrigErr() error {
  23339. return nil
  23340. }
  23341. func (s *PolicyChangesInProgressException) Error() string {
  23342. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  23343. }
  23344. // Status code returns the HTTP status code for the request's response error.
  23345. func (s *PolicyChangesInProgressException) StatusCode() int {
  23346. return s.RespMetadata.StatusCode
  23347. }
  23348. // RequestID returns the service's response RequestID for request.
  23349. func (s *PolicyChangesInProgressException) RequestID() string {
  23350. return s.RespMetadata.RequestID
  23351. }
  23352. // The policy is attached to one or more entities. You must detach it from all
  23353. // roots, OUs, and accounts before performing this operation.
  23354. type PolicyInUseException struct {
  23355. _ struct{} `type:"structure"`
  23356. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  23357. Message_ *string `locationName:"Message" type:"string"`
  23358. }
  23359. // String returns the string representation.
  23360. //
  23361. // API parameter values that are decorated as "sensitive" in the API will not
  23362. // be included in the string output. The member name will be present, but the
  23363. // value will be replaced with "sensitive".
  23364. func (s PolicyInUseException) String() string {
  23365. return awsutil.Prettify(s)
  23366. }
  23367. // GoString returns the string representation.
  23368. //
  23369. // API parameter values that are decorated as "sensitive" in the API will not
  23370. // be included in the string output. The member name will be present, but the
  23371. // value will be replaced with "sensitive".
  23372. func (s PolicyInUseException) GoString() string {
  23373. return s.String()
  23374. }
  23375. func newErrorPolicyInUseException(v protocol.ResponseMetadata) error {
  23376. return &PolicyInUseException{
  23377. RespMetadata: v,
  23378. }
  23379. }
  23380. // Code returns the exception type name.
  23381. func (s *PolicyInUseException) Code() string {
  23382. return "PolicyInUseException"
  23383. }
  23384. // Message returns the exception's message.
  23385. func (s *PolicyInUseException) Message() string {
  23386. if s.Message_ != nil {
  23387. return *s.Message_
  23388. }
  23389. return ""
  23390. }
  23391. // OrigErr always returns nil, satisfies awserr.Error interface.
  23392. func (s *PolicyInUseException) OrigErr() error {
  23393. return nil
  23394. }
  23395. func (s *PolicyInUseException) Error() string {
  23396. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  23397. }
  23398. // Status code returns the HTTP status code for the request's response error.
  23399. func (s *PolicyInUseException) StatusCode() int {
  23400. return s.RespMetadata.StatusCode
  23401. }
  23402. // RequestID returns the service's response RequestID for request.
  23403. func (s *PolicyInUseException) RequestID() string {
  23404. return s.RespMetadata.RequestID
  23405. }
  23406. // The policy isn't attached to the specified target in the specified root.
  23407. type PolicyNotAttachedException struct {
  23408. _ struct{} `type:"structure"`
  23409. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  23410. Message_ *string `locationName:"Message" type:"string"`
  23411. }
  23412. // String returns the string representation.
  23413. //
  23414. // API parameter values that are decorated as "sensitive" in the API will not
  23415. // be included in the string output. The member name will be present, but the
  23416. // value will be replaced with "sensitive".
  23417. func (s PolicyNotAttachedException) String() string {
  23418. return awsutil.Prettify(s)
  23419. }
  23420. // GoString returns the string representation.
  23421. //
  23422. // API parameter values that are decorated as "sensitive" in the API will not
  23423. // be included in the string output. The member name will be present, but the
  23424. // value will be replaced with "sensitive".
  23425. func (s PolicyNotAttachedException) GoString() string {
  23426. return s.String()
  23427. }
  23428. func newErrorPolicyNotAttachedException(v protocol.ResponseMetadata) error {
  23429. return &PolicyNotAttachedException{
  23430. RespMetadata: v,
  23431. }
  23432. }
  23433. // Code returns the exception type name.
  23434. func (s *PolicyNotAttachedException) Code() string {
  23435. return "PolicyNotAttachedException"
  23436. }
  23437. // Message returns the exception's message.
  23438. func (s *PolicyNotAttachedException) Message() string {
  23439. if s.Message_ != nil {
  23440. return *s.Message_
  23441. }
  23442. return ""
  23443. }
  23444. // OrigErr always returns nil, satisfies awserr.Error interface.
  23445. func (s *PolicyNotAttachedException) OrigErr() error {
  23446. return nil
  23447. }
  23448. func (s *PolicyNotAttachedException) Error() string {
  23449. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  23450. }
  23451. // Status code returns the HTTP status code for the request's response error.
  23452. func (s *PolicyNotAttachedException) StatusCode() int {
  23453. return s.RespMetadata.StatusCode
  23454. }
  23455. // RequestID returns the service's response RequestID for request.
  23456. func (s *PolicyNotAttachedException) RequestID() string {
  23457. return s.RespMetadata.RequestID
  23458. }
  23459. // We can't find a policy with the PolicyId that you specified.
  23460. type PolicyNotFoundException struct {
  23461. _ struct{} `type:"structure"`
  23462. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  23463. Message_ *string `locationName:"Message" type:"string"`
  23464. }
  23465. // String returns the string representation.
  23466. //
  23467. // API parameter values that are decorated as "sensitive" in the API will not
  23468. // be included in the string output. The member name will be present, but the
  23469. // value will be replaced with "sensitive".
  23470. func (s PolicyNotFoundException) String() string {
  23471. return awsutil.Prettify(s)
  23472. }
  23473. // GoString returns the string representation.
  23474. //
  23475. // API parameter values that are decorated as "sensitive" in the API will not
  23476. // be included in the string output. The member name will be present, but the
  23477. // value will be replaced with "sensitive".
  23478. func (s PolicyNotFoundException) GoString() string {
  23479. return s.String()
  23480. }
  23481. func newErrorPolicyNotFoundException(v protocol.ResponseMetadata) error {
  23482. return &PolicyNotFoundException{
  23483. RespMetadata: v,
  23484. }
  23485. }
  23486. // Code returns the exception type name.
  23487. func (s *PolicyNotFoundException) Code() string {
  23488. return "PolicyNotFoundException"
  23489. }
  23490. // Message returns the exception's message.
  23491. func (s *PolicyNotFoundException) Message() string {
  23492. if s.Message_ != nil {
  23493. return *s.Message_
  23494. }
  23495. return ""
  23496. }
  23497. // OrigErr always returns nil, satisfies awserr.Error interface.
  23498. func (s *PolicyNotFoundException) OrigErr() error {
  23499. return nil
  23500. }
  23501. func (s *PolicyNotFoundException) Error() string {
  23502. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  23503. }
  23504. // Status code returns the HTTP status code for the request's response error.
  23505. func (s *PolicyNotFoundException) StatusCode() int {
  23506. return s.RespMetadata.StatusCode
  23507. }
  23508. // RequestID returns the service's response RequestID for request.
  23509. func (s *PolicyNotFoundException) RequestID() string {
  23510. return s.RespMetadata.RequestID
  23511. }
  23512. // Contains information about a policy, but does not include the content. To
  23513. // see the content of a policy, see DescribePolicy.
  23514. type PolicySummary struct {
  23515. _ struct{} `type:"structure"`
  23516. // The Amazon Resource Name (ARN) of the policy.
  23517. //
  23518. // For more information about ARNs in Organizations, see ARN Formats Supported
  23519. // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
  23520. // in the Amazon Web Services Service Authorization Reference.
  23521. Arn *string `type:"string"`
  23522. // A boolean value that indicates whether the specified policy is an Amazon
  23523. // Web Services managed policy. If true, then you can attach the policy to roots,
  23524. // OUs, or accounts, but you cannot edit it.
  23525. AwsManaged *bool `type:"boolean"`
  23526. // The description of the policy.
  23527. Description *string `type:"string"`
  23528. // The unique identifier (ID) of the policy.
  23529. //
  23530. // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string
  23531. // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits,
  23532. // or the underscore character (_).
  23533. Id *string `type:"string"`
  23534. // The friendly name of the policy.
  23535. //
  23536. // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
  23537. // this parameter is a string of any of the characters in the ASCII character
  23538. // range.
  23539. Name *string `min:"1" type:"string"`
  23540. // The type of policy.
  23541. Type *string `type:"string" enum:"PolicyType"`
  23542. }
  23543. // String returns the string representation.
  23544. //
  23545. // API parameter values that are decorated as "sensitive" in the API will not
  23546. // be included in the string output. The member name will be present, but the
  23547. // value will be replaced with "sensitive".
  23548. func (s PolicySummary) String() string {
  23549. return awsutil.Prettify(s)
  23550. }
  23551. // GoString returns the string representation.
  23552. //
  23553. // API parameter values that are decorated as "sensitive" in the API will not
  23554. // be included in the string output. The member name will be present, but the
  23555. // value will be replaced with "sensitive".
  23556. func (s PolicySummary) GoString() string {
  23557. return s.String()
  23558. }
  23559. // SetArn sets the Arn field's value.
  23560. func (s *PolicySummary) SetArn(v string) *PolicySummary {
  23561. s.Arn = &v
  23562. return s
  23563. }
  23564. // SetAwsManaged sets the AwsManaged field's value.
  23565. func (s *PolicySummary) SetAwsManaged(v bool) *PolicySummary {
  23566. s.AwsManaged = &v
  23567. return s
  23568. }
  23569. // SetDescription sets the Description field's value.
  23570. func (s *PolicySummary) SetDescription(v string) *PolicySummary {
  23571. s.Description = &v
  23572. return s
  23573. }
  23574. // SetId sets the Id field's value.
  23575. func (s *PolicySummary) SetId(v string) *PolicySummary {
  23576. s.Id = &v
  23577. return s
  23578. }
  23579. // SetName sets the Name field's value.
  23580. func (s *PolicySummary) SetName(v string) *PolicySummary {
  23581. s.Name = &v
  23582. return s
  23583. }
  23584. // SetType sets the Type field's value.
  23585. func (s *PolicySummary) SetType(v string) *PolicySummary {
  23586. s.Type = &v
  23587. return s
  23588. }
  23589. // Contains information about a root, OU, or account that a policy is attached
  23590. // to.
  23591. type PolicyTargetSummary struct {
  23592. _ struct{} `type:"structure"`
  23593. // The Amazon Resource Name (ARN) of the policy target.
  23594. //
  23595. // For more information about ARNs in Organizations, see ARN Formats Supported
  23596. // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
  23597. // in the Amazon Web Services Service Authorization Reference.
  23598. Arn *string `type:"string"`
  23599. // The friendly name of the policy target.
  23600. //
  23601. // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
  23602. // this parameter is a string of any of the characters in the ASCII character
  23603. // range.
  23604. Name *string `min:"1" type:"string"`
  23605. // The unique identifier (ID) of the policy target.
  23606. //
  23607. // The regex pattern (http://wikipedia.org/wiki/regex) for a target ID string
  23608. // requires one of the following:
  23609. //
  23610. // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
  23611. // letters or digits.
  23612. //
  23613. // * Account - A string that consists of exactly 12 digits.
  23614. //
  23615. // * Organizational unit (OU) - A string that begins with "ou-" followed
  23616. // by from 4 to 32 lowercase letters or digits (the ID of the root that the
  23617. // OU is in). This string is followed by a second "-" dash and from 8 to
  23618. // 32 additional lowercase letters or digits.
  23619. TargetId *string `type:"string"`
  23620. // The type of the policy target.
  23621. Type *string `type:"string" enum:"TargetType"`
  23622. }
  23623. // String returns the string representation.
  23624. //
  23625. // API parameter values that are decorated as "sensitive" in the API will not
  23626. // be included in the string output. The member name will be present, but the
  23627. // value will be replaced with "sensitive".
  23628. func (s PolicyTargetSummary) String() string {
  23629. return awsutil.Prettify(s)
  23630. }
  23631. // GoString returns the string representation.
  23632. //
  23633. // API parameter values that are decorated as "sensitive" in the API will not
  23634. // be included in the string output. The member name will be present, but the
  23635. // value will be replaced with "sensitive".
  23636. func (s PolicyTargetSummary) GoString() string {
  23637. return s.String()
  23638. }
  23639. // SetArn sets the Arn field's value.
  23640. func (s *PolicyTargetSummary) SetArn(v string) *PolicyTargetSummary {
  23641. s.Arn = &v
  23642. return s
  23643. }
  23644. // SetName sets the Name field's value.
  23645. func (s *PolicyTargetSummary) SetName(v string) *PolicyTargetSummary {
  23646. s.Name = &v
  23647. return s
  23648. }
  23649. // SetTargetId sets the TargetId field's value.
  23650. func (s *PolicyTargetSummary) SetTargetId(v string) *PolicyTargetSummary {
  23651. s.TargetId = &v
  23652. return s
  23653. }
  23654. // SetType sets the Type field's value.
  23655. func (s *PolicyTargetSummary) SetType(v string) *PolicyTargetSummary {
  23656. s.Type = &v
  23657. return s
  23658. }
  23659. // The specified policy type is already enabled in the specified root.
  23660. type PolicyTypeAlreadyEnabledException struct {
  23661. _ struct{} `type:"structure"`
  23662. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  23663. Message_ *string `locationName:"Message" type:"string"`
  23664. }
  23665. // String returns the string representation.
  23666. //
  23667. // API parameter values that are decorated as "sensitive" in the API will not
  23668. // be included in the string output. The member name will be present, but the
  23669. // value will be replaced with "sensitive".
  23670. func (s PolicyTypeAlreadyEnabledException) String() string {
  23671. return awsutil.Prettify(s)
  23672. }
  23673. // GoString returns the string representation.
  23674. //
  23675. // API parameter values that are decorated as "sensitive" in the API will not
  23676. // be included in the string output. The member name will be present, but the
  23677. // value will be replaced with "sensitive".
  23678. func (s PolicyTypeAlreadyEnabledException) GoString() string {
  23679. return s.String()
  23680. }
  23681. func newErrorPolicyTypeAlreadyEnabledException(v protocol.ResponseMetadata) error {
  23682. return &PolicyTypeAlreadyEnabledException{
  23683. RespMetadata: v,
  23684. }
  23685. }
  23686. // Code returns the exception type name.
  23687. func (s *PolicyTypeAlreadyEnabledException) Code() string {
  23688. return "PolicyTypeAlreadyEnabledException"
  23689. }
  23690. // Message returns the exception's message.
  23691. func (s *PolicyTypeAlreadyEnabledException) Message() string {
  23692. if s.Message_ != nil {
  23693. return *s.Message_
  23694. }
  23695. return ""
  23696. }
  23697. // OrigErr always returns nil, satisfies awserr.Error interface.
  23698. func (s *PolicyTypeAlreadyEnabledException) OrigErr() error {
  23699. return nil
  23700. }
  23701. func (s *PolicyTypeAlreadyEnabledException) Error() string {
  23702. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  23703. }
  23704. // Status code returns the HTTP status code for the request's response error.
  23705. func (s *PolicyTypeAlreadyEnabledException) StatusCode() int {
  23706. return s.RespMetadata.StatusCode
  23707. }
  23708. // RequestID returns the service's response RequestID for request.
  23709. func (s *PolicyTypeAlreadyEnabledException) RequestID() string {
  23710. return s.RespMetadata.RequestID
  23711. }
  23712. // You can't use the specified policy type with the feature set currently enabled
  23713. // for this organization. For example, you can enable SCPs only after you enable
  23714. // all features in the organization. For more information, see Managing Organizations
  23715. // Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root)in
  23716. // the Organizations User Guide.
  23717. type PolicyTypeNotAvailableForOrganizationException struct {
  23718. _ struct{} `type:"structure"`
  23719. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  23720. Message_ *string `locationName:"Message" type:"string"`
  23721. }
  23722. // String returns the string representation.
  23723. //
  23724. // API parameter values that are decorated as "sensitive" in the API will not
  23725. // be included in the string output. The member name will be present, but the
  23726. // value will be replaced with "sensitive".
  23727. func (s PolicyTypeNotAvailableForOrganizationException) String() string {
  23728. return awsutil.Prettify(s)
  23729. }
  23730. // GoString returns the string representation.
  23731. //
  23732. // API parameter values that are decorated as "sensitive" in the API will not
  23733. // be included in the string output. The member name will be present, but the
  23734. // value will be replaced with "sensitive".
  23735. func (s PolicyTypeNotAvailableForOrganizationException) GoString() string {
  23736. return s.String()
  23737. }
  23738. func newErrorPolicyTypeNotAvailableForOrganizationException(v protocol.ResponseMetadata) error {
  23739. return &PolicyTypeNotAvailableForOrganizationException{
  23740. RespMetadata: v,
  23741. }
  23742. }
  23743. // Code returns the exception type name.
  23744. func (s *PolicyTypeNotAvailableForOrganizationException) Code() string {
  23745. return "PolicyTypeNotAvailableForOrganizationException"
  23746. }
  23747. // Message returns the exception's message.
  23748. func (s *PolicyTypeNotAvailableForOrganizationException) Message() string {
  23749. if s.Message_ != nil {
  23750. return *s.Message_
  23751. }
  23752. return ""
  23753. }
  23754. // OrigErr always returns nil, satisfies awserr.Error interface.
  23755. func (s *PolicyTypeNotAvailableForOrganizationException) OrigErr() error {
  23756. return nil
  23757. }
  23758. func (s *PolicyTypeNotAvailableForOrganizationException) Error() string {
  23759. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  23760. }
  23761. // Status code returns the HTTP status code for the request's response error.
  23762. func (s *PolicyTypeNotAvailableForOrganizationException) StatusCode() int {
  23763. return s.RespMetadata.StatusCode
  23764. }
  23765. // RequestID returns the service's response RequestID for request.
  23766. func (s *PolicyTypeNotAvailableForOrganizationException) RequestID() string {
  23767. return s.RespMetadata.RequestID
  23768. }
  23769. // The specified policy type isn't currently enabled in this root. You can't
  23770. // attach policies of the specified type to entities in a root until you enable
  23771. // that type in the root. For more information, see Enabling All Features in
  23772. // Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
  23773. // in the Organizations User Guide.
  23774. type PolicyTypeNotEnabledException struct {
  23775. _ struct{} `type:"structure"`
  23776. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  23777. Message_ *string `locationName:"Message" type:"string"`
  23778. }
  23779. // String returns the string representation.
  23780. //
  23781. // API parameter values that are decorated as "sensitive" in the API will not
  23782. // be included in the string output. The member name will be present, but the
  23783. // value will be replaced with "sensitive".
  23784. func (s PolicyTypeNotEnabledException) String() string {
  23785. return awsutil.Prettify(s)
  23786. }
  23787. // GoString returns the string representation.
  23788. //
  23789. // API parameter values that are decorated as "sensitive" in the API will not
  23790. // be included in the string output. The member name will be present, but the
  23791. // value will be replaced with "sensitive".
  23792. func (s PolicyTypeNotEnabledException) GoString() string {
  23793. return s.String()
  23794. }
  23795. func newErrorPolicyTypeNotEnabledException(v protocol.ResponseMetadata) error {
  23796. return &PolicyTypeNotEnabledException{
  23797. RespMetadata: v,
  23798. }
  23799. }
  23800. // Code returns the exception type name.
  23801. func (s *PolicyTypeNotEnabledException) Code() string {
  23802. return "PolicyTypeNotEnabledException"
  23803. }
  23804. // Message returns the exception's message.
  23805. func (s *PolicyTypeNotEnabledException) Message() string {
  23806. if s.Message_ != nil {
  23807. return *s.Message_
  23808. }
  23809. return ""
  23810. }
  23811. // OrigErr always returns nil, satisfies awserr.Error interface.
  23812. func (s *PolicyTypeNotEnabledException) OrigErr() error {
  23813. return nil
  23814. }
  23815. func (s *PolicyTypeNotEnabledException) Error() string {
  23816. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  23817. }
  23818. // Status code returns the HTTP status code for the request's response error.
  23819. func (s *PolicyTypeNotEnabledException) StatusCode() int {
  23820. return s.RespMetadata.StatusCode
  23821. }
  23822. // RequestID returns the service's response RequestID for request.
  23823. func (s *PolicyTypeNotEnabledException) RequestID() string {
  23824. return s.RespMetadata.RequestID
  23825. }
  23826. // Contains information about a policy type and its status in the associated
  23827. // root.
  23828. type PolicyTypeSummary struct {
  23829. _ struct{} `type:"structure"`
  23830. // The status of the policy type as it relates to the associated root. To attach
  23831. // a policy of the specified type to a root or to an OU or account in that root,
  23832. // it must be available in the organization and enabled for that root.
  23833. Status *string `type:"string" enum:"PolicyTypeStatus"`
  23834. // The name of the policy type.
  23835. Type *string `type:"string" enum:"PolicyType"`
  23836. }
  23837. // String returns the string representation.
  23838. //
  23839. // API parameter values that are decorated as "sensitive" in the API will not
  23840. // be included in the string output. The member name will be present, but the
  23841. // value will be replaced with "sensitive".
  23842. func (s PolicyTypeSummary) String() string {
  23843. return awsutil.Prettify(s)
  23844. }
  23845. // GoString returns the string representation.
  23846. //
  23847. // API parameter values that are decorated as "sensitive" in the API will not
  23848. // be included in the string output. The member name will be present, but the
  23849. // value will be replaced with "sensitive".
  23850. func (s PolicyTypeSummary) GoString() string {
  23851. return s.String()
  23852. }
  23853. // SetStatus sets the Status field's value.
  23854. func (s *PolicyTypeSummary) SetStatus(v string) *PolicyTypeSummary {
  23855. s.Status = &v
  23856. return s
  23857. }
  23858. // SetType sets the Type field's value.
  23859. func (s *PolicyTypeSummary) SetType(v string) *PolicyTypeSummary {
  23860. s.Type = &v
  23861. return s
  23862. }
  23863. type PutResourcePolicyInput struct {
  23864. _ struct{} `type:"structure"`
  23865. // If provided, the new content for the resource policy. The text must be correctly
  23866. // formatted JSON that complies with the syntax for the resource policy's type.
  23867. // For more information, see Service Control Policy Syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html)
  23868. // in the Organizations User Guide.
  23869. //
  23870. // Content is a required field
  23871. Content *string `min:"1" type:"string" required:"true"`
  23872. // Updates the list of tags that you want to attach to the newly-created resource
  23873. // policy. For each tag in the list, you must specify both a tag key and a value.
  23874. // You can set the value to an empty string, but you can't set it to null. For
  23875. // more information about tagging, see Tagging Organizations resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html)
  23876. // in the Organizations User Guide.
  23877. //
  23878. // Calls with tags apply to the initial creation of the resource policy, otherwise
  23879. // an exception is thrown. If any one of the tags is invalid or if you exceed
  23880. // the allowed number of tags for the resource policy, then the entire request
  23881. // fails and the resource policy is not created.
  23882. Tags []*Tag `type:"list"`
  23883. }
  23884. // String returns the string representation.
  23885. //
  23886. // API parameter values that are decorated as "sensitive" in the API will not
  23887. // be included in the string output. The member name will be present, but the
  23888. // value will be replaced with "sensitive".
  23889. func (s PutResourcePolicyInput) String() string {
  23890. return awsutil.Prettify(s)
  23891. }
  23892. // GoString returns the string representation.
  23893. //
  23894. // API parameter values that are decorated as "sensitive" in the API will not
  23895. // be included in the string output. The member name will be present, but the
  23896. // value will be replaced with "sensitive".
  23897. func (s PutResourcePolicyInput) GoString() string {
  23898. return s.String()
  23899. }
  23900. // Validate inspects the fields of the type to determine if they are valid.
  23901. func (s *PutResourcePolicyInput) Validate() error {
  23902. invalidParams := request.ErrInvalidParams{Context: "PutResourcePolicyInput"}
  23903. if s.Content == nil {
  23904. invalidParams.Add(request.NewErrParamRequired("Content"))
  23905. }
  23906. if s.Content != nil && len(*s.Content) < 1 {
  23907. invalidParams.Add(request.NewErrParamMinLen("Content", 1))
  23908. }
  23909. if s.Tags != nil {
  23910. for i, v := range s.Tags {
  23911. if v == nil {
  23912. continue
  23913. }
  23914. if err := v.Validate(); err != nil {
  23915. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  23916. }
  23917. }
  23918. }
  23919. if invalidParams.Len() > 0 {
  23920. return invalidParams
  23921. }
  23922. return nil
  23923. }
  23924. // SetContent sets the Content field's value.
  23925. func (s *PutResourcePolicyInput) SetContent(v string) *PutResourcePolicyInput {
  23926. s.Content = &v
  23927. return s
  23928. }
  23929. // SetTags sets the Tags field's value.
  23930. func (s *PutResourcePolicyInput) SetTags(v []*Tag) *PutResourcePolicyInput {
  23931. s.Tags = v
  23932. return s
  23933. }
  23934. type PutResourcePolicyOutput struct {
  23935. _ struct{} `type:"structure"`
  23936. // A structure that contains details about the resource policy.
  23937. ResourcePolicy *ResourcePolicy `type:"structure"`
  23938. }
  23939. // String returns the string representation.
  23940. //
  23941. // API parameter values that are decorated as "sensitive" in the API will not
  23942. // be included in the string output. The member name will be present, but the
  23943. // value will be replaced with "sensitive".
  23944. func (s PutResourcePolicyOutput) String() string {
  23945. return awsutil.Prettify(s)
  23946. }
  23947. // GoString returns the string representation.
  23948. //
  23949. // API parameter values that are decorated as "sensitive" in the API will not
  23950. // be included in the string output. The member name will be present, but the
  23951. // value will be replaced with "sensitive".
  23952. func (s PutResourcePolicyOutput) GoString() string {
  23953. return s.String()
  23954. }
  23955. // SetResourcePolicy sets the ResourcePolicy field's value.
  23956. func (s *PutResourcePolicyOutput) SetResourcePolicy(v *ResourcePolicy) *PutResourcePolicyOutput {
  23957. s.ResourcePolicy = v
  23958. return s
  23959. }
  23960. type RegisterDelegatedAdministratorInput struct {
  23961. _ struct{} `type:"structure"`
  23962. // The account ID number of the member account in the organization to register
  23963. // as a delegated administrator.
  23964. //
  23965. // AccountId is a required field
  23966. AccountId *string `type:"string" required:"true"`
  23967. // The service principal of the Amazon Web Services service for which you want
  23968. // to make the member account a delegated administrator.
  23969. //
  23970. // ServicePrincipal is a required field
  23971. ServicePrincipal *string `min:"1" type:"string" required:"true"`
  23972. }
  23973. // String returns the string representation.
  23974. //
  23975. // API parameter values that are decorated as "sensitive" in the API will not
  23976. // be included in the string output. The member name will be present, but the
  23977. // value will be replaced with "sensitive".
  23978. func (s RegisterDelegatedAdministratorInput) String() string {
  23979. return awsutil.Prettify(s)
  23980. }
  23981. // GoString returns the string representation.
  23982. //
  23983. // API parameter values that are decorated as "sensitive" in the API will not
  23984. // be included in the string output. The member name will be present, but the
  23985. // value will be replaced with "sensitive".
  23986. func (s RegisterDelegatedAdministratorInput) GoString() string {
  23987. return s.String()
  23988. }
  23989. // Validate inspects the fields of the type to determine if they are valid.
  23990. func (s *RegisterDelegatedAdministratorInput) Validate() error {
  23991. invalidParams := request.ErrInvalidParams{Context: "RegisterDelegatedAdministratorInput"}
  23992. if s.AccountId == nil {
  23993. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  23994. }
  23995. if s.ServicePrincipal == nil {
  23996. invalidParams.Add(request.NewErrParamRequired("ServicePrincipal"))
  23997. }
  23998. if s.ServicePrincipal != nil && len(*s.ServicePrincipal) < 1 {
  23999. invalidParams.Add(request.NewErrParamMinLen("ServicePrincipal", 1))
  24000. }
  24001. if invalidParams.Len() > 0 {
  24002. return invalidParams
  24003. }
  24004. return nil
  24005. }
  24006. // SetAccountId sets the AccountId field's value.
  24007. func (s *RegisterDelegatedAdministratorInput) SetAccountId(v string) *RegisterDelegatedAdministratorInput {
  24008. s.AccountId = &v
  24009. return s
  24010. }
  24011. // SetServicePrincipal sets the ServicePrincipal field's value.
  24012. func (s *RegisterDelegatedAdministratorInput) SetServicePrincipal(v string) *RegisterDelegatedAdministratorInput {
  24013. s.ServicePrincipal = &v
  24014. return s
  24015. }
  24016. type RegisterDelegatedAdministratorOutput struct {
  24017. _ struct{} `type:"structure"`
  24018. }
  24019. // String returns the string representation.
  24020. //
  24021. // API parameter values that are decorated as "sensitive" in the API will not
  24022. // be included in the string output. The member name will be present, but the
  24023. // value will be replaced with "sensitive".
  24024. func (s RegisterDelegatedAdministratorOutput) String() string {
  24025. return awsutil.Prettify(s)
  24026. }
  24027. // GoString returns the string representation.
  24028. //
  24029. // API parameter values that are decorated as "sensitive" in the API will not
  24030. // be included in the string output. The member name will be present, but the
  24031. // value will be replaced with "sensitive".
  24032. func (s RegisterDelegatedAdministratorOutput) GoString() string {
  24033. return s.String()
  24034. }
  24035. type RemoveAccountFromOrganizationInput struct {
  24036. _ struct{} `type:"structure"`
  24037. // The unique identifier (ID) of the member account that you want to remove
  24038. // from the organization.
  24039. //
  24040. // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string
  24041. // requires exactly 12 digits.
  24042. //
  24043. // AccountId is a required field
  24044. AccountId *string `type:"string" required:"true"`
  24045. }
  24046. // String returns the string representation.
  24047. //
  24048. // API parameter values that are decorated as "sensitive" in the API will not
  24049. // be included in the string output. The member name will be present, but the
  24050. // value will be replaced with "sensitive".
  24051. func (s RemoveAccountFromOrganizationInput) String() string {
  24052. return awsutil.Prettify(s)
  24053. }
  24054. // GoString returns the string representation.
  24055. //
  24056. // API parameter values that are decorated as "sensitive" in the API will not
  24057. // be included in the string output. The member name will be present, but the
  24058. // value will be replaced with "sensitive".
  24059. func (s RemoveAccountFromOrganizationInput) GoString() string {
  24060. return s.String()
  24061. }
  24062. // Validate inspects the fields of the type to determine if they are valid.
  24063. func (s *RemoveAccountFromOrganizationInput) Validate() error {
  24064. invalidParams := request.ErrInvalidParams{Context: "RemoveAccountFromOrganizationInput"}
  24065. if s.AccountId == nil {
  24066. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  24067. }
  24068. if invalidParams.Len() > 0 {
  24069. return invalidParams
  24070. }
  24071. return nil
  24072. }
  24073. // SetAccountId sets the AccountId field's value.
  24074. func (s *RemoveAccountFromOrganizationInput) SetAccountId(v string) *RemoveAccountFromOrganizationInput {
  24075. s.AccountId = &v
  24076. return s
  24077. }
  24078. type RemoveAccountFromOrganizationOutput struct {
  24079. _ struct{} `type:"structure"`
  24080. }
  24081. // String returns the string representation.
  24082. //
  24083. // API parameter values that are decorated as "sensitive" in the API will not
  24084. // be included in the string output. The member name will be present, but the
  24085. // value will be replaced with "sensitive".
  24086. func (s RemoveAccountFromOrganizationOutput) String() string {
  24087. return awsutil.Prettify(s)
  24088. }
  24089. // GoString returns the string representation.
  24090. //
  24091. // API parameter values that are decorated as "sensitive" in the API will not
  24092. // be included in the string output. The member name will be present, but the
  24093. // value will be replaced with "sensitive".
  24094. func (s RemoveAccountFromOrganizationOutput) GoString() string {
  24095. return s.String()
  24096. }
  24097. // A structure that contains details about a resource policy.
  24098. type ResourcePolicy struct {
  24099. _ struct{} `type:"structure"`
  24100. // The policy text of the resource policy.
  24101. Content *string `min:"1" type:"string"`
  24102. // A structure that contains resource policy ID and Amazon Resource Name (ARN).
  24103. ResourcePolicySummary *ResourcePolicySummary `type:"structure"`
  24104. }
  24105. // String returns the string representation.
  24106. //
  24107. // API parameter values that are decorated as "sensitive" in the API will not
  24108. // be included in the string output. The member name will be present, but the
  24109. // value will be replaced with "sensitive".
  24110. func (s ResourcePolicy) String() string {
  24111. return awsutil.Prettify(s)
  24112. }
  24113. // GoString returns the string representation.
  24114. //
  24115. // API parameter values that are decorated as "sensitive" in the API will not
  24116. // be included in the string output. The member name will be present, but the
  24117. // value will be replaced with "sensitive".
  24118. func (s ResourcePolicy) GoString() string {
  24119. return s.String()
  24120. }
  24121. // SetContent sets the Content field's value.
  24122. func (s *ResourcePolicy) SetContent(v string) *ResourcePolicy {
  24123. s.Content = &v
  24124. return s
  24125. }
  24126. // SetResourcePolicySummary sets the ResourcePolicySummary field's value.
  24127. func (s *ResourcePolicy) SetResourcePolicySummary(v *ResourcePolicySummary) *ResourcePolicy {
  24128. s.ResourcePolicySummary = v
  24129. return s
  24130. }
  24131. // We can't find a resource policy request with the parameter that you specified.
  24132. type ResourcePolicyNotFoundException struct {
  24133. _ struct{} `type:"structure"`
  24134. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  24135. Message_ *string `locationName:"Message" type:"string"`
  24136. }
  24137. // String returns the string representation.
  24138. //
  24139. // API parameter values that are decorated as "sensitive" in the API will not
  24140. // be included in the string output. The member name will be present, but the
  24141. // value will be replaced with "sensitive".
  24142. func (s ResourcePolicyNotFoundException) String() string {
  24143. return awsutil.Prettify(s)
  24144. }
  24145. // GoString returns the string representation.
  24146. //
  24147. // API parameter values that are decorated as "sensitive" in the API will not
  24148. // be included in the string output. The member name will be present, but the
  24149. // value will be replaced with "sensitive".
  24150. func (s ResourcePolicyNotFoundException) GoString() string {
  24151. return s.String()
  24152. }
  24153. func newErrorResourcePolicyNotFoundException(v protocol.ResponseMetadata) error {
  24154. return &ResourcePolicyNotFoundException{
  24155. RespMetadata: v,
  24156. }
  24157. }
  24158. // Code returns the exception type name.
  24159. func (s *ResourcePolicyNotFoundException) Code() string {
  24160. return "ResourcePolicyNotFoundException"
  24161. }
  24162. // Message returns the exception's message.
  24163. func (s *ResourcePolicyNotFoundException) Message() string {
  24164. if s.Message_ != nil {
  24165. return *s.Message_
  24166. }
  24167. return ""
  24168. }
  24169. // OrigErr always returns nil, satisfies awserr.Error interface.
  24170. func (s *ResourcePolicyNotFoundException) OrigErr() error {
  24171. return nil
  24172. }
  24173. func (s *ResourcePolicyNotFoundException) Error() string {
  24174. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  24175. }
  24176. // Status code returns the HTTP status code for the request's response error.
  24177. func (s *ResourcePolicyNotFoundException) StatusCode() int {
  24178. return s.RespMetadata.StatusCode
  24179. }
  24180. // RequestID returns the service's response RequestID for request.
  24181. func (s *ResourcePolicyNotFoundException) RequestID() string {
  24182. return s.RespMetadata.RequestID
  24183. }
  24184. // A structure that contains resource policy ID and Amazon Resource Name (ARN).
  24185. type ResourcePolicySummary struct {
  24186. _ struct{} `type:"structure"`
  24187. // The Amazon Resource Name (ARN) of the resource policy.
  24188. Arn *string `type:"string"`
  24189. // The unique identifier (ID) of the resource policy.
  24190. Id *string `type:"string"`
  24191. }
  24192. // String returns the string representation.
  24193. //
  24194. // API parameter values that are decorated as "sensitive" in the API will not
  24195. // be included in the string output. The member name will be present, but the
  24196. // value will be replaced with "sensitive".
  24197. func (s ResourcePolicySummary) String() string {
  24198. return awsutil.Prettify(s)
  24199. }
  24200. // GoString returns the string representation.
  24201. //
  24202. // API parameter values that are decorated as "sensitive" in the API will not
  24203. // be included in the string output. The member name will be present, but the
  24204. // value will be replaced with "sensitive".
  24205. func (s ResourcePolicySummary) GoString() string {
  24206. return s.String()
  24207. }
  24208. // SetArn sets the Arn field's value.
  24209. func (s *ResourcePolicySummary) SetArn(v string) *ResourcePolicySummary {
  24210. s.Arn = &v
  24211. return s
  24212. }
  24213. // SetId sets the Id field's value.
  24214. func (s *ResourcePolicySummary) SetId(v string) *ResourcePolicySummary {
  24215. s.Id = &v
  24216. return s
  24217. }
  24218. // Contains details about a root. A root is a top-level parent node in the hierarchy
  24219. // of an organization that can contain organizational units (OUs) and accounts.
  24220. // The root contains every Amazon Web Services account in the organization.
  24221. type Root struct {
  24222. _ struct{} `type:"structure"`
  24223. // The Amazon Resource Name (ARN) of the root.
  24224. //
  24225. // For more information about ARNs in Organizations, see ARN Formats Supported
  24226. // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
  24227. // in the Amazon Web Services Service Authorization Reference.
  24228. Arn *string `type:"string"`
  24229. // The unique identifier (ID) for the root.
  24230. //
  24231. // The regex pattern (http://wikipedia.org/wiki/regex) for a root ID string
  24232. // requires "r-" followed by from 4 to 32 lowercase letters or digits.
  24233. Id *string `type:"string"`
  24234. // The friendly name of the root.
  24235. //
  24236. // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
  24237. // this parameter is a string of any of the characters in the ASCII character
  24238. // range.
  24239. Name *string `min:"1" type:"string"`
  24240. // The types of policies that are currently enabled for the root and therefore
  24241. // can be attached to the root or to its OUs or accounts.
  24242. //
  24243. // Even if a policy type is shown as available in the organization, you can
  24244. // separately enable and disable them at the root level by using EnablePolicyType
  24245. // and DisablePolicyType. Use DescribeOrganization to see the availability of
  24246. // the policy types in that organization.
  24247. PolicyTypes []*PolicyTypeSummary `type:"list"`
  24248. }
  24249. // String returns the string representation.
  24250. //
  24251. // API parameter values that are decorated as "sensitive" in the API will not
  24252. // be included in the string output. The member name will be present, but the
  24253. // value will be replaced with "sensitive".
  24254. func (s Root) String() string {
  24255. return awsutil.Prettify(s)
  24256. }
  24257. // GoString returns the string representation.
  24258. //
  24259. // API parameter values that are decorated as "sensitive" in the API will not
  24260. // be included in the string output. The member name will be present, but the
  24261. // value will be replaced with "sensitive".
  24262. func (s Root) GoString() string {
  24263. return s.String()
  24264. }
  24265. // SetArn sets the Arn field's value.
  24266. func (s *Root) SetArn(v string) *Root {
  24267. s.Arn = &v
  24268. return s
  24269. }
  24270. // SetId sets the Id field's value.
  24271. func (s *Root) SetId(v string) *Root {
  24272. s.Id = &v
  24273. return s
  24274. }
  24275. // SetName sets the Name field's value.
  24276. func (s *Root) SetName(v string) *Root {
  24277. s.Name = &v
  24278. return s
  24279. }
  24280. // SetPolicyTypes sets the PolicyTypes field's value.
  24281. func (s *Root) SetPolicyTypes(v []*PolicyTypeSummary) *Root {
  24282. s.PolicyTypes = v
  24283. return s
  24284. }
  24285. // We can't find a root with the RootId that you specified.
  24286. type RootNotFoundException struct {
  24287. _ struct{} `type:"structure"`
  24288. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  24289. Message_ *string `locationName:"Message" type:"string"`
  24290. }
  24291. // String returns the string representation.
  24292. //
  24293. // API parameter values that are decorated as "sensitive" in the API will not
  24294. // be included in the string output. The member name will be present, but the
  24295. // value will be replaced with "sensitive".
  24296. func (s RootNotFoundException) String() string {
  24297. return awsutil.Prettify(s)
  24298. }
  24299. // GoString returns the string representation.
  24300. //
  24301. // API parameter values that are decorated as "sensitive" in the API will not
  24302. // be included in the string output. The member name will be present, but the
  24303. // value will be replaced with "sensitive".
  24304. func (s RootNotFoundException) GoString() string {
  24305. return s.String()
  24306. }
  24307. func newErrorRootNotFoundException(v protocol.ResponseMetadata) error {
  24308. return &RootNotFoundException{
  24309. RespMetadata: v,
  24310. }
  24311. }
  24312. // Code returns the exception type name.
  24313. func (s *RootNotFoundException) Code() string {
  24314. return "RootNotFoundException"
  24315. }
  24316. // Message returns the exception's message.
  24317. func (s *RootNotFoundException) Message() string {
  24318. if s.Message_ != nil {
  24319. return *s.Message_
  24320. }
  24321. return ""
  24322. }
  24323. // OrigErr always returns nil, satisfies awserr.Error interface.
  24324. func (s *RootNotFoundException) OrigErr() error {
  24325. return nil
  24326. }
  24327. func (s *RootNotFoundException) Error() string {
  24328. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  24329. }
  24330. // Status code returns the HTTP status code for the request's response error.
  24331. func (s *RootNotFoundException) StatusCode() int {
  24332. return s.RespMetadata.StatusCode
  24333. }
  24334. // RequestID returns the service's response RequestID for request.
  24335. func (s *RootNotFoundException) RequestID() string {
  24336. return s.RespMetadata.RequestID
  24337. }
  24338. // Organizations can't complete your request because of an internal service
  24339. // error. Try again later.
  24340. type ServiceException struct {
  24341. _ struct{} `type:"structure"`
  24342. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  24343. Message_ *string `locationName:"Message" type:"string"`
  24344. }
  24345. // String returns the string representation.
  24346. //
  24347. // API parameter values that are decorated as "sensitive" in the API will not
  24348. // be included in the string output. The member name will be present, but the
  24349. // value will be replaced with "sensitive".
  24350. func (s ServiceException) String() string {
  24351. return awsutil.Prettify(s)
  24352. }
  24353. // GoString returns the string representation.
  24354. //
  24355. // API parameter values that are decorated as "sensitive" in the API will not
  24356. // be included in the string output. The member name will be present, but the
  24357. // value will be replaced with "sensitive".
  24358. func (s ServiceException) GoString() string {
  24359. return s.String()
  24360. }
  24361. func newErrorServiceException(v protocol.ResponseMetadata) error {
  24362. return &ServiceException{
  24363. RespMetadata: v,
  24364. }
  24365. }
  24366. // Code returns the exception type name.
  24367. func (s *ServiceException) Code() string {
  24368. return "ServiceException"
  24369. }
  24370. // Message returns the exception's message.
  24371. func (s *ServiceException) Message() string {
  24372. if s.Message_ != nil {
  24373. return *s.Message_
  24374. }
  24375. return ""
  24376. }
  24377. // OrigErr always returns nil, satisfies awserr.Error interface.
  24378. func (s *ServiceException) OrigErr() error {
  24379. return nil
  24380. }
  24381. func (s *ServiceException) Error() string {
  24382. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  24383. }
  24384. // Status code returns the HTTP status code for the request's response error.
  24385. func (s *ServiceException) StatusCode() int {
  24386. return s.RespMetadata.StatusCode
  24387. }
  24388. // RequestID returns the service's response RequestID for request.
  24389. func (s *ServiceException) RequestID() string {
  24390. return s.RespMetadata.RequestID
  24391. }
  24392. // We can't find a source root or OU with the ParentId that you specified.
  24393. type SourceParentNotFoundException struct {
  24394. _ struct{} `type:"structure"`
  24395. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  24396. Message_ *string `locationName:"Message" type:"string"`
  24397. }
  24398. // String returns the string representation.
  24399. //
  24400. // API parameter values that are decorated as "sensitive" in the API will not
  24401. // be included in the string output. The member name will be present, but the
  24402. // value will be replaced with "sensitive".
  24403. func (s SourceParentNotFoundException) String() string {
  24404. return awsutil.Prettify(s)
  24405. }
  24406. // GoString returns the string representation.
  24407. //
  24408. // API parameter values that are decorated as "sensitive" in the API will not
  24409. // be included in the string output. The member name will be present, but the
  24410. // value will be replaced with "sensitive".
  24411. func (s SourceParentNotFoundException) GoString() string {
  24412. return s.String()
  24413. }
  24414. func newErrorSourceParentNotFoundException(v protocol.ResponseMetadata) error {
  24415. return &SourceParentNotFoundException{
  24416. RespMetadata: v,
  24417. }
  24418. }
  24419. // Code returns the exception type name.
  24420. func (s *SourceParentNotFoundException) Code() string {
  24421. return "SourceParentNotFoundException"
  24422. }
  24423. // Message returns the exception's message.
  24424. func (s *SourceParentNotFoundException) Message() string {
  24425. if s.Message_ != nil {
  24426. return *s.Message_
  24427. }
  24428. return ""
  24429. }
  24430. // OrigErr always returns nil, satisfies awserr.Error interface.
  24431. func (s *SourceParentNotFoundException) OrigErr() error {
  24432. return nil
  24433. }
  24434. func (s *SourceParentNotFoundException) Error() string {
  24435. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  24436. }
  24437. // Status code returns the HTTP status code for the request's response error.
  24438. func (s *SourceParentNotFoundException) StatusCode() int {
  24439. return s.RespMetadata.StatusCode
  24440. }
  24441. // RequestID returns the service's response RequestID for request.
  24442. func (s *SourceParentNotFoundException) RequestID() string {
  24443. return s.RespMetadata.RequestID
  24444. }
  24445. // A custom key-value pair associated with a resource within your organization.
  24446. //
  24447. // You can attach tags to any of the following organization resources.
  24448. //
  24449. // - Amazon Web Services account
  24450. //
  24451. // - Organizational unit (OU)
  24452. //
  24453. // - Organization root
  24454. //
  24455. // - Policy
  24456. type Tag struct {
  24457. _ struct{} `type:"structure"`
  24458. // The key identifier, or name, of the tag.
  24459. //
  24460. // Key is a required field
  24461. Key *string `min:"1" type:"string" required:"true"`
  24462. // The string value that's associated with the key of the tag. You can set the
  24463. // value of a tag to an empty string, but you can't set the value of a tag to
  24464. // null.
  24465. //
  24466. // Value is a required field
  24467. Value *string `type:"string" required:"true"`
  24468. }
  24469. // String returns the string representation.
  24470. //
  24471. // API parameter values that are decorated as "sensitive" in the API will not
  24472. // be included in the string output. The member name will be present, but the
  24473. // value will be replaced with "sensitive".
  24474. func (s Tag) String() string {
  24475. return awsutil.Prettify(s)
  24476. }
  24477. // GoString returns the string representation.
  24478. //
  24479. // API parameter values that are decorated as "sensitive" in the API will not
  24480. // be included in the string output. The member name will be present, but the
  24481. // value will be replaced with "sensitive".
  24482. func (s Tag) GoString() string {
  24483. return s.String()
  24484. }
  24485. // Validate inspects the fields of the type to determine if they are valid.
  24486. func (s *Tag) Validate() error {
  24487. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  24488. if s.Key == nil {
  24489. invalidParams.Add(request.NewErrParamRequired("Key"))
  24490. }
  24491. if s.Key != nil && len(*s.Key) < 1 {
  24492. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  24493. }
  24494. if s.Value == nil {
  24495. invalidParams.Add(request.NewErrParamRequired("Value"))
  24496. }
  24497. if invalidParams.Len() > 0 {
  24498. return invalidParams
  24499. }
  24500. return nil
  24501. }
  24502. // SetKey sets the Key field's value.
  24503. func (s *Tag) SetKey(v string) *Tag {
  24504. s.Key = &v
  24505. return s
  24506. }
  24507. // SetValue sets the Value field's value.
  24508. func (s *Tag) SetValue(v string) *Tag {
  24509. s.Value = &v
  24510. return s
  24511. }
  24512. type TagResourceInput struct {
  24513. _ struct{} `type:"structure"`
  24514. // The ID of the resource to add a tag to.
  24515. //
  24516. // You can specify any of the following taggable resources.
  24517. //
  24518. // * Amazon Web Services account – specify the account ID number.
  24519. //
  24520. // * Organizational unit – specify the OU ID that begins with ou- and looks
  24521. // similar to: ou-1a2b-34uvwxyz
  24522. //
  24523. // * Root – specify the root ID that begins with r- and looks similar to:
  24524. // r-1a2b
  24525. //
  24526. // * Policy – specify the policy ID that begins with p- andlooks similar
  24527. // to: p-12abcdefg3
  24528. //
  24529. // ResourceId is a required field
  24530. ResourceId *string `type:"string" required:"true"`
  24531. // A list of tags to add to the specified resource.
  24532. //
  24533. // For each tag in the list, you must specify both a tag key and a value. The
  24534. // value can be an empty string, but you can't set it to null.
  24535. //
  24536. // If any one of the tags is invalid or if you exceed the maximum allowed number
  24537. // of tags for a resource, then the entire request fails.
  24538. //
  24539. // Tags is a required field
  24540. Tags []*Tag `type:"list" required:"true"`
  24541. }
  24542. // String returns the string representation.
  24543. //
  24544. // API parameter values that are decorated as "sensitive" in the API will not
  24545. // be included in the string output. The member name will be present, but the
  24546. // value will be replaced with "sensitive".
  24547. func (s TagResourceInput) String() string {
  24548. return awsutil.Prettify(s)
  24549. }
  24550. // GoString returns the string representation.
  24551. //
  24552. // API parameter values that are decorated as "sensitive" in the API will not
  24553. // be included in the string output. The member name will be present, but the
  24554. // value will be replaced with "sensitive".
  24555. func (s TagResourceInput) GoString() string {
  24556. return s.String()
  24557. }
  24558. // Validate inspects the fields of the type to determine if they are valid.
  24559. func (s *TagResourceInput) Validate() error {
  24560. invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  24561. if s.ResourceId == nil {
  24562. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  24563. }
  24564. if s.Tags == nil {
  24565. invalidParams.Add(request.NewErrParamRequired("Tags"))
  24566. }
  24567. if s.Tags != nil {
  24568. for i, v := range s.Tags {
  24569. if v == nil {
  24570. continue
  24571. }
  24572. if err := v.Validate(); err != nil {
  24573. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  24574. }
  24575. }
  24576. }
  24577. if invalidParams.Len() > 0 {
  24578. return invalidParams
  24579. }
  24580. return nil
  24581. }
  24582. // SetResourceId sets the ResourceId field's value.
  24583. func (s *TagResourceInput) SetResourceId(v string) *TagResourceInput {
  24584. s.ResourceId = &v
  24585. return s
  24586. }
  24587. // SetTags sets the Tags field's value.
  24588. func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput {
  24589. s.Tags = v
  24590. return s
  24591. }
  24592. type TagResourceOutput struct {
  24593. _ struct{} `type:"structure"`
  24594. }
  24595. // String returns the string representation.
  24596. //
  24597. // API parameter values that are decorated as "sensitive" in the API will not
  24598. // be included in the string output. The member name will be present, but the
  24599. // value will be replaced with "sensitive".
  24600. func (s TagResourceOutput) String() string {
  24601. return awsutil.Prettify(s)
  24602. }
  24603. // GoString returns the string representation.
  24604. //
  24605. // API parameter values that are decorated as "sensitive" in the API will not
  24606. // be included in the string output. The member name will be present, but the
  24607. // value will be replaced with "sensitive".
  24608. func (s TagResourceOutput) GoString() string {
  24609. return s.String()
  24610. }
  24611. // We can't find a root, OU, account, or policy with the TargetId that you specified.
  24612. type TargetNotFoundException struct {
  24613. _ struct{} `type:"structure"`
  24614. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  24615. Message_ *string `locationName:"Message" type:"string"`
  24616. }
  24617. // String returns the string representation.
  24618. //
  24619. // API parameter values that are decorated as "sensitive" in the API will not
  24620. // be included in the string output. The member name will be present, but the
  24621. // value will be replaced with "sensitive".
  24622. func (s TargetNotFoundException) String() string {
  24623. return awsutil.Prettify(s)
  24624. }
  24625. // GoString returns the string representation.
  24626. //
  24627. // API parameter values that are decorated as "sensitive" in the API will not
  24628. // be included in the string output. The member name will be present, but the
  24629. // value will be replaced with "sensitive".
  24630. func (s TargetNotFoundException) GoString() string {
  24631. return s.String()
  24632. }
  24633. func newErrorTargetNotFoundException(v protocol.ResponseMetadata) error {
  24634. return &TargetNotFoundException{
  24635. RespMetadata: v,
  24636. }
  24637. }
  24638. // Code returns the exception type name.
  24639. func (s *TargetNotFoundException) Code() string {
  24640. return "TargetNotFoundException"
  24641. }
  24642. // Message returns the exception's message.
  24643. func (s *TargetNotFoundException) Message() string {
  24644. if s.Message_ != nil {
  24645. return *s.Message_
  24646. }
  24647. return ""
  24648. }
  24649. // OrigErr always returns nil, satisfies awserr.Error interface.
  24650. func (s *TargetNotFoundException) OrigErr() error {
  24651. return nil
  24652. }
  24653. func (s *TargetNotFoundException) Error() string {
  24654. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  24655. }
  24656. // Status code returns the HTTP status code for the request's response error.
  24657. func (s *TargetNotFoundException) StatusCode() int {
  24658. return s.RespMetadata.StatusCode
  24659. }
  24660. // RequestID returns the service's response RequestID for request.
  24661. func (s *TargetNotFoundException) RequestID() string {
  24662. return s.RespMetadata.RequestID
  24663. }
  24664. // You have sent too many requests in too short a period of time. The quota
  24665. // helps protect against denial-of-service attacks. Try again later.
  24666. //
  24667. // For information about quotas that affect Organizations, see Quotas for Organizations
  24668. // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
  24669. // the Organizations User Guide.
  24670. type TooManyRequestsException struct {
  24671. _ struct{} `type:"structure"`
  24672. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  24673. Message_ *string `locationName:"Message" type:"string"`
  24674. Type *string `type:"string"`
  24675. }
  24676. // String returns the string representation.
  24677. //
  24678. // API parameter values that are decorated as "sensitive" in the API will not
  24679. // be included in the string output. The member name will be present, but the
  24680. // value will be replaced with "sensitive".
  24681. func (s TooManyRequestsException) String() string {
  24682. return awsutil.Prettify(s)
  24683. }
  24684. // GoString returns the string representation.
  24685. //
  24686. // API parameter values that are decorated as "sensitive" in the API will not
  24687. // be included in the string output. The member name will be present, but the
  24688. // value will be replaced with "sensitive".
  24689. func (s TooManyRequestsException) GoString() string {
  24690. return s.String()
  24691. }
  24692. func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error {
  24693. return &TooManyRequestsException{
  24694. RespMetadata: v,
  24695. }
  24696. }
  24697. // Code returns the exception type name.
  24698. func (s *TooManyRequestsException) Code() string {
  24699. return "TooManyRequestsException"
  24700. }
  24701. // Message returns the exception's message.
  24702. func (s *TooManyRequestsException) Message() string {
  24703. if s.Message_ != nil {
  24704. return *s.Message_
  24705. }
  24706. return ""
  24707. }
  24708. // OrigErr always returns nil, satisfies awserr.Error interface.
  24709. func (s *TooManyRequestsException) OrigErr() error {
  24710. return nil
  24711. }
  24712. func (s *TooManyRequestsException) Error() string {
  24713. return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  24714. }
  24715. // Status code returns the HTTP status code for the request's response error.
  24716. func (s *TooManyRequestsException) StatusCode() int {
  24717. return s.RespMetadata.StatusCode
  24718. }
  24719. // RequestID returns the service's response RequestID for request.
  24720. func (s *TooManyRequestsException) RequestID() string {
  24721. return s.RespMetadata.RequestID
  24722. }
  24723. // This action isn't available in the current Amazon Web Services Region.
  24724. type UnsupportedAPIEndpointException struct {
  24725. _ struct{} `type:"structure"`
  24726. RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  24727. Message_ *string `locationName:"Message" type:"string"`
  24728. }
  24729. // String returns the string representation.
  24730. //
  24731. // API parameter values that are decorated as "sensitive" in the API will not
  24732. // be included in the string output. The member name will be present, but the
  24733. // value will be replaced with "sensitive".
  24734. func (s UnsupportedAPIEndpointException) String() string {
  24735. return awsutil.Prettify(s)
  24736. }
  24737. // GoString returns the string representation.
  24738. //
  24739. // API parameter values that are decorated as "sensitive" in the API will not
  24740. // be included in the string output. The member name will be present, but the
  24741. // value will be replaced with "sensitive".
  24742. func (s UnsupportedAPIEndpointException) GoString() string {
  24743. return s.String()
  24744. }
  24745. func newErrorUnsupportedAPIEndpointException(v protocol.ResponseMetadata) error {
  24746. return &UnsupportedAPIEndpointException{
  24747. RespMetadata: v,
  24748. }
  24749. }
  24750. // Code returns the exception type name.
  24751. func (s *UnsupportedAPIEndpointException) Code() string {
  24752. return "UnsupportedAPIEndpointException"
  24753. }
  24754. // Message returns the exception's message.
  24755. func (s *UnsupportedAPIEndpointException) Message() string {
  24756. if s.Message_ != nil {
  24757. return *s.Message_
  24758. }
  24759. return ""
  24760. }
  24761. // OrigErr always returns nil, satisfies awserr.Error interface.
  24762. func (s *UnsupportedAPIEndpointException) OrigErr() error {
  24763. return nil
  24764. }
  24765. func (s *UnsupportedAPIEndpointException) Error() string {
  24766. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  24767. }
  24768. // Status code returns the HTTP status code for the request's response error.
  24769. func (s *UnsupportedAPIEndpointException) StatusCode() int {
  24770. return s.RespMetadata.StatusCode
  24771. }
  24772. // RequestID returns the service's response RequestID for request.
  24773. func (s *UnsupportedAPIEndpointException) RequestID() string {
  24774. return s.RespMetadata.RequestID
  24775. }
  24776. type UntagResourceInput struct {
  24777. _ struct{} `type:"structure"`
  24778. // The ID of the resource to remove a tag from.
  24779. //
  24780. // You can specify any of the following taggable resources.
  24781. //
  24782. // * Amazon Web Services account – specify the account ID number.
  24783. //
  24784. // * Organizational unit – specify the OU ID that begins with ou- and looks
  24785. // similar to: ou-1a2b-34uvwxyz
  24786. //
  24787. // * Root – specify the root ID that begins with r- and looks similar to:
  24788. // r-1a2b
  24789. //
  24790. // * Policy – specify the policy ID that begins with p- andlooks similar
  24791. // to: p-12abcdefg3
  24792. //
  24793. // ResourceId is a required field
  24794. ResourceId *string `type:"string" required:"true"`
  24795. // The list of keys for tags to remove from the specified resource.
  24796. //
  24797. // TagKeys is a required field
  24798. TagKeys []*string `type:"list" required:"true"`
  24799. }
  24800. // String returns the string representation.
  24801. //
  24802. // API parameter values that are decorated as "sensitive" in the API will not
  24803. // be included in the string output. The member name will be present, but the
  24804. // value will be replaced with "sensitive".
  24805. func (s UntagResourceInput) String() string {
  24806. return awsutil.Prettify(s)
  24807. }
  24808. // GoString returns the string representation.
  24809. //
  24810. // API parameter values that are decorated as "sensitive" in the API will not
  24811. // be included in the string output. The member name will be present, but the
  24812. // value will be replaced with "sensitive".
  24813. func (s UntagResourceInput) GoString() string {
  24814. return s.String()
  24815. }
  24816. // Validate inspects the fields of the type to determine if they are valid.
  24817. func (s *UntagResourceInput) Validate() error {
  24818. invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  24819. if s.ResourceId == nil {
  24820. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  24821. }
  24822. if s.TagKeys == nil {
  24823. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  24824. }
  24825. if invalidParams.Len() > 0 {
  24826. return invalidParams
  24827. }
  24828. return nil
  24829. }
  24830. // SetResourceId sets the ResourceId field's value.
  24831. func (s *UntagResourceInput) SetResourceId(v string) *UntagResourceInput {
  24832. s.ResourceId = &v
  24833. return s
  24834. }
  24835. // SetTagKeys sets the TagKeys field's value.
  24836. func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
  24837. s.TagKeys = v
  24838. return s
  24839. }
  24840. type UntagResourceOutput struct {
  24841. _ struct{} `type:"structure"`
  24842. }
  24843. // String returns the string representation.
  24844. //
  24845. // API parameter values that are decorated as "sensitive" in the API will not
  24846. // be included in the string output. The member name will be present, but the
  24847. // value will be replaced with "sensitive".
  24848. func (s UntagResourceOutput) String() string {
  24849. return awsutil.Prettify(s)
  24850. }
  24851. // GoString returns the string representation.
  24852. //
  24853. // API parameter values that are decorated as "sensitive" in the API will not
  24854. // be included in the string output. The member name will be present, but the
  24855. // value will be replaced with "sensitive".
  24856. func (s UntagResourceOutput) GoString() string {
  24857. return s.String()
  24858. }
  24859. type UpdateOrganizationalUnitInput struct {
  24860. _ struct{} `type:"structure"`
  24861. // The new name that you want to assign to the OU.
  24862. //
  24863. // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
  24864. // this parameter is a string of any of the characters in the ASCII character
  24865. // range.
  24866. Name *string `min:"1" type:"string"`
  24867. // The unique identifier (ID) of the OU that you want to rename. You can get
  24868. // the ID from the ListOrganizationalUnitsForParent operation.
  24869. //
  24870. // The regex pattern (http://wikipedia.org/wiki/regex) for an organizational
  24871. // unit ID string requires "ou-" followed by from 4 to 32 lowercase letters
  24872. // or digits (the ID of the root that contains the OU). This string is followed
  24873. // by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
  24874. //
  24875. // OrganizationalUnitId is a required field
  24876. OrganizationalUnitId *string `type:"string" required:"true"`
  24877. }
  24878. // String returns the string representation.
  24879. //
  24880. // API parameter values that are decorated as "sensitive" in the API will not
  24881. // be included in the string output. The member name will be present, but the
  24882. // value will be replaced with "sensitive".
  24883. func (s UpdateOrganizationalUnitInput) String() string {
  24884. return awsutil.Prettify(s)
  24885. }
  24886. // GoString returns the string representation.
  24887. //
  24888. // API parameter values that are decorated as "sensitive" in the API will not
  24889. // be included in the string output. The member name will be present, but the
  24890. // value will be replaced with "sensitive".
  24891. func (s UpdateOrganizationalUnitInput) GoString() string {
  24892. return s.String()
  24893. }
  24894. // Validate inspects the fields of the type to determine if they are valid.
  24895. func (s *UpdateOrganizationalUnitInput) Validate() error {
  24896. invalidParams := request.ErrInvalidParams{Context: "UpdateOrganizationalUnitInput"}
  24897. if s.Name != nil && len(*s.Name) < 1 {
  24898. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  24899. }
  24900. if s.OrganizationalUnitId == nil {
  24901. invalidParams.Add(request.NewErrParamRequired("OrganizationalUnitId"))
  24902. }
  24903. if invalidParams.Len() > 0 {
  24904. return invalidParams
  24905. }
  24906. return nil
  24907. }
  24908. // SetName sets the Name field's value.
  24909. func (s *UpdateOrganizationalUnitInput) SetName(v string) *UpdateOrganizationalUnitInput {
  24910. s.Name = &v
  24911. return s
  24912. }
  24913. // SetOrganizationalUnitId sets the OrganizationalUnitId field's value.
  24914. func (s *UpdateOrganizationalUnitInput) SetOrganizationalUnitId(v string) *UpdateOrganizationalUnitInput {
  24915. s.OrganizationalUnitId = &v
  24916. return s
  24917. }
  24918. type UpdateOrganizationalUnitOutput struct {
  24919. _ struct{} `type:"structure"`
  24920. // A structure that contains the details about the specified OU, including its
  24921. // new name.
  24922. OrganizationalUnit *OrganizationalUnit `type:"structure"`
  24923. }
  24924. // String returns the string representation.
  24925. //
  24926. // API parameter values that are decorated as "sensitive" in the API will not
  24927. // be included in the string output. The member name will be present, but the
  24928. // value will be replaced with "sensitive".
  24929. func (s UpdateOrganizationalUnitOutput) String() string {
  24930. return awsutil.Prettify(s)
  24931. }
  24932. // GoString returns the string representation.
  24933. //
  24934. // API parameter values that are decorated as "sensitive" in the API will not
  24935. // be included in the string output. The member name will be present, but the
  24936. // value will be replaced with "sensitive".
  24937. func (s UpdateOrganizationalUnitOutput) GoString() string {
  24938. return s.String()
  24939. }
  24940. // SetOrganizationalUnit sets the OrganizationalUnit field's value.
  24941. func (s *UpdateOrganizationalUnitOutput) SetOrganizationalUnit(v *OrganizationalUnit) *UpdateOrganizationalUnitOutput {
  24942. s.OrganizationalUnit = v
  24943. return s
  24944. }
  24945. type UpdatePolicyInput struct {
  24946. _ struct{} `type:"structure"`
  24947. // If provided, the new content for the policy. The text must be correctly formatted
  24948. // JSON that complies with the syntax for the policy's type. For more information,
  24949. // see Service Control Policy Syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html)
  24950. // in the Organizations User Guide.
  24951. Content *string `min:"1" type:"string"`
  24952. // If provided, the new description for the policy.
  24953. Description *string `type:"string"`
  24954. // If provided, the new name for the policy.
  24955. //
  24956. // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
  24957. // this parameter is a string of any of the characters in the ASCII character
  24958. // range.
  24959. Name *string `min:"1" type:"string"`
  24960. // The unique identifier (ID) of the policy that you want to update.
  24961. //
  24962. // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string
  24963. // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits,
  24964. // or the underscore character (_).
  24965. //
  24966. // PolicyId is a required field
  24967. PolicyId *string `type:"string" required:"true"`
  24968. }
  24969. // String returns the string representation.
  24970. //
  24971. // API parameter values that are decorated as "sensitive" in the API will not
  24972. // be included in the string output. The member name will be present, but the
  24973. // value will be replaced with "sensitive".
  24974. func (s UpdatePolicyInput) String() string {
  24975. return awsutil.Prettify(s)
  24976. }
  24977. // GoString returns the string representation.
  24978. //
  24979. // API parameter values that are decorated as "sensitive" in the API will not
  24980. // be included in the string output. The member name will be present, but the
  24981. // value will be replaced with "sensitive".
  24982. func (s UpdatePolicyInput) GoString() string {
  24983. return s.String()
  24984. }
  24985. // Validate inspects the fields of the type to determine if they are valid.
  24986. func (s *UpdatePolicyInput) Validate() error {
  24987. invalidParams := request.ErrInvalidParams{Context: "UpdatePolicyInput"}
  24988. if s.Content != nil && len(*s.Content) < 1 {
  24989. invalidParams.Add(request.NewErrParamMinLen("Content", 1))
  24990. }
  24991. if s.Name != nil && len(*s.Name) < 1 {
  24992. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  24993. }
  24994. if s.PolicyId == nil {
  24995. invalidParams.Add(request.NewErrParamRequired("PolicyId"))
  24996. }
  24997. if invalidParams.Len() > 0 {
  24998. return invalidParams
  24999. }
  25000. return nil
  25001. }
  25002. // SetContent sets the Content field's value.
  25003. func (s *UpdatePolicyInput) SetContent(v string) *UpdatePolicyInput {
  25004. s.Content = &v
  25005. return s
  25006. }
  25007. // SetDescription sets the Description field's value.
  25008. func (s *UpdatePolicyInput) SetDescription(v string) *UpdatePolicyInput {
  25009. s.Description = &v
  25010. return s
  25011. }
  25012. // SetName sets the Name field's value.
  25013. func (s *UpdatePolicyInput) SetName(v string) *UpdatePolicyInput {
  25014. s.Name = &v
  25015. return s
  25016. }
  25017. // SetPolicyId sets the PolicyId field's value.
  25018. func (s *UpdatePolicyInput) SetPolicyId(v string) *UpdatePolicyInput {
  25019. s.PolicyId = &v
  25020. return s
  25021. }
  25022. type UpdatePolicyOutput struct {
  25023. _ struct{} `type:"structure"`
  25024. // A structure that contains details about the updated policy, showing the requested
  25025. // changes.
  25026. Policy *Policy `type:"structure"`
  25027. }
  25028. // String returns the string representation.
  25029. //
  25030. // API parameter values that are decorated as "sensitive" in the API will not
  25031. // be included in the string output. The member name will be present, but the
  25032. // value will be replaced with "sensitive".
  25033. func (s UpdatePolicyOutput) String() string {
  25034. return awsutil.Prettify(s)
  25035. }
  25036. // GoString returns the string representation.
  25037. //
  25038. // API parameter values that are decorated as "sensitive" in the API will not
  25039. // be included in the string output. The member name will be present, but the
  25040. // value will be replaced with "sensitive".
  25041. func (s UpdatePolicyOutput) GoString() string {
  25042. return s.String()
  25043. }
  25044. // SetPolicy sets the Policy field's value.
  25045. func (s *UpdatePolicyOutput) SetPolicy(v *Policy) *UpdatePolicyOutput {
  25046. s.Policy = v
  25047. return s
  25048. }
  25049. const (
  25050. // AccessDeniedForDependencyExceptionReasonAccessDeniedDuringCreateServiceLinkedRole is a AccessDeniedForDependencyExceptionReason enum value
  25051. AccessDeniedForDependencyExceptionReasonAccessDeniedDuringCreateServiceLinkedRole = "ACCESS_DENIED_DURING_CREATE_SERVICE_LINKED_ROLE"
  25052. )
  25053. // AccessDeniedForDependencyExceptionReason_Values returns all elements of the AccessDeniedForDependencyExceptionReason enum
  25054. func AccessDeniedForDependencyExceptionReason_Values() []string {
  25055. return []string{
  25056. AccessDeniedForDependencyExceptionReasonAccessDeniedDuringCreateServiceLinkedRole,
  25057. }
  25058. }
  25059. const (
  25060. // AccountJoinedMethodInvited is a AccountJoinedMethod enum value
  25061. AccountJoinedMethodInvited = "INVITED"
  25062. // AccountJoinedMethodCreated is a AccountJoinedMethod enum value
  25063. AccountJoinedMethodCreated = "CREATED"
  25064. )
  25065. // AccountJoinedMethod_Values returns all elements of the AccountJoinedMethod enum
  25066. func AccountJoinedMethod_Values() []string {
  25067. return []string{
  25068. AccountJoinedMethodInvited,
  25069. AccountJoinedMethodCreated,
  25070. }
  25071. }
  25072. const (
  25073. // AccountStatusActive is a AccountStatus enum value
  25074. AccountStatusActive = "ACTIVE"
  25075. // AccountStatusSuspended is a AccountStatus enum value
  25076. AccountStatusSuspended = "SUSPENDED"
  25077. // AccountStatusPendingClosure is a AccountStatus enum value
  25078. AccountStatusPendingClosure = "PENDING_CLOSURE"
  25079. )
  25080. // AccountStatus_Values returns all elements of the AccountStatus enum
  25081. func AccountStatus_Values() []string {
  25082. return []string{
  25083. AccountStatusActive,
  25084. AccountStatusSuspended,
  25085. AccountStatusPendingClosure,
  25086. }
  25087. }
  25088. const (
  25089. // ActionTypeInvite is a ActionType enum value
  25090. ActionTypeInvite = "INVITE"
  25091. // ActionTypeEnableAllFeatures is a ActionType enum value
  25092. ActionTypeEnableAllFeatures = "ENABLE_ALL_FEATURES"
  25093. // ActionTypeApproveAllFeatures is a ActionType enum value
  25094. ActionTypeApproveAllFeatures = "APPROVE_ALL_FEATURES"
  25095. // ActionTypeAddOrganizationsServiceLinkedRole is a ActionType enum value
  25096. ActionTypeAddOrganizationsServiceLinkedRole = "ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE"
  25097. )
  25098. // ActionType_Values returns all elements of the ActionType enum
  25099. func ActionType_Values() []string {
  25100. return []string{
  25101. ActionTypeInvite,
  25102. ActionTypeEnableAllFeatures,
  25103. ActionTypeApproveAllFeatures,
  25104. ActionTypeAddOrganizationsServiceLinkedRole,
  25105. }
  25106. }
  25107. const (
  25108. // ChildTypeAccount is a ChildType enum value
  25109. ChildTypeAccount = "ACCOUNT"
  25110. // ChildTypeOrganizationalUnit is a ChildType enum value
  25111. ChildTypeOrganizationalUnit = "ORGANIZATIONAL_UNIT"
  25112. )
  25113. // ChildType_Values returns all elements of the ChildType enum
  25114. func ChildType_Values() []string {
  25115. return []string{
  25116. ChildTypeAccount,
  25117. ChildTypeOrganizationalUnit,
  25118. }
  25119. }
  25120. const (
  25121. // ConstraintViolationExceptionReasonAccountNumberLimitExceeded is a ConstraintViolationExceptionReason enum value
  25122. ConstraintViolationExceptionReasonAccountNumberLimitExceeded = "ACCOUNT_NUMBER_LIMIT_EXCEEDED"
  25123. // ConstraintViolationExceptionReasonHandshakeRateLimitExceeded is a ConstraintViolationExceptionReason enum value
  25124. ConstraintViolationExceptionReasonHandshakeRateLimitExceeded = "HANDSHAKE_RATE_LIMIT_EXCEEDED"
  25125. // ConstraintViolationExceptionReasonOuNumberLimitExceeded is a ConstraintViolationExceptionReason enum value
  25126. ConstraintViolationExceptionReasonOuNumberLimitExceeded = "OU_NUMBER_LIMIT_EXCEEDED"
  25127. // ConstraintViolationExceptionReasonOuDepthLimitExceeded is a ConstraintViolationExceptionReason enum value
  25128. ConstraintViolationExceptionReasonOuDepthLimitExceeded = "OU_DEPTH_LIMIT_EXCEEDED"
  25129. // ConstraintViolationExceptionReasonPolicyNumberLimitExceeded is a ConstraintViolationExceptionReason enum value
  25130. ConstraintViolationExceptionReasonPolicyNumberLimitExceeded = "POLICY_NUMBER_LIMIT_EXCEEDED"
  25131. // ConstraintViolationExceptionReasonPolicyContentLimitExceeded is a ConstraintViolationExceptionReason enum value
  25132. ConstraintViolationExceptionReasonPolicyContentLimitExceeded = "POLICY_CONTENT_LIMIT_EXCEEDED"
  25133. // ConstraintViolationExceptionReasonMaxPolicyTypeAttachmentLimitExceeded is a ConstraintViolationExceptionReason enum value
  25134. ConstraintViolationExceptionReasonMaxPolicyTypeAttachmentLimitExceeded = "MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED"
  25135. // ConstraintViolationExceptionReasonMinPolicyTypeAttachmentLimitExceeded is a ConstraintViolationExceptionReason enum value
  25136. ConstraintViolationExceptionReasonMinPolicyTypeAttachmentLimitExceeded = "MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED"
  25137. // ConstraintViolationExceptionReasonAccountCannotLeaveOrganization is a ConstraintViolationExceptionReason enum value
  25138. ConstraintViolationExceptionReasonAccountCannotLeaveOrganization = "ACCOUNT_CANNOT_LEAVE_ORGANIZATION"
  25139. // ConstraintViolationExceptionReasonAccountCannotLeaveWithoutEula is a ConstraintViolationExceptionReason enum value
  25140. ConstraintViolationExceptionReasonAccountCannotLeaveWithoutEula = "ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA"
  25141. // ConstraintViolationExceptionReasonAccountCannotLeaveWithoutPhoneVerification is a ConstraintViolationExceptionReason enum value
  25142. ConstraintViolationExceptionReasonAccountCannotLeaveWithoutPhoneVerification = "ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION"
  25143. // ConstraintViolationExceptionReasonMasterAccountPaymentInstrumentRequired is a ConstraintViolationExceptionReason enum value
  25144. ConstraintViolationExceptionReasonMasterAccountPaymentInstrumentRequired = "MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED"
  25145. // ConstraintViolationExceptionReasonMemberAccountPaymentInstrumentRequired is a ConstraintViolationExceptionReason enum value
  25146. ConstraintViolationExceptionReasonMemberAccountPaymentInstrumentRequired = "MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED"
  25147. // ConstraintViolationExceptionReasonAccountCreationRateLimitExceeded is a ConstraintViolationExceptionReason enum value
  25148. ConstraintViolationExceptionReasonAccountCreationRateLimitExceeded = "ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED"
  25149. // ConstraintViolationExceptionReasonMasterAccountAddressDoesNotMatchMarketplace is a ConstraintViolationExceptionReason enum value
  25150. ConstraintViolationExceptionReasonMasterAccountAddressDoesNotMatchMarketplace = "MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE"
  25151. // ConstraintViolationExceptionReasonMasterAccountMissingContactInfo is a ConstraintViolationExceptionReason enum value
  25152. ConstraintViolationExceptionReasonMasterAccountMissingContactInfo = "MASTER_ACCOUNT_MISSING_CONTACT_INFO"
  25153. // ConstraintViolationExceptionReasonMasterAccountNotGovcloudEnabled is a ConstraintViolationExceptionReason enum value
  25154. ConstraintViolationExceptionReasonMasterAccountNotGovcloudEnabled = "MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED"
  25155. // ConstraintViolationExceptionReasonOrganizationNotInAllFeaturesMode is a ConstraintViolationExceptionReason enum value
  25156. ConstraintViolationExceptionReasonOrganizationNotInAllFeaturesMode = "ORGANIZATION_NOT_IN_ALL_FEATURES_MODE"
  25157. // ConstraintViolationExceptionReasonCreateOrganizationInBillingModeUnsupportedRegion is a ConstraintViolationExceptionReason enum value
  25158. ConstraintViolationExceptionReasonCreateOrganizationInBillingModeUnsupportedRegion = "CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION"
  25159. // ConstraintViolationExceptionReasonEmailVerificationCodeExpired is a ConstraintViolationExceptionReason enum value
  25160. ConstraintViolationExceptionReasonEmailVerificationCodeExpired = "EMAIL_VERIFICATION_CODE_EXPIRED"
  25161. // ConstraintViolationExceptionReasonWaitPeriodActive is a ConstraintViolationExceptionReason enum value
  25162. ConstraintViolationExceptionReasonWaitPeriodActive = "WAIT_PERIOD_ACTIVE"
  25163. // ConstraintViolationExceptionReasonMaxTagLimitExceeded is a ConstraintViolationExceptionReason enum value
  25164. ConstraintViolationExceptionReasonMaxTagLimitExceeded = "MAX_TAG_LIMIT_EXCEEDED"
  25165. // ConstraintViolationExceptionReasonTagPolicyViolation is a ConstraintViolationExceptionReason enum value
  25166. ConstraintViolationExceptionReasonTagPolicyViolation = "TAG_POLICY_VIOLATION"
  25167. // ConstraintViolationExceptionReasonMaxDelegatedAdministratorsForServiceLimitExceeded is a ConstraintViolationExceptionReason enum value
  25168. ConstraintViolationExceptionReasonMaxDelegatedAdministratorsForServiceLimitExceeded = "MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED"
  25169. // ConstraintViolationExceptionReasonCannotRegisterMasterAsDelegatedAdministrator is a ConstraintViolationExceptionReason enum value
  25170. ConstraintViolationExceptionReasonCannotRegisterMasterAsDelegatedAdministrator = "CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR"
  25171. // ConstraintViolationExceptionReasonCannotRemoveDelegatedAdministratorFromOrg is a ConstraintViolationExceptionReason enum value
  25172. ConstraintViolationExceptionReasonCannotRemoveDelegatedAdministratorFromOrg = "CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG"
  25173. // ConstraintViolationExceptionReasonDelegatedAdministratorExistsForThisService is a ConstraintViolationExceptionReason enum value
  25174. ConstraintViolationExceptionReasonDelegatedAdministratorExistsForThisService = "DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE"
  25175. // ConstraintViolationExceptionReasonMasterAccountMissingBusinessLicense is a ConstraintViolationExceptionReason enum value
  25176. ConstraintViolationExceptionReasonMasterAccountMissingBusinessLicense = "MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE"
  25177. // ConstraintViolationExceptionReasonCannotCloseManagementAccount is a ConstraintViolationExceptionReason enum value
  25178. ConstraintViolationExceptionReasonCannotCloseManagementAccount = "CANNOT_CLOSE_MANAGEMENT_ACCOUNT"
  25179. // ConstraintViolationExceptionReasonCloseAccountQuotaExceeded is a ConstraintViolationExceptionReason enum value
  25180. ConstraintViolationExceptionReasonCloseAccountQuotaExceeded = "CLOSE_ACCOUNT_QUOTA_EXCEEDED"
  25181. // ConstraintViolationExceptionReasonCloseAccountRequestsLimitExceeded is a ConstraintViolationExceptionReason enum value
  25182. ConstraintViolationExceptionReasonCloseAccountRequestsLimitExceeded = "CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED"
  25183. // ConstraintViolationExceptionReasonServiceAccessNotEnabled is a ConstraintViolationExceptionReason enum value
  25184. ConstraintViolationExceptionReasonServiceAccessNotEnabled = "SERVICE_ACCESS_NOT_ENABLED"
  25185. // ConstraintViolationExceptionReasonInvalidPaymentInstrument is a ConstraintViolationExceptionReason enum value
  25186. ConstraintViolationExceptionReasonInvalidPaymentInstrument = "INVALID_PAYMENT_INSTRUMENT"
  25187. )
  25188. // ConstraintViolationExceptionReason_Values returns all elements of the ConstraintViolationExceptionReason enum
  25189. func ConstraintViolationExceptionReason_Values() []string {
  25190. return []string{
  25191. ConstraintViolationExceptionReasonAccountNumberLimitExceeded,
  25192. ConstraintViolationExceptionReasonHandshakeRateLimitExceeded,
  25193. ConstraintViolationExceptionReasonOuNumberLimitExceeded,
  25194. ConstraintViolationExceptionReasonOuDepthLimitExceeded,
  25195. ConstraintViolationExceptionReasonPolicyNumberLimitExceeded,
  25196. ConstraintViolationExceptionReasonPolicyContentLimitExceeded,
  25197. ConstraintViolationExceptionReasonMaxPolicyTypeAttachmentLimitExceeded,
  25198. ConstraintViolationExceptionReasonMinPolicyTypeAttachmentLimitExceeded,
  25199. ConstraintViolationExceptionReasonAccountCannotLeaveOrganization,
  25200. ConstraintViolationExceptionReasonAccountCannotLeaveWithoutEula,
  25201. ConstraintViolationExceptionReasonAccountCannotLeaveWithoutPhoneVerification,
  25202. ConstraintViolationExceptionReasonMasterAccountPaymentInstrumentRequired,
  25203. ConstraintViolationExceptionReasonMemberAccountPaymentInstrumentRequired,
  25204. ConstraintViolationExceptionReasonAccountCreationRateLimitExceeded,
  25205. ConstraintViolationExceptionReasonMasterAccountAddressDoesNotMatchMarketplace,
  25206. ConstraintViolationExceptionReasonMasterAccountMissingContactInfo,
  25207. ConstraintViolationExceptionReasonMasterAccountNotGovcloudEnabled,
  25208. ConstraintViolationExceptionReasonOrganizationNotInAllFeaturesMode,
  25209. ConstraintViolationExceptionReasonCreateOrganizationInBillingModeUnsupportedRegion,
  25210. ConstraintViolationExceptionReasonEmailVerificationCodeExpired,
  25211. ConstraintViolationExceptionReasonWaitPeriodActive,
  25212. ConstraintViolationExceptionReasonMaxTagLimitExceeded,
  25213. ConstraintViolationExceptionReasonTagPolicyViolation,
  25214. ConstraintViolationExceptionReasonMaxDelegatedAdministratorsForServiceLimitExceeded,
  25215. ConstraintViolationExceptionReasonCannotRegisterMasterAsDelegatedAdministrator,
  25216. ConstraintViolationExceptionReasonCannotRemoveDelegatedAdministratorFromOrg,
  25217. ConstraintViolationExceptionReasonDelegatedAdministratorExistsForThisService,
  25218. ConstraintViolationExceptionReasonMasterAccountMissingBusinessLicense,
  25219. ConstraintViolationExceptionReasonCannotCloseManagementAccount,
  25220. ConstraintViolationExceptionReasonCloseAccountQuotaExceeded,
  25221. ConstraintViolationExceptionReasonCloseAccountRequestsLimitExceeded,
  25222. ConstraintViolationExceptionReasonServiceAccessNotEnabled,
  25223. ConstraintViolationExceptionReasonInvalidPaymentInstrument,
  25224. }
  25225. }
  25226. const (
  25227. // CreateAccountFailureReasonAccountLimitExceeded is a CreateAccountFailureReason enum value
  25228. CreateAccountFailureReasonAccountLimitExceeded = "ACCOUNT_LIMIT_EXCEEDED"
  25229. // CreateAccountFailureReasonEmailAlreadyExists is a CreateAccountFailureReason enum value
  25230. CreateAccountFailureReasonEmailAlreadyExists = "EMAIL_ALREADY_EXISTS"
  25231. // CreateAccountFailureReasonInvalidAddress is a CreateAccountFailureReason enum value
  25232. CreateAccountFailureReasonInvalidAddress = "INVALID_ADDRESS"
  25233. // CreateAccountFailureReasonInvalidEmail is a CreateAccountFailureReason enum value
  25234. CreateAccountFailureReasonInvalidEmail = "INVALID_EMAIL"
  25235. // CreateAccountFailureReasonConcurrentAccountModification is a CreateAccountFailureReason enum value
  25236. CreateAccountFailureReasonConcurrentAccountModification = "CONCURRENT_ACCOUNT_MODIFICATION"
  25237. // CreateAccountFailureReasonInternalFailure is a CreateAccountFailureReason enum value
  25238. CreateAccountFailureReasonInternalFailure = "INTERNAL_FAILURE"
  25239. // CreateAccountFailureReasonGovcloudAccountAlreadyExists is a CreateAccountFailureReason enum value
  25240. CreateAccountFailureReasonGovcloudAccountAlreadyExists = "GOVCLOUD_ACCOUNT_ALREADY_EXISTS"
  25241. // CreateAccountFailureReasonMissingBusinessValidation is a CreateAccountFailureReason enum value
  25242. CreateAccountFailureReasonMissingBusinessValidation = "MISSING_BUSINESS_VALIDATION"
  25243. // CreateAccountFailureReasonFailedBusinessValidation is a CreateAccountFailureReason enum value
  25244. CreateAccountFailureReasonFailedBusinessValidation = "FAILED_BUSINESS_VALIDATION"
  25245. // CreateAccountFailureReasonPendingBusinessValidation is a CreateAccountFailureReason enum value
  25246. CreateAccountFailureReasonPendingBusinessValidation = "PENDING_BUSINESS_VALIDATION"
  25247. // CreateAccountFailureReasonInvalidIdentityForBusinessValidation is a CreateAccountFailureReason enum value
  25248. CreateAccountFailureReasonInvalidIdentityForBusinessValidation = "INVALID_IDENTITY_FOR_BUSINESS_VALIDATION"
  25249. // CreateAccountFailureReasonUnknownBusinessValidation is a CreateAccountFailureReason enum value
  25250. CreateAccountFailureReasonUnknownBusinessValidation = "UNKNOWN_BUSINESS_VALIDATION"
  25251. // CreateAccountFailureReasonMissingPaymentInstrument is a CreateAccountFailureReason enum value
  25252. CreateAccountFailureReasonMissingPaymentInstrument = "MISSING_PAYMENT_INSTRUMENT"
  25253. // CreateAccountFailureReasonInvalidPaymentInstrument is a CreateAccountFailureReason enum value
  25254. CreateAccountFailureReasonInvalidPaymentInstrument = "INVALID_PAYMENT_INSTRUMENT"
  25255. // CreateAccountFailureReasonUpdateExistingResourcePolicyWithTagsNotSupported is a CreateAccountFailureReason enum value
  25256. CreateAccountFailureReasonUpdateExistingResourcePolicyWithTagsNotSupported = "UPDATE_EXISTING_RESOURCE_POLICY_WITH_TAGS_NOT_SUPPORTED"
  25257. )
  25258. // CreateAccountFailureReason_Values returns all elements of the CreateAccountFailureReason enum
  25259. func CreateAccountFailureReason_Values() []string {
  25260. return []string{
  25261. CreateAccountFailureReasonAccountLimitExceeded,
  25262. CreateAccountFailureReasonEmailAlreadyExists,
  25263. CreateAccountFailureReasonInvalidAddress,
  25264. CreateAccountFailureReasonInvalidEmail,
  25265. CreateAccountFailureReasonConcurrentAccountModification,
  25266. CreateAccountFailureReasonInternalFailure,
  25267. CreateAccountFailureReasonGovcloudAccountAlreadyExists,
  25268. CreateAccountFailureReasonMissingBusinessValidation,
  25269. CreateAccountFailureReasonFailedBusinessValidation,
  25270. CreateAccountFailureReasonPendingBusinessValidation,
  25271. CreateAccountFailureReasonInvalidIdentityForBusinessValidation,
  25272. CreateAccountFailureReasonUnknownBusinessValidation,
  25273. CreateAccountFailureReasonMissingPaymentInstrument,
  25274. CreateAccountFailureReasonInvalidPaymentInstrument,
  25275. CreateAccountFailureReasonUpdateExistingResourcePolicyWithTagsNotSupported,
  25276. }
  25277. }
  25278. const (
  25279. // CreateAccountStateInProgress is a CreateAccountState enum value
  25280. CreateAccountStateInProgress = "IN_PROGRESS"
  25281. // CreateAccountStateSucceeded is a CreateAccountState enum value
  25282. CreateAccountStateSucceeded = "SUCCEEDED"
  25283. // CreateAccountStateFailed is a CreateAccountState enum value
  25284. CreateAccountStateFailed = "FAILED"
  25285. )
  25286. // CreateAccountState_Values returns all elements of the CreateAccountState enum
  25287. func CreateAccountState_Values() []string {
  25288. return []string{
  25289. CreateAccountStateInProgress,
  25290. CreateAccountStateSucceeded,
  25291. CreateAccountStateFailed,
  25292. }
  25293. }
  25294. const (
  25295. // EffectivePolicyTypeTagPolicy is a EffectivePolicyType enum value
  25296. EffectivePolicyTypeTagPolicy = "TAG_POLICY"
  25297. // EffectivePolicyTypeBackupPolicy is a EffectivePolicyType enum value
  25298. EffectivePolicyTypeBackupPolicy = "BACKUP_POLICY"
  25299. // EffectivePolicyTypeAiservicesOptOutPolicy is a EffectivePolicyType enum value
  25300. EffectivePolicyTypeAiservicesOptOutPolicy = "AISERVICES_OPT_OUT_POLICY"
  25301. )
  25302. // EffectivePolicyType_Values returns all elements of the EffectivePolicyType enum
  25303. func EffectivePolicyType_Values() []string {
  25304. return []string{
  25305. EffectivePolicyTypeTagPolicy,
  25306. EffectivePolicyTypeBackupPolicy,
  25307. EffectivePolicyTypeAiservicesOptOutPolicy,
  25308. }
  25309. }
  25310. const (
  25311. // HandshakeConstraintViolationExceptionReasonAccountNumberLimitExceeded is a HandshakeConstraintViolationExceptionReason enum value
  25312. HandshakeConstraintViolationExceptionReasonAccountNumberLimitExceeded = "ACCOUNT_NUMBER_LIMIT_EXCEEDED"
  25313. // HandshakeConstraintViolationExceptionReasonHandshakeRateLimitExceeded is a HandshakeConstraintViolationExceptionReason enum value
  25314. HandshakeConstraintViolationExceptionReasonHandshakeRateLimitExceeded = "HANDSHAKE_RATE_LIMIT_EXCEEDED"
  25315. // HandshakeConstraintViolationExceptionReasonAlreadyInAnOrganization is a HandshakeConstraintViolationExceptionReason enum value
  25316. HandshakeConstraintViolationExceptionReasonAlreadyInAnOrganization = "ALREADY_IN_AN_ORGANIZATION"
  25317. // HandshakeConstraintViolationExceptionReasonOrganizationAlreadyHasAllFeatures is a HandshakeConstraintViolationExceptionReason enum value
  25318. HandshakeConstraintViolationExceptionReasonOrganizationAlreadyHasAllFeatures = "ORGANIZATION_ALREADY_HAS_ALL_FEATURES"
  25319. // HandshakeConstraintViolationExceptionReasonOrganizationIsAlreadyPendingAllFeaturesMigration is a HandshakeConstraintViolationExceptionReason enum value
  25320. HandshakeConstraintViolationExceptionReasonOrganizationIsAlreadyPendingAllFeaturesMigration = "ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION"
  25321. // HandshakeConstraintViolationExceptionReasonInviteDisabledDuringEnableAllFeatures is a HandshakeConstraintViolationExceptionReason enum value
  25322. HandshakeConstraintViolationExceptionReasonInviteDisabledDuringEnableAllFeatures = "INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES"
  25323. // HandshakeConstraintViolationExceptionReasonPaymentInstrumentRequired is a HandshakeConstraintViolationExceptionReason enum value
  25324. HandshakeConstraintViolationExceptionReasonPaymentInstrumentRequired = "PAYMENT_INSTRUMENT_REQUIRED"
  25325. // HandshakeConstraintViolationExceptionReasonOrganizationFromDifferentSellerOfRecord is a HandshakeConstraintViolationExceptionReason enum value
  25326. HandshakeConstraintViolationExceptionReasonOrganizationFromDifferentSellerOfRecord = "ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD"
  25327. // HandshakeConstraintViolationExceptionReasonOrganizationMembershipChangeRateLimitExceeded is a HandshakeConstraintViolationExceptionReason enum value
  25328. HandshakeConstraintViolationExceptionReasonOrganizationMembershipChangeRateLimitExceeded = "ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED"
  25329. // HandshakeConstraintViolationExceptionReasonManagementAccountEmailNotVerified is a HandshakeConstraintViolationExceptionReason enum value
  25330. HandshakeConstraintViolationExceptionReasonManagementAccountEmailNotVerified = "MANAGEMENT_ACCOUNT_EMAIL_NOT_VERIFIED"
  25331. )
  25332. // HandshakeConstraintViolationExceptionReason_Values returns all elements of the HandshakeConstraintViolationExceptionReason enum
  25333. func HandshakeConstraintViolationExceptionReason_Values() []string {
  25334. return []string{
  25335. HandshakeConstraintViolationExceptionReasonAccountNumberLimitExceeded,
  25336. HandshakeConstraintViolationExceptionReasonHandshakeRateLimitExceeded,
  25337. HandshakeConstraintViolationExceptionReasonAlreadyInAnOrganization,
  25338. HandshakeConstraintViolationExceptionReasonOrganizationAlreadyHasAllFeatures,
  25339. HandshakeConstraintViolationExceptionReasonOrganizationIsAlreadyPendingAllFeaturesMigration,
  25340. HandshakeConstraintViolationExceptionReasonInviteDisabledDuringEnableAllFeatures,
  25341. HandshakeConstraintViolationExceptionReasonPaymentInstrumentRequired,
  25342. HandshakeConstraintViolationExceptionReasonOrganizationFromDifferentSellerOfRecord,
  25343. HandshakeConstraintViolationExceptionReasonOrganizationMembershipChangeRateLimitExceeded,
  25344. HandshakeConstraintViolationExceptionReasonManagementAccountEmailNotVerified,
  25345. }
  25346. }
  25347. const (
  25348. // HandshakePartyTypeAccount is a HandshakePartyType enum value
  25349. HandshakePartyTypeAccount = "ACCOUNT"
  25350. // HandshakePartyTypeOrganization is a HandshakePartyType enum value
  25351. HandshakePartyTypeOrganization = "ORGANIZATION"
  25352. // HandshakePartyTypeEmail is a HandshakePartyType enum value
  25353. HandshakePartyTypeEmail = "EMAIL"
  25354. )
  25355. // HandshakePartyType_Values returns all elements of the HandshakePartyType enum
  25356. func HandshakePartyType_Values() []string {
  25357. return []string{
  25358. HandshakePartyTypeAccount,
  25359. HandshakePartyTypeOrganization,
  25360. HandshakePartyTypeEmail,
  25361. }
  25362. }
  25363. const (
  25364. // HandshakeResourceTypeAccount is a HandshakeResourceType enum value
  25365. HandshakeResourceTypeAccount = "ACCOUNT"
  25366. // HandshakeResourceTypeOrganization is a HandshakeResourceType enum value
  25367. HandshakeResourceTypeOrganization = "ORGANIZATION"
  25368. // HandshakeResourceTypeOrganizationFeatureSet is a HandshakeResourceType enum value
  25369. HandshakeResourceTypeOrganizationFeatureSet = "ORGANIZATION_FEATURE_SET"
  25370. // HandshakeResourceTypeEmail is a HandshakeResourceType enum value
  25371. HandshakeResourceTypeEmail = "EMAIL"
  25372. // HandshakeResourceTypeMasterEmail is a HandshakeResourceType enum value
  25373. HandshakeResourceTypeMasterEmail = "MASTER_EMAIL"
  25374. // HandshakeResourceTypeMasterName is a HandshakeResourceType enum value
  25375. HandshakeResourceTypeMasterName = "MASTER_NAME"
  25376. // HandshakeResourceTypeNotes is a HandshakeResourceType enum value
  25377. HandshakeResourceTypeNotes = "NOTES"
  25378. // HandshakeResourceTypeParentHandshake is a HandshakeResourceType enum value
  25379. HandshakeResourceTypeParentHandshake = "PARENT_HANDSHAKE"
  25380. )
  25381. // HandshakeResourceType_Values returns all elements of the HandshakeResourceType enum
  25382. func HandshakeResourceType_Values() []string {
  25383. return []string{
  25384. HandshakeResourceTypeAccount,
  25385. HandshakeResourceTypeOrganization,
  25386. HandshakeResourceTypeOrganizationFeatureSet,
  25387. HandshakeResourceTypeEmail,
  25388. HandshakeResourceTypeMasterEmail,
  25389. HandshakeResourceTypeMasterName,
  25390. HandshakeResourceTypeNotes,
  25391. HandshakeResourceTypeParentHandshake,
  25392. }
  25393. }
  25394. const (
  25395. // HandshakeStateRequested is a HandshakeState enum value
  25396. HandshakeStateRequested = "REQUESTED"
  25397. // HandshakeStateOpen is a HandshakeState enum value
  25398. HandshakeStateOpen = "OPEN"
  25399. // HandshakeStateCanceled is a HandshakeState enum value
  25400. HandshakeStateCanceled = "CANCELED"
  25401. // HandshakeStateAccepted is a HandshakeState enum value
  25402. HandshakeStateAccepted = "ACCEPTED"
  25403. // HandshakeStateDeclined is a HandshakeState enum value
  25404. HandshakeStateDeclined = "DECLINED"
  25405. // HandshakeStateExpired is a HandshakeState enum value
  25406. HandshakeStateExpired = "EXPIRED"
  25407. )
  25408. // HandshakeState_Values returns all elements of the HandshakeState enum
  25409. func HandshakeState_Values() []string {
  25410. return []string{
  25411. HandshakeStateRequested,
  25412. HandshakeStateOpen,
  25413. HandshakeStateCanceled,
  25414. HandshakeStateAccepted,
  25415. HandshakeStateDeclined,
  25416. HandshakeStateExpired,
  25417. }
  25418. }
  25419. const (
  25420. // IAMUserAccessToBillingAllow is a IAMUserAccessToBilling enum value
  25421. IAMUserAccessToBillingAllow = "ALLOW"
  25422. // IAMUserAccessToBillingDeny is a IAMUserAccessToBilling enum value
  25423. IAMUserAccessToBillingDeny = "DENY"
  25424. )
  25425. // IAMUserAccessToBilling_Values returns all elements of the IAMUserAccessToBilling enum
  25426. func IAMUserAccessToBilling_Values() []string {
  25427. return []string{
  25428. IAMUserAccessToBillingAllow,
  25429. IAMUserAccessToBillingDeny,
  25430. }
  25431. }
  25432. const (
  25433. // InvalidInputExceptionReasonInvalidPartyTypeTarget is a InvalidInputExceptionReason enum value
  25434. InvalidInputExceptionReasonInvalidPartyTypeTarget = "INVALID_PARTY_TYPE_TARGET"
  25435. // InvalidInputExceptionReasonInvalidSyntaxOrganizationArn is a InvalidInputExceptionReason enum value
  25436. InvalidInputExceptionReasonInvalidSyntaxOrganizationArn = "INVALID_SYNTAX_ORGANIZATION_ARN"
  25437. // InvalidInputExceptionReasonInvalidSyntaxPolicyId is a InvalidInputExceptionReason enum value
  25438. InvalidInputExceptionReasonInvalidSyntaxPolicyId = "INVALID_SYNTAX_POLICY_ID"
  25439. // InvalidInputExceptionReasonInvalidEnum is a InvalidInputExceptionReason enum value
  25440. InvalidInputExceptionReasonInvalidEnum = "INVALID_ENUM"
  25441. // InvalidInputExceptionReasonInvalidEnumPolicyType is a InvalidInputExceptionReason enum value
  25442. InvalidInputExceptionReasonInvalidEnumPolicyType = "INVALID_ENUM_POLICY_TYPE"
  25443. // InvalidInputExceptionReasonInvalidListMember is a InvalidInputExceptionReason enum value
  25444. InvalidInputExceptionReasonInvalidListMember = "INVALID_LIST_MEMBER"
  25445. // InvalidInputExceptionReasonMaxLengthExceeded is a InvalidInputExceptionReason enum value
  25446. InvalidInputExceptionReasonMaxLengthExceeded = "MAX_LENGTH_EXCEEDED"
  25447. // InvalidInputExceptionReasonMaxValueExceeded is a InvalidInputExceptionReason enum value
  25448. InvalidInputExceptionReasonMaxValueExceeded = "MAX_VALUE_EXCEEDED"
  25449. // InvalidInputExceptionReasonMinLengthExceeded is a InvalidInputExceptionReason enum value
  25450. InvalidInputExceptionReasonMinLengthExceeded = "MIN_LENGTH_EXCEEDED"
  25451. // InvalidInputExceptionReasonMinValueExceeded is a InvalidInputExceptionReason enum value
  25452. InvalidInputExceptionReasonMinValueExceeded = "MIN_VALUE_EXCEEDED"
  25453. // InvalidInputExceptionReasonImmutablePolicy is a InvalidInputExceptionReason enum value
  25454. InvalidInputExceptionReasonImmutablePolicy = "IMMUTABLE_POLICY"
  25455. // InvalidInputExceptionReasonInvalidPattern is a InvalidInputExceptionReason enum value
  25456. InvalidInputExceptionReasonInvalidPattern = "INVALID_PATTERN"
  25457. // InvalidInputExceptionReasonInvalidPatternTargetId is a InvalidInputExceptionReason enum value
  25458. InvalidInputExceptionReasonInvalidPatternTargetId = "INVALID_PATTERN_TARGET_ID"
  25459. // InvalidInputExceptionReasonInputRequired is a InvalidInputExceptionReason enum value
  25460. InvalidInputExceptionReasonInputRequired = "INPUT_REQUIRED"
  25461. // InvalidInputExceptionReasonInvalidNextToken is a InvalidInputExceptionReason enum value
  25462. InvalidInputExceptionReasonInvalidNextToken = "INVALID_NEXT_TOKEN"
  25463. // InvalidInputExceptionReasonMaxLimitExceededFilter is a InvalidInputExceptionReason enum value
  25464. InvalidInputExceptionReasonMaxLimitExceededFilter = "MAX_LIMIT_EXCEEDED_FILTER"
  25465. // InvalidInputExceptionReasonMovingAccountBetweenDifferentRoots is a InvalidInputExceptionReason enum value
  25466. InvalidInputExceptionReasonMovingAccountBetweenDifferentRoots = "MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS"
  25467. // InvalidInputExceptionReasonInvalidFullNameTarget is a InvalidInputExceptionReason enum value
  25468. InvalidInputExceptionReasonInvalidFullNameTarget = "INVALID_FULL_NAME_TARGET"
  25469. // InvalidInputExceptionReasonUnrecognizedServicePrincipal is a InvalidInputExceptionReason enum value
  25470. InvalidInputExceptionReasonUnrecognizedServicePrincipal = "UNRECOGNIZED_SERVICE_PRINCIPAL"
  25471. // InvalidInputExceptionReasonInvalidRoleName is a InvalidInputExceptionReason enum value
  25472. InvalidInputExceptionReasonInvalidRoleName = "INVALID_ROLE_NAME"
  25473. // InvalidInputExceptionReasonInvalidSystemTagsParameter is a InvalidInputExceptionReason enum value
  25474. InvalidInputExceptionReasonInvalidSystemTagsParameter = "INVALID_SYSTEM_TAGS_PARAMETER"
  25475. // InvalidInputExceptionReasonDuplicateTagKey is a InvalidInputExceptionReason enum value
  25476. InvalidInputExceptionReasonDuplicateTagKey = "DUPLICATE_TAG_KEY"
  25477. // InvalidInputExceptionReasonTargetNotSupported is a InvalidInputExceptionReason enum value
  25478. InvalidInputExceptionReasonTargetNotSupported = "TARGET_NOT_SUPPORTED"
  25479. // InvalidInputExceptionReasonInvalidEmailAddressTarget is a InvalidInputExceptionReason enum value
  25480. InvalidInputExceptionReasonInvalidEmailAddressTarget = "INVALID_EMAIL_ADDRESS_TARGET"
  25481. // InvalidInputExceptionReasonInvalidResourcePolicyJson is a InvalidInputExceptionReason enum value
  25482. InvalidInputExceptionReasonInvalidResourcePolicyJson = "INVALID_RESOURCE_POLICY_JSON"
  25483. // InvalidInputExceptionReasonUnsupportedActionInResourcePolicy is a InvalidInputExceptionReason enum value
  25484. InvalidInputExceptionReasonUnsupportedActionInResourcePolicy = "UNSUPPORTED_ACTION_IN_RESOURCE_POLICY"
  25485. // InvalidInputExceptionReasonUnsupportedPolicyTypeInResourcePolicy is a InvalidInputExceptionReason enum value
  25486. InvalidInputExceptionReasonUnsupportedPolicyTypeInResourcePolicy = "UNSUPPORTED_POLICY_TYPE_IN_RESOURCE_POLICY"
  25487. // InvalidInputExceptionReasonUnsupportedResourceInResourcePolicy is a InvalidInputExceptionReason enum value
  25488. InvalidInputExceptionReasonUnsupportedResourceInResourcePolicy = "UNSUPPORTED_RESOURCE_IN_RESOURCE_POLICY"
  25489. )
  25490. // InvalidInputExceptionReason_Values returns all elements of the InvalidInputExceptionReason enum
  25491. func InvalidInputExceptionReason_Values() []string {
  25492. return []string{
  25493. InvalidInputExceptionReasonInvalidPartyTypeTarget,
  25494. InvalidInputExceptionReasonInvalidSyntaxOrganizationArn,
  25495. InvalidInputExceptionReasonInvalidSyntaxPolicyId,
  25496. InvalidInputExceptionReasonInvalidEnum,
  25497. InvalidInputExceptionReasonInvalidEnumPolicyType,
  25498. InvalidInputExceptionReasonInvalidListMember,
  25499. InvalidInputExceptionReasonMaxLengthExceeded,
  25500. InvalidInputExceptionReasonMaxValueExceeded,
  25501. InvalidInputExceptionReasonMinLengthExceeded,
  25502. InvalidInputExceptionReasonMinValueExceeded,
  25503. InvalidInputExceptionReasonImmutablePolicy,
  25504. InvalidInputExceptionReasonInvalidPattern,
  25505. InvalidInputExceptionReasonInvalidPatternTargetId,
  25506. InvalidInputExceptionReasonInputRequired,
  25507. InvalidInputExceptionReasonInvalidNextToken,
  25508. InvalidInputExceptionReasonMaxLimitExceededFilter,
  25509. InvalidInputExceptionReasonMovingAccountBetweenDifferentRoots,
  25510. InvalidInputExceptionReasonInvalidFullNameTarget,
  25511. InvalidInputExceptionReasonUnrecognizedServicePrincipal,
  25512. InvalidInputExceptionReasonInvalidRoleName,
  25513. InvalidInputExceptionReasonInvalidSystemTagsParameter,
  25514. InvalidInputExceptionReasonDuplicateTagKey,
  25515. InvalidInputExceptionReasonTargetNotSupported,
  25516. InvalidInputExceptionReasonInvalidEmailAddressTarget,
  25517. InvalidInputExceptionReasonInvalidResourcePolicyJson,
  25518. InvalidInputExceptionReasonUnsupportedActionInResourcePolicy,
  25519. InvalidInputExceptionReasonUnsupportedPolicyTypeInResourcePolicy,
  25520. InvalidInputExceptionReasonUnsupportedResourceInResourcePolicy,
  25521. }
  25522. }
  25523. const (
  25524. // OrganizationFeatureSetAll is a OrganizationFeatureSet enum value
  25525. OrganizationFeatureSetAll = "ALL"
  25526. // OrganizationFeatureSetConsolidatedBilling is a OrganizationFeatureSet enum value
  25527. OrganizationFeatureSetConsolidatedBilling = "CONSOLIDATED_BILLING"
  25528. )
  25529. // OrganizationFeatureSet_Values returns all elements of the OrganizationFeatureSet enum
  25530. func OrganizationFeatureSet_Values() []string {
  25531. return []string{
  25532. OrganizationFeatureSetAll,
  25533. OrganizationFeatureSetConsolidatedBilling,
  25534. }
  25535. }
  25536. const (
  25537. // ParentTypeRoot is a ParentType enum value
  25538. ParentTypeRoot = "ROOT"
  25539. // ParentTypeOrganizationalUnit is a ParentType enum value
  25540. ParentTypeOrganizationalUnit = "ORGANIZATIONAL_UNIT"
  25541. )
  25542. // ParentType_Values returns all elements of the ParentType enum
  25543. func ParentType_Values() []string {
  25544. return []string{
  25545. ParentTypeRoot,
  25546. ParentTypeOrganizationalUnit,
  25547. }
  25548. }
  25549. const (
  25550. // PolicyTypeServiceControlPolicy is a PolicyType enum value
  25551. PolicyTypeServiceControlPolicy = "SERVICE_CONTROL_POLICY"
  25552. // PolicyTypeTagPolicy is a PolicyType enum value
  25553. PolicyTypeTagPolicy = "TAG_POLICY"
  25554. // PolicyTypeBackupPolicy is a PolicyType enum value
  25555. PolicyTypeBackupPolicy = "BACKUP_POLICY"
  25556. // PolicyTypeAiservicesOptOutPolicy is a PolicyType enum value
  25557. PolicyTypeAiservicesOptOutPolicy = "AISERVICES_OPT_OUT_POLICY"
  25558. )
  25559. // PolicyType_Values returns all elements of the PolicyType enum
  25560. func PolicyType_Values() []string {
  25561. return []string{
  25562. PolicyTypeServiceControlPolicy,
  25563. PolicyTypeTagPolicy,
  25564. PolicyTypeBackupPolicy,
  25565. PolicyTypeAiservicesOptOutPolicy,
  25566. }
  25567. }
  25568. const (
  25569. // PolicyTypeStatusEnabled is a PolicyTypeStatus enum value
  25570. PolicyTypeStatusEnabled = "ENABLED"
  25571. // PolicyTypeStatusPendingEnable is a PolicyTypeStatus enum value
  25572. PolicyTypeStatusPendingEnable = "PENDING_ENABLE"
  25573. // PolicyTypeStatusPendingDisable is a PolicyTypeStatus enum value
  25574. PolicyTypeStatusPendingDisable = "PENDING_DISABLE"
  25575. )
  25576. // PolicyTypeStatus_Values returns all elements of the PolicyTypeStatus enum
  25577. func PolicyTypeStatus_Values() []string {
  25578. return []string{
  25579. PolicyTypeStatusEnabled,
  25580. PolicyTypeStatusPendingEnable,
  25581. PolicyTypeStatusPendingDisable,
  25582. }
  25583. }
  25584. const (
  25585. // TargetTypeAccount is a TargetType enum value
  25586. TargetTypeAccount = "ACCOUNT"
  25587. // TargetTypeOrganizationalUnit is a TargetType enum value
  25588. TargetTypeOrganizationalUnit = "ORGANIZATIONAL_UNIT"
  25589. // TargetTypeRoot is a TargetType enum value
  25590. TargetTypeRoot = "ROOT"
  25591. )
  25592. // TargetType_Values returns all elements of the TargetType enum
  25593. func TargetType_Values() []string {
  25594. return []string{
  25595. TargetTypeAccount,
  25596. TargetTypeOrganizationalUnit,
  25597. TargetTypeRoot,
  25598. }
  25599. }