api.go 177 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package applicationautoscaling
  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 opDeleteScalingPolicy = "DeleteScalingPolicy"
  13. // DeleteScalingPolicyRequest generates a "aws/request.Request" representing the
  14. // client's request for the DeleteScalingPolicy 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 DeleteScalingPolicy for more information on using the DeleteScalingPolicy
  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. //
  28. // // Example sending a request using the DeleteScalingPolicyRequest method.
  29. // req, resp := client.DeleteScalingPolicyRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeleteScalingPolicy
  37. func (c *ApplicationAutoScaling) DeleteScalingPolicyRequest(input *DeleteScalingPolicyInput) (req *request.Request, output *DeleteScalingPolicyOutput) {
  38. op := &request.Operation{
  39. Name: opDeleteScalingPolicy,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &DeleteScalingPolicyInput{}
  45. }
  46. output = &DeleteScalingPolicyOutput{}
  47. req = c.newRequest(op, input, output)
  48. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  49. return
  50. }
  51. // DeleteScalingPolicy API operation for Application Auto Scaling.
  52. //
  53. // Deletes the specified Application Auto Scaling scaling policy.
  54. //
  55. // Deleting a policy deletes the underlying alarm action, but does not delete
  56. // the CloudWatch alarm associated with the scaling policy, even if it no longer
  57. // has an associated action.
  58. //
  59. // To create a scaling policy or update an existing one, see PutScalingPolicy.
  60. //
  61. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  62. // with awserr.Error's Code and Message methods to get detailed information about
  63. // the error.
  64. //
  65. // See the AWS API reference guide for Application Auto Scaling's
  66. // API operation DeleteScalingPolicy for usage and error information.
  67. //
  68. // Returned Error Codes:
  69. // * ErrCodeValidationException "ValidationException"
  70. // An exception was thrown for a validation issue. Review the available parameters
  71. // for the API request.
  72. //
  73. // * ErrCodeObjectNotFoundException "ObjectNotFoundException"
  74. // The specified object could not be found. For any operation that depends on
  75. // the existence of a scalable target, this exception is thrown if the scalable
  76. // target with the specified service namespace, resource ID, and scalable dimension
  77. // does not exist. For any operation that deletes or deregisters a resource,
  78. // this exception is thrown if the resource cannot be found.
  79. //
  80. // * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
  81. // Concurrent updates caused an exception, for example, if you request an update
  82. // to an Application Auto Scaling resource that already has a pending update.
  83. //
  84. // * ErrCodeInternalServiceException "InternalServiceException"
  85. // The service encountered an internal error.
  86. //
  87. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeleteScalingPolicy
  88. func (c *ApplicationAutoScaling) DeleteScalingPolicy(input *DeleteScalingPolicyInput) (*DeleteScalingPolicyOutput, error) {
  89. req, out := c.DeleteScalingPolicyRequest(input)
  90. return out, req.Send()
  91. }
  92. // DeleteScalingPolicyWithContext is the same as DeleteScalingPolicy with the addition of
  93. // the ability to pass a context and additional request options.
  94. //
  95. // See DeleteScalingPolicy for details on how to use this API operation.
  96. //
  97. // The context must be non-nil and will be used for request cancellation. If
  98. // the context is nil a panic will occur. In the future the SDK may create
  99. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  100. // for more information on using Contexts.
  101. func (c *ApplicationAutoScaling) DeleteScalingPolicyWithContext(ctx aws.Context, input *DeleteScalingPolicyInput, opts ...request.Option) (*DeleteScalingPolicyOutput, error) {
  102. req, out := c.DeleteScalingPolicyRequest(input)
  103. req.SetContext(ctx)
  104. req.ApplyOptions(opts...)
  105. return out, req.Send()
  106. }
  107. const opDeleteScheduledAction = "DeleteScheduledAction"
  108. // DeleteScheduledActionRequest generates a "aws/request.Request" representing the
  109. // client's request for the DeleteScheduledAction operation. The "output" return
  110. // value will be populated with the request's response once the request completes
  111. // successfully.
  112. //
  113. // Use "Send" method on the returned Request to send the API call to the service.
  114. // the "output" return value is not valid until after Send returns without error.
  115. //
  116. // See DeleteScheduledAction for more information on using the DeleteScheduledAction
  117. // API call, and error handling.
  118. //
  119. // This method is useful when you want to inject custom logic or configuration
  120. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  121. //
  122. //
  123. // // Example sending a request using the DeleteScheduledActionRequest method.
  124. // req, resp := client.DeleteScheduledActionRequest(params)
  125. //
  126. // err := req.Send()
  127. // if err == nil { // resp is now filled
  128. // fmt.Println(resp)
  129. // }
  130. //
  131. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeleteScheduledAction
  132. func (c *ApplicationAutoScaling) DeleteScheduledActionRequest(input *DeleteScheduledActionInput) (req *request.Request, output *DeleteScheduledActionOutput) {
  133. op := &request.Operation{
  134. Name: opDeleteScheduledAction,
  135. HTTPMethod: "POST",
  136. HTTPPath: "/",
  137. }
  138. if input == nil {
  139. input = &DeleteScheduledActionInput{}
  140. }
  141. output = &DeleteScheduledActionOutput{}
  142. req = c.newRequest(op, input, output)
  143. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  144. return
  145. }
  146. // DeleteScheduledAction API operation for Application Auto Scaling.
  147. //
  148. // Deletes the specified Application Auto Scaling scheduled action.
  149. //
  150. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  151. // with awserr.Error's Code and Message methods to get detailed information about
  152. // the error.
  153. //
  154. // See the AWS API reference guide for Application Auto Scaling's
  155. // API operation DeleteScheduledAction for usage and error information.
  156. //
  157. // Returned Error Codes:
  158. // * ErrCodeValidationException "ValidationException"
  159. // An exception was thrown for a validation issue. Review the available parameters
  160. // for the API request.
  161. //
  162. // * ErrCodeObjectNotFoundException "ObjectNotFoundException"
  163. // The specified object could not be found. For any operation that depends on
  164. // the existence of a scalable target, this exception is thrown if the scalable
  165. // target with the specified service namespace, resource ID, and scalable dimension
  166. // does not exist. For any operation that deletes or deregisters a resource,
  167. // this exception is thrown if the resource cannot be found.
  168. //
  169. // * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
  170. // Concurrent updates caused an exception, for example, if you request an update
  171. // to an Application Auto Scaling resource that already has a pending update.
  172. //
  173. // * ErrCodeInternalServiceException "InternalServiceException"
  174. // The service encountered an internal error.
  175. //
  176. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeleteScheduledAction
  177. func (c *ApplicationAutoScaling) DeleteScheduledAction(input *DeleteScheduledActionInput) (*DeleteScheduledActionOutput, error) {
  178. req, out := c.DeleteScheduledActionRequest(input)
  179. return out, req.Send()
  180. }
  181. // DeleteScheduledActionWithContext is the same as DeleteScheduledAction with the addition of
  182. // the ability to pass a context and additional request options.
  183. //
  184. // See DeleteScheduledAction for details on how to use this API operation.
  185. //
  186. // The context must be non-nil and will be used for request cancellation. If
  187. // the context is nil a panic will occur. In the future the SDK may create
  188. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  189. // for more information on using Contexts.
  190. func (c *ApplicationAutoScaling) DeleteScheduledActionWithContext(ctx aws.Context, input *DeleteScheduledActionInput, opts ...request.Option) (*DeleteScheduledActionOutput, error) {
  191. req, out := c.DeleteScheduledActionRequest(input)
  192. req.SetContext(ctx)
  193. req.ApplyOptions(opts...)
  194. return out, req.Send()
  195. }
  196. const opDeregisterScalableTarget = "DeregisterScalableTarget"
  197. // DeregisterScalableTargetRequest generates a "aws/request.Request" representing the
  198. // client's request for the DeregisterScalableTarget operation. The "output" return
  199. // value will be populated with the request's response once the request completes
  200. // successfully.
  201. //
  202. // Use "Send" method on the returned Request to send the API call to the service.
  203. // the "output" return value is not valid until after Send returns without error.
  204. //
  205. // See DeregisterScalableTarget for more information on using the DeregisterScalableTarget
  206. // API call, and error handling.
  207. //
  208. // This method is useful when you want to inject custom logic or configuration
  209. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  210. //
  211. //
  212. // // Example sending a request using the DeregisterScalableTargetRequest method.
  213. // req, resp := client.DeregisterScalableTargetRequest(params)
  214. //
  215. // err := req.Send()
  216. // if err == nil { // resp is now filled
  217. // fmt.Println(resp)
  218. // }
  219. //
  220. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeregisterScalableTarget
  221. func (c *ApplicationAutoScaling) DeregisterScalableTargetRequest(input *DeregisterScalableTargetInput) (req *request.Request, output *DeregisterScalableTargetOutput) {
  222. op := &request.Operation{
  223. Name: opDeregisterScalableTarget,
  224. HTTPMethod: "POST",
  225. HTTPPath: "/",
  226. }
  227. if input == nil {
  228. input = &DeregisterScalableTargetInput{}
  229. }
  230. output = &DeregisterScalableTargetOutput{}
  231. req = c.newRequest(op, input, output)
  232. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  233. return
  234. }
  235. // DeregisterScalableTarget API operation for Application Auto Scaling.
  236. //
  237. // Deregisters a scalable target.
  238. //
  239. // Deregistering a scalable target deletes the scaling policies that are associated
  240. // with it.
  241. //
  242. // To create a scalable target or update an existing one, see RegisterScalableTarget.
  243. //
  244. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  245. // with awserr.Error's Code and Message methods to get detailed information about
  246. // the error.
  247. //
  248. // See the AWS API reference guide for Application Auto Scaling's
  249. // API operation DeregisterScalableTarget for usage and error information.
  250. //
  251. // Returned Error Codes:
  252. // * ErrCodeValidationException "ValidationException"
  253. // An exception was thrown for a validation issue. Review the available parameters
  254. // for the API request.
  255. //
  256. // * ErrCodeObjectNotFoundException "ObjectNotFoundException"
  257. // The specified object could not be found. For any operation that depends on
  258. // the existence of a scalable target, this exception is thrown if the scalable
  259. // target with the specified service namespace, resource ID, and scalable dimension
  260. // does not exist. For any operation that deletes or deregisters a resource,
  261. // this exception is thrown if the resource cannot be found.
  262. //
  263. // * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
  264. // Concurrent updates caused an exception, for example, if you request an update
  265. // to an Application Auto Scaling resource that already has a pending update.
  266. //
  267. // * ErrCodeInternalServiceException "InternalServiceException"
  268. // The service encountered an internal error.
  269. //
  270. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeregisterScalableTarget
  271. func (c *ApplicationAutoScaling) DeregisterScalableTarget(input *DeregisterScalableTargetInput) (*DeregisterScalableTargetOutput, error) {
  272. req, out := c.DeregisterScalableTargetRequest(input)
  273. return out, req.Send()
  274. }
  275. // DeregisterScalableTargetWithContext is the same as DeregisterScalableTarget with the addition of
  276. // the ability to pass a context and additional request options.
  277. //
  278. // See DeregisterScalableTarget for details on how to use this API operation.
  279. //
  280. // The context must be non-nil and will be used for request cancellation. If
  281. // the context is nil a panic will occur. In the future the SDK may create
  282. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  283. // for more information on using Contexts.
  284. func (c *ApplicationAutoScaling) DeregisterScalableTargetWithContext(ctx aws.Context, input *DeregisterScalableTargetInput, opts ...request.Option) (*DeregisterScalableTargetOutput, error) {
  285. req, out := c.DeregisterScalableTargetRequest(input)
  286. req.SetContext(ctx)
  287. req.ApplyOptions(opts...)
  288. return out, req.Send()
  289. }
  290. const opDescribeScalableTargets = "DescribeScalableTargets"
  291. // DescribeScalableTargetsRequest generates a "aws/request.Request" representing the
  292. // client's request for the DescribeScalableTargets operation. The "output" return
  293. // value will be populated with the request's response once the request completes
  294. // successfully.
  295. //
  296. // Use "Send" method on the returned Request to send the API call to the service.
  297. // the "output" return value is not valid until after Send returns without error.
  298. //
  299. // See DescribeScalableTargets for more information on using the DescribeScalableTargets
  300. // API call, and error handling.
  301. //
  302. // This method is useful when you want to inject custom logic or configuration
  303. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  304. //
  305. //
  306. // // Example sending a request using the DescribeScalableTargetsRequest method.
  307. // req, resp := client.DescribeScalableTargetsRequest(params)
  308. //
  309. // err := req.Send()
  310. // if err == nil { // resp is now filled
  311. // fmt.Println(resp)
  312. // }
  313. //
  314. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalableTargets
  315. func (c *ApplicationAutoScaling) DescribeScalableTargetsRequest(input *DescribeScalableTargetsInput) (req *request.Request, output *DescribeScalableTargetsOutput) {
  316. op := &request.Operation{
  317. Name: opDescribeScalableTargets,
  318. HTTPMethod: "POST",
  319. HTTPPath: "/",
  320. Paginator: &request.Paginator{
  321. InputTokens: []string{"NextToken"},
  322. OutputTokens: []string{"NextToken"},
  323. LimitToken: "MaxResults",
  324. TruncationToken: "",
  325. },
  326. }
  327. if input == nil {
  328. input = &DescribeScalableTargetsInput{}
  329. }
  330. output = &DescribeScalableTargetsOutput{}
  331. req = c.newRequest(op, input, output)
  332. return
  333. }
  334. // DescribeScalableTargets API operation for Application Auto Scaling.
  335. //
  336. // Gets information about the scalable targets in the specified namespace.
  337. //
  338. // You can filter the results using the ResourceIds and ScalableDimension parameters.
  339. //
  340. // To create a scalable target or update an existing one, see RegisterScalableTarget.
  341. // If you are no longer using a scalable target, you can deregister it using
  342. // DeregisterScalableTarget.
  343. //
  344. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  345. // with awserr.Error's Code and Message methods to get detailed information about
  346. // the error.
  347. //
  348. // See the AWS API reference guide for Application Auto Scaling's
  349. // API operation DescribeScalableTargets for usage and error information.
  350. //
  351. // Returned Error Codes:
  352. // * ErrCodeValidationException "ValidationException"
  353. // An exception was thrown for a validation issue. Review the available parameters
  354. // for the API request.
  355. //
  356. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  357. // The next token supplied was invalid.
  358. //
  359. // * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
  360. // Concurrent updates caused an exception, for example, if you request an update
  361. // to an Application Auto Scaling resource that already has a pending update.
  362. //
  363. // * ErrCodeInternalServiceException "InternalServiceException"
  364. // The service encountered an internal error.
  365. //
  366. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalableTargets
  367. func (c *ApplicationAutoScaling) DescribeScalableTargets(input *DescribeScalableTargetsInput) (*DescribeScalableTargetsOutput, error) {
  368. req, out := c.DescribeScalableTargetsRequest(input)
  369. return out, req.Send()
  370. }
  371. // DescribeScalableTargetsWithContext is the same as DescribeScalableTargets with the addition of
  372. // the ability to pass a context and additional request options.
  373. //
  374. // See DescribeScalableTargets for details on how to use this API operation.
  375. //
  376. // The context must be non-nil and will be used for request cancellation. If
  377. // the context is nil a panic will occur. In the future the SDK may create
  378. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  379. // for more information on using Contexts.
  380. func (c *ApplicationAutoScaling) DescribeScalableTargetsWithContext(ctx aws.Context, input *DescribeScalableTargetsInput, opts ...request.Option) (*DescribeScalableTargetsOutput, error) {
  381. req, out := c.DescribeScalableTargetsRequest(input)
  382. req.SetContext(ctx)
  383. req.ApplyOptions(opts...)
  384. return out, req.Send()
  385. }
  386. // DescribeScalableTargetsPages iterates over the pages of a DescribeScalableTargets operation,
  387. // calling the "fn" function with the response data for each page. To stop
  388. // iterating, return false from the fn function.
  389. //
  390. // See DescribeScalableTargets method for more information on how to use this operation.
  391. //
  392. // Note: This operation can generate multiple requests to a service.
  393. //
  394. // // Example iterating over at most 3 pages of a DescribeScalableTargets operation.
  395. // pageNum := 0
  396. // err := client.DescribeScalableTargetsPages(params,
  397. // func(page *DescribeScalableTargetsOutput, lastPage bool) bool {
  398. // pageNum++
  399. // fmt.Println(page)
  400. // return pageNum <= 3
  401. // })
  402. //
  403. func (c *ApplicationAutoScaling) DescribeScalableTargetsPages(input *DescribeScalableTargetsInput, fn func(*DescribeScalableTargetsOutput, bool) bool) error {
  404. return c.DescribeScalableTargetsPagesWithContext(aws.BackgroundContext(), input, fn)
  405. }
  406. // DescribeScalableTargetsPagesWithContext same as DescribeScalableTargetsPages except
  407. // it takes a Context and allows setting request options on the pages.
  408. //
  409. // The context must be non-nil and will be used for request cancellation. If
  410. // the context is nil a panic will occur. In the future the SDK may create
  411. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  412. // for more information on using Contexts.
  413. func (c *ApplicationAutoScaling) DescribeScalableTargetsPagesWithContext(ctx aws.Context, input *DescribeScalableTargetsInput, fn func(*DescribeScalableTargetsOutput, bool) bool, opts ...request.Option) error {
  414. p := request.Pagination{
  415. NewRequest: func() (*request.Request, error) {
  416. var inCpy *DescribeScalableTargetsInput
  417. if input != nil {
  418. tmp := *input
  419. inCpy = &tmp
  420. }
  421. req, _ := c.DescribeScalableTargetsRequest(inCpy)
  422. req.SetContext(ctx)
  423. req.ApplyOptions(opts...)
  424. return req, nil
  425. },
  426. }
  427. cont := true
  428. for p.Next() && cont {
  429. cont = fn(p.Page().(*DescribeScalableTargetsOutput), !p.HasNextPage())
  430. }
  431. return p.Err()
  432. }
  433. const opDescribeScalingActivities = "DescribeScalingActivities"
  434. // DescribeScalingActivitiesRequest generates a "aws/request.Request" representing the
  435. // client's request for the DescribeScalingActivities operation. The "output" return
  436. // value will be populated with the request's response once the request completes
  437. // successfully.
  438. //
  439. // Use "Send" method on the returned Request to send the API call to the service.
  440. // the "output" return value is not valid until after Send returns without error.
  441. //
  442. // See DescribeScalingActivities for more information on using the DescribeScalingActivities
  443. // API call, and error handling.
  444. //
  445. // This method is useful when you want to inject custom logic or configuration
  446. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  447. //
  448. //
  449. // // Example sending a request using the DescribeScalingActivitiesRequest method.
  450. // req, resp := client.DescribeScalingActivitiesRequest(params)
  451. //
  452. // err := req.Send()
  453. // if err == nil { // resp is now filled
  454. // fmt.Println(resp)
  455. // }
  456. //
  457. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalingActivities
  458. func (c *ApplicationAutoScaling) DescribeScalingActivitiesRequest(input *DescribeScalingActivitiesInput) (req *request.Request, output *DescribeScalingActivitiesOutput) {
  459. op := &request.Operation{
  460. Name: opDescribeScalingActivities,
  461. HTTPMethod: "POST",
  462. HTTPPath: "/",
  463. Paginator: &request.Paginator{
  464. InputTokens: []string{"NextToken"},
  465. OutputTokens: []string{"NextToken"},
  466. LimitToken: "MaxResults",
  467. TruncationToken: "",
  468. },
  469. }
  470. if input == nil {
  471. input = &DescribeScalingActivitiesInput{}
  472. }
  473. output = &DescribeScalingActivitiesOutput{}
  474. req = c.newRequest(op, input, output)
  475. return
  476. }
  477. // DescribeScalingActivities API operation for Application Auto Scaling.
  478. //
  479. // Provides descriptive information about the scaling activities in the specified
  480. // namespace from the previous six weeks.
  481. //
  482. // You can filter the results using the ResourceId and ScalableDimension parameters.
  483. //
  484. // Scaling activities are triggered by CloudWatch alarms that are associated
  485. // with scaling policies. To view the scaling policies for a service namespace,
  486. // see DescribeScalingPolicies. To create a scaling policy or update an existing
  487. // one, see PutScalingPolicy.
  488. //
  489. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  490. // with awserr.Error's Code and Message methods to get detailed information about
  491. // the error.
  492. //
  493. // See the AWS API reference guide for Application Auto Scaling's
  494. // API operation DescribeScalingActivities for usage and error information.
  495. //
  496. // Returned Error Codes:
  497. // * ErrCodeValidationException "ValidationException"
  498. // An exception was thrown for a validation issue. Review the available parameters
  499. // for the API request.
  500. //
  501. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  502. // The next token supplied was invalid.
  503. //
  504. // * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
  505. // Concurrent updates caused an exception, for example, if you request an update
  506. // to an Application Auto Scaling resource that already has a pending update.
  507. //
  508. // * ErrCodeInternalServiceException "InternalServiceException"
  509. // The service encountered an internal error.
  510. //
  511. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalingActivities
  512. func (c *ApplicationAutoScaling) DescribeScalingActivities(input *DescribeScalingActivitiesInput) (*DescribeScalingActivitiesOutput, error) {
  513. req, out := c.DescribeScalingActivitiesRequest(input)
  514. return out, req.Send()
  515. }
  516. // DescribeScalingActivitiesWithContext is the same as DescribeScalingActivities with the addition of
  517. // the ability to pass a context and additional request options.
  518. //
  519. // See DescribeScalingActivities for details on how to use this API operation.
  520. //
  521. // The context must be non-nil and will be used for request cancellation. If
  522. // the context is nil a panic will occur. In the future the SDK may create
  523. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  524. // for more information on using Contexts.
  525. func (c *ApplicationAutoScaling) DescribeScalingActivitiesWithContext(ctx aws.Context, input *DescribeScalingActivitiesInput, opts ...request.Option) (*DescribeScalingActivitiesOutput, error) {
  526. req, out := c.DescribeScalingActivitiesRequest(input)
  527. req.SetContext(ctx)
  528. req.ApplyOptions(opts...)
  529. return out, req.Send()
  530. }
  531. // DescribeScalingActivitiesPages iterates over the pages of a DescribeScalingActivities operation,
  532. // calling the "fn" function with the response data for each page. To stop
  533. // iterating, return false from the fn function.
  534. //
  535. // See DescribeScalingActivities method for more information on how to use this operation.
  536. //
  537. // Note: This operation can generate multiple requests to a service.
  538. //
  539. // // Example iterating over at most 3 pages of a DescribeScalingActivities operation.
  540. // pageNum := 0
  541. // err := client.DescribeScalingActivitiesPages(params,
  542. // func(page *DescribeScalingActivitiesOutput, lastPage bool) bool {
  543. // pageNum++
  544. // fmt.Println(page)
  545. // return pageNum <= 3
  546. // })
  547. //
  548. func (c *ApplicationAutoScaling) DescribeScalingActivitiesPages(input *DescribeScalingActivitiesInput, fn func(*DescribeScalingActivitiesOutput, bool) bool) error {
  549. return c.DescribeScalingActivitiesPagesWithContext(aws.BackgroundContext(), input, fn)
  550. }
  551. // DescribeScalingActivitiesPagesWithContext same as DescribeScalingActivitiesPages except
  552. // it takes a Context and allows setting request options on the pages.
  553. //
  554. // The context must be non-nil and will be used for request cancellation. If
  555. // the context is nil a panic will occur. In the future the SDK may create
  556. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  557. // for more information on using Contexts.
  558. func (c *ApplicationAutoScaling) DescribeScalingActivitiesPagesWithContext(ctx aws.Context, input *DescribeScalingActivitiesInput, fn func(*DescribeScalingActivitiesOutput, bool) bool, opts ...request.Option) error {
  559. p := request.Pagination{
  560. NewRequest: func() (*request.Request, error) {
  561. var inCpy *DescribeScalingActivitiesInput
  562. if input != nil {
  563. tmp := *input
  564. inCpy = &tmp
  565. }
  566. req, _ := c.DescribeScalingActivitiesRequest(inCpy)
  567. req.SetContext(ctx)
  568. req.ApplyOptions(opts...)
  569. return req, nil
  570. },
  571. }
  572. cont := true
  573. for p.Next() && cont {
  574. cont = fn(p.Page().(*DescribeScalingActivitiesOutput), !p.HasNextPage())
  575. }
  576. return p.Err()
  577. }
  578. const opDescribeScalingPolicies = "DescribeScalingPolicies"
  579. // DescribeScalingPoliciesRequest generates a "aws/request.Request" representing the
  580. // client's request for the DescribeScalingPolicies operation. The "output" return
  581. // value will be populated with the request's response once the request completes
  582. // successfully.
  583. //
  584. // Use "Send" method on the returned Request to send the API call to the service.
  585. // the "output" return value is not valid until after Send returns without error.
  586. //
  587. // See DescribeScalingPolicies for more information on using the DescribeScalingPolicies
  588. // API call, and error handling.
  589. //
  590. // This method is useful when you want to inject custom logic or configuration
  591. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  592. //
  593. //
  594. // // Example sending a request using the DescribeScalingPoliciesRequest method.
  595. // req, resp := client.DescribeScalingPoliciesRequest(params)
  596. //
  597. // err := req.Send()
  598. // if err == nil { // resp is now filled
  599. // fmt.Println(resp)
  600. // }
  601. //
  602. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalingPolicies
  603. func (c *ApplicationAutoScaling) DescribeScalingPoliciesRequest(input *DescribeScalingPoliciesInput) (req *request.Request, output *DescribeScalingPoliciesOutput) {
  604. op := &request.Operation{
  605. Name: opDescribeScalingPolicies,
  606. HTTPMethod: "POST",
  607. HTTPPath: "/",
  608. Paginator: &request.Paginator{
  609. InputTokens: []string{"NextToken"},
  610. OutputTokens: []string{"NextToken"},
  611. LimitToken: "MaxResults",
  612. TruncationToken: "",
  613. },
  614. }
  615. if input == nil {
  616. input = &DescribeScalingPoliciesInput{}
  617. }
  618. output = &DescribeScalingPoliciesOutput{}
  619. req = c.newRequest(op, input, output)
  620. return
  621. }
  622. // DescribeScalingPolicies API operation for Application Auto Scaling.
  623. //
  624. // Describes the scaling policies for the specified service namespace.
  625. //
  626. // You can filter the results using the ResourceId, ScalableDimension, and PolicyNames
  627. // parameters.
  628. //
  629. // To create a scaling policy or update an existing one, see PutScalingPolicy.
  630. // If you are no longer using a scaling policy, you can delete it using DeleteScalingPolicy.
  631. //
  632. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  633. // with awserr.Error's Code and Message methods to get detailed information about
  634. // the error.
  635. //
  636. // See the AWS API reference guide for Application Auto Scaling's
  637. // API operation DescribeScalingPolicies for usage and error information.
  638. //
  639. // Returned Error Codes:
  640. // * ErrCodeValidationException "ValidationException"
  641. // An exception was thrown for a validation issue. Review the available parameters
  642. // for the API request.
  643. //
  644. // * ErrCodeFailedResourceAccessException "FailedResourceAccessException"
  645. // Failed access to resources caused an exception. This exception is thrown
  646. // when Application Auto Scaling is unable to retrieve the alarms associated
  647. // with a scaling policy due to a client error, for example, if the role ARN
  648. // specified for a scalable target does not have permission to call the CloudWatch
  649. // DescribeAlarms (http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html)
  650. // on your behalf.
  651. //
  652. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  653. // The next token supplied was invalid.
  654. //
  655. // * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
  656. // Concurrent updates caused an exception, for example, if you request an update
  657. // to an Application Auto Scaling resource that already has a pending update.
  658. //
  659. // * ErrCodeInternalServiceException "InternalServiceException"
  660. // The service encountered an internal error.
  661. //
  662. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalingPolicies
  663. func (c *ApplicationAutoScaling) DescribeScalingPolicies(input *DescribeScalingPoliciesInput) (*DescribeScalingPoliciesOutput, error) {
  664. req, out := c.DescribeScalingPoliciesRequest(input)
  665. return out, req.Send()
  666. }
  667. // DescribeScalingPoliciesWithContext is the same as DescribeScalingPolicies with the addition of
  668. // the ability to pass a context and additional request options.
  669. //
  670. // See DescribeScalingPolicies for details on how to use this API operation.
  671. //
  672. // The context must be non-nil and will be used for request cancellation. If
  673. // the context is nil a panic will occur. In the future the SDK may create
  674. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  675. // for more information on using Contexts.
  676. func (c *ApplicationAutoScaling) DescribeScalingPoliciesWithContext(ctx aws.Context, input *DescribeScalingPoliciesInput, opts ...request.Option) (*DescribeScalingPoliciesOutput, error) {
  677. req, out := c.DescribeScalingPoliciesRequest(input)
  678. req.SetContext(ctx)
  679. req.ApplyOptions(opts...)
  680. return out, req.Send()
  681. }
  682. // DescribeScalingPoliciesPages iterates over the pages of a DescribeScalingPolicies operation,
  683. // calling the "fn" function with the response data for each page. To stop
  684. // iterating, return false from the fn function.
  685. //
  686. // See DescribeScalingPolicies method for more information on how to use this operation.
  687. //
  688. // Note: This operation can generate multiple requests to a service.
  689. //
  690. // // Example iterating over at most 3 pages of a DescribeScalingPolicies operation.
  691. // pageNum := 0
  692. // err := client.DescribeScalingPoliciesPages(params,
  693. // func(page *DescribeScalingPoliciesOutput, lastPage bool) bool {
  694. // pageNum++
  695. // fmt.Println(page)
  696. // return pageNum <= 3
  697. // })
  698. //
  699. func (c *ApplicationAutoScaling) DescribeScalingPoliciesPages(input *DescribeScalingPoliciesInput, fn func(*DescribeScalingPoliciesOutput, bool) bool) error {
  700. return c.DescribeScalingPoliciesPagesWithContext(aws.BackgroundContext(), input, fn)
  701. }
  702. // DescribeScalingPoliciesPagesWithContext same as DescribeScalingPoliciesPages except
  703. // it takes a Context and allows setting request options on the pages.
  704. //
  705. // The context must be non-nil and will be used for request cancellation. If
  706. // the context is nil a panic will occur. In the future the SDK may create
  707. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  708. // for more information on using Contexts.
  709. func (c *ApplicationAutoScaling) DescribeScalingPoliciesPagesWithContext(ctx aws.Context, input *DescribeScalingPoliciesInput, fn func(*DescribeScalingPoliciesOutput, bool) bool, opts ...request.Option) error {
  710. p := request.Pagination{
  711. NewRequest: func() (*request.Request, error) {
  712. var inCpy *DescribeScalingPoliciesInput
  713. if input != nil {
  714. tmp := *input
  715. inCpy = &tmp
  716. }
  717. req, _ := c.DescribeScalingPoliciesRequest(inCpy)
  718. req.SetContext(ctx)
  719. req.ApplyOptions(opts...)
  720. return req, nil
  721. },
  722. }
  723. cont := true
  724. for p.Next() && cont {
  725. cont = fn(p.Page().(*DescribeScalingPoliciesOutput), !p.HasNextPage())
  726. }
  727. return p.Err()
  728. }
  729. const opDescribeScheduledActions = "DescribeScheduledActions"
  730. // DescribeScheduledActionsRequest generates a "aws/request.Request" representing the
  731. // client's request for the DescribeScheduledActions operation. The "output" return
  732. // value will be populated with the request's response once the request completes
  733. // successfully.
  734. //
  735. // Use "Send" method on the returned Request to send the API call to the service.
  736. // the "output" return value is not valid until after Send returns without error.
  737. //
  738. // See DescribeScheduledActions for more information on using the DescribeScheduledActions
  739. // API call, and error handling.
  740. //
  741. // This method is useful when you want to inject custom logic or configuration
  742. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  743. //
  744. //
  745. // // Example sending a request using the DescribeScheduledActionsRequest method.
  746. // req, resp := client.DescribeScheduledActionsRequest(params)
  747. //
  748. // err := req.Send()
  749. // if err == nil { // resp is now filled
  750. // fmt.Println(resp)
  751. // }
  752. //
  753. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScheduledActions
  754. func (c *ApplicationAutoScaling) DescribeScheduledActionsRequest(input *DescribeScheduledActionsInput) (req *request.Request, output *DescribeScheduledActionsOutput) {
  755. op := &request.Operation{
  756. Name: opDescribeScheduledActions,
  757. HTTPMethod: "POST",
  758. HTTPPath: "/",
  759. }
  760. if input == nil {
  761. input = &DescribeScheduledActionsInput{}
  762. }
  763. output = &DescribeScheduledActionsOutput{}
  764. req = c.newRequest(op, input, output)
  765. return
  766. }
  767. // DescribeScheduledActions API operation for Application Auto Scaling.
  768. //
  769. // Describes the scheduled actions for the specified service namespace.
  770. //
  771. // You can filter the results using the ResourceId, ScalableDimension, and ScheduledActionNames
  772. // parameters.
  773. //
  774. // To create a scheduled action or update an existing one, see PutScheduledAction.
  775. // If you are no longer using a scheduled action, you can delete it using DeleteScheduledAction.
  776. //
  777. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  778. // with awserr.Error's Code and Message methods to get detailed information about
  779. // the error.
  780. //
  781. // See the AWS API reference guide for Application Auto Scaling's
  782. // API operation DescribeScheduledActions for usage and error information.
  783. //
  784. // Returned Error Codes:
  785. // * ErrCodeValidationException "ValidationException"
  786. // An exception was thrown for a validation issue. Review the available parameters
  787. // for the API request.
  788. //
  789. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  790. // The next token supplied was invalid.
  791. //
  792. // * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
  793. // Concurrent updates caused an exception, for example, if you request an update
  794. // to an Application Auto Scaling resource that already has a pending update.
  795. //
  796. // * ErrCodeInternalServiceException "InternalServiceException"
  797. // The service encountered an internal error.
  798. //
  799. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScheduledActions
  800. func (c *ApplicationAutoScaling) DescribeScheduledActions(input *DescribeScheduledActionsInput) (*DescribeScheduledActionsOutput, error) {
  801. req, out := c.DescribeScheduledActionsRequest(input)
  802. return out, req.Send()
  803. }
  804. // DescribeScheduledActionsWithContext is the same as DescribeScheduledActions with the addition of
  805. // the ability to pass a context and additional request options.
  806. //
  807. // See DescribeScheduledActions for details on how to use this API operation.
  808. //
  809. // The context must be non-nil and will be used for request cancellation. If
  810. // the context is nil a panic will occur. In the future the SDK may create
  811. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  812. // for more information on using Contexts.
  813. func (c *ApplicationAutoScaling) DescribeScheduledActionsWithContext(ctx aws.Context, input *DescribeScheduledActionsInput, opts ...request.Option) (*DescribeScheduledActionsOutput, error) {
  814. req, out := c.DescribeScheduledActionsRequest(input)
  815. req.SetContext(ctx)
  816. req.ApplyOptions(opts...)
  817. return out, req.Send()
  818. }
  819. const opPutScalingPolicy = "PutScalingPolicy"
  820. // PutScalingPolicyRequest generates a "aws/request.Request" representing the
  821. // client's request for the PutScalingPolicy operation. The "output" return
  822. // value will be populated with the request's response once the request completes
  823. // successfully.
  824. //
  825. // Use "Send" method on the returned Request to send the API call to the service.
  826. // the "output" return value is not valid until after Send returns without error.
  827. //
  828. // See PutScalingPolicy for more information on using the PutScalingPolicy
  829. // API call, and error handling.
  830. //
  831. // This method is useful when you want to inject custom logic or configuration
  832. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  833. //
  834. //
  835. // // Example sending a request using the PutScalingPolicyRequest method.
  836. // req, resp := client.PutScalingPolicyRequest(params)
  837. //
  838. // err := req.Send()
  839. // if err == nil { // resp is now filled
  840. // fmt.Println(resp)
  841. // }
  842. //
  843. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PutScalingPolicy
  844. func (c *ApplicationAutoScaling) PutScalingPolicyRequest(input *PutScalingPolicyInput) (req *request.Request, output *PutScalingPolicyOutput) {
  845. op := &request.Operation{
  846. Name: opPutScalingPolicy,
  847. HTTPMethod: "POST",
  848. HTTPPath: "/",
  849. }
  850. if input == nil {
  851. input = &PutScalingPolicyInput{}
  852. }
  853. output = &PutScalingPolicyOutput{}
  854. req = c.newRequest(op, input, output)
  855. return
  856. }
  857. // PutScalingPolicy API operation for Application Auto Scaling.
  858. //
  859. // Creates or updates a policy for an Application Auto Scaling scalable target.
  860. //
  861. // Each scalable target is identified by a service namespace, resource ID, and
  862. // scalable dimension. A scaling policy applies to the scalable target identified
  863. // by those three attributes. You cannot create a scaling policy until you register
  864. // the scalable target using RegisterScalableTarget.
  865. //
  866. // To update a policy, specify its policy name and the parameters that you want
  867. // to change. Any parameters that you don't specify are not changed by this
  868. // update request.
  869. //
  870. // You can view the scaling policies for a service namespace using DescribeScalingPolicies.
  871. // If you are no longer using a scaling policy, you can delete it using DeleteScalingPolicy.
  872. //
  873. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  874. // with awserr.Error's Code and Message methods to get detailed information about
  875. // the error.
  876. //
  877. // See the AWS API reference guide for Application Auto Scaling's
  878. // API operation PutScalingPolicy for usage and error information.
  879. //
  880. // Returned Error Codes:
  881. // * ErrCodeValidationException "ValidationException"
  882. // An exception was thrown for a validation issue. Review the available parameters
  883. // for the API request.
  884. //
  885. // * ErrCodeLimitExceededException "LimitExceededException"
  886. // A per-account resource limit is exceeded. For more information, see Application
  887. // Auto Scaling Limits (http://docs.aws.amazon.com/ApplicationAutoScaling/latest/userguide/application-auto-scaling-limits.html).
  888. //
  889. // * ErrCodeObjectNotFoundException "ObjectNotFoundException"
  890. // The specified object could not be found. For any operation that depends on
  891. // the existence of a scalable target, this exception is thrown if the scalable
  892. // target with the specified service namespace, resource ID, and scalable dimension
  893. // does not exist. For any operation that deletes or deregisters a resource,
  894. // this exception is thrown if the resource cannot be found.
  895. //
  896. // * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
  897. // Concurrent updates caused an exception, for example, if you request an update
  898. // to an Application Auto Scaling resource that already has a pending update.
  899. //
  900. // * ErrCodeFailedResourceAccessException "FailedResourceAccessException"
  901. // Failed access to resources caused an exception. This exception is thrown
  902. // when Application Auto Scaling is unable to retrieve the alarms associated
  903. // with a scaling policy due to a client error, for example, if the role ARN
  904. // specified for a scalable target does not have permission to call the CloudWatch
  905. // DescribeAlarms (http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html)
  906. // on your behalf.
  907. //
  908. // * ErrCodeInternalServiceException "InternalServiceException"
  909. // The service encountered an internal error.
  910. //
  911. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PutScalingPolicy
  912. func (c *ApplicationAutoScaling) PutScalingPolicy(input *PutScalingPolicyInput) (*PutScalingPolicyOutput, error) {
  913. req, out := c.PutScalingPolicyRequest(input)
  914. return out, req.Send()
  915. }
  916. // PutScalingPolicyWithContext is the same as PutScalingPolicy with the addition of
  917. // the ability to pass a context and additional request options.
  918. //
  919. // See PutScalingPolicy for details on how to use this API operation.
  920. //
  921. // The context must be non-nil and will be used for request cancellation. If
  922. // the context is nil a panic will occur. In the future the SDK may create
  923. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  924. // for more information on using Contexts.
  925. func (c *ApplicationAutoScaling) PutScalingPolicyWithContext(ctx aws.Context, input *PutScalingPolicyInput, opts ...request.Option) (*PutScalingPolicyOutput, error) {
  926. req, out := c.PutScalingPolicyRequest(input)
  927. req.SetContext(ctx)
  928. req.ApplyOptions(opts...)
  929. return out, req.Send()
  930. }
  931. const opPutScheduledAction = "PutScheduledAction"
  932. // PutScheduledActionRequest generates a "aws/request.Request" representing the
  933. // client's request for the PutScheduledAction operation. The "output" return
  934. // value will be populated with the request's response once the request completes
  935. // successfully.
  936. //
  937. // Use "Send" method on the returned Request to send the API call to the service.
  938. // the "output" return value is not valid until after Send returns without error.
  939. //
  940. // See PutScheduledAction for more information on using the PutScheduledAction
  941. // API call, and error handling.
  942. //
  943. // This method is useful when you want to inject custom logic or configuration
  944. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  945. //
  946. //
  947. // // Example sending a request using the PutScheduledActionRequest method.
  948. // req, resp := client.PutScheduledActionRequest(params)
  949. //
  950. // err := req.Send()
  951. // if err == nil { // resp is now filled
  952. // fmt.Println(resp)
  953. // }
  954. //
  955. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PutScheduledAction
  956. func (c *ApplicationAutoScaling) PutScheduledActionRequest(input *PutScheduledActionInput) (req *request.Request, output *PutScheduledActionOutput) {
  957. op := &request.Operation{
  958. Name: opPutScheduledAction,
  959. HTTPMethod: "POST",
  960. HTTPPath: "/",
  961. }
  962. if input == nil {
  963. input = &PutScheduledActionInput{}
  964. }
  965. output = &PutScheduledActionOutput{}
  966. req = c.newRequest(op, input, output)
  967. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  968. return
  969. }
  970. // PutScheduledAction API operation for Application Auto Scaling.
  971. //
  972. // Creates or updates a scheduled action for an Application Auto Scaling scalable
  973. // target.
  974. //
  975. // Each scalable target is identified by a service namespace, resource ID, and
  976. // scalable dimension. A scheduled action applies to the scalable target identified
  977. // by those three attributes. You cannot create a scheduled action until you
  978. // register the scalable target using RegisterScalableTarget.
  979. //
  980. // To update an action, specify its name and the parameters that you want to
  981. // change. If you don't specify start and end times, the old values are deleted.
  982. // Any other parameters that you don't specify are not changed by this update
  983. // request.
  984. //
  985. // You can view the scheduled actions using DescribeScheduledActions. If you
  986. // are no longer using a scheduled action, you can delete it using DeleteScheduledAction.
  987. //
  988. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  989. // with awserr.Error's Code and Message methods to get detailed information about
  990. // the error.
  991. //
  992. // See the AWS API reference guide for Application Auto Scaling's
  993. // API operation PutScheduledAction for usage and error information.
  994. //
  995. // Returned Error Codes:
  996. // * ErrCodeValidationException "ValidationException"
  997. // An exception was thrown for a validation issue. Review the available parameters
  998. // for the API request.
  999. //
  1000. // * ErrCodeLimitExceededException "LimitExceededException"
  1001. // A per-account resource limit is exceeded. For more information, see Application
  1002. // Auto Scaling Limits (http://docs.aws.amazon.com/ApplicationAutoScaling/latest/userguide/application-auto-scaling-limits.html).
  1003. //
  1004. // * ErrCodeObjectNotFoundException "ObjectNotFoundException"
  1005. // The specified object could not be found. For any operation that depends on
  1006. // the existence of a scalable target, this exception is thrown if the scalable
  1007. // target with the specified service namespace, resource ID, and scalable dimension
  1008. // does not exist. For any operation that deletes or deregisters a resource,
  1009. // this exception is thrown if the resource cannot be found.
  1010. //
  1011. // * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
  1012. // Concurrent updates caused an exception, for example, if you request an update
  1013. // to an Application Auto Scaling resource that already has a pending update.
  1014. //
  1015. // * ErrCodeInternalServiceException "InternalServiceException"
  1016. // The service encountered an internal error.
  1017. //
  1018. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PutScheduledAction
  1019. func (c *ApplicationAutoScaling) PutScheduledAction(input *PutScheduledActionInput) (*PutScheduledActionOutput, error) {
  1020. req, out := c.PutScheduledActionRequest(input)
  1021. return out, req.Send()
  1022. }
  1023. // PutScheduledActionWithContext is the same as PutScheduledAction with the addition of
  1024. // the ability to pass a context and additional request options.
  1025. //
  1026. // See PutScheduledAction for details on how to use this API operation.
  1027. //
  1028. // The context must be non-nil and will be used for request cancellation. If
  1029. // the context is nil a panic will occur. In the future the SDK may create
  1030. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1031. // for more information on using Contexts.
  1032. func (c *ApplicationAutoScaling) PutScheduledActionWithContext(ctx aws.Context, input *PutScheduledActionInput, opts ...request.Option) (*PutScheduledActionOutput, error) {
  1033. req, out := c.PutScheduledActionRequest(input)
  1034. req.SetContext(ctx)
  1035. req.ApplyOptions(opts...)
  1036. return out, req.Send()
  1037. }
  1038. const opRegisterScalableTarget = "RegisterScalableTarget"
  1039. // RegisterScalableTargetRequest generates a "aws/request.Request" representing the
  1040. // client's request for the RegisterScalableTarget operation. The "output" return
  1041. // value will be populated with the request's response once the request completes
  1042. // successfully.
  1043. //
  1044. // Use "Send" method on the returned Request to send the API call to the service.
  1045. // the "output" return value is not valid until after Send returns without error.
  1046. //
  1047. // See RegisterScalableTarget for more information on using the RegisterScalableTarget
  1048. // API call, and error handling.
  1049. //
  1050. // This method is useful when you want to inject custom logic or configuration
  1051. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1052. //
  1053. //
  1054. // // Example sending a request using the RegisterScalableTargetRequest method.
  1055. // req, resp := client.RegisterScalableTargetRequest(params)
  1056. //
  1057. // err := req.Send()
  1058. // if err == nil { // resp is now filled
  1059. // fmt.Println(resp)
  1060. // }
  1061. //
  1062. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/RegisterScalableTarget
  1063. func (c *ApplicationAutoScaling) RegisterScalableTargetRequest(input *RegisterScalableTargetInput) (req *request.Request, output *RegisterScalableTargetOutput) {
  1064. op := &request.Operation{
  1065. Name: opRegisterScalableTarget,
  1066. HTTPMethod: "POST",
  1067. HTTPPath: "/",
  1068. }
  1069. if input == nil {
  1070. input = &RegisterScalableTargetInput{}
  1071. }
  1072. output = &RegisterScalableTargetOutput{}
  1073. req = c.newRequest(op, input, output)
  1074. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1075. return
  1076. }
  1077. // RegisterScalableTarget API operation for Application Auto Scaling.
  1078. //
  1079. // Registers or updates a scalable target. A scalable target is a resource that
  1080. // Application Auto Scaling can scale out or scale in. After you have registered
  1081. // a scalable target, you can use this operation to update the minimum and maximum
  1082. // values for its scalable dimension.
  1083. //
  1084. // After you register a scalable target, you can create and apply scaling policies
  1085. // using PutScalingPolicy. You can view the scaling policies for a service namespace
  1086. // using DescribeScalableTargets. If you no longer need a scalable target, you
  1087. // can deregister it using DeregisterScalableTarget.
  1088. //
  1089. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1090. // with awserr.Error's Code and Message methods to get detailed information about
  1091. // the error.
  1092. //
  1093. // See the AWS API reference guide for Application Auto Scaling's
  1094. // API operation RegisterScalableTarget for usage and error information.
  1095. //
  1096. // Returned Error Codes:
  1097. // * ErrCodeValidationException "ValidationException"
  1098. // An exception was thrown for a validation issue. Review the available parameters
  1099. // for the API request.
  1100. //
  1101. // * ErrCodeLimitExceededException "LimitExceededException"
  1102. // A per-account resource limit is exceeded. For more information, see Application
  1103. // Auto Scaling Limits (http://docs.aws.amazon.com/ApplicationAutoScaling/latest/userguide/application-auto-scaling-limits.html).
  1104. //
  1105. // * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
  1106. // Concurrent updates caused an exception, for example, if you request an update
  1107. // to an Application Auto Scaling resource that already has a pending update.
  1108. //
  1109. // * ErrCodeInternalServiceException "InternalServiceException"
  1110. // The service encountered an internal error.
  1111. //
  1112. // See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/RegisterScalableTarget
  1113. func (c *ApplicationAutoScaling) RegisterScalableTarget(input *RegisterScalableTargetInput) (*RegisterScalableTargetOutput, error) {
  1114. req, out := c.RegisterScalableTargetRequest(input)
  1115. return out, req.Send()
  1116. }
  1117. // RegisterScalableTargetWithContext is the same as RegisterScalableTarget with the addition of
  1118. // the ability to pass a context and additional request options.
  1119. //
  1120. // See RegisterScalableTarget for details on how to use this API operation.
  1121. //
  1122. // The context must be non-nil and will be used for request cancellation. If
  1123. // the context is nil a panic will occur. In the future the SDK may create
  1124. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1125. // for more information on using Contexts.
  1126. func (c *ApplicationAutoScaling) RegisterScalableTargetWithContext(ctx aws.Context, input *RegisterScalableTargetInput, opts ...request.Option) (*RegisterScalableTargetOutput, error) {
  1127. req, out := c.RegisterScalableTargetRequest(input)
  1128. req.SetContext(ctx)
  1129. req.ApplyOptions(opts...)
  1130. return out, req.Send()
  1131. }
  1132. // Represents a CloudWatch alarm associated with a scaling policy.
  1133. type Alarm struct {
  1134. _ struct{} `type:"structure"`
  1135. // The Amazon Resource Name (ARN) of the alarm.
  1136. //
  1137. // AlarmARN is a required field
  1138. AlarmARN *string `type:"string" required:"true"`
  1139. // The name of the alarm.
  1140. //
  1141. // AlarmName is a required field
  1142. AlarmName *string `type:"string" required:"true"`
  1143. }
  1144. // String returns the string representation
  1145. func (s Alarm) String() string {
  1146. return awsutil.Prettify(s)
  1147. }
  1148. // GoString returns the string representation
  1149. func (s Alarm) GoString() string {
  1150. return s.String()
  1151. }
  1152. // SetAlarmARN sets the AlarmARN field's value.
  1153. func (s *Alarm) SetAlarmARN(v string) *Alarm {
  1154. s.AlarmARN = &v
  1155. return s
  1156. }
  1157. // SetAlarmName sets the AlarmName field's value.
  1158. func (s *Alarm) SetAlarmName(v string) *Alarm {
  1159. s.AlarmName = &v
  1160. return s
  1161. }
  1162. // Configures a customized metric for a target tracking policy.
  1163. type CustomizedMetricSpecification struct {
  1164. _ struct{} `type:"structure"`
  1165. // The dimensions of the metric.
  1166. Dimensions []*MetricDimension `type:"list"`
  1167. // The name of the metric.
  1168. //
  1169. // MetricName is a required field
  1170. MetricName *string `type:"string" required:"true"`
  1171. // The namespace of the metric.
  1172. //
  1173. // Namespace is a required field
  1174. Namespace *string `type:"string" required:"true"`
  1175. // The statistic of the metric.
  1176. //
  1177. // Statistic is a required field
  1178. Statistic *string `type:"string" required:"true" enum:"MetricStatistic"`
  1179. // The unit of the metric.
  1180. Unit *string `type:"string"`
  1181. }
  1182. // String returns the string representation
  1183. func (s CustomizedMetricSpecification) String() string {
  1184. return awsutil.Prettify(s)
  1185. }
  1186. // GoString returns the string representation
  1187. func (s CustomizedMetricSpecification) GoString() string {
  1188. return s.String()
  1189. }
  1190. // Validate inspects the fields of the type to determine if they are valid.
  1191. func (s *CustomizedMetricSpecification) Validate() error {
  1192. invalidParams := request.ErrInvalidParams{Context: "CustomizedMetricSpecification"}
  1193. if s.MetricName == nil {
  1194. invalidParams.Add(request.NewErrParamRequired("MetricName"))
  1195. }
  1196. if s.Namespace == nil {
  1197. invalidParams.Add(request.NewErrParamRequired("Namespace"))
  1198. }
  1199. if s.Statistic == nil {
  1200. invalidParams.Add(request.NewErrParamRequired("Statistic"))
  1201. }
  1202. if s.Dimensions != nil {
  1203. for i, v := range s.Dimensions {
  1204. if v == nil {
  1205. continue
  1206. }
  1207. if err := v.Validate(); err != nil {
  1208. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams))
  1209. }
  1210. }
  1211. }
  1212. if invalidParams.Len() > 0 {
  1213. return invalidParams
  1214. }
  1215. return nil
  1216. }
  1217. // SetDimensions sets the Dimensions field's value.
  1218. func (s *CustomizedMetricSpecification) SetDimensions(v []*MetricDimension) *CustomizedMetricSpecification {
  1219. s.Dimensions = v
  1220. return s
  1221. }
  1222. // SetMetricName sets the MetricName field's value.
  1223. func (s *CustomizedMetricSpecification) SetMetricName(v string) *CustomizedMetricSpecification {
  1224. s.MetricName = &v
  1225. return s
  1226. }
  1227. // SetNamespace sets the Namespace field's value.
  1228. func (s *CustomizedMetricSpecification) SetNamespace(v string) *CustomizedMetricSpecification {
  1229. s.Namespace = &v
  1230. return s
  1231. }
  1232. // SetStatistic sets the Statistic field's value.
  1233. func (s *CustomizedMetricSpecification) SetStatistic(v string) *CustomizedMetricSpecification {
  1234. s.Statistic = &v
  1235. return s
  1236. }
  1237. // SetUnit sets the Unit field's value.
  1238. func (s *CustomizedMetricSpecification) SetUnit(v string) *CustomizedMetricSpecification {
  1239. s.Unit = &v
  1240. return s
  1241. }
  1242. type DeleteScalingPolicyInput struct {
  1243. _ struct{} `type:"structure"`
  1244. // The name of the scaling policy.
  1245. //
  1246. // PolicyName is a required field
  1247. PolicyName *string `min:"1" type:"string" required:"true"`
  1248. // The identifier of the resource associated with the scalable target. This
  1249. // string consists of the resource type and unique identifier.
  1250. //
  1251. // * ECS service - The resource type is service and the unique identifier
  1252. // is the cluster name and service name. Example: service/default/sample-webapp.
  1253. //
  1254. // * Spot fleet request - The resource type is spot-fleet-request and the
  1255. // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
  1256. //
  1257. // * EMR cluster - The resource type is instancegroup and the unique identifier
  1258. // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
  1259. //
  1260. // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
  1261. // is the fleet name. Example: fleet/sample-fleet.
  1262. //
  1263. // * DynamoDB table - The resource type is table and the unique identifier
  1264. // is the resource ID. Example: table/my-table.
  1265. //
  1266. // * DynamoDB global secondary index - The resource type is index and the
  1267. // unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
  1268. //
  1269. // * Aurora DB cluster - The resource type is cluster and the unique identifier
  1270. // is the cluster name. Example: cluster:my-db-cluster.
  1271. //
  1272. // * Amazon SageMaker endpoint variants - The resource type is variant and
  1273. // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
  1274. //
  1275. // * Custom resources are not supported with a resource type. This parameter
  1276. // must specify the OutputValue from the CloudFormation template stack used
  1277. // to access the resources. The unique identifier is defined by the service
  1278. // provider.
  1279. //
  1280. // ResourceId is a required field
  1281. ResourceId *string `min:"1" type:"string" required:"true"`
  1282. // The scalable dimension. This string consists of the service namespace, resource
  1283. // type, and scaling property.
  1284. //
  1285. // * ecs:service:DesiredCount - The desired task count of an ECS service.
  1286. //
  1287. // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
  1288. // fleet request.
  1289. //
  1290. // * elasticmapreduce:instancegroup:InstanceCount - The instance count of
  1291. // an EMR Instance Group.
  1292. //
  1293. // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
  1294. // 2.0 fleet.
  1295. //
  1296. // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
  1297. // a DynamoDB table.
  1298. //
  1299. // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
  1300. // a DynamoDB table.
  1301. //
  1302. // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
  1303. // a DynamoDB global secondary index.
  1304. //
  1305. // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
  1306. // a DynamoDB global secondary index.
  1307. //
  1308. // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
  1309. // DB cluster. Available for Aurora MySQL-compatible edition.
  1310. //
  1311. // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
  1312. // for an Amazon SageMaker model endpoint variant.
  1313. //
  1314. // * custom-resource:ResourceType:Property - The scalable dimension for a
  1315. // custom resource provided by your own application or service.
  1316. //
  1317. // ScalableDimension is a required field
  1318. ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"`
  1319. // The namespace of the AWS service that provides the resource or custom-resource
  1320. // for a resource provided by your own application or service. For more information,
  1321. // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
  1322. // in the Amazon Web Services General Reference.
  1323. //
  1324. // ServiceNamespace is a required field
  1325. ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
  1326. }
  1327. // String returns the string representation
  1328. func (s DeleteScalingPolicyInput) String() string {
  1329. return awsutil.Prettify(s)
  1330. }
  1331. // GoString returns the string representation
  1332. func (s DeleteScalingPolicyInput) GoString() string {
  1333. return s.String()
  1334. }
  1335. // Validate inspects the fields of the type to determine if they are valid.
  1336. func (s *DeleteScalingPolicyInput) Validate() error {
  1337. invalidParams := request.ErrInvalidParams{Context: "DeleteScalingPolicyInput"}
  1338. if s.PolicyName == nil {
  1339. invalidParams.Add(request.NewErrParamRequired("PolicyName"))
  1340. }
  1341. if s.PolicyName != nil && len(*s.PolicyName) < 1 {
  1342. invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
  1343. }
  1344. if s.ResourceId == nil {
  1345. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  1346. }
  1347. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  1348. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  1349. }
  1350. if s.ScalableDimension == nil {
  1351. invalidParams.Add(request.NewErrParamRequired("ScalableDimension"))
  1352. }
  1353. if s.ServiceNamespace == nil {
  1354. invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
  1355. }
  1356. if invalidParams.Len() > 0 {
  1357. return invalidParams
  1358. }
  1359. return nil
  1360. }
  1361. // SetPolicyName sets the PolicyName field's value.
  1362. func (s *DeleteScalingPolicyInput) SetPolicyName(v string) *DeleteScalingPolicyInput {
  1363. s.PolicyName = &v
  1364. return s
  1365. }
  1366. // SetResourceId sets the ResourceId field's value.
  1367. func (s *DeleteScalingPolicyInput) SetResourceId(v string) *DeleteScalingPolicyInput {
  1368. s.ResourceId = &v
  1369. return s
  1370. }
  1371. // SetScalableDimension sets the ScalableDimension field's value.
  1372. func (s *DeleteScalingPolicyInput) SetScalableDimension(v string) *DeleteScalingPolicyInput {
  1373. s.ScalableDimension = &v
  1374. return s
  1375. }
  1376. // SetServiceNamespace sets the ServiceNamespace field's value.
  1377. func (s *DeleteScalingPolicyInput) SetServiceNamespace(v string) *DeleteScalingPolicyInput {
  1378. s.ServiceNamespace = &v
  1379. return s
  1380. }
  1381. type DeleteScalingPolicyOutput struct {
  1382. _ struct{} `type:"structure"`
  1383. }
  1384. // String returns the string representation
  1385. func (s DeleteScalingPolicyOutput) String() string {
  1386. return awsutil.Prettify(s)
  1387. }
  1388. // GoString returns the string representation
  1389. func (s DeleteScalingPolicyOutput) GoString() string {
  1390. return s.String()
  1391. }
  1392. type DeleteScheduledActionInput struct {
  1393. _ struct{} `type:"structure"`
  1394. // The identifier of the resource associated with the scheduled action. This
  1395. // string consists of the resource type and unique identifier.
  1396. //
  1397. // * ECS service - The resource type is service and the unique identifier
  1398. // is the cluster name and service name. Example: service/default/sample-webapp.
  1399. //
  1400. // * Spot fleet request - The resource type is spot-fleet-request and the
  1401. // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
  1402. //
  1403. // * EMR cluster - The resource type is instancegroup and the unique identifier
  1404. // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
  1405. //
  1406. // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
  1407. // is the fleet name. Example: fleet/sample-fleet.
  1408. //
  1409. // * DynamoDB table - The resource type is table and the unique identifier
  1410. // is the resource ID. Example: table/my-table.
  1411. //
  1412. // * DynamoDB global secondary index - The resource type is index and the
  1413. // unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
  1414. //
  1415. // * Aurora DB cluster - The resource type is cluster and the unique identifier
  1416. // is the cluster name. Example: cluster:my-db-cluster.
  1417. //
  1418. // * Amazon SageMaker endpoint variants - The resource type is variant and
  1419. // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
  1420. //
  1421. // * Custom resources are not supported with a resource type. This parameter
  1422. // must specify the OutputValue from the CloudFormation template stack used
  1423. // to access the resources. The unique identifier is defined by the service
  1424. // provider.
  1425. //
  1426. // ResourceId is a required field
  1427. ResourceId *string `min:"1" type:"string" required:"true"`
  1428. // The scalable dimension. This string consists of the service namespace, resource
  1429. // type, and scaling property.
  1430. //
  1431. // * ecs:service:DesiredCount - The desired task count of an ECS service.
  1432. //
  1433. // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
  1434. // fleet request.
  1435. //
  1436. // * elasticmapreduce:instancegroup:InstanceCount - The instance count of
  1437. // an EMR Instance Group.
  1438. //
  1439. // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
  1440. // 2.0 fleet.
  1441. //
  1442. // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
  1443. // a DynamoDB table.
  1444. //
  1445. // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
  1446. // a DynamoDB table.
  1447. //
  1448. // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
  1449. // a DynamoDB global secondary index.
  1450. //
  1451. // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
  1452. // a DynamoDB global secondary index.
  1453. //
  1454. // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
  1455. // DB cluster. Available for Aurora MySQL-compatible edition.
  1456. //
  1457. // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
  1458. // for an Amazon SageMaker model endpoint variant.
  1459. //
  1460. // * custom-resource:ResourceType:Property - The scalable dimension for a
  1461. // custom resource provided by your own application or service.
  1462. ScalableDimension *string `type:"string" enum:"ScalableDimension"`
  1463. // The name of the scheduled action.
  1464. //
  1465. // ScheduledActionName is a required field
  1466. ScheduledActionName *string `min:"1" type:"string" required:"true"`
  1467. // The namespace of the AWS service that provides the resource or custom-resource
  1468. // for a resource provided by your own application or service. For more information,
  1469. // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
  1470. // in the Amazon Web Services General Reference.
  1471. //
  1472. // ServiceNamespace is a required field
  1473. ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
  1474. }
  1475. // String returns the string representation
  1476. func (s DeleteScheduledActionInput) String() string {
  1477. return awsutil.Prettify(s)
  1478. }
  1479. // GoString returns the string representation
  1480. func (s DeleteScheduledActionInput) GoString() string {
  1481. return s.String()
  1482. }
  1483. // Validate inspects the fields of the type to determine if they are valid.
  1484. func (s *DeleteScheduledActionInput) Validate() error {
  1485. invalidParams := request.ErrInvalidParams{Context: "DeleteScheduledActionInput"}
  1486. if s.ResourceId == nil {
  1487. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  1488. }
  1489. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  1490. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  1491. }
  1492. if s.ScheduledActionName == nil {
  1493. invalidParams.Add(request.NewErrParamRequired("ScheduledActionName"))
  1494. }
  1495. if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 {
  1496. invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1))
  1497. }
  1498. if s.ServiceNamespace == nil {
  1499. invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
  1500. }
  1501. if invalidParams.Len() > 0 {
  1502. return invalidParams
  1503. }
  1504. return nil
  1505. }
  1506. // SetResourceId sets the ResourceId field's value.
  1507. func (s *DeleteScheduledActionInput) SetResourceId(v string) *DeleteScheduledActionInput {
  1508. s.ResourceId = &v
  1509. return s
  1510. }
  1511. // SetScalableDimension sets the ScalableDimension field's value.
  1512. func (s *DeleteScheduledActionInput) SetScalableDimension(v string) *DeleteScheduledActionInput {
  1513. s.ScalableDimension = &v
  1514. return s
  1515. }
  1516. // SetScheduledActionName sets the ScheduledActionName field's value.
  1517. func (s *DeleteScheduledActionInput) SetScheduledActionName(v string) *DeleteScheduledActionInput {
  1518. s.ScheduledActionName = &v
  1519. return s
  1520. }
  1521. // SetServiceNamespace sets the ServiceNamespace field's value.
  1522. func (s *DeleteScheduledActionInput) SetServiceNamespace(v string) *DeleteScheduledActionInput {
  1523. s.ServiceNamespace = &v
  1524. return s
  1525. }
  1526. type DeleteScheduledActionOutput struct {
  1527. _ struct{} `type:"structure"`
  1528. }
  1529. // String returns the string representation
  1530. func (s DeleteScheduledActionOutput) String() string {
  1531. return awsutil.Prettify(s)
  1532. }
  1533. // GoString returns the string representation
  1534. func (s DeleteScheduledActionOutput) GoString() string {
  1535. return s.String()
  1536. }
  1537. type DeregisterScalableTargetInput struct {
  1538. _ struct{} `type:"structure"`
  1539. // The identifier of the resource associated with the scalable target. This
  1540. // string consists of the resource type and unique identifier.
  1541. //
  1542. // * ECS service - The resource type is service and the unique identifier
  1543. // is the cluster name and service name. Example: service/default/sample-webapp.
  1544. //
  1545. // * Spot fleet request - The resource type is spot-fleet-request and the
  1546. // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
  1547. //
  1548. // * EMR cluster - The resource type is instancegroup and the unique identifier
  1549. // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
  1550. //
  1551. // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
  1552. // is the fleet name. Example: fleet/sample-fleet.
  1553. //
  1554. // * DynamoDB table - The resource type is table and the unique identifier
  1555. // is the resource ID. Example: table/my-table.
  1556. //
  1557. // * DynamoDB global secondary index - The resource type is index and the
  1558. // unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
  1559. //
  1560. // * Aurora DB cluster - The resource type is cluster and the unique identifier
  1561. // is the cluster name. Example: cluster:my-db-cluster.
  1562. //
  1563. // * Amazon SageMaker endpoint variants - The resource type is variant and
  1564. // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
  1565. //
  1566. // * Custom resources are not supported with a resource type. This parameter
  1567. // must specify the OutputValue from the CloudFormation template stack used
  1568. // to access the resources. The unique identifier is defined by the service
  1569. // provider.
  1570. //
  1571. // ResourceId is a required field
  1572. ResourceId *string `min:"1" type:"string" required:"true"`
  1573. // The scalable dimension associated with the scalable target. This string consists
  1574. // of the service namespace, resource type, and scaling property.
  1575. //
  1576. // * ecs:service:DesiredCount - The desired task count of an ECS service.
  1577. //
  1578. // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
  1579. // fleet request.
  1580. //
  1581. // * elasticmapreduce:instancegroup:InstanceCount - The instance count of
  1582. // an EMR Instance Group.
  1583. //
  1584. // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
  1585. // 2.0 fleet.
  1586. //
  1587. // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
  1588. // a DynamoDB table.
  1589. //
  1590. // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
  1591. // a DynamoDB table.
  1592. //
  1593. // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
  1594. // a DynamoDB global secondary index.
  1595. //
  1596. // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
  1597. // a DynamoDB global secondary index.
  1598. //
  1599. // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
  1600. // DB cluster. Available for Aurora MySQL-compatible edition.
  1601. //
  1602. // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
  1603. // for an Amazon SageMaker model endpoint variant.
  1604. //
  1605. // * custom-resource:ResourceType:Property - The scalable dimension for a
  1606. // custom resource provided by your own application or service.
  1607. //
  1608. // ScalableDimension is a required field
  1609. ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"`
  1610. // The namespace of the AWS service that provides the resource or custom-resource
  1611. // for a resource provided by your own application or service. For more information,
  1612. // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
  1613. // in the Amazon Web Services General Reference.
  1614. //
  1615. // ServiceNamespace is a required field
  1616. ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
  1617. }
  1618. // String returns the string representation
  1619. func (s DeregisterScalableTargetInput) String() string {
  1620. return awsutil.Prettify(s)
  1621. }
  1622. // GoString returns the string representation
  1623. func (s DeregisterScalableTargetInput) GoString() string {
  1624. return s.String()
  1625. }
  1626. // Validate inspects the fields of the type to determine if they are valid.
  1627. func (s *DeregisterScalableTargetInput) Validate() error {
  1628. invalidParams := request.ErrInvalidParams{Context: "DeregisterScalableTargetInput"}
  1629. if s.ResourceId == nil {
  1630. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  1631. }
  1632. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  1633. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  1634. }
  1635. if s.ScalableDimension == nil {
  1636. invalidParams.Add(request.NewErrParamRequired("ScalableDimension"))
  1637. }
  1638. if s.ServiceNamespace == nil {
  1639. invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
  1640. }
  1641. if invalidParams.Len() > 0 {
  1642. return invalidParams
  1643. }
  1644. return nil
  1645. }
  1646. // SetResourceId sets the ResourceId field's value.
  1647. func (s *DeregisterScalableTargetInput) SetResourceId(v string) *DeregisterScalableTargetInput {
  1648. s.ResourceId = &v
  1649. return s
  1650. }
  1651. // SetScalableDimension sets the ScalableDimension field's value.
  1652. func (s *DeregisterScalableTargetInput) SetScalableDimension(v string) *DeregisterScalableTargetInput {
  1653. s.ScalableDimension = &v
  1654. return s
  1655. }
  1656. // SetServiceNamespace sets the ServiceNamespace field's value.
  1657. func (s *DeregisterScalableTargetInput) SetServiceNamespace(v string) *DeregisterScalableTargetInput {
  1658. s.ServiceNamespace = &v
  1659. return s
  1660. }
  1661. type DeregisterScalableTargetOutput struct {
  1662. _ struct{} `type:"structure"`
  1663. }
  1664. // String returns the string representation
  1665. func (s DeregisterScalableTargetOutput) String() string {
  1666. return awsutil.Prettify(s)
  1667. }
  1668. // GoString returns the string representation
  1669. func (s DeregisterScalableTargetOutput) GoString() string {
  1670. return s.String()
  1671. }
  1672. type DescribeScalableTargetsInput struct {
  1673. _ struct{} `type:"structure"`
  1674. // The maximum number of scalable targets. This value can be between 1 and 50.
  1675. // The default value is 50.
  1676. //
  1677. // If this parameter is used, the operation returns up to MaxResults results
  1678. // at a time, along with a NextToken value. To get the next set of results,
  1679. // include the NextToken value in a subsequent call. If this parameter is not
  1680. // used, the operation returns up to 50 results and a NextToken value, if applicable.
  1681. MaxResults *int64 `type:"integer"`
  1682. // The token for the next set of results.
  1683. NextToken *string `type:"string"`
  1684. // The identifier of the resource associated with the scalable target. This
  1685. // string consists of the resource type and unique identifier. If you specify
  1686. // a scalable dimension, you must also specify a resource ID.
  1687. //
  1688. // * ECS service - The resource type is service and the unique identifier
  1689. // is the cluster name and service name. Example: service/default/sample-webapp.
  1690. //
  1691. // * Spot fleet request - The resource type is spot-fleet-request and the
  1692. // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
  1693. //
  1694. // * EMR cluster - The resource type is instancegroup and the unique identifier
  1695. // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
  1696. //
  1697. // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
  1698. // is the fleet name. Example: fleet/sample-fleet.
  1699. //
  1700. // * DynamoDB table - The resource type is table and the unique identifier
  1701. // is the resource ID. Example: table/my-table.
  1702. //
  1703. // * DynamoDB global secondary index - The resource type is index and the
  1704. // unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
  1705. //
  1706. // * Aurora DB cluster - The resource type is cluster and the unique identifier
  1707. // is the cluster name. Example: cluster:my-db-cluster.
  1708. //
  1709. // * Amazon SageMaker endpoint variants - The resource type is variant and
  1710. // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
  1711. //
  1712. // * Custom resources are not supported with a resource type. This parameter
  1713. // must specify the OutputValue from the CloudFormation template stack used
  1714. // to access the resources. The unique identifier is defined by the service
  1715. // provider.
  1716. ResourceIds []*string `type:"list"`
  1717. // The scalable dimension associated with the scalable target. This string consists
  1718. // of the service namespace, resource type, and scaling property. If you specify
  1719. // a scalable dimension, you must also specify a resource ID.
  1720. //
  1721. // * ecs:service:DesiredCount - The desired task count of an ECS service.
  1722. //
  1723. // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
  1724. // fleet request.
  1725. //
  1726. // * elasticmapreduce:instancegroup:InstanceCount - The instance count of
  1727. // an EMR Instance Group.
  1728. //
  1729. // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
  1730. // 2.0 fleet.
  1731. //
  1732. // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
  1733. // a DynamoDB table.
  1734. //
  1735. // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
  1736. // a DynamoDB table.
  1737. //
  1738. // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
  1739. // a DynamoDB global secondary index.
  1740. //
  1741. // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
  1742. // a DynamoDB global secondary index.
  1743. //
  1744. // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
  1745. // DB cluster. Available for Aurora MySQL-compatible edition.
  1746. //
  1747. // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
  1748. // for an Amazon SageMaker model endpoint variant.
  1749. //
  1750. // * custom-resource:ResourceType:Property - The scalable dimension for a
  1751. // custom resource provided by your own application or service.
  1752. ScalableDimension *string `type:"string" enum:"ScalableDimension"`
  1753. // The namespace of the AWS service that provides the resource or custom-resource
  1754. // for a resource provided by your own application or service. For more information,
  1755. // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
  1756. // in the Amazon Web Services General Reference.
  1757. //
  1758. // ServiceNamespace is a required field
  1759. ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
  1760. }
  1761. // String returns the string representation
  1762. func (s DescribeScalableTargetsInput) String() string {
  1763. return awsutil.Prettify(s)
  1764. }
  1765. // GoString returns the string representation
  1766. func (s DescribeScalableTargetsInput) GoString() string {
  1767. return s.String()
  1768. }
  1769. // Validate inspects the fields of the type to determine if they are valid.
  1770. func (s *DescribeScalableTargetsInput) Validate() error {
  1771. invalidParams := request.ErrInvalidParams{Context: "DescribeScalableTargetsInput"}
  1772. if s.ServiceNamespace == nil {
  1773. invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
  1774. }
  1775. if invalidParams.Len() > 0 {
  1776. return invalidParams
  1777. }
  1778. return nil
  1779. }
  1780. // SetMaxResults sets the MaxResults field's value.
  1781. func (s *DescribeScalableTargetsInput) SetMaxResults(v int64) *DescribeScalableTargetsInput {
  1782. s.MaxResults = &v
  1783. return s
  1784. }
  1785. // SetNextToken sets the NextToken field's value.
  1786. func (s *DescribeScalableTargetsInput) SetNextToken(v string) *DescribeScalableTargetsInput {
  1787. s.NextToken = &v
  1788. return s
  1789. }
  1790. // SetResourceIds sets the ResourceIds field's value.
  1791. func (s *DescribeScalableTargetsInput) SetResourceIds(v []*string) *DescribeScalableTargetsInput {
  1792. s.ResourceIds = v
  1793. return s
  1794. }
  1795. // SetScalableDimension sets the ScalableDimension field's value.
  1796. func (s *DescribeScalableTargetsInput) SetScalableDimension(v string) *DescribeScalableTargetsInput {
  1797. s.ScalableDimension = &v
  1798. return s
  1799. }
  1800. // SetServiceNamespace sets the ServiceNamespace field's value.
  1801. func (s *DescribeScalableTargetsInput) SetServiceNamespace(v string) *DescribeScalableTargetsInput {
  1802. s.ServiceNamespace = &v
  1803. return s
  1804. }
  1805. type DescribeScalableTargetsOutput struct {
  1806. _ struct{} `type:"structure"`
  1807. // The token required to get the next set of results. This value is null if
  1808. // there are no more results to return.
  1809. NextToken *string `type:"string"`
  1810. // The scalable targets that match the request parameters.
  1811. ScalableTargets []*ScalableTarget `type:"list"`
  1812. }
  1813. // String returns the string representation
  1814. func (s DescribeScalableTargetsOutput) String() string {
  1815. return awsutil.Prettify(s)
  1816. }
  1817. // GoString returns the string representation
  1818. func (s DescribeScalableTargetsOutput) GoString() string {
  1819. return s.String()
  1820. }
  1821. // SetNextToken sets the NextToken field's value.
  1822. func (s *DescribeScalableTargetsOutput) SetNextToken(v string) *DescribeScalableTargetsOutput {
  1823. s.NextToken = &v
  1824. return s
  1825. }
  1826. // SetScalableTargets sets the ScalableTargets field's value.
  1827. func (s *DescribeScalableTargetsOutput) SetScalableTargets(v []*ScalableTarget) *DescribeScalableTargetsOutput {
  1828. s.ScalableTargets = v
  1829. return s
  1830. }
  1831. type DescribeScalingActivitiesInput struct {
  1832. _ struct{} `type:"structure"`
  1833. // The maximum number of scalable targets. This value can be between 1 and 50.
  1834. // The default value is 50.
  1835. //
  1836. // If this parameter is used, the operation returns up to MaxResults results
  1837. // at a time, along with a NextToken value. To get the next set of results,
  1838. // include the NextToken value in a subsequent call. If this parameter is not
  1839. // used, the operation returns up to 50 results and a NextToken value, if applicable.
  1840. MaxResults *int64 `type:"integer"`
  1841. // The token for the next set of results.
  1842. NextToken *string `type:"string"`
  1843. // The identifier of the resource associated with the scaling activity. This
  1844. // string consists of the resource type and unique identifier. If you specify
  1845. // a scalable dimension, you must also specify a resource ID.
  1846. //
  1847. // * ECS service - The resource type is service and the unique identifier
  1848. // is the cluster name and service name. Example: service/default/sample-webapp.
  1849. //
  1850. // * Spot fleet request - The resource type is spot-fleet-request and the
  1851. // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
  1852. //
  1853. // * EMR cluster - The resource type is instancegroup and the unique identifier
  1854. // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
  1855. //
  1856. // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
  1857. // is the fleet name. Example: fleet/sample-fleet.
  1858. //
  1859. // * DynamoDB table - The resource type is table and the unique identifier
  1860. // is the resource ID. Example: table/my-table.
  1861. //
  1862. // * DynamoDB global secondary index - The resource type is index and the
  1863. // unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
  1864. //
  1865. // * Aurora DB cluster - The resource type is cluster and the unique identifier
  1866. // is the cluster name. Example: cluster:my-db-cluster.
  1867. //
  1868. // * Amazon SageMaker endpoint variants - The resource type is variant and
  1869. // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
  1870. //
  1871. // * Custom resources are not supported with a resource type. This parameter
  1872. // must specify the OutputValue from the CloudFormation template stack used
  1873. // to access the resources. The unique identifier is defined by the service
  1874. // provider.
  1875. ResourceId *string `min:"1" type:"string"`
  1876. // The scalable dimension. This string consists of the service namespace, resource
  1877. // type, and scaling property. If you specify a scalable dimension, you must
  1878. // also specify a resource ID.
  1879. //
  1880. // * ecs:service:DesiredCount - The desired task count of an ECS service.
  1881. //
  1882. // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
  1883. // fleet request.
  1884. //
  1885. // * elasticmapreduce:instancegroup:InstanceCount - The instance count of
  1886. // an EMR Instance Group.
  1887. //
  1888. // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
  1889. // 2.0 fleet.
  1890. //
  1891. // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
  1892. // a DynamoDB table.
  1893. //
  1894. // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
  1895. // a DynamoDB table.
  1896. //
  1897. // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
  1898. // a DynamoDB global secondary index.
  1899. //
  1900. // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
  1901. // a DynamoDB global secondary index.
  1902. //
  1903. // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
  1904. // DB cluster. Available for Aurora MySQL-compatible edition.
  1905. //
  1906. // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
  1907. // for an Amazon SageMaker model endpoint variant.
  1908. //
  1909. // * custom-resource:ResourceType:Property - The scalable dimension for a
  1910. // custom resource provided by your own application or service.
  1911. ScalableDimension *string `type:"string" enum:"ScalableDimension"`
  1912. // The namespace of the AWS service that provides the resource or custom-resource
  1913. // for a resource provided by your own application or service. For more information,
  1914. // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
  1915. // in the Amazon Web Services General Reference.
  1916. //
  1917. // ServiceNamespace is a required field
  1918. ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
  1919. }
  1920. // String returns the string representation
  1921. func (s DescribeScalingActivitiesInput) String() string {
  1922. return awsutil.Prettify(s)
  1923. }
  1924. // GoString returns the string representation
  1925. func (s DescribeScalingActivitiesInput) GoString() string {
  1926. return s.String()
  1927. }
  1928. // Validate inspects the fields of the type to determine if they are valid.
  1929. func (s *DescribeScalingActivitiesInput) Validate() error {
  1930. invalidParams := request.ErrInvalidParams{Context: "DescribeScalingActivitiesInput"}
  1931. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  1932. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  1933. }
  1934. if s.ServiceNamespace == nil {
  1935. invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
  1936. }
  1937. if invalidParams.Len() > 0 {
  1938. return invalidParams
  1939. }
  1940. return nil
  1941. }
  1942. // SetMaxResults sets the MaxResults field's value.
  1943. func (s *DescribeScalingActivitiesInput) SetMaxResults(v int64) *DescribeScalingActivitiesInput {
  1944. s.MaxResults = &v
  1945. return s
  1946. }
  1947. // SetNextToken sets the NextToken field's value.
  1948. func (s *DescribeScalingActivitiesInput) SetNextToken(v string) *DescribeScalingActivitiesInput {
  1949. s.NextToken = &v
  1950. return s
  1951. }
  1952. // SetResourceId sets the ResourceId field's value.
  1953. func (s *DescribeScalingActivitiesInput) SetResourceId(v string) *DescribeScalingActivitiesInput {
  1954. s.ResourceId = &v
  1955. return s
  1956. }
  1957. // SetScalableDimension sets the ScalableDimension field's value.
  1958. func (s *DescribeScalingActivitiesInput) SetScalableDimension(v string) *DescribeScalingActivitiesInput {
  1959. s.ScalableDimension = &v
  1960. return s
  1961. }
  1962. // SetServiceNamespace sets the ServiceNamespace field's value.
  1963. func (s *DescribeScalingActivitiesInput) SetServiceNamespace(v string) *DescribeScalingActivitiesInput {
  1964. s.ServiceNamespace = &v
  1965. return s
  1966. }
  1967. type DescribeScalingActivitiesOutput struct {
  1968. _ struct{} `type:"structure"`
  1969. // The token required to get the next set of results. This value is null if
  1970. // there are no more results to return.
  1971. NextToken *string `type:"string"`
  1972. // A list of scaling activity objects.
  1973. ScalingActivities []*ScalingActivity `type:"list"`
  1974. }
  1975. // String returns the string representation
  1976. func (s DescribeScalingActivitiesOutput) String() string {
  1977. return awsutil.Prettify(s)
  1978. }
  1979. // GoString returns the string representation
  1980. func (s DescribeScalingActivitiesOutput) GoString() string {
  1981. return s.String()
  1982. }
  1983. // SetNextToken sets the NextToken field's value.
  1984. func (s *DescribeScalingActivitiesOutput) SetNextToken(v string) *DescribeScalingActivitiesOutput {
  1985. s.NextToken = &v
  1986. return s
  1987. }
  1988. // SetScalingActivities sets the ScalingActivities field's value.
  1989. func (s *DescribeScalingActivitiesOutput) SetScalingActivities(v []*ScalingActivity) *DescribeScalingActivitiesOutput {
  1990. s.ScalingActivities = v
  1991. return s
  1992. }
  1993. type DescribeScalingPoliciesInput struct {
  1994. _ struct{} `type:"structure"`
  1995. // The maximum number of scalable targets. This value can be between 1 and 50.
  1996. // The default value is 50.
  1997. //
  1998. // If this parameter is used, the operation returns up to MaxResults results
  1999. // at a time, along with a NextToken value. To get the next set of results,
  2000. // include the NextToken value in a subsequent call. If this parameter is not
  2001. // used, the operation returns up to 50 results and a NextToken value, if applicable.
  2002. MaxResults *int64 `type:"integer"`
  2003. // The token for the next set of results.
  2004. NextToken *string `type:"string"`
  2005. // The names of the scaling policies to describe.
  2006. PolicyNames []*string `type:"list"`
  2007. // The identifier of the resource associated with the scaling policy. This string
  2008. // consists of the resource type and unique identifier. If you specify a scalable
  2009. // dimension, you must also specify a resource ID.
  2010. //
  2011. // * ECS service - The resource type is service and the unique identifier
  2012. // is the cluster name and service name. Example: service/default/sample-webapp.
  2013. //
  2014. // * Spot fleet request - The resource type is spot-fleet-request and the
  2015. // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
  2016. //
  2017. // * EMR cluster - The resource type is instancegroup and the unique identifier
  2018. // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
  2019. //
  2020. // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
  2021. // is the fleet name. Example: fleet/sample-fleet.
  2022. //
  2023. // * DynamoDB table - The resource type is table and the unique identifier
  2024. // is the resource ID. Example: table/my-table.
  2025. //
  2026. // * DynamoDB global secondary index - The resource type is index and the
  2027. // unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
  2028. //
  2029. // * Aurora DB cluster - The resource type is cluster and the unique identifier
  2030. // is the cluster name. Example: cluster:my-db-cluster.
  2031. //
  2032. // * Amazon SageMaker endpoint variants - The resource type is variant and
  2033. // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
  2034. //
  2035. // * Custom resources are not supported with a resource type. This parameter
  2036. // must specify the OutputValue from the CloudFormation template stack used
  2037. // to access the resources. The unique identifier is defined by the service
  2038. // provider.
  2039. ResourceId *string `min:"1" type:"string"`
  2040. // The scalable dimension. This string consists of the service namespace, resource
  2041. // type, and scaling property. If you specify a scalable dimension, you must
  2042. // also specify a resource ID.
  2043. //
  2044. // * ecs:service:DesiredCount - The desired task count of an ECS service.
  2045. //
  2046. // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
  2047. // fleet request.
  2048. //
  2049. // * elasticmapreduce:instancegroup:InstanceCount - The instance count of
  2050. // an EMR Instance Group.
  2051. //
  2052. // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
  2053. // 2.0 fleet.
  2054. //
  2055. // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
  2056. // a DynamoDB table.
  2057. //
  2058. // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
  2059. // a DynamoDB table.
  2060. //
  2061. // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
  2062. // a DynamoDB global secondary index.
  2063. //
  2064. // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
  2065. // a DynamoDB global secondary index.
  2066. //
  2067. // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
  2068. // DB cluster. Available for Aurora MySQL-compatible edition.
  2069. //
  2070. // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
  2071. // for an Amazon SageMaker model endpoint variant.
  2072. //
  2073. // * custom-resource:ResourceType:Property - The scalable dimension for a
  2074. // custom resource provided by your own application or service.
  2075. ScalableDimension *string `type:"string" enum:"ScalableDimension"`
  2076. // The namespace of the AWS service that provides the resource or custom-resource
  2077. // for a resource provided by your own application or service. For more information,
  2078. // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
  2079. // in the Amazon Web Services General Reference.
  2080. //
  2081. // ServiceNamespace is a required field
  2082. ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
  2083. }
  2084. // String returns the string representation
  2085. func (s DescribeScalingPoliciesInput) String() string {
  2086. return awsutil.Prettify(s)
  2087. }
  2088. // GoString returns the string representation
  2089. func (s DescribeScalingPoliciesInput) GoString() string {
  2090. return s.String()
  2091. }
  2092. // Validate inspects the fields of the type to determine if they are valid.
  2093. func (s *DescribeScalingPoliciesInput) Validate() error {
  2094. invalidParams := request.ErrInvalidParams{Context: "DescribeScalingPoliciesInput"}
  2095. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  2096. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  2097. }
  2098. if s.ServiceNamespace == nil {
  2099. invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
  2100. }
  2101. if invalidParams.Len() > 0 {
  2102. return invalidParams
  2103. }
  2104. return nil
  2105. }
  2106. // SetMaxResults sets the MaxResults field's value.
  2107. func (s *DescribeScalingPoliciesInput) SetMaxResults(v int64) *DescribeScalingPoliciesInput {
  2108. s.MaxResults = &v
  2109. return s
  2110. }
  2111. // SetNextToken sets the NextToken field's value.
  2112. func (s *DescribeScalingPoliciesInput) SetNextToken(v string) *DescribeScalingPoliciesInput {
  2113. s.NextToken = &v
  2114. return s
  2115. }
  2116. // SetPolicyNames sets the PolicyNames field's value.
  2117. func (s *DescribeScalingPoliciesInput) SetPolicyNames(v []*string) *DescribeScalingPoliciesInput {
  2118. s.PolicyNames = v
  2119. return s
  2120. }
  2121. // SetResourceId sets the ResourceId field's value.
  2122. func (s *DescribeScalingPoliciesInput) SetResourceId(v string) *DescribeScalingPoliciesInput {
  2123. s.ResourceId = &v
  2124. return s
  2125. }
  2126. // SetScalableDimension sets the ScalableDimension field's value.
  2127. func (s *DescribeScalingPoliciesInput) SetScalableDimension(v string) *DescribeScalingPoliciesInput {
  2128. s.ScalableDimension = &v
  2129. return s
  2130. }
  2131. // SetServiceNamespace sets the ServiceNamespace field's value.
  2132. func (s *DescribeScalingPoliciesInput) SetServiceNamespace(v string) *DescribeScalingPoliciesInput {
  2133. s.ServiceNamespace = &v
  2134. return s
  2135. }
  2136. type DescribeScalingPoliciesOutput struct {
  2137. _ struct{} `type:"structure"`
  2138. // The token required to get the next set of results. This value is null if
  2139. // there are no more results to return.
  2140. NextToken *string `type:"string"`
  2141. // Information about the scaling policies.
  2142. ScalingPolicies []*ScalingPolicy `type:"list"`
  2143. }
  2144. // String returns the string representation
  2145. func (s DescribeScalingPoliciesOutput) String() string {
  2146. return awsutil.Prettify(s)
  2147. }
  2148. // GoString returns the string representation
  2149. func (s DescribeScalingPoliciesOutput) GoString() string {
  2150. return s.String()
  2151. }
  2152. // SetNextToken sets the NextToken field's value.
  2153. func (s *DescribeScalingPoliciesOutput) SetNextToken(v string) *DescribeScalingPoliciesOutput {
  2154. s.NextToken = &v
  2155. return s
  2156. }
  2157. // SetScalingPolicies sets the ScalingPolicies field's value.
  2158. func (s *DescribeScalingPoliciesOutput) SetScalingPolicies(v []*ScalingPolicy) *DescribeScalingPoliciesOutput {
  2159. s.ScalingPolicies = v
  2160. return s
  2161. }
  2162. type DescribeScheduledActionsInput struct {
  2163. _ struct{} `type:"structure"`
  2164. // The maximum number of scheduled action results. This value can be between
  2165. // 1 and 50. The default value is 50.
  2166. //
  2167. // If this parameter is used, the operation returns up to MaxResults results
  2168. // at a time, along with a NextToken value. To get the next set of results,
  2169. // include the NextToken value in a subsequent call. If this parameter is not
  2170. // used, the operation returns up to 50 results and a NextToken value, if applicable.
  2171. MaxResults *int64 `type:"integer"`
  2172. // The token for the next set of results.
  2173. NextToken *string `type:"string"`
  2174. // The identifier of the resource associated with the scheduled action. This
  2175. // string consists of the resource type and unique identifier. If you specify
  2176. // a scalable dimension, you must also specify a resource ID.
  2177. //
  2178. // * ECS service - The resource type is service and the unique identifier
  2179. // is the cluster name and service name. Example: service/default/sample-webapp.
  2180. //
  2181. // * Spot fleet request - The resource type is spot-fleet-request and the
  2182. // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
  2183. //
  2184. // * EMR cluster - The resource type is instancegroup and the unique identifier
  2185. // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
  2186. //
  2187. // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
  2188. // is the fleet name. Example: fleet/sample-fleet.
  2189. //
  2190. // * DynamoDB table - The resource type is table and the unique identifier
  2191. // is the resource ID. Example: table/my-table.
  2192. //
  2193. // * DynamoDB global secondary index - The resource type is index and the
  2194. // unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
  2195. //
  2196. // * Aurora DB cluster - The resource type is cluster and the unique identifier
  2197. // is the cluster name. Example: cluster:my-db-cluster.
  2198. //
  2199. // * Amazon SageMaker endpoint variants - The resource type is variant and
  2200. // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
  2201. //
  2202. // * Custom resources are not supported with a resource type. This parameter
  2203. // must specify the OutputValue from the CloudFormation template stack used
  2204. // to access the resources. The unique identifier is defined by the service
  2205. // provider.
  2206. ResourceId *string `min:"1" type:"string"`
  2207. // The scalable dimension. This string consists of the service namespace, resource
  2208. // type, and scaling property. If you specify a scalable dimension, you must
  2209. // also specify a resource ID.
  2210. //
  2211. // * ecs:service:DesiredCount - The desired task count of an ECS service.
  2212. //
  2213. // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
  2214. // fleet request.
  2215. //
  2216. // * elasticmapreduce:instancegroup:InstanceCount - The instance count of
  2217. // an EMR Instance Group.
  2218. //
  2219. // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
  2220. // 2.0 fleet.
  2221. //
  2222. // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
  2223. // a DynamoDB table.
  2224. //
  2225. // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
  2226. // a DynamoDB table.
  2227. //
  2228. // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
  2229. // a DynamoDB global secondary index.
  2230. //
  2231. // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
  2232. // a DynamoDB global secondary index.
  2233. //
  2234. // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
  2235. // DB cluster. Available for Aurora MySQL-compatible edition.
  2236. //
  2237. // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
  2238. // for an Amazon SageMaker model endpoint variant.
  2239. //
  2240. // * custom-resource:ResourceType:Property - The scalable dimension for a
  2241. // custom resource provided by your own application or service.
  2242. ScalableDimension *string `type:"string" enum:"ScalableDimension"`
  2243. // The names of the scheduled actions to describe.
  2244. ScheduledActionNames []*string `type:"list"`
  2245. // The namespace of the AWS service that provides the resource or custom-resource
  2246. // for a resource provided by your own application or service. For more information,
  2247. // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
  2248. // in the Amazon Web Services General Reference.
  2249. //
  2250. // ServiceNamespace is a required field
  2251. ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
  2252. }
  2253. // String returns the string representation
  2254. func (s DescribeScheduledActionsInput) String() string {
  2255. return awsutil.Prettify(s)
  2256. }
  2257. // GoString returns the string representation
  2258. func (s DescribeScheduledActionsInput) GoString() string {
  2259. return s.String()
  2260. }
  2261. // Validate inspects the fields of the type to determine if they are valid.
  2262. func (s *DescribeScheduledActionsInput) Validate() error {
  2263. invalidParams := request.ErrInvalidParams{Context: "DescribeScheduledActionsInput"}
  2264. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  2265. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  2266. }
  2267. if s.ServiceNamespace == nil {
  2268. invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
  2269. }
  2270. if invalidParams.Len() > 0 {
  2271. return invalidParams
  2272. }
  2273. return nil
  2274. }
  2275. // SetMaxResults sets the MaxResults field's value.
  2276. func (s *DescribeScheduledActionsInput) SetMaxResults(v int64) *DescribeScheduledActionsInput {
  2277. s.MaxResults = &v
  2278. return s
  2279. }
  2280. // SetNextToken sets the NextToken field's value.
  2281. func (s *DescribeScheduledActionsInput) SetNextToken(v string) *DescribeScheduledActionsInput {
  2282. s.NextToken = &v
  2283. return s
  2284. }
  2285. // SetResourceId sets the ResourceId field's value.
  2286. func (s *DescribeScheduledActionsInput) SetResourceId(v string) *DescribeScheduledActionsInput {
  2287. s.ResourceId = &v
  2288. return s
  2289. }
  2290. // SetScalableDimension sets the ScalableDimension field's value.
  2291. func (s *DescribeScheduledActionsInput) SetScalableDimension(v string) *DescribeScheduledActionsInput {
  2292. s.ScalableDimension = &v
  2293. return s
  2294. }
  2295. // SetScheduledActionNames sets the ScheduledActionNames field's value.
  2296. func (s *DescribeScheduledActionsInput) SetScheduledActionNames(v []*string) *DescribeScheduledActionsInput {
  2297. s.ScheduledActionNames = v
  2298. return s
  2299. }
  2300. // SetServiceNamespace sets the ServiceNamespace field's value.
  2301. func (s *DescribeScheduledActionsInput) SetServiceNamespace(v string) *DescribeScheduledActionsInput {
  2302. s.ServiceNamespace = &v
  2303. return s
  2304. }
  2305. type DescribeScheduledActionsOutput struct {
  2306. _ struct{} `type:"structure"`
  2307. // The token required to get the next set of results. This value is null if
  2308. // there are no more results to return.
  2309. NextToken *string `type:"string"`
  2310. // Information about the scheduled actions.
  2311. ScheduledActions []*ScheduledAction `type:"list"`
  2312. }
  2313. // String returns the string representation
  2314. func (s DescribeScheduledActionsOutput) String() string {
  2315. return awsutil.Prettify(s)
  2316. }
  2317. // GoString returns the string representation
  2318. func (s DescribeScheduledActionsOutput) GoString() string {
  2319. return s.String()
  2320. }
  2321. // SetNextToken sets the NextToken field's value.
  2322. func (s *DescribeScheduledActionsOutput) SetNextToken(v string) *DescribeScheduledActionsOutput {
  2323. s.NextToken = &v
  2324. return s
  2325. }
  2326. // SetScheduledActions sets the ScheduledActions field's value.
  2327. func (s *DescribeScheduledActionsOutput) SetScheduledActions(v []*ScheduledAction) *DescribeScheduledActionsOutput {
  2328. s.ScheduledActions = v
  2329. return s
  2330. }
  2331. // Describes the dimension of a metric.
  2332. type MetricDimension struct {
  2333. _ struct{} `type:"structure"`
  2334. // The name of the dimension.
  2335. //
  2336. // Name is a required field
  2337. Name *string `type:"string" required:"true"`
  2338. // The value of the dimension.
  2339. //
  2340. // Value is a required field
  2341. Value *string `type:"string" required:"true"`
  2342. }
  2343. // String returns the string representation
  2344. func (s MetricDimension) String() string {
  2345. return awsutil.Prettify(s)
  2346. }
  2347. // GoString returns the string representation
  2348. func (s MetricDimension) GoString() string {
  2349. return s.String()
  2350. }
  2351. // Validate inspects the fields of the type to determine if they are valid.
  2352. func (s *MetricDimension) Validate() error {
  2353. invalidParams := request.ErrInvalidParams{Context: "MetricDimension"}
  2354. if s.Name == nil {
  2355. invalidParams.Add(request.NewErrParamRequired("Name"))
  2356. }
  2357. if s.Value == nil {
  2358. invalidParams.Add(request.NewErrParamRequired("Value"))
  2359. }
  2360. if invalidParams.Len() > 0 {
  2361. return invalidParams
  2362. }
  2363. return nil
  2364. }
  2365. // SetName sets the Name field's value.
  2366. func (s *MetricDimension) SetName(v string) *MetricDimension {
  2367. s.Name = &v
  2368. return s
  2369. }
  2370. // SetValue sets the Value field's value.
  2371. func (s *MetricDimension) SetValue(v string) *MetricDimension {
  2372. s.Value = &v
  2373. return s
  2374. }
  2375. // Configures a predefined metric for a target tracking policy.
  2376. type PredefinedMetricSpecification struct {
  2377. _ struct{} `type:"structure"`
  2378. // The metric type. The ALBRequestCountPerTarget metric type applies only to
  2379. // Spot fleet requests and ECS services.
  2380. //
  2381. // PredefinedMetricType is a required field
  2382. PredefinedMetricType *string `type:"string" required:"true" enum:"MetricType"`
  2383. // Identifies the resource associated with the metric type. You can't specify
  2384. // a resource label unless the metric type is ALBRequestCountPerTarget and there
  2385. // is a target group attached to the Spot fleet request or ECS service.
  2386. //
  2387. // The format is app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>,
  2388. // where:
  2389. //
  2390. // * app/<load-balancer-name>/<load-balancer-id> is the final portion of
  2391. // the load balancer ARN
  2392. //
  2393. // * targetgroup/<target-group-name>/<target-group-id> is the final portion
  2394. // of the target group ARN.
  2395. ResourceLabel *string `min:"1" type:"string"`
  2396. }
  2397. // String returns the string representation
  2398. func (s PredefinedMetricSpecification) String() string {
  2399. return awsutil.Prettify(s)
  2400. }
  2401. // GoString returns the string representation
  2402. func (s PredefinedMetricSpecification) GoString() string {
  2403. return s.String()
  2404. }
  2405. // Validate inspects the fields of the type to determine if they are valid.
  2406. func (s *PredefinedMetricSpecification) Validate() error {
  2407. invalidParams := request.ErrInvalidParams{Context: "PredefinedMetricSpecification"}
  2408. if s.PredefinedMetricType == nil {
  2409. invalidParams.Add(request.NewErrParamRequired("PredefinedMetricType"))
  2410. }
  2411. if s.ResourceLabel != nil && len(*s.ResourceLabel) < 1 {
  2412. invalidParams.Add(request.NewErrParamMinLen("ResourceLabel", 1))
  2413. }
  2414. if invalidParams.Len() > 0 {
  2415. return invalidParams
  2416. }
  2417. return nil
  2418. }
  2419. // SetPredefinedMetricType sets the PredefinedMetricType field's value.
  2420. func (s *PredefinedMetricSpecification) SetPredefinedMetricType(v string) *PredefinedMetricSpecification {
  2421. s.PredefinedMetricType = &v
  2422. return s
  2423. }
  2424. // SetResourceLabel sets the ResourceLabel field's value.
  2425. func (s *PredefinedMetricSpecification) SetResourceLabel(v string) *PredefinedMetricSpecification {
  2426. s.ResourceLabel = &v
  2427. return s
  2428. }
  2429. type PutScalingPolicyInput struct {
  2430. _ struct{} `type:"structure"`
  2431. // The name of the scaling policy.
  2432. //
  2433. // PolicyName is a required field
  2434. PolicyName *string `min:"1" type:"string" required:"true"`
  2435. // The policy type. This parameter is required if you are creating a policy.
  2436. //
  2437. // For DynamoDB, only TargetTrackingScaling is supported. For Amazon ECS, Spot
  2438. // Fleet, and Amazon RDS, both StepScaling and TargetTrackingScaling are supported.
  2439. // For any other service, only StepScaling is supported.
  2440. PolicyType *string `type:"string" enum:"PolicyType"`
  2441. // The identifier of the resource associated with the scaling policy. This string
  2442. // consists of the resource type and unique identifier.
  2443. //
  2444. // * ECS service - The resource type is service and the unique identifier
  2445. // is the cluster name and service name. Example: service/default/sample-webapp.
  2446. //
  2447. // * Spot fleet request - The resource type is spot-fleet-request and the
  2448. // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
  2449. //
  2450. // * EMR cluster - The resource type is instancegroup and the unique identifier
  2451. // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
  2452. //
  2453. // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
  2454. // is the fleet name. Example: fleet/sample-fleet.
  2455. //
  2456. // * DynamoDB table - The resource type is table and the unique identifier
  2457. // is the resource ID. Example: table/my-table.
  2458. //
  2459. // * DynamoDB global secondary index - The resource type is index and the
  2460. // unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
  2461. //
  2462. // * Aurora DB cluster - The resource type is cluster and the unique identifier
  2463. // is the cluster name. Example: cluster:my-db-cluster.
  2464. //
  2465. // * Amazon SageMaker endpoint variants - The resource type is variant and
  2466. // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
  2467. //
  2468. // * Custom resources are not supported with a resource type. This parameter
  2469. // must specify the OutputValue from the CloudFormation template stack used
  2470. // to access the resources. The unique identifier is defined by the service
  2471. // provider.
  2472. //
  2473. // ResourceId is a required field
  2474. ResourceId *string `min:"1" type:"string" required:"true"`
  2475. // The scalable dimension. This string consists of the service namespace, resource
  2476. // type, and scaling property.
  2477. //
  2478. // * ecs:service:DesiredCount - The desired task count of an ECS service.
  2479. //
  2480. // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
  2481. // fleet request.
  2482. //
  2483. // * elasticmapreduce:instancegroup:InstanceCount - The instance count of
  2484. // an EMR Instance Group.
  2485. //
  2486. // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
  2487. // 2.0 fleet.
  2488. //
  2489. // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
  2490. // a DynamoDB table.
  2491. //
  2492. // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
  2493. // a DynamoDB table.
  2494. //
  2495. // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
  2496. // a DynamoDB global secondary index.
  2497. //
  2498. // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
  2499. // a DynamoDB global secondary index.
  2500. //
  2501. // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
  2502. // DB cluster. Available for Aurora MySQL-compatible edition.
  2503. //
  2504. // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
  2505. // for an Amazon SageMaker model endpoint variant.
  2506. //
  2507. // * custom-resource:ResourceType:Property - The scalable dimension for a
  2508. // custom resource provided by your own application or service.
  2509. //
  2510. // ScalableDimension is a required field
  2511. ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"`
  2512. // The namespace of the AWS service that provides the resource or custom-resource
  2513. // for a resource provided by your own application or service. For more information,
  2514. // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
  2515. // in the Amazon Web Services General Reference.
  2516. //
  2517. // ServiceNamespace is a required field
  2518. ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
  2519. // A step scaling policy.
  2520. //
  2521. // This parameter is required if you are creating a policy and the policy type
  2522. // is StepScaling.
  2523. StepScalingPolicyConfiguration *StepScalingPolicyConfiguration `type:"structure"`
  2524. // A target tracking policy.
  2525. //
  2526. // This parameter is required if you are creating a policy and the policy type
  2527. // is TargetTrackingScaling.
  2528. TargetTrackingScalingPolicyConfiguration *TargetTrackingScalingPolicyConfiguration `type:"structure"`
  2529. }
  2530. // String returns the string representation
  2531. func (s PutScalingPolicyInput) String() string {
  2532. return awsutil.Prettify(s)
  2533. }
  2534. // GoString returns the string representation
  2535. func (s PutScalingPolicyInput) GoString() string {
  2536. return s.String()
  2537. }
  2538. // Validate inspects the fields of the type to determine if they are valid.
  2539. func (s *PutScalingPolicyInput) Validate() error {
  2540. invalidParams := request.ErrInvalidParams{Context: "PutScalingPolicyInput"}
  2541. if s.PolicyName == nil {
  2542. invalidParams.Add(request.NewErrParamRequired("PolicyName"))
  2543. }
  2544. if s.PolicyName != nil && len(*s.PolicyName) < 1 {
  2545. invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
  2546. }
  2547. if s.ResourceId == nil {
  2548. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  2549. }
  2550. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  2551. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  2552. }
  2553. if s.ScalableDimension == nil {
  2554. invalidParams.Add(request.NewErrParamRequired("ScalableDimension"))
  2555. }
  2556. if s.ServiceNamespace == nil {
  2557. invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
  2558. }
  2559. if s.StepScalingPolicyConfiguration != nil {
  2560. if err := s.StepScalingPolicyConfiguration.Validate(); err != nil {
  2561. invalidParams.AddNested("StepScalingPolicyConfiguration", err.(request.ErrInvalidParams))
  2562. }
  2563. }
  2564. if s.TargetTrackingScalingPolicyConfiguration != nil {
  2565. if err := s.TargetTrackingScalingPolicyConfiguration.Validate(); err != nil {
  2566. invalidParams.AddNested("TargetTrackingScalingPolicyConfiguration", err.(request.ErrInvalidParams))
  2567. }
  2568. }
  2569. if invalidParams.Len() > 0 {
  2570. return invalidParams
  2571. }
  2572. return nil
  2573. }
  2574. // SetPolicyName sets the PolicyName field's value.
  2575. func (s *PutScalingPolicyInput) SetPolicyName(v string) *PutScalingPolicyInput {
  2576. s.PolicyName = &v
  2577. return s
  2578. }
  2579. // SetPolicyType sets the PolicyType field's value.
  2580. func (s *PutScalingPolicyInput) SetPolicyType(v string) *PutScalingPolicyInput {
  2581. s.PolicyType = &v
  2582. return s
  2583. }
  2584. // SetResourceId sets the ResourceId field's value.
  2585. func (s *PutScalingPolicyInput) SetResourceId(v string) *PutScalingPolicyInput {
  2586. s.ResourceId = &v
  2587. return s
  2588. }
  2589. // SetScalableDimension sets the ScalableDimension field's value.
  2590. func (s *PutScalingPolicyInput) SetScalableDimension(v string) *PutScalingPolicyInput {
  2591. s.ScalableDimension = &v
  2592. return s
  2593. }
  2594. // SetServiceNamespace sets the ServiceNamespace field's value.
  2595. func (s *PutScalingPolicyInput) SetServiceNamespace(v string) *PutScalingPolicyInput {
  2596. s.ServiceNamespace = &v
  2597. return s
  2598. }
  2599. // SetStepScalingPolicyConfiguration sets the StepScalingPolicyConfiguration field's value.
  2600. func (s *PutScalingPolicyInput) SetStepScalingPolicyConfiguration(v *StepScalingPolicyConfiguration) *PutScalingPolicyInput {
  2601. s.StepScalingPolicyConfiguration = v
  2602. return s
  2603. }
  2604. // SetTargetTrackingScalingPolicyConfiguration sets the TargetTrackingScalingPolicyConfiguration field's value.
  2605. func (s *PutScalingPolicyInput) SetTargetTrackingScalingPolicyConfiguration(v *TargetTrackingScalingPolicyConfiguration) *PutScalingPolicyInput {
  2606. s.TargetTrackingScalingPolicyConfiguration = v
  2607. return s
  2608. }
  2609. type PutScalingPolicyOutput struct {
  2610. _ struct{} `type:"structure"`
  2611. // The CloudWatch alarms created for the target tracking policy.
  2612. Alarms []*Alarm `type:"list"`
  2613. // The Amazon Resource Name (ARN) of the resulting scaling policy.
  2614. //
  2615. // PolicyARN is a required field
  2616. PolicyARN *string `min:"1" type:"string" required:"true"`
  2617. }
  2618. // String returns the string representation
  2619. func (s PutScalingPolicyOutput) String() string {
  2620. return awsutil.Prettify(s)
  2621. }
  2622. // GoString returns the string representation
  2623. func (s PutScalingPolicyOutput) GoString() string {
  2624. return s.String()
  2625. }
  2626. // SetAlarms sets the Alarms field's value.
  2627. func (s *PutScalingPolicyOutput) SetAlarms(v []*Alarm) *PutScalingPolicyOutput {
  2628. s.Alarms = v
  2629. return s
  2630. }
  2631. // SetPolicyARN sets the PolicyARN field's value.
  2632. func (s *PutScalingPolicyOutput) SetPolicyARN(v string) *PutScalingPolicyOutput {
  2633. s.PolicyARN = &v
  2634. return s
  2635. }
  2636. type PutScheduledActionInput struct {
  2637. _ struct{} `type:"structure"`
  2638. // The date and time for the scheduled action to end.
  2639. EndTime *time.Time `type:"timestamp"`
  2640. // The identifier of the resource associated with the scheduled action. This
  2641. // string consists of the resource type and unique identifier.
  2642. //
  2643. // * ECS service - The resource type is service and the unique identifier
  2644. // is the cluster name and service name. Example: service/default/sample-webapp.
  2645. //
  2646. // * Spot fleet request - The resource type is spot-fleet-request and the
  2647. // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
  2648. //
  2649. // * EMR cluster - The resource type is instancegroup and the unique identifier
  2650. // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
  2651. //
  2652. // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
  2653. // is the fleet name. Example: fleet/sample-fleet.
  2654. //
  2655. // * DynamoDB table - The resource type is table and the unique identifier
  2656. // is the resource ID. Example: table/my-table.
  2657. //
  2658. // * DynamoDB global secondary index - The resource type is index and the
  2659. // unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
  2660. //
  2661. // * Aurora DB cluster - The resource type is cluster and the unique identifier
  2662. // is the cluster name. Example: cluster:my-db-cluster.
  2663. //
  2664. // * Amazon SageMaker endpoint variants - The resource type is variant and
  2665. // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
  2666. //
  2667. // * Custom resources are not supported with a resource type. This parameter
  2668. // must specify the OutputValue from the CloudFormation template stack used
  2669. // to access the resources. The unique identifier is defined by the service
  2670. // provider.
  2671. //
  2672. // ResourceId is a required field
  2673. ResourceId *string `min:"1" type:"string" required:"true"`
  2674. // The scalable dimension. This parameter is required if you are creating a
  2675. // scheduled action. This string consists of the service namespace, resource
  2676. // type, and scaling property.
  2677. //
  2678. // * ecs:service:DesiredCount - The desired task count of an ECS service.
  2679. //
  2680. // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
  2681. // fleet request.
  2682. //
  2683. // * elasticmapreduce:instancegroup:InstanceCount - The instance count of
  2684. // an EMR Instance Group.
  2685. //
  2686. // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
  2687. // 2.0 fleet.
  2688. //
  2689. // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
  2690. // a DynamoDB table.
  2691. //
  2692. // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
  2693. // a DynamoDB table.
  2694. //
  2695. // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
  2696. // a DynamoDB global secondary index.
  2697. //
  2698. // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
  2699. // a DynamoDB global secondary index.
  2700. //
  2701. // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
  2702. // DB cluster. Available for Aurora MySQL-compatible edition.
  2703. //
  2704. // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
  2705. // for an Amazon SageMaker model endpoint variant.
  2706. //
  2707. // * custom-resource:ResourceType:Property - The scalable dimension for a
  2708. // custom resource provided by your own application or service.
  2709. ScalableDimension *string `type:"string" enum:"ScalableDimension"`
  2710. // The new minimum and maximum capacity. You can set both values or just one.
  2711. // During the scheduled time, if the current capacity is below the minimum capacity,
  2712. // Application Auto Scaling scales out to the minimum capacity. If the current
  2713. // capacity is above the maximum capacity, Application Auto Scaling scales in
  2714. // to the maximum capacity.
  2715. ScalableTargetAction *ScalableTargetAction `type:"structure"`
  2716. // The schedule for this action. The following formats are supported:
  2717. //
  2718. // * At expressions - at(yyyy-mm-ddThh:mm:ss)
  2719. //
  2720. // * Rate expressions - rate(valueunit)
  2721. //
  2722. // * Cron expressions - cron(fields)
  2723. //
  2724. // At expressions are useful for one-time schedules. Specify the time, in UTC.
  2725. //
  2726. // For rate expressions, value is a positive integer and unit is minute | minutes
  2727. // | hour | hours | day | days.
  2728. //
  2729. // For more information about cron expressions, see Cron Expressions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions)
  2730. // in the Amazon CloudWatch Events User Guide.
  2731. Schedule *string `min:"1" type:"string"`
  2732. // The name of the scheduled action.
  2733. //
  2734. // ScheduledActionName is a required field
  2735. ScheduledActionName *string `min:"1" type:"string" required:"true"`
  2736. // The namespace of the AWS service that provides the resource or custom-resource
  2737. // for a resource provided by your own application or service. For more information,
  2738. // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
  2739. // in the Amazon Web Services General Reference.
  2740. //
  2741. // ServiceNamespace is a required field
  2742. ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
  2743. // The date and time for the scheduled action to start.
  2744. StartTime *time.Time `type:"timestamp"`
  2745. }
  2746. // String returns the string representation
  2747. func (s PutScheduledActionInput) String() string {
  2748. return awsutil.Prettify(s)
  2749. }
  2750. // GoString returns the string representation
  2751. func (s PutScheduledActionInput) GoString() string {
  2752. return s.String()
  2753. }
  2754. // Validate inspects the fields of the type to determine if they are valid.
  2755. func (s *PutScheduledActionInput) Validate() error {
  2756. invalidParams := request.ErrInvalidParams{Context: "PutScheduledActionInput"}
  2757. if s.ResourceId == nil {
  2758. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  2759. }
  2760. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  2761. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  2762. }
  2763. if s.Schedule != nil && len(*s.Schedule) < 1 {
  2764. invalidParams.Add(request.NewErrParamMinLen("Schedule", 1))
  2765. }
  2766. if s.ScheduledActionName == nil {
  2767. invalidParams.Add(request.NewErrParamRequired("ScheduledActionName"))
  2768. }
  2769. if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 {
  2770. invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1))
  2771. }
  2772. if s.ServiceNamespace == nil {
  2773. invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
  2774. }
  2775. if invalidParams.Len() > 0 {
  2776. return invalidParams
  2777. }
  2778. return nil
  2779. }
  2780. // SetEndTime sets the EndTime field's value.
  2781. func (s *PutScheduledActionInput) SetEndTime(v time.Time) *PutScheduledActionInput {
  2782. s.EndTime = &v
  2783. return s
  2784. }
  2785. // SetResourceId sets the ResourceId field's value.
  2786. func (s *PutScheduledActionInput) SetResourceId(v string) *PutScheduledActionInput {
  2787. s.ResourceId = &v
  2788. return s
  2789. }
  2790. // SetScalableDimension sets the ScalableDimension field's value.
  2791. func (s *PutScheduledActionInput) SetScalableDimension(v string) *PutScheduledActionInput {
  2792. s.ScalableDimension = &v
  2793. return s
  2794. }
  2795. // SetScalableTargetAction sets the ScalableTargetAction field's value.
  2796. func (s *PutScheduledActionInput) SetScalableTargetAction(v *ScalableTargetAction) *PutScheduledActionInput {
  2797. s.ScalableTargetAction = v
  2798. return s
  2799. }
  2800. // SetSchedule sets the Schedule field's value.
  2801. func (s *PutScheduledActionInput) SetSchedule(v string) *PutScheduledActionInput {
  2802. s.Schedule = &v
  2803. return s
  2804. }
  2805. // SetScheduledActionName sets the ScheduledActionName field's value.
  2806. func (s *PutScheduledActionInput) SetScheduledActionName(v string) *PutScheduledActionInput {
  2807. s.ScheduledActionName = &v
  2808. return s
  2809. }
  2810. // SetServiceNamespace sets the ServiceNamespace field's value.
  2811. func (s *PutScheduledActionInput) SetServiceNamespace(v string) *PutScheduledActionInput {
  2812. s.ServiceNamespace = &v
  2813. return s
  2814. }
  2815. // SetStartTime sets the StartTime field's value.
  2816. func (s *PutScheduledActionInput) SetStartTime(v time.Time) *PutScheduledActionInput {
  2817. s.StartTime = &v
  2818. return s
  2819. }
  2820. type PutScheduledActionOutput struct {
  2821. _ struct{} `type:"structure"`
  2822. }
  2823. // String returns the string representation
  2824. func (s PutScheduledActionOutput) String() string {
  2825. return awsutil.Prettify(s)
  2826. }
  2827. // GoString returns the string representation
  2828. func (s PutScheduledActionOutput) GoString() string {
  2829. return s.String()
  2830. }
  2831. type RegisterScalableTargetInput struct {
  2832. _ struct{} `type:"structure"`
  2833. // The maximum value to scale to in response to a scale out event. This parameter
  2834. // is required if you are registering a scalable target.
  2835. MaxCapacity *int64 `type:"integer"`
  2836. // The minimum value to scale to in response to a scale in event. This parameter
  2837. // is required if you are registering a scalable target.
  2838. MinCapacity *int64 `type:"integer"`
  2839. // The identifier of the resource associated with the scalable target. This
  2840. // string consists of the resource type and unique identifier.
  2841. //
  2842. // * ECS service - The resource type is service and the unique identifier
  2843. // is the cluster name and service name. Example: service/default/sample-webapp.
  2844. //
  2845. // * Spot fleet request - The resource type is spot-fleet-request and the
  2846. // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
  2847. //
  2848. // * EMR cluster - The resource type is instancegroup and the unique identifier
  2849. // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
  2850. //
  2851. // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
  2852. // is the fleet name. Example: fleet/sample-fleet.
  2853. //
  2854. // * DynamoDB table - The resource type is table and the unique identifier
  2855. // is the resource ID. Example: table/my-table.
  2856. //
  2857. // * DynamoDB global secondary index - The resource type is index and the
  2858. // unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
  2859. //
  2860. // * Aurora DB cluster - The resource type is cluster and the unique identifier
  2861. // is the cluster name. Example: cluster:my-db-cluster.
  2862. //
  2863. // * Amazon SageMaker endpoint variants - The resource type is variant and
  2864. // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
  2865. //
  2866. // * Custom resources are not supported with a resource type. This parameter
  2867. // must specify the OutputValue from the CloudFormation template stack used
  2868. // to access the resources. The unique identifier is defined by the service
  2869. // provider.
  2870. //
  2871. // ResourceId is a required field
  2872. ResourceId *string `min:"1" type:"string" required:"true"`
  2873. // Application Auto Scaling creates a service-linked role that grants it permissions
  2874. // to modify the scalable target on your behalf. For more information, see Service-Linked
  2875. // Roles for Application Auto Scaling (http://docs.aws.amazon.com/autoscaling/application/userguide/application-autoscaling-service-linked-roles.html).
  2876. //
  2877. // For resources that are not supported using a service-linked role, this parameter
  2878. // is required and must specify the ARN of an IAM role that allows Application
  2879. // Auto Scaling to modify the scalable target on your behalf.
  2880. RoleARN *string `min:"1" type:"string"`
  2881. // The scalable dimension associated with the scalable target. This string consists
  2882. // of the service namespace, resource type, and scaling property.
  2883. //
  2884. // * ecs:service:DesiredCount - The desired task count of an ECS service.
  2885. //
  2886. // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
  2887. // fleet request.
  2888. //
  2889. // * elasticmapreduce:instancegroup:InstanceCount - The instance count of
  2890. // an EMR Instance Group.
  2891. //
  2892. // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
  2893. // 2.0 fleet.
  2894. //
  2895. // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
  2896. // a DynamoDB table.
  2897. //
  2898. // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
  2899. // a DynamoDB table.
  2900. //
  2901. // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
  2902. // a DynamoDB global secondary index.
  2903. //
  2904. // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
  2905. // a DynamoDB global secondary index.
  2906. //
  2907. // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
  2908. // DB cluster. Available for Aurora MySQL-compatible edition.
  2909. //
  2910. // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
  2911. // for an Amazon SageMaker model endpoint variant.
  2912. //
  2913. // * custom-resource:ResourceType:Property - The scalable dimension for a
  2914. // custom resource provided by your own application or service.
  2915. //
  2916. // ScalableDimension is a required field
  2917. ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"`
  2918. // The namespace of the AWS service that provides the resource or custom-resource
  2919. // for a resource provided by your own application or service. For more information,
  2920. // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
  2921. // in the Amazon Web Services General Reference.
  2922. //
  2923. // ServiceNamespace is a required field
  2924. ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
  2925. }
  2926. // String returns the string representation
  2927. func (s RegisterScalableTargetInput) String() string {
  2928. return awsutil.Prettify(s)
  2929. }
  2930. // GoString returns the string representation
  2931. func (s RegisterScalableTargetInput) GoString() string {
  2932. return s.String()
  2933. }
  2934. // Validate inspects the fields of the type to determine if they are valid.
  2935. func (s *RegisterScalableTargetInput) Validate() error {
  2936. invalidParams := request.ErrInvalidParams{Context: "RegisterScalableTargetInput"}
  2937. if s.ResourceId == nil {
  2938. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  2939. }
  2940. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  2941. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  2942. }
  2943. if s.RoleARN != nil && len(*s.RoleARN) < 1 {
  2944. invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1))
  2945. }
  2946. if s.ScalableDimension == nil {
  2947. invalidParams.Add(request.NewErrParamRequired("ScalableDimension"))
  2948. }
  2949. if s.ServiceNamespace == nil {
  2950. invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
  2951. }
  2952. if invalidParams.Len() > 0 {
  2953. return invalidParams
  2954. }
  2955. return nil
  2956. }
  2957. // SetMaxCapacity sets the MaxCapacity field's value.
  2958. func (s *RegisterScalableTargetInput) SetMaxCapacity(v int64) *RegisterScalableTargetInput {
  2959. s.MaxCapacity = &v
  2960. return s
  2961. }
  2962. // SetMinCapacity sets the MinCapacity field's value.
  2963. func (s *RegisterScalableTargetInput) SetMinCapacity(v int64) *RegisterScalableTargetInput {
  2964. s.MinCapacity = &v
  2965. return s
  2966. }
  2967. // SetResourceId sets the ResourceId field's value.
  2968. func (s *RegisterScalableTargetInput) SetResourceId(v string) *RegisterScalableTargetInput {
  2969. s.ResourceId = &v
  2970. return s
  2971. }
  2972. // SetRoleARN sets the RoleARN field's value.
  2973. func (s *RegisterScalableTargetInput) SetRoleARN(v string) *RegisterScalableTargetInput {
  2974. s.RoleARN = &v
  2975. return s
  2976. }
  2977. // SetScalableDimension sets the ScalableDimension field's value.
  2978. func (s *RegisterScalableTargetInput) SetScalableDimension(v string) *RegisterScalableTargetInput {
  2979. s.ScalableDimension = &v
  2980. return s
  2981. }
  2982. // SetServiceNamespace sets the ServiceNamespace field's value.
  2983. func (s *RegisterScalableTargetInput) SetServiceNamespace(v string) *RegisterScalableTargetInput {
  2984. s.ServiceNamespace = &v
  2985. return s
  2986. }
  2987. type RegisterScalableTargetOutput struct {
  2988. _ struct{} `type:"structure"`
  2989. }
  2990. // String returns the string representation
  2991. func (s RegisterScalableTargetOutput) String() string {
  2992. return awsutil.Prettify(s)
  2993. }
  2994. // GoString returns the string representation
  2995. func (s RegisterScalableTargetOutput) GoString() string {
  2996. return s.String()
  2997. }
  2998. // Represents a scalable target.
  2999. type ScalableTarget struct {
  3000. _ struct{} `type:"structure"`
  3001. // The Unix timestamp for when the scalable target was created.
  3002. //
  3003. // CreationTime is a required field
  3004. CreationTime *time.Time `type:"timestamp" required:"true"`
  3005. // The maximum value to scale to in response to a scale out event.
  3006. //
  3007. // MaxCapacity is a required field
  3008. MaxCapacity *int64 `type:"integer" required:"true"`
  3009. // The minimum value to scale to in response to a scale in event.
  3010. //
  3011. // MinCapacity is a required field
  3012. MinCapacity *int64 `type:"integer" required:"true"`
  3013. // The identifier of the resource associated with the scalable target. This
  3014. // string consists of the resource type and unique identifier.
  3015. //
  3016. // * ECS service - The resource type is service and the unique identifier
  3017. // is the cluster name and service name. Example: service/default/sample-webapp.
  3018. //
  3019. // * Spot fleet request - The resource type is spot-fleet-request and the
  3020. // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
  3021. //
  3022. // * EMR cluster - The resource type is instancegroup and the unique identifier
  3023. // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
  3024. //
  3025. // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
  3026. // is the fleet name. Example: fleet/sample-fleet.
  3027. //
  3028. // * DynamoDB table - The resource type is table and the unique identifier
  3029. // is the resource ID. Example: table/my-table.
  3030. //
  3031. // * DynamoDB global secondary index - The resource type is index and the
  3032. // unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
  3033. //
  3034. // * Aurora DB cluster - The resource type is cluster and the unique identifier
  3035. // is the cluster name. Example: cluster:my-db-cluster.
  3036. //
  3037. // * Amazon SageMaker endpoint variants - The resource type is variant and
  3038. // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
  3039. //
  3040. // * Custom resources are not supported with a resource type. This parameter
  3041. // must specify the OutputValue from the CloudFormation template stack used
  3042. // to access the resources. The unique identifier is defined by the service
  3043. // provider.
  3044. //
  3045. // ResourceId is a required field
  3046. ResourceId *string `min:"1" type:"string" required:"true"`
  3047. // The ARN of an IAM role that allows Application Auto Scaling to modify the
  3048. // scalable target on your behalf.
  3049. //
  3050. // RoleARN is a required field
  3051. RoleARN *string `min:"1" type:"string" required:"true"`
  3052. // The scalable dimension associated with the scalable target. This string consists
  3053. // of the service namespace, resource type, and scaling property.
  3054. //
  3055. // * ecs:service:DesiredCount - The desired task count of an ECS service.
  3056. //
  3057. // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
  3058. // fleet request.
  3059. //
  3060. // * elasticmapreduce:instancegroup:InstanceCount - The instance count of
  3061. // an EMR Instance Group.
  3062. //
  3063. // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
  3064. // 2.0 fleet.
  3065. //
  3066. // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
  3067. // a DynamoDB table.
  3068. //
  3069. // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
  3070. // a DynamoDB table.
  3071. //
  3072. // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
  3073. // a DynamoDB global secondary index.
  3074. //
  3075. // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
  3076. // a DynamoDB global secondary index.
  3077. //
  3078. // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
  3079. // DB cluster. Available for Aurora MySQL-compatible edition.
  3080. //
  3081. // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
  3082. // for an Amazon SageMaker model endpoint variant.
  3083. //
  3084. // * custom-resource:ResourceType:Property - The scalable dimension for a
  3085. // custom resource provided by your own application or service.
  3086. //
  3087. // ScalableDimension is a required field
  3088. ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"`
  3089. // The namespace of the AWS service that provides the resource or custom-resource
  3090. // for a resource provided by your own application or service. For more information,
  3091. // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
  3092. // in the Amazon Web Services General Reference.
  3093. //
  3094. // ServiceNamespace is a required field
  3095. ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
  3096. }
  3097. // String returns the string representation
  3098. func (s ScalableTarget) String() string {
  3099. return awsutil.Prettify(s)
  3100. }
  3101. // GoString returns the string representation
  3102. func (s ScalableTarget) GoString() string {
  3103. return s.String()
  3104. }
  3105. // SetCreationTime sets the CreationTime field's value.
  3106. func (s *ScalableTarget) SetCreationTime(v time.Time) *ScalableTarget {
  3107. s.CreationTime = &v
  3108. return s
  3109. }
  3110. // SetMaxCapacity sets the MaxCapacity field's value.
  3111. func (s *ScalableTarget) SetMaxCapacity(v int64) *ScalableTarget {
  3112. s.MaxCapacity = &v
  3113. return s
  3114. }
  3115. // SetMinCapacity sets the MinCapacity field's value.
  3116. func (s *ScalableTarget) SetMinCapacity(v int64) *ScalableTarget {
  3117. s.MinCapacity = &v
  3118. return s
  3119. }
  3120. // SetResourceId sets the ResourceId field's value.
  3121. func (s *ScalableTarget) SetResourceId(v string) *ScalableTarget {
  3122. s.ResourceId = &v
  3123. return s
  3124. }
  3125. // SetRoleARN sets the RoleARN field's value.
  3126. func (s *ScalableTarget) SetRoleARN(v string) *ScalableTarget {
  3127. s.RoleARN = &v
  3128. return s
  3129. }
  3130. // SetScalableDimension sets the ScalableDimension field's value.
  3131. func (s *ScalableTarget) SetScalableDimension(v string) *ScalableTarget {
  3132. s.ScalableDimension = &v
  3133. return s
  3134. }
  3135. // SetServiceNamespace sets the ServiceNamespace field's value.
  3136. func (s *ScalableTarget) SetServiceNamespace(v string) *ScalableTarget {
  3137. s.ServiceNamespace = &v
  3138. return s
  3139. }
  3140. // Represents the minimum and maximum capacity for a scheduled action.
  3141. type ScalableTargetAction struct {
  3142. _ struct{} `type:"structure"`
  3143. // The maximum capacity.
  3144. MaxCapacity *int64 `type:"integer"`
  3145. // The minimum capacity.
  3146. MinCapacity *int64 `type:"integer"`
  3147. }
  3148. // String returns the string representation
  3149. func (s ScalableTargetAction) String() string {
  3150. return awsutil.Prettify(s)
  3151. }
  3152. // GoString returns the string representation
  3153. func (s ScalableTargetAction) GoString() string {
  3154. return s.String()
  3155. }
  3156. // SetMaxCapacity sets the MaxCapacity field's value.
  3157. func (s *ScalableTargetAction) SetMaxCapacity(v int64) *ScalableTargetAction {
  3158. s.MaxCapacity = &v
  3159. return s
  3160. }
  3161. // SetMinCapacity sets the MinCapacity field's value.
  3162. func (s *ScalableTargetAction) SetMinCapacity(v int64) *ScalableTargetAction {
  3163. s.MinCapacity = &v
  3164. return s
  3165. }
  3166. // Represents a scaling activity.
  3167. type ScalingActivity struct {
  3168. _ struct{} `type:"structure"`
  3169. // The unique identifier of the scaling activity.
  3170. //
  3171. // ActivityId is a required field
  3172. ActivityId *string `type:"string" required:"true"`
  3173. // A simple description of what caused the scaling activity to happen.
  3174. //
  3175. // Cause is a required field
  3176. Cause *string `type:"string" required:"true"`
  3177. // A simple description of what action the scaling activity intends to accomplish.
  3178. //
  3179. // Description is a required field
  3180. Description *string `type:"string" required:"true"`
  3181. // The details about the scaling activity.
  3182. Details *string `type:"string"`
  3183. // The Unix timestamp for when the scaling activity ended.
  3184. EndTime *time.Time `type:"timestamp"`
  3185. // The identifier of the resource associated with the scaling activity. This
  3186. // string consists of the resource type and unique identifier.
  3187. //
  3188. // * ECS service - The resource type is service and the unique identifier
  3189. // is the cluster name and service name. Example: service/default/sample-webapp.
  3190. //
  3191. // * Spot fleet request - The resource type is spot-fleet-request and the
  3192. // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
  3193. //
  3194. // * EMR cluster - The resource type is instancegroup and the unique identifier
  3195. // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
  3196. //
  3197. // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
  3198. // is the fleet name. Example: fleet/sample-fleet.
  3199. //
  3200. // * DynamoDB table - The resource type is table and the unique identifier
  3201. // is the resource ID. Example: table/my-table.
  3202. //
  3203. // * DynamoDB global secondary index - The resource type is index and the
  3204. // unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
  3205. //
  3206. // * Aurora DB cluster - The resource type is cluster and the unique identifier
  3207. // is the cluster name. Example: cluster:my-db-cluster.
  3208. //
  3209. // * Amazon SageMaker endpoint variants - The resource type is variant and
  3210. // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
  3211. //
  3212. // * Custom resources are not supported with a resource type. This parameter
  3213. // must specify the OutputValue from the CloudFormation template stack used
  3214. // to access the resources. The unique identifier is defined by the service
  3215. // provider.
  3216. //
  3217. // ResourceId is a required field
  3218. ResourceId *string `min:"1" type:"string" required:"true"`
  3219. // The scalable dimension. This string consists of the service namespace, resource
  3220. // type, and scaling property.
  3221. //
  3222. // * ecs:service:DesiredCount - The desired task count of an ECS service.
  3223. //
  3224. // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
  3225. // fleet request.
  3226. //
  3227. // * elasticmapreduce:instancegroup:InstanceCount - The instance count of
  3228. // an EMR Instance Group.
  3229. //
  3230. // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
  3231. // 2.0 fleet.
  3232. //
  3233. // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
  3234. // a DynamoDB table.
  3235. //
  3236. // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
  3237. // a DynamoDB table.
  3238. //
  3239. // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
  3240. // a DynamoDB global secondary index.
  3241. //
  3242. // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
  3243. // a DynamoDB global secondary index.
  3244. //
  3245. // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
  3246. // DB cluster. Available for Aurora MySQL-compatible edition.
  3247. //
  3248. // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
  3249. // for an Amazon SageMaker model endpoint variant.
  3250. //
  3251. // * custom-resource:ResourceType:Property - The scalable dimension for a
  3252. // custom resource provided by your own application or service.
  3253. //
  3254. // ScalableDimension is a required field
  3255. ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"`
  3256. // The namespace of the AWS service that provides the resource or custom-resource
  3257. // for a resource provided by your own application or service. For more information,
  3258. // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
  3259. // in the Amazon Web Services General Reference.
  3260. //
  3261. // ServiceNamespace is a required field
  3262. ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
  3263. // The Unix timestamp for when the scaling activity began.
  3264. //
  3265. // StartTime is a required field
  3266. StartTime *time.Time `type:"timestamp" required:"true"`
  3267. // Indicates the status of the scaling activity.
  3268. //
  3269. // StatusCode is a required field
  3270. StatusCode *string `type:"string" required:"true" enum:"ScalingActivityStatusCode"`
  3271. // A simple message about the current status of the scaling activity.
  3272. StatusMessage *string `type:"string"`
  3273. }
  3274. // String returns the string representation
  3275. func (s ScalingActivity) String() string {
  3276. return awsutil.Prettify(s)
  3277. }
  3278. // GoString returns the string representation
  3279. func (s ScalingActivity) GoString() string {
  3280. return s.String()
  3281. }
  3282. // SetActivityId sets the ActivityId field's value.
  3283. func (s *ScalingActivity) SetActivityId(v string) *ScalingActivity {
  3284. s.ActivityId = &v
  3285. return s
  3286. }
  3287. // SetCause sets the Cause field's value.
  3288. func (s *ScalingActivity) SetCause(v string) *ScalingActivity {
  3289. s.Cause = &v
  3290. return s
  3291. }
  3292. // SetDescription sets the Description field's value.
  3293. func (s *ScalingActivity) SetDescription(v string) *ScalingActivity {
  3294. s.Description = &v
  3295. return s
  3296. }
  3297. // SetDetails sets the Details field's value.
  3298. func (s *ScalingActivity) SetDetails(v string) *ScalingActivity {
  3299. s.Details = &v
  3300. return s
  3301. }
  3302. // SetEndTime sets the EndTime field's value.
  3303. func (s *ScalingActivity) SetEndTime(v time.Time) *ScalingActivity {
  3304. s.EndTime = &v
  3305. return s
  3306. }
  3307. // SetResourceId sets the ResourceId field's value.
  3308. func (s *ScalingActivity) SetResourceId(v string) *ScalingActivity {
  3309. s.ResourceId = &v
  3310. return s
  3311. }
  3312. // SetScalableDimension sets the ScalableDimension field's value.
  3313. func (s *ScalingActivity) SetScalableDimension(v string) *ScalingActivity {
  3314. s.ScalableDimension = &v
  3315. return s
  3316. }
  3317. // SetServiceNamespace sets the ServiceNamespace field's value.
  3318. func (s *ScalingActivity) SetServiceNamespace(v string) *ScalingActivity {
  3319. s.ServiceNamespace = &v
  3320. return s
  3321. }
  3322. // SetStartTime sets the StartTime field's value.
  3323. func (s *ScalingActivity) SetStartTime(v time.Time) *ScalingActivity {
  3324. s.StartTime = &v
  3325. return s
  3326. }
  3327. // SetStatusCode sets the StatusCode field's value.
  3328. func (s *ScalingActivity) SetStatusCode(v string) *ScalingActivity {
  3329. s.StatusCode = &v
  3330. return s
  3331. }
  3332. // SetStatusMessage sets the StatusMessage field's value.
  3333. func (s *ScalingActivity) SetStatusMessage(v string) *ScalingActivity {
  3334. s.StatusMessage = &v
  3335. return s
  3336. }
  3337. // Represents a scaling policy.
  3338. type ScalingPolicy struct {
  3339. _ struct{} `type:"structure"`
  3340. // The CloudWatch alarms associated with the scaling policy.
  3341. Alarms []*Alarm `type:"list"`
  3342. // The Unix timestamp for when the scaling policy was created.
  3343. //
  3344. // CreationTime is a required field
  3345. CreationTime *time.Time `type:"timestamp" required:"true"`
  3346. // The Amazon Resource Name (ARN) of the scaling policy.
  3347. //
  3348. // PolicyARN is a required field
  3349. PolicyARN *string `min:"1" type:"string" required:"true"`
  3350. // The name of the scaling policy.
  3351. //
  3352. // PolicyName is a required field
  3353. PolicyName *string `min:"1" type:"string" required:"true"`
  3354. // The scaling policy type.
  3355. //
  3356. // PolicyType is a required field
  3357. PolicyType *string `type:"string" required:"true" enum:"PolicyType"`
  3358. // The identifier of the resource associated with the scaling policy. This string
  3359. // consists of the resource type and unique identifier.
  3360. //
  3361. // * ECS service - The resource type is service and the unique identifier
  3362. // is the cluster name and service name. Example: service/default/sample-webapp.
  3363. //
  3364. // * Spot fleet request - The resource type is spot-fleet-request and the
  3365. // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
  3366. //
  3367. // * EMR cluster - The resource type is instancegroup and the unique identifier
  3368. // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
  3369. //
  3370. // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
  3371. // is the fleet name. Example: fleet/sample-fleet.
  3372. //
  3373. // * DynamoDB table - The resource type is table and the unique identifier
  3374. // is the resource ID. Example: table/my-table.
  3375. //
  3376. // * DynamoDB global secondary index - The resource type is index and the
  3377. // unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
  3378. //
  3379. // * Aurora DB cluster - The resource type is cluster and the unique identifier
  3380. // is the cluster name. Example: cluster:my-db-cluster.
  3381. //
  3382. // * Amazon SageMaker endpoint variants - The resource type is variant and
  3383. // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
  3384. //
  3385. // * Custom resources are not supported with a resource type. This parameter
  3386. // must specify the OutputValue from the CloudFormation template stack used
  3387. // to access the resources. The unique identifier is defined by the service
  3388. // provider.
  3389. //
  3390. // ResourceId is a required field
  3391. ResourceId *string `min:"1" type:"string" required:"true"`
  3392. // The scalable dimension. This string consists of the service namespace, resource
  3393. // type, and scaling property.
  3394. //
  3395. // * ecs:service:DesiredCount - The desired task count of an ECS service.
  3396. //
  3397. // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
  3398. // fleet request.
  3399. //
  3400. // * elasticmapreduce:instancegroup:InstanceCount - The instance count of
  3401. // an EMR Instance Group.
  3402. //
  3403. // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
  3404. // 2.0 fleet.
  3405. //
  3406. // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
  3407. // a DynamoDB table.
  3408. //
  3409. // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
  3410. // a DynamoDB table.
  3411. //
  3412. // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
  3413. // a DynamoDB global secondary index.
  3414. //
  3415. // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
  3416. // a DynamoDB global secondary index.
  3417. //
  3418. // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
  3419. // DB cluster. Available for Aurora MySQL-compatible edition.
  3420. //
  3421. // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
  3422. // for an Amazon SageMaker model endpoint variant.
  3423. //
  3424. // * custom-resource:ResourceType:Property - The scalable dimension for a
  3425. // custom resource provided by your own application or service.
  3426. //
  3427. // ScalableDimension is a required field
  3428. ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"`
  3429. // The namespace of the AWS service that provides the resource or custom-resource
  3430. // for a resource provided by your own application or service. For more information,
  3431. // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
  3432. // in the Amazon Web Services General Reference.
  3433. //
  3434. // ServiceNamespace is a required field
  3435. ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
  3436. // A step scaling policy.
  3437. StepScalingPolicyConfiguration *StepScalingPolicyConfiguration `type:"structure"`
  3438. // A target tracking policy.
  3439. TargetTrackingScalingPolicyConfiguration *TargetTrackingScalingPolicyConfiguration `type:"structure"`
  3440. }
  3441. // String returns the string representation
  3442. func (s ScalingPolicy) String() string {
  3443. return awsutil.Prettify(s)
  3444. }
  3445. // GoString returns the string representation
  3446. func (s ScalingPolicy) GoString() string {
  3447. return s.String()
  3448. }
  3449. // SetAlarms sets the Alarms field's value.
  3450. func (s *ScalingPolicy) SetAlarms(v []*Alarm) *ScalingPolicy {
  3451. s.Alarms = v
  3452. return s
  3453. }
  3454. // SetCreationTime sets the CreationTime field's value.
  3455. func (s *ScalingPolicy) SetCreationTime(v time.Time) *ScalingPolicy {
  3456. s.CreationTime = &v
  3457. return s
  3458. }
  3459. // SetPolicyARN sets the PolicyARN field's value.
  3460. func (s *ScalingPolicy) SetPolicyARN(v string) *ScalingPolicy {
  3461. s.PolicyARN = &v
  3462. return s
  3463. }
  3464. // SetPolicyName sets the PolicyName field's value.
  3465. func (s *ScalingPolicy) SetPolicyName(v string) *ScalingPolicy {
  3466. s.PolicyName = &v
  3467. return s
  3468. }
  3469. // SetPolicyType sets the PolicyType field's value.
  3470. func (s *ScalingPolicy) SetPolicyType(v string) *ScalingPolicy {
  3471. s.PolicyType = &v
  3472. return s
  3473. }
  3474. // SetResourceId sets the ResourceId field's value.
  3475. func (s *ScalingPolicy) SetResourceId(v string) *ScalingPolicy {
  3476. s.ResourceId = &v
  3477. return s
  3478. }
  3479. // SetScalableDimension sets the ScalableDimension field's value.
  3480. func (s *ScalingPolicy) SetScalableDimension(v string) *ScalingPolicy {
  3481. s.ScalableDimension = &v
  3482. return s
  3483. }
  3484. // SetServiceNamespace sets the ServiceNamespace field's value.
  3485. func (s *ScalingPolicy) SetServiceNamespace(v string) *ScalingPolicy {
  3486. s.ServiceNamespace = &v
  3487. return s
  3488. }
  3489. // SetStepScalingPolicyConfiguration sets the StepScalingPolicyConfiguration field's value.
  3490. func (s *ScalingPolicy) SetStepScalingPolicyConfiguration(v *StepScalingPolicyConfiguration) *ScalingPolicy {
  3491. s.StepScalingPolicyConfiguration = v
  3492. return s
  3493. }
  3494. // SetTargetTrackingScalingPolicyConfiguration sets the TargetTrackingScalingPolicyConfiguration field's value.
  3495. func (s *ScalingPolicy) SetTargetTrackingScalingPolicyConfiguration(v *TargetTrackingScalingPolicyConfiguration) *ScalingPolicy {
  3496. s.TargetTrackingScalingPolicyConfiguration = v
  3497. return s
  3498. }
  3499. // Represents a scheduled action.
  3500. type ScheduledAction struct {
  3501. _ struct{} `type:"structure"`
  3502. // The date and time that the scheduled action was created.
  3503. //
  3504. // CreationTime is a required field
  3505. CreationTime *time.Time `type:"timestamp" required:"true"`
  3506. // The date and time that the action is scheduled to end.
  3507. EndTime *time.Time `type:"timestamp"`
  3508. // The identifier of the resource associated with the scaling policy. This string
  3509. // consists of the resource type and unique identifier.
  3510. //
  3511. // * ECS service - The resource type is service and the unique identifier
  3512. // is the cluster name and service name. Example: service/default/sample-webapp.
  3513. //
  3514. // * Spot fleet request - The resource type is spot-fleet-request and the
  3515. // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
  3516. //
  3517. // * EMR cluster - The resource type is instancegroup and the unique identifier
  3518. // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
  3519. //
  3520. // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
  3521. // is the fleet name. Example: fleet/sample-fleet.
  3522. //
  3523. // * DynamoDB table - The resource type is table and the unique identifier
  3524. // is the resource ID. Example: table/my-table.
  3525. //
  3526. // * DynamoDB global secondary index - The resource type is index and the
  3527. // unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
  3528. //
  3529. // * Aurora DB cluster - The resource type is cluster and the unique identifier
  3530. // is the cluster name. Example: cluster:my-db-cluster.
  3531. //
  3532. // * Amazon SageMaker endpoint variants - The resource type is variant and
  3533. // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
  3534. //
  3535. // * Custom resources are not supported with a resource type. This parameter
  3536. // must specify the OutputValue from the CloudFormation template stack used
  3537. // to access the resources. The unique identifier is defined by the service
  3538. // provider.
  3539. //
  3540. // ResourceId is a required field
  3541. ResourceId *string `min:"1" type:"string" required:"true"`
  3542. // The scalable dimension. This string consists of the service namespace, resource
  3543. // type, and scaling property.
  3544. //
  3545. // * ecs:service:DesiredCount - The desired task count of an ECS service.
  3546. //
  3547. // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
  3548. // fleet request.
  3549. //
  3550. // * elasticmapreduce:instancegroup:InstanceCount - The instance count of
  3551. // an EMR Instance Group.
  3552. //
  3553. // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
  3554. // 2.0 fleet.
  3555. //
  3556. // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
  3557. // a DynamoDB table.
  3558. //
  3559. // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
  3560. // a DynamoDB table.
  3561. //
  3562. // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
  3563. // a DynamoDB global secondary index.
  3564. //
  3565. // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
  3566. // a DynamoDB global secondary index.
  3567. //
  3568. // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
  3569. // DB cluster. Available for Aurora MySQL-compatible edition.
  3570. //
  3571. // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
  3572. // for an Amazon SageMaker model endpoint variant.
  3573. //
  3574. // * custom-resource:ResourceType:Property - The scalable dimension for a
  3575. // custom resource provided by your own application or service.
  3576. ScalableDimension *string `type:"string" enum:"ScalableDimension"`
  3577. // The new minimum and maximum capacity. You can set both values or just one.
  3578. // During the scheduled time, if the current capacity is below the minimum capacity,
  3579. // Application Auto Scaling scales out to the minimum capacity. If the current
  3580. // capacity is above the maximum capacity, Application Auto Scaling scales in
  3581. // to the maximum capacity.
  3582. ScalableTargetAction *ScalableTargetAction `type:"structure"`
  3583. // The schedule for this action. The following formats are supported:
  3584. //
  3585. // * At expressions - at(yyyy-mm-ddThh:mm:ss)
  3586. //
  3587. // * Rate expressions - rate(valueunit)
  3588. //
  3589. // * Cron expressions - cron(fields)
  3590. //
  3591. // At expressions are useful for one-time schedules. Specify the time, in UTC.
  3592. //
  3593. // For rate expressions, value is a positive integer and unit is minute | minutes
  3594. // | hour | hours | day | days.
  3595. //
  3596. // For more information about cron expressions, see Cron Expressions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions)
  3597. // in the Amazon CloudWatch Events User Guide.
  3598. //
  3599. // Schedule is a required field
  3600. Schedule *string `min:"1" type:"string" required:"true"`
  3601. // The Amazon Resource Name (ARN) of the scheduled action.
  3602. //
  3603. // ScheduledActionARN is a required field
  3604. ScheduledActionARN *string `min:"1" type:"string" required:"true"`
  3605. // The name of the scheduled action.
  3606. //
  3607. // ScheduledActionName is a required field
  3608. ScheduledActionName *string `min:"1" type:"string" required:"true"`
  3609. // The namespace of the AWS service that provides the resource or custom-resource
  3610. // for a resource provided by your own application or service. For more information,
  3611. // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
  3612. // in the Amazon Web Services General Reference.
  3613. //
  3614. // ServiceNamespace is a required field
  3615. ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
  3616. // The date and time that the action is scheduled to begin.
  3617. StartTime *time.Time `type:"timestamp"`
  3618. }
  3619. // String returns the string representation
  3620. func (s ScheduledAction) String() string {
  3621. return awsutil.Prettify(s)
  3622. }
  3623. // GoString returns the string representation
  3624. func (s ScheduledAction) GoString() string {
  3625. return s.String()
  3626. }
  3627. // SetCreationTime sets the CreationTime field's value.
  3628. func (s *ScheduledAction) SetCreationTime(v time.Time) *ScheduledAction {
  3629. s.CreationTime = &v
  3630. return s
  3631. }
  3632. // SetEndTime sets the EndTime field's value.
  3633. func (s *ScheduledAction) SetEndTime(v time.Time) *ScheduledAction {
  3634. s.EndTime = &v
  3635. return s
  3636. }
  3637. // SetResourceId sets the ResourceId field's value.
  3638. func (s *ScheduledAction) SetResourceId(v string) *ScheduledAction {
  3639. s.ResourceId = &v
  3640. return s
  3641. }
  3642. // SetScalableDimension sets the ScalableDimension field's value.
  3643. func (s *ScheduledAction) SetScalableDimension(v string) *ScheduledAction {
  3644. s.ScalableDimension = &v
  3645. return s
  3646. }
  3647. // SetScalableTargetAction sets the ScalableTargetAction field's value.
  3648. func (s *ScheduledAction) SetScalableTargetAction(v *ScalableTargetAction) *ScheduledAction {
  3649. s.ScalableTargetAction = v
  3650. return s
  3651. }
  3652. // SetSchedule sets the Schedule field's value.
  3653. func (s *ScheduledAction) SetSchedule(v string) *ScheduledAction {
  3654. s.Schedule = &v
  3655. return s
  3656. }
  3657. // SetScheduledActionARN sets the ScheduledActionARN field's value.
  3658. func (s *ScheduledAction) SetScheduledActionARN(v string) *ScheduledAction {
  3659. s.ScheduledActionARN = &v
  3660. return s
  3661. }
  3662. // SetScheduledActionName sets the ScheduledActionName field's value.
  3663. func (s *ScheduledAction) SetScheduledActionName(v string) *ScheduledAction {
  3664. s.ScheduledActionName = &v
  3665. return s
  3666. }
  3667. // SetServiceNamespace sets the ServiceNamespace field's value.
  3668. func (s *ScheduledAction) SetServiceNamespace(v string) *ScheduledAction {
  3669. s.ServiceNamespace = &v
  3670. return s
  3671. }
  3672. // SetStartTime sets the StartTime field's value.
  3673. func (s *ScheduledAction) SetStartTime(v time.Time) *ScheduledAction {
  3674. s.StartTime = &v
  3675. return s
  3676. }
  3677. // Represents a step adjustment for a StepScalingPolicyConfiguration. Describes
  3678. // an adjustment based on the difference between the value of the aggregated
  3679. // CloudWatch metric and the breach threshold that you've defined for the alarm.
  3680. //
  3681. // For the following examples, suppose that you have an alarm with a breach
  3682. // threshold of 50:
  3683. //
  3684. // * To trigger the adjustment when the metric is greater than or equal to
  3685. // 50 and less than 60, specify a lower bound of 0 and an upper bound of
  3686. // 10.
  3687. //
  3688. // * To trigger the adjustment when the metric is greater than 40 and less
  3689. // than or equal to 50, specify a lower bound of -10 and an upper bound of
  3690. // 0.
  3691. //
  3692. // There are a few rules for the step adjustments for your step policy:
  3693. //
  3694. // * The ranges of your step adjustments can't overlap or have a gap.
  3695. //
  3696. // * At most one step adjustment can have a null lower bound. If one step
  3697. // adjustment has a negative lower bound, then there must be a step adjustment
  3698. // with a null lower bound.
  3699. //
  3700. // * At most one step adjustment can have a null upper bound. If one step
  3701. // adjustment has a positive upper bound, then there must be a step adjustment
  3702. // with a null upper bound.
  3703. //
  3704. // * The upper and lower bound can't be null in the same step adjustment.
  3705. type StepAdjustment struct {
  3706. _ struct{} `type:"structure"`
  3707. // The lower bound for the difference between the alarm threshold and the CloudWatch
  3708. // metric. If the metric value is above the breach threshold, the lower bound
  3709. // is inclusive (the metric must be greater than or equal to the threshold plus
  3710. // the lower bound). Otherwise, it is exclusive (the metric must be greater
  3711. // than the threshold plus the lower bound). A null value indicates negative
  3712. // infinity.
  3713. MetricIntervalLowerBound *float64 `type:"double"`
  3714. // The upper bound for the difference between the alarm threshold and the CloudWatch
  3715. // metric. If the metric value is above the breach threshold, the upper bound
  3716. // is exclusive (the metric must be less than the threshold plus the upper bound).
  3717. // Otherwise, it is inclusive (the metric must be less than or equal to the
  3718. // threshold plus the upper bound). A null value indicates positive infinity.
  3719. //
  3720. // The upper bound must be greater than the lower bound.
  3721. MetricIntervalUpperBound *float64 `type:"double"`
  3722. // The amount by which to scale, based on the specified adjustment type. A positive
  3723. // value adds to the current scalable dimension while a negative number removes
  3724. // from the current scalable dimension.
  3725. //
  3726. // ScalingAdjustment is a required field
  3727. ScalingAdjustment *int64 `type:"integer" required:"true"`
  3728. }
  3729. // String returns the string representation
  3730. func (s StepAdjustment) String() string {
  3731. return awsutil.Prettify(s)
  3732. }
  3733. // GoString returns the string representation
  3734. func (s StepAdjustment) GoString() string {
  3735. return s.String()
  3736. }
  3737. // Validate inspects the fields of the type to determine if they are valid.
  3738. func (s *StepAdjustment) Validate() error {
  3739. invalidParams := request.ErrInvalidParams{Context: "StepAdjustment"}
  3740. if s.ScalingAdjustment == nil {
  3741. invalidParams.Add(request.NewErrParamRequired("ScalingAdjustment"))
  3742. }
  3743. if invalidParams.Len() > 0 {
  3744. return invalidParams
  3745. }
  3746. return nil
  3747. }
  3748. // SetMetricIntervalLowerBound sets the MetricIntervalLowerBound field's value.
  3749. func (s *StepAdjustment) SetMetricIntervalLowerBound(v float64) *StepAdjustment {
  3750. s.MetricIntervalLowerBound = &v
  3751. return s
  3752. }
  3753. // SetMetricIntervalUpperBound sets the MetricIntervalUpperBound field's value.
  3754. func (s *StepAdjustment) SetMetricIntervalUpperBound(v float64) *StepAdjustment {
  3755. s.MetricIntervalUpperBound = &v
  3756. return s
  3757. }
  3758. // SetScalingAdjustment sets the ScalingAdjustment field's value.
  3759. func (s *StepAdjustment) SetScalingAdjustment(v int64) *StepAdjustment {
  3760. s.ScalingAdjustment = &v
  3761. return s
  3762. }
  3763. // Represents a step scaling policy configuration.
  3764. type StepScalingPolicyConfiguration struct {
  3765. _ struct{} `type:"structure"`
  3766. // The adjustment type, which specifies how the ScalingAdjustment parameter
  3767. // in a StepAdjustment is interpreted.
  3768. AdjustmentType *string `type:"string" enum:"AdjustmentType"`
  3769. // The amount of time, in seconds, after a scaling activity completes where
  3770. // previous trigger-related scaling activities can influence future scaling
  3771. // events.
  3772. //
  3773. // For scale out policies, while the cooldown period is in effect, the capacity
  3774. // that has been added by the previous scale out event that initiated the cooldown
  3775. // is calculated as part of the desired capacity for the next scale out. The
  3776. // intention is to continuously (but not excessively) scale out. For example,
  3777. // an alarm triggers a step scaling policy to scale out an Amazon ECS service
  3778. // by 2 tasks, the scaling activity completes successfully, and a cooldown period
  3779. // of 5 minutes starts. During the Cooldown period, if the alarm triggers the
  3780. // same policy again but at a more aggressive step adjustment to scale out the
  3781. // service by 3 tasks, the 2 tasks that were added in the previous scale out
  3782. // event are considered part of that capacity and only 1 additional task is
  3783. // added to the desired count.
  3784. //
  3785. // For scale in policies, the cooldown period is used to block subsequent scale
  3786. // in requests until it has expired. The intention is to scale in conservatively
  3787. // to protect your application's availability. However, if another alarm triggers
  3788. // a scale out policy during the cooldown period after a scale-in, Application
  3789. // Auto Scaling scales out your scalable target immediately.
  3790. Cooldown *int64 `type:"integer"`
  3791. // The aggregation type for the CloudWatch metrics. Valid values are Minimum,
  3792. // Maximum, and Average.
  3793. MetricAggregationType *string `type:"string" enum:"MetricAggregationType"`
  3794. // The minimum number to adjust your scalable dimension as a result of a scaling
  3795. // activity. If the adjustment type is PercentChangeInCapacity, the scaling
  3796. // policy changes the scalable dimension of the scalable target by this amount.
  3797. MinAdjustmentMagnitude *int64 `type:"integer"`
  3798. // A set of adjustments that enable you to scale based on the size of the alarm
  3799. // breach.
  3800. StepAdjustments []*StepAdjustment `type:"list"`
  3801. }
  3802. // String returns the string representation
  3803. func (s StepScalingPolicyConfiguration) String() string {
  3804. return awsutil.Prettify(s)
  3805. }
  3806. // GoString returns the string representation
  3807. func (s StepScalingPolicyConfiguration) GoString() string {
  3808. return s.String()
  3809. }
  3810. // Validate inspects the fields of the type to determine if they are valid.
  3811. func (s *StepScalingPolicyConfiguration) Validate() error {
  3812. invalidParams := request.ErrInvalidParams{Context: "StepScalingPolicyConfiguration"}
  3813. if s.StepAdjustments != nil {
  3814. for i, v := range s.StepAdjustments {
  3815. if v == nil {
  3816. continue
  3817. }
  3818. if err := v.Validate(); err != nil {
  3819. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "StepAdjustments", i), err.(request.ErrInvalidParams))
  3820. }
  3821. }
  3822. }
  3823. if invalidParams.Len() > 0 {
  3824. return invalidParams
  3825. }
  3826. return nil
  3827. }
  3828. // SetAdjustmentType sets the AdjustmentType field's value.
  3829. func (s *StepScalingPolicyConfiguration) SetAdjustmentType(v string) *StepScalingPolicyConfiguration {
  3830. s.AdjustmentType = &v
  3831. return s
  3832. }
  3833. // SetCooldown sets the Cooldown field's value.
  3834. func (s *StepScalingPolicyConfiguration) SetCooldown(v int64) *StepScalingPolicyConfiguration {
  3835. s.Cooldown = &v
  3836. return s
  3837. }
  3838. // SetMetricAggregationType sets the MetricAggregationType field's value.
  3839. func (s *StepScalingPolicyConfiguration) SetMetricAggregationType(v string) *StepScalingPolicyConfiguration {
  3840. s.MetricAggregationType = &v
  3841. return s
  3842. }
  3843. // SetMinAdjustmentMagnitude sets the MinAdjustmentMagnitude field's value.
  3844. func (s *StepScalingPolicyConfiguration) SetMinAdjustmentMagnitude(v int64) *StepScalingPolicyConfiguration {
  3845. s.MinAdjustmentMagnitude = &v
  3846. return s
  3847. }
  3848. // SetStepAdjustments sets the StepAdjustments field's value.
  3849. func (s *StepScalingPolicyConfiguration) SetStepAdjustments(v []*StepAdjustment) *StepScalingPolicyConfiguration {
  3850. s.StepAdjustments = v
  3851. return s
  3852. }
  3853. // Represents a target tracking scaling policy configuration.
  3854. type TargetTrackingScalingPolicyConfiguration struct {
  3855. _ struct{} `type:"structure"`
  3856. // A customized metric.
  3857. CustomizedMetricSpecification *CustomizedMetricSpecification `type:"structure"`
  3858. // Indicates whether scale in by the target tracking policy is disabled. If
  3859. // the value is true, scale in is disabled and the target tracking policy won't
  3860. // remove capacity from the scalable resource. Otherwise, scale in is enabled
  3861. // and the target tracking policy can remove capacity from the scalable resource.
  3862. // The default value is false.
  3863. DisableScaleIn *bool `type:"boolean"`
  3864. // A predefined metric.
  3865. PredefinedMetricSpecification *PredefinedMetricSpecification `type:"structure"`
  3866. // The amount of time, in seconds, after a scale in activity completes before
  3867. // another scale in activity can start.
  3868. //
  3869. // The cooldown period is used to block subsequent scale in requests until it
  3870. // has expired. The intention is to scale in conservatively to protect your
  3871. // application's availability. However, if another alarm triggers a scale out
  3872. // policy during the cooldown period after a scale-in, Application Auto Scaling
  3873. // scales out your scalable target immediately.
  3874. ScaleInCooldown *int64 `type:"integer"`
  3875. // The amount of time, in seconds, after a scale out activity completes before
  3876. // another scale out activity can start.
  3877. //
  3878. // While the cooldown period is in effect, the capacity that has been added
  3879. // by the previous scale out event that initiated the cooldown is calculated
  3880. // as part of the desired capacity for the next scale out. The intention is
  3881. // to continuously (but not excessively) scale out.
  3882. ScaleOutCooldown *int64 `type:"integer"`
  3883. // The target value for the metric. The range is 8.515920e-109 to 1.174271e+108
  3884. // (Base 10) or 2e-360 to 2e360 (Base 2).
  3885. //
  3886. // TargetValue is a required field
  3887. TargetValue *float64 `type:"double" required:"true"`
  3888. }
  3889. // String returns the string representation
  3890. func (s TargetTrackingScalingPolicyConfiguration) String() string {
  3891. return awsutil.Prettify(s)
  3892. }
  3893. // GoString returns the string representation
  3894. func (s TargetTrackingScalingPolicyConfiguration) GoString() string {
  3895. return s.String()
  3896. }
  3897. // Validate inspects the fields of the type to determine if they are valid.
  3898. func (s *TargetTrackingScalingPolicyConfiguration) Validate() error {
  3899. invalidParams := request.ErrInvalidParams{Context: "TargetTrackingScalingPolicyConfiguration"}
  3900. if s.TargetValue == nil {
  3901. invalidParams.Add(request.NewErrParamRequired("TargetValue"))
  3902. }
  3903. if s.CustomizedMetricSpecification != nil {
  3904. if err := s.CustomizedMetricSpecification.Validate(); err != nil {
  3905. invalidParams.AddNested("CustomizedMetricSpecification", err.(request.ErrInvalidParams))
  3906. }
  3907. }
  3908. if s.PredefinedMetricSpecification != nil {
  3909. if err := s.PredefinedMetricSpecification.Validate(); err != nil {
  3910. invalidParams.AddNested("PredefinedMetricSpecification", err.(request.ErrInvalidParams))
  3911. }
  3912. }
  3913. if invalidParams.Len() > 0 {
  3914. return invalidParams
  3915. }
  3916. return nil
  3917. }
  3918. // SetCustomizedMetricSpecification sets the CustomizedMetricSpecification field's value.
  3919. func (s *TargetTrackingScalingPolicyConfiguration) SetCustomizedMetricSpecification(v *CustomizedMetricSpecification) *TargetTrackingScalingPolicyConfiguration {
  3920. s.CustomizedMetricSpecification = v
  3921. return s
  3922. }
  3923. // SetDisableScaleIn sets the DisableScaleIn field's value.
  3924. func (s *TargetTrackingScalingPolicyConfiguration) SetDisableScaleIn(v bool) *TargetTrackingScalingPolicyConfiguration {
  3925. s.DisableScaleIn = &v
  3926. return s
  3927. }
  3928. // SetPredefinedMetricSpecification sets the PredefinedMetricSpecification field's value.
  3929. func (s *TargetTrackingScalingPolicyConfiguration) SetPredefinedMetricSpecification(v *PredefinedMetricSpecification) *TargetTrackingScalingPolicyConfiguration {
  3930. s.PredefinedMetricSpecification = v
  3931. return s
  3932. }
  3933. // SetScaleInCooldown sets the ScaleInCooldown field's value.
  3934. func (s *TargetTrackingScalingPolicyConfiguration) SetScaleInCooldown(v int64) *TargetTrackingScalingPolicyConfiguration {
  3935. s.ScaleInCooldown = &v
  3936. return s
  3937. }
  3938. // SetScaleOutCooldown sets the ScaleOutCooldown field's value.
  3939. func (s *TargetTrackingScalingPolicyConfiguration) SetScaleOutCooldown(v int64) *TargetTrackingScalingPolicyConfiguration {
  3940. s.ScaleOutCooldown = &v
  3941. return s
  3942. }
  3943. // SetTargetValue sets the TargetValue field's value.
  3944. func (s *TargetTrackingScalingPolicyConfiguration) SetTargetValue(v float64) *TargetTrackingScalingPolicyConfiguration {
  3945. s.TargetValue = &v
  3946. return s
  3947. }
  3948. const (
  3949. // AdjustmentTypeChangeInCapacity is a AdjustmentType enum value
  3950. AdjustmentTypeChangeInCapacity = "ChangeInCapacity"
  3951. // AdjustmentTypePercentChangeInCapacity is a AdjustmentType enum value
  3952. AdjustmentTypePercentChangeInCapacity = "PercentChangeInCapacity"
  3953. // AdjustmentTypeExactCapacity is a AdjustmentType enum value
  3954. AdjustmentTypeExactCapacity = "ExactCapacity"
  3955. )
  3956. const (
  3957. // MetricAggregationTypeAverage is a MetricAggregationType enum value
  3958. MetricAggregationTypeAverage = "Average"
  3959. // MetricAggregationTypeMinimum is a MetricAggregationType enum value
  3960. MetricAggregationTypeMinimum = "Minimum"
  3961. // MetricAggregationTypeMaximum is a MetricAggregationType enum value
  3962. MetricAggregationTypeMaximum = "Maximum"
  3963. )
  3964. const (
  3965. // MetricStatisticAverage is a MetricStatistic enum value
  3966. MetricStatisticAverage = "Average"
  3967. // MetricStatisticMinimum is a MetricStatistic enum value
  3968. MetricStatisticMinimum = "Minimum"
  3969. // MetricStatisticMaximum is a MetricStatistic enum value
  3970. MetricStatisticMaximum = "Maximum"
  3971. // MetricStatisticSampleCount is a MetricStatistic enum value
  3972. MetricStatisticSampleCount = "SampleCount"
  3973. // MetricStatisticSum is a MetricStatistic enum value
  3974. MetricStatisticSum = "Sum"
  3975. )
  3976. const (
  3977. // MetricTypeDynamoDbreadCapacityUtilization is a MetricType enum value
  3978. MetricTypeDynamoDbreadCapacityUtilization = "DynamoDBReadCapacityUtilization"
  3979. // MetricTypeDynamoDbwriteCapacityUtilization is a MetricType enum value
  3980. MetricTypeDynamoDbwriteCapacityUtilization = "DynamoDBWriteCapacityUtilization"
  3981. // MetricTypeAlbrequestCountPerTarget is a MetricType enum value
  3982. MetricTypeAlbrequestCountPerTarget = "ALBRequestCountPerTarget"
  3983. // MetricTypeRdsreaderAverageCpuutilization is a MetricType enum value
  3984. MetricTypeRdsreaderAverageCpuutilization = "RDSReaderAverageCPUUtilization"
  3985. // MetricTypeRdsreaderAverageDatabaseConnections is a MetricType enum value
  3986. MetricTypeRdsreaderAverageDatabaseConnections = "RDSReaderAverageDatabaseConnections"
  3987. // MetricTypeEc2spotFleetRequestAverageCpuutilization is a MetricType enum value
  3988. MetricTypeEc2spotFleetRequestAverageCpuutilization = "EC2SpotFleetRequestAverageCPUUtilization"
  3989. // MetricTypeEc2spotFleetRequestAverageNetworkIn is a MetricType enum value
  3990. MetricTypeEc2spotFleetRequestAverageNetworkIn = "EC2SpotFleetRequestAverageNetworkIn"
  3991. // MetricTypeEc2spotFleetRequestAverageNetworkOut is a MetricType enum value
  3992. MetricTypeEc2spotFleetRequestAverageNetworkOut = "EC2SpotFleetRequestAverageNetworkOut"
  3993. // MetricTypeSageMakerVariantInvocationsPerInstance is a MetricType enum value
  3994. MetricTypeSageMakerVariantInvocationsPerInstance = "SageMakerVariantInvocationsPerInstance"
  3995. // MetricTypeEcsserviceAverageCpuutilization is a MetricType enum value
  3996. MetricTypeEcsserviceAverageCpuutilization = "ECSServiceAverageCPUUtilization"
  3997. // MetricTypeEcsserviceAverageMemoryUtilization is a MetricType enum value
  3998. MetricTypeEcsserviceAverageMemoryUtilization = "ECSServiceAverageMemoryUtilization"
  3999. )
  4000. const (
  4001. // PolicyTypeStepScaling is a PolicyType enum value
  4002. PolicyTypeStepScaling = "StepScaling"
  4003. // PolicyTypeTargetTrackingScaling is a PolicyType enum value
  4004. PolicyTypeTargetTrackingScaling = "TargetTrackingScaling"
  4005. )
  4006. const (
  4007. // ScalableDimensionEcsServiceDesiredCount is a ScalableDimension enum value
  4008. ScalableDimensionEcsServiceDesiredCount = "ecs:service:DesiredCount"
  4009. // ScalableDimensionEc2SpotFleetRequestTargetCapacity is a ScalableDimension enum value
  4010. ScalableDimensionEc2SpotFleetRequestTargetCapacity = "ec2:spot-fleet-request:TargetCapacity"
  4011. // ScalableDimensionElasticmapreduceInstancegroupInstanceCount is a ScalableDimension enum value
  4012. ScalableDimensionElasticmapreduceInstancegroupInstanceCount = "elasticmapreduce:instancegroup:InstanceCount"
  4013. // ScalableDimensionAppstreamFleetDesiredCapacity is a ScalableDimension enum value
  4014. ScalableDimensionAppstreamFleetDesiredCapacity = "appstream:fleet:DesiredCapacity"
  4015. // ScalableDimensionDynamodbTableReadCapacityUnits is a ScalableDimension enum value
  4016. ScalableDimensionDynamodbTableReadCapacityUnits = "dynamodb:table:ReadCapacityUnits"
  4017. // ScalableDimensionDynamodbTableWriteCapacityUnits is a ScalableDimension enum value
  4018. ScalableDimensionDynamodbTableWriteCapacityUnits = "dynamodb:table:WriteCapacityUnits"
  4019. // ScalableDimensionDynamodbIndexReadCapacityUnits is a ScalableDimension enum value
  4020. ScalableDimensionDynamodbIndexReadCapacityUnits = "dynamodb:index:ReadCapacityUnits"
  4021. // ScalableDimensionDynamodbIndexWriteCapacityUnits is a ScalableDimension enum value
  4022. ScalableDimensionDynamodbIndexWriteCapacityUnits = "dynamodb:index:WriteCapacityUnits"
  4023. // ScalableDimensionRdsClusterReadReplicaCount is a ScalableDimension enum value
  4024. ScalableDimensionRdsClusterReadReplicaCount = "rds:cluster:ReadReplicaCount"
  4025. // ScalableDimensionSagemakerVariantDesiredInstanceCount is a ScalableDimension enum value
  4026. ScalableDimensionSagemakerVariantDesiredInstanceCount = "sagemaker:variant:DesiredInstanceCount"
  4027. // ScalableDimensionCustomResourceResourceTypeProperty is a ScalableDimension enum value
  4028. ScalableDimensionCustomResourceResourceTypeProperty = "custom-resource:ResourceType:Property"
  4029. )
  4030. const (
  4031. // ScalingActivityStatusCodePending is a ScalingActivityStatusCode enum value
  4032. ScalingActivityStatusCodePending = "Pending"
  4033. // ScalingActivityStatusCodeInProgress is a ScalingActivityStatusCode enum value
  4034. ScalingActivityStatusCodeInProgress = "InProgress"
  4035. // ScalingActivityStatusCodeSuccessful is a ScalingActivityStatusCode enum value
  4036. ScalingActivityStatusCodeSuccessful = "Successful"
  4037. // ScalingActivityStatusCodeOverridden is a ScalingActivityStatusCode enum value
  4038. ScalingActivityStatusCodeOverridden = "Overridden"
  4039. // ScalingActivityStatusCodeUnfulfilled is a ScalingActivityStatusCode enum value
  4040. ScalingActivityStatusCodeUnfulfilled = "Unfulfilled"
  4041. // ScalingActivityStatusCodeFailed is a ScalingActivityStatusCode enum value
  4042. ScalingActivityStatusCodeFailed = "Failed"
  4043. )
  4044. const (
  4045. // ServiceNamespaceEcs is a ServiceNamespace enum value
  4046. ServiceNamespaceEcs = "ecs"
  4047. // ServiceNamespaceElasticmapreduce is a ServiceNamespace enum value
  4048. ServiceNamespaceElasticmapreduce = "elasticmapreduce"
  4049. // ServiceNamespaceEc2 is a ServiceNamespace enum value
  4050. ServiceNamespaceEc2 = "ec2"
  4051. // ServiceNamespaceAppstream is a ServiceNamespace enum value
  4052. ServiceNamespaceAppstream = "appstream"
  4053. // ServiceNamespaceDynamodb is a ServiceNamespace enum value
  4054. ServiceNamespaceDynamodb = "dynamodb"
  4055. // ServiceNamespaceRds is a ServiceNamespace enum value
  4056. ServiceNamespaceRds = "rds"
  4057. // ServiceNamespaceSagemaker is a ServiceNamespace enum value
  4058. ServiceNamespaceSagemaker = "sagemaker"
  4059. // ServiceNamespaceCustomResource is a ServiceNamespace enum value
  4060. ServiceNamespaceCustomResource = "custom-resource"
  4061. )